>>We have these sfx animations from FoT that are explosions and other special effects.
i`ll think about.
>>The other thing is how the engine handles books.
Item scripting is ... well dificult task. Most of the comands didn`t work for it. So when you use item there no call to use_p_proc, engine try to handle it by itself and call use_p_proc only if it can do it itself.
Logic of this in pseudo-code:
//protinst_use_item_ proc
switch(obj_item_subtype(item)){
case [0,1,4,6] : display_msg("That does nothing."); break; //This message is from proto.msg, line 582
case 2 : return -1; break; //and hadle that at parent function, i suppouse
case [3,5] :
<...>
/*try to use item as:
book (engine), if item is cannot be used as book it try to used it as
flare (engine, PID) and so on
misc item (call use_p_proc if any)
radio (equal to misc item)
explosive(engine)
charged object(? item_w_charges)
*/
}
So, you can`t hadle "Use" on anithing except misc and weapons(?).
As for books. Yes, handlig is done by PID numbers. First it check for PID, then load approriate message from proto.msg (802-806) and skill num, then check combat mode and if combat is initialize then show line 902 and exit. Else it checks current value of loaded skill num, check if player has Comprehension perk. Than it it modify skill (if skill < 100), fade in screen, increase game time based by player IN, load message 800, execute map_update, fade out and show loaded messages (800 and 801-806).
I can find all offststs for books pid numbers, numbers of modified skill for each book, loaded message numbers. I think, that the adding new book in engine *is* possible. Pid check for each book look like this:
so we just need about 15 bytes of free memory to jump here and add check for our own added pid. But this is just my speculation, I don`t know asm enough to do such thing.
>>Another similar issue is the "active" items, which are flares, dynamite, plastic explosives, motion detector, stealth boy, and geiger counter.
I`ll check this out.
i`ll think about.
>>The other thing is how the engine handles books.
Item scripting is ... well dificult task. Most of the comands didn`t work for it. So when you use item there no call to use_p_proc, engine try to handle it by itself and call use_p_proc only if it can do it itself.
Logic of this in pseudo-code:
//protinst_use_item_ proc
switch(obj_item_subtype(item)){
case [0,1,4,6] : display_msg("That does nothing."); break; //This message is from proto.msg, line 582
case 2 : return -1; break; //and hadle that at parent function, i suppouse
case [3,5] :
<...>
/*try to use item as:
book (engine), if item is cannot be used as book it try to used it as
flare (engine, PID) and so on
misc item (call use_p_proc if any)
radio (equal to misc item)
explosive(engine)
charged object(? item_w_charges)
*/
}
So, you can`t hadle "Use" on anithing except misc and weapons(?).
As for books. Yes, handlig is done by PID numbers. First it check for PID, then load approriate message from proto.msg (802-806) and skill num, then check combat mode and if combat is initialize then show line 902 and exit. Else it checks current value of loaded skill num, check if player has Comprehension perk. Than it it modify skill (if skill < 100), fade in screen, increase game time based by player IN, load message 800, execute map_update, fade out and show loaded messages (800 and 801-806).
I can find all offststs for books pid numbers, numbers of modified skill for each book, loaded message numbers. I think, that the adding new book in engine *is* possible. Pid check for each book look like this:
Code:
AUTO:004B6BD8 loc_4B6BD8: ; CODE XREF: obj_use_book_+1Aj
AUTO:004B6BD8 ja short loc_4B6BE9
AUTO:004B6BDA mov edi, 802
AUTO:004B6BDF mov ebx, 12
AUTO:004B6BE4 jmp loc_4B6A7D
so we just need about 15 bytes of free memory to jump here and add check for our own added pid. But this is just my speculation, I don`t know asm enough to do such thing.
>>Another similar issue is the "active" items, which are flares, dynamite, plastic explosives, motion detector, stealth boy, and geiger counter.
I`ll check this out.