Engine hacks

Discussion in 'Modding and Scripting Support' started by Anonymous, Aug 28, 2008.

Remove all ads!
Support Terra-Arcanum:

GOG.com

PayPal - The safer, easier way to pay online!
  1. Anonymous

    Anonymous Guest

    I'll be posting here my engine hacks, hope you find them interesting. Feel free to contribute, as well.

    Format:
    offset in exe: new value

    Here's what I've found today:
    153F00:7D - PCs will display their race icon (or a monster icon) instead of a portrait.
    153F04:7D - NPCs will always display their race icon (or a monster icon) instead of a portrait.
    153F04:61 - NPCs will always display their portrait even if they're not in your party. (They will display a race/monster icon if they don't have one.)
    15A29E:7D, 15A542:7D - PCs won't display race, gender (and age) if they're monster.
     
  2. Anonymous

    Anonymous Guest

    As I was going through the forums, I've stumbled upon many complaints about effect.mes allowing only 399 effects. This may be especially annoying for modders who wish to have all kinds of funny effects in their mods. Anyway, for everybody who's interested, here's how to fix it.

    The default max range is 400, the following offsets control it:
    000E9A10
    000E9A1C
    000E9A2D
    000E9A3E
    000E9A4F
    000E9A60
    000E9AAC

    Change them all to something else, e.g. 10000 (1027 in hex).

    If this hack gets popular, it may be included in the UAP.
     
  3. rroyo

    rroyo Active Member

    Messages:
    3,319
    Likes Received:
    0
    Joined:
    Oct 13, 2006
    Please do!

    I'd love to have this option available.
     
  4. Anonymous

    Anonymous Guest

    Then please test it extensively. It seems to be working correctly, but I'm not sure why there was a limitation in the first place, perhaps there may be some unforeseen consequences.
     
  5. rroyo

    rroyo Active Member

    Messages:
    3,319
    Likes Received:
    0
    Joined:
    Oct 13, 2006
    Extensive testing? You know it!
    Murphy's Law is in full force with my hack, so everything gets tested up, down, and sideways - - - and I still get problems. (sour expression)

    And thank you for adding this!

    If I were to guess on why the limit was set where it was - Why add more than you need? 400 just happened to be a nice, even number.

    BTW: Have you found the location for global flag numbers? There is currently a maximum of 2199 listings possible and Troika used 1757, which leaves 442. This may sound like a lot - unless you're building a big-assed expansion pack.

    I'm going to be real close to the limit before I'm done and would like to know if this value can be reset as well.
     
  6. Anonymous

    Anonymous Guest

    You can just use global variables instead of global flags to get around the limitation. And BTW, there are some global flags unlisted in globalflags.mes, e.g. Kerghan sets gf2760 in his hearbeat script (#2798) when he's done summoning his slaves (which are always the number of people in PC's party + 1).
     
  7. rroyo

    rroyo Active Member

    Messages:
    3,319
    Likes Received:
    0
    Joined:
    Oct 13, 2006
    ooooppps... Seeing that slot open, I used it for the "Where's Frigo" runaround. Murphy's Law again....

    I've got work to do tonight.

    And thanks for the info on the global variables.
     
  8. Anonymous

    Anonymous Guest

    Here's all global flags that were added in the official patches.
    {2758}{DBT - 1 = Donn Throgg was convinced to riot and will no longer talk to the PC}
    {2759}{DBT - 1 = The PC has found the Gem of Malachi Rench}
    {2760}{DBT - 1 = Kerghan has finished summoning his slaves}

    They just didn't include the updated version of globalflags.mes. Anyway, the UAP will have it since the next version. I'm also adding my own global flags, so you may want to start from 2780, or 2800. I have only one entry so far though, but who knows what issues I'lll be fixing in the future.
    {2761}{DBT - 1 = The PC has spoken with Torian Kel about his home}
     
  9. rroyo

    rroyo Active Member

    Messages:
    3,319
    Likes Received:
    0
    Joined:
    Oct 13, 2006
    Thanks for the heads-up.
    I'll reset my work from 2800.
     
  10. Anonymous

    Anonymous Guest

    Let's continue with the engine hacks!

    A very useful hack today, if you're playing with ambient tracks only.* It disables the subroutine that changes the music to combat one. The music change is especially annoying if you're playing with ambient tracks, since it leaves you in silence. Now you can enjoy ambient sounds (and regular music tracks) even in combat!
    1C4D0:C3

    * In order to disable music, but still preserve ambient tracks, rename 'music' folder in "modules\Arcanum\sound" to something else, e.g. 'music.off'. If you just disable music in options, ambient tracks will be disabled as well, thus leaving you in complete silence.
     
  11. papa_dog_1999

    papa_dog_1999 Well-Known Member

    Messages:
    1,511
    Media:
    1
    Likes Received:
    27
    Joined:
    Aug 14, 2008
    Many, many thanks for this info. :)
     
  12. Anonymous

    Anonymous Guest

    A few more hacks today:

    4810:C3, 14A0:EB09 - no starting movies
    A8FAC:00 - no auto-looting items from the ground for all NPC critters
     
  13. BPD

    BPD New Member

    Messages:
    11
    Likes Received:
    0
    Joined:
    Oct 19, 2008
    All very cool stuff.

    Have you ever come across a way to lock the style of combat into one of the modes? My mod has some new combat features that can be optimized for either but become broken if you can switch back and forth between turn-based and real time.

    It might be as simple as deleting the buttons that let you change it in the UI. Or are there keyboard shortcuts too?

    Holy Grail territory: Any way to keep the player in combat mode while there are hostiles on the screen, ala Fallout?

    Thanks.

    BPD
     
  14. DarkFool

    DarkFool Nemesis of the Ancients

    Messages:
    4,007
    Likes Received:
    5
    Joined:
    Jan 28, 2005
    Alright, so I admit that these're positively useless to me (I'm no modder, and don't intend to be), but I thought I'd step in say thanks Drog, cause I know Rroyo, and any modders who may later come along, will appreciate it greatly!
     
  15. Anonymous

    Anonymous Guest

    Yes, it is quite easy. The following hack will set the combat mode to TB only, the options settings and the keyboard shortcut (the space button) will do nothing, the game will just assume TB without reading any settings. Fast TB can still be switched on and off, though.
    B6C80:B8010000
    B6CB0:EB

    Perhaps, I'll look into it.
     
  16. Anonymous

    Anonymous Guest

    A few more useful hacks.

    Larger dialog font

    The game will use 14 size font in dialogs instead of 12. It's exactly the same font, just a bit larger. Should be useful with the resolution patch.
    C93DE:E6 - larger font for PC lines
    D5CCF:E6 - larger font for NPC lines

    Skip prototypes generation

    This (especially if used in conjunction with the skip movies hack) will enable the game to start almost instantly. However, if some of prototypes in your 'proto' folder are invalid or missing the game may crash upon loading a save.
    68660:C3 - skip reading (and generating) prototypes
     
  17. papa_dog_1999

    papa_dog_1999 Well-Known Member

    Messages:
    1,511
    Media:
    1
    Likes Received:
    27
    Joined:
    Aug 14, 2008
    Alright! That does it!
    I’m going back to the cave and resurrecting you.
    If you’re this good dead, I bet your better alive.
    Besides, I’m still feeling guilty about killing you in the first place.
     
  18. BPD

    BPD New Member

    Messages:
    11
    Likes Received:
    0
    Joined:
    Oct 19, 2008
    Splendid. Thanks.
     
  19. BPD

    BPD New Member

    Messages:
    11
    Likes Received:
    0
    Joined:
    Oct 19, 2008
    Tested out the Turn-based only fix last night, and it works exactly as advertised. However, it is also easy to see why it is a bad idea. No sooner than robbing the bank in Shrouded Hills did I come across the horrible never ending combat round bug. Since I had disabled real time combat, I was stuck except to quit and reload.

    Have you ever come across a reason for the never ending combat turn bug? Is it something I can fix through scripting, or maybe there is a way to add a timeout feature to the processing for a combat round? Something like if it takes more than 10 seconds it starts the next round or drops out of combat.

    Perhaps... instead of disabling the space button, can you change its behavior to go into realtime and immediately back into turn based? That would allow the player to clear these bugs when they occur.

    Thanks.
     
  20. Anonymous

    Anonymous Guest

    Yes, I had a thought that you may encounter this bug. Anyway, it is quite random, and there's no certain way to replicate it, so it's hard for me to find the cause. You may try enabling the debug output, it gives a lot of info on TB, and if the bug occurs again, you may send me the log (debug.txt in your Arcanum folder), specifically the part where a round freezes. (The debug output appears in a separate window, you can Alt+Tab from the game to see what's going on.)
     
Our Host!