[HOW] Arcanum - Enabling debugging options

Discussion in 'Arcanum Discussion' started by Crypton, May 27, 2008.

Remove all ads!
Support Terra-Arcanum:

GOG.com

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

    Crypton Member

    Messages:
    589
    Likes Received:
    2
    Joined:
    May 22, 2008
    Hey everybody ;)

    I found something new (?) in game so I want to share it with you,maybe it will be helpfull for coders...

    When I was searching for some info in arcanum.exe I found out that it includes debugging messages,also it allow to attach remote debugger and 2 next things which I'm not sure about them...

    It also enables a debug window,which is command line window where are all debug messages displayed...
    So you can easily set bp on message you want to handle...

    All debugging messages are written also in debug.txt where arcanum.exe is located...

    EDIT: Game is also using this argument: tigdebug
    I dont know for what is good that but its checking for it when debug info is exists in registry,it may allow some debugging features in game.

    To run game with this arguments just create a shortcut and add argument:
    "D:\Sierra\Arcanum\Arcanum.exe tigdebug -doublebuffer"

    - doublebuffer = game may run smoother,it will probably use twice video memory...

    Archive includes 2 .reg files,to enable and disable debugging...
    Code:
    Download:
    http://www.xup.in/dl,15899068/arcan.rar/
     
  2. team a

    team a New Member

    Messages:
    580
    Likes Received:
    0
    Joined:
    May 10, 2007
    Crypton -

    I love you forever. Are there any other things you can find out from the .exe? I know Arcanum can be run with "-dialognumber" command, and worlded can be run with "-unassigned" command. If you find anything else, that would be much appreciated, even though it might take people a bit to figure out how to use them.

    Interesting - so the game library is rebuilt every time you enter and leave a map, or just the relevant parts are added to a cache or something? I don't know much about that aspect, but it's definitely interesting when thinking about adding .dat files, .patch* files, and protos to the data/protos folder (as I'm too lazy to dat and undat modules all the time).
     
  3. Elder Joachim

    Elder Joachim New Member

    Messages:
    75
    Likes Received:
    0
    Joined:
    May 28, 2008
    Yes, Arcanum has a console and a debugger, but I didn't know that it in fact was accessible in the final version. Nice find.

    The only thing I would like to do with the engine is to extract the protos table (all protos but critters) and make the engine access it from a txt file (just like with the critters' tables). Do you think it's possible with out disasming the game? ToEE engine does just that, and it's pretty much the Arcanum engine in disguise.
     
  4. Crypton

    Crypton Member

    Messages:
    589
    Likes Received:
    2
    Joined:
    May 22, 2008
    Forcing game to load data from new external file isnt easy,but I can do that... Just what needs to be done is add new section to exe and write inside function for loading... I found that game is using some tables,but I did not know why its needed... I'll find out it ..
     
  5. Elder Joachim

    Elder Joachim New Member

    Messages:
    75
    Likes Received:
    0
    Joined:
    May 28, 2008
    The game uses the so called "prototypes" system. Prototypes are generated from tables and cached in data\proto folder. Critters are generated from tables in data\rules folder (npc.txt, monster.txt and unique.txt), but all other protos (all items, walls, etc) are generated from a table in the executable itself, thus to edit stats of an item or a weapon you have to hex edit the cached files. If the protos table was an external file, it would be much more user friendly.
     
  6. Crypton

    Crypton Member

    Messages:
    589
    Likes Received:
    2
    Joined:
    May 22, 2008
    Thanks for explanation ;) Now it will be much easier to make it possible,but I'll look at that little bit later... I have few projects opened so it needs to be finished :)
     
  7. Oracle

    Oracle Member

    Messages:
    219
    Likes Received:
    0
    Joined:
    Sep 25, 2006
    wow. First drog and his patches and now this? If you would succeed in finding these tables maybe we would get a step closer to be able to edit arcanum to a more balanced game! Nice work so far :thumbup:
     
  8. team a

    team a New Member

    Messages:
    580
    Likes Received:
    0
    Joined:
    May 10, 2007
    Well, you can balance the game right now, but what stats would you change?

    As for doing the protos in a text file, I am really interested in that. It would be nice to have that as another registry key. Also, to have one text file for each object type like with critters, you'd have to decypher the protos, and that isn't done yet. However, converting the protos into text documents would be something i'd like to see.

    Maybe a better idea is writing a program that can convert a .pro to a text file and then back. THen, you could just run that program instead of changing the .exe. If you change the .exe for arcanum, you'd make a lot of people's games incompatible with others', and you'd made every fan-made patch incompatible unless you convert all the new and edited .pro's into text. I think a new and somple program that allows the existing protos into text files so they can be edited faster than with a hex editor, and so they are more accessible to the less experienced modder, would be a worthier undertaking.
     
  9. Elder Joachim

    Elder Joachim New Member

    Messages:
    75
    Likes Received:
    0
    Joined:
    May 28, 2008
    You don't really understand, do you? There's nothing to "decipher", there's a table inside the .exe file. The protos are generated from it. The .pro files are cached files, they shouldn't really be edited. The "right" way to edit the objects would be via the table. Since it's in the .exe file it can't be easily edited, but if it were an external file, it'd be much more user friendly.
     
  10. team a

    team a New Member

    Messages:
    580
    Likes Received:
    0
    Joined:
    May 10, 2007
    does the table explain what each value corresponds to, as the .txt files do? Not having seen it, I of course have no idea/
     
  11. Crypton

    Crypton Member

    Messages:
    589
    Likes Received:
    2
    Joined:
    May 22, 2008
    I think its possible to convert it ;) Atm I'm working on that,to extract that tables and make arcanum load them from external file at startup,and if it will possible to convert them to text file...
     
  12. team a

    team a New Member

    Messages:
    580
    Likes Received:
    0
    Joined:
    May 10, 2007
    Crypton, do you know if they're just values in the table, or if the variables tell you what they mean?

    Regardless, i would like to see rules/written.txt, even if it would raise a whole set of issues.
     
  13. Crypton

    Crypton Member

    Messages:
    589
    Likes Received:
    2
    Joined:
    May 22, 2008
    It looks that its constant table,but I may be wrong... I had not much time to investigate that... I'll look at that today ;) so be patient.....
     
  14. Oracle

    Oracle Member

    Messages:
    219
    Likes Received:
    0
    Joined:
    Sep 25, 2006
    find any other interresting things, Crypton ?
     
  15. DarkFool

    DarkFool Nemesis of the Ancients

    Messages:
    4,006
    Likes Received:
    5
    Joined:
    Jan 28, 2005
    *sighs* Oracle, 'ven't I chased you around this forum with a frying pan already for digging up threads? Please, don't bring up old threads. Just pm someone that you know is still active on the forum, and was discussing the matter. Please. Also, please don't respond to this. Let's just let this thread die, unless Team A has heard more from Crypton, or Crypton cares to post on the matter.
     
Our Host!