Fable: The Lost Chapters Mod Scene
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Fable TLC » Mods » Work In Progress » [WIP] - Fable SDK  () 1 Vote
Re: [WIP] - Fable SDK [message #66802 is a reply to message #66801] Fri, 08 June 2012 08:51 Go to previous messageGo to previous message
EternalNoob
Messages: 47
Registered: January 2006
Location: The Pit of Hell
You generally can't do that with debuggers(AFAIK), but, I happen to have a specialized debugger made just for hacking which can. (Attempts at calling it have crashed the game, but, it's not a normal function, it uses __thiscall, ie, it's class based, so, that's likely the cause of the issue.)

I don't believe I've tried calling them from my SDK yet, I can do just about anything from there. (Like, how I made the game update when I change the hero's alignment\morality.)

// Makes visual changes take effect. (After morality changes.)
static void UpdateMorality(int value)
{
	static u32 address = 0x0057C2E6; // The function the game normally calls to update the players visuals

	__asm
	{
		push value // New morality value
		mov ecx, G_CTCHeroStats // this* ptr to CTCHeroStats instance
		call address
	}
}


I'll play around with it, see if I can make it execute a script function. (It's pretty complex, it uses classes to represent variables, and commands, so, I need to figure out what I need to pass it in order to make it work.)

----

Check out this structure I just found.

debug475:12ADC910 aPlayer4Uid18446741874686296485Definiti db 0Dh,0Ah
debug475:12ADC910                                         ; DATA XREF: debug475:off_12A93E48o
debug475:12ADC910                 db 'Player 4;',0Dh,0Ah
debug475:12ADC910                 db 'UID 18446741874686296300;',0Dh,0Ah
debug475:12ADC910                 db 'DefinitionType "BUILDING_GUILD_MAZE_QUARTERS_01";',0Dh,0Ah
debug475:12ADC910                 db 'ScriptName NULL;',0Dh,0Ah
debug475:12ADC910                 db 'ScriptData "NULL";',0Dh,0Ah
debug475:12ADC910                 db 'ThingGamePersistent FALSE;',0Dh,0Ah
debug475:12ADC910                 db 'ThingLevelPersistent FALSE;',0Dh,0Ah
debug475:12ADC910                 db 'StartCTCPhysicsStandard;',0Dh,0Ah
debug475:12ADC910                 db 'PositionX 133.977539;',0Dh,0Ah
debug475:12ADC910                 db 'PositionY 70.008789;',0Dh,0Ah
debug475:12ADC910                 db 'PositionZ 20.0;',0Dh,0Ah
debug475:12ADC910                 db 'RHSetForwardX -0.999994;',0Dh,0Ah
debug475:12ADC910                 db 'RHSetForwardY 0.0;',0Dh,0Ah
debug475:12ADC910                 db 'RHSetForwardZ 0.0;',0Dh,0Ah
debug475:12ADC910                 db 'RHSetUpX 0.0;',0Dh,0Ah
debug475:12ADC910                 db 'RHSetUpY 0.0;',0Dh,0Ah
debug475:12ADC910                 db 'RHSetUpZ 0.999994;',0Dh,0Ah
debug475:12ADC910                 db 'EndCTCPhysicsStandard;',0Dh,0Ah
debug475:12ADC910                 db 'StartCTCEditor;',0Dh,0Ah
debug475:12ADC910                 db 'EndCTCEditor;',0Dh,0Ah
debug475:12ADC910                 db 'StartCTCVillageMember;',0Dh,0Ah
debug475:12ADC910                 db 'VillageUID 18446741874686297130;',0Dh,0Ah
debug475:12ADC910                 db 'EndCTCVillageMember;',0Dh,0Ah
debug475:12ADC910                 db 'StartCTCBuyableHouse;',0Dh,0Ah
debug475:12ADC910                 db 'WifeLivingHere 0;',0Dh,0Ah
debug475:12ADC910                 db 'OwnedByPlayer FALSE;',0Dh,0Ah
debug475:12ADC910                 db 'IsScripted FALSE;',0Dh,0Ah
debug475:12ADC910                 db 'Rented FALSE;',0Dh,0Ah
debug475:12ADC910                 db 'DayNextRentIsDue 2147483647;',0Dh,0Ah
debug475:12ADC910                 db 'CurrentDressLevel 0;',0Dh,0Ah
debug475:12ADC910                 db 'VirtualMoneyBags 0;',0Dh,0Ah
debug475:12ADC910                 db 'IsResidential TRUE;',0Dh,0Ah
debug475:12ADC910                 db 'EndCTCBuyableHouse;',0Dh,0Ah
debug475:12ADC910                 db 'Health 15000.0'


Edit: The function seems to loop through all the properties in the current area(once, when the level loads). (I can see a few modding possibilities here.)


Whether you think you can, or can't, you're right.

[Updated on: Sat, 09 June 2012 10:38]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Armour with dynamic capes
Next Topic: Fable: Fallout
Goto Forum:
  


Current Time: Thu Nov 28 13:16:23 PST 2024

Total time taken to generate the page: 0.26395 seconds