Page 2 of 2

Posted: Tue Aug 18, 2009 8:38 pm
by Spocks-cuddly-tribble
592C28: address of loaded meplanet.bin


Wrong or overlooked? :
58C0B0: address of loaded aibldreq.bin


Also my abbreviation was here in the wrong language:
5B1A90: Mudd cheat (0=OFF, 1=ON) (0x38B27=F9-RPs /0x38B63=F10-credits)

Posted: Sat Aug 22, 2009 11:48 am
by Gowron
Spocks-cuddly-tribble wrote:592C28: address of loaded meplanet.bin


Wrong or overlooked? :
58C0B0: address of loaded aibldreq.bin


Also my abbreviation was here in the wrong language:
5B1A90: Mudd cheat (0=OFF, 1=ON) (0x38B27=F9-RPs /0x38B63=F10-credits)
All included/clarified now :)

Posted: Sat Sep 05, 2009 10:09 am
by Spocks-cuddly-tribble
58AE7C: address of AIAgtIdCtr (see savegames)
58AE84: address of AITaskIdCtr (see savegames)
58AE88: address of AISysUnt (see savegames)
58AE8C: address of AIShpUnt (see savegames)

5A36C8: address of systInfo (see savegames)

Posted: Sat Sep 05, 2009 11:49 am
by Gowron
Spocks-cuddly-tribble wrote:58AE7C: address of AIAgtIdCtr (see savegames)
58AE84: address of AITaskIdCtr (see savegames)
58AE88: address of AISysUnt (see savegames)
58AE8C: address of AIShpUnt (see savegames)

5A36C8: address of systInfo (see savegames)
All included, thanks :)

Posted: Mon Nov 23, 2009 3:57 pm
by Spocks-cuddly-tribble
I moved the updated list to:

http://flocke.bplaced.net/botfwiki/inde ... _Variables


592BF8: address of loaded race.rst / 5CB2F8: a corresponding count

5A36CC: address of stellInfo (see savegames)
5A36D8: address of sector.lst (see savegames)
5A36E0: address of treaty (see savegames) /5A3748: a corresponding count

shipname.bin -> wrong/unclear

Posted: Tue Nov 24, 2009 12:01 pm
by Flocke
Spocks-cuddly-tribble wrote:I moved the updated list to:

http://flocke.bplaced.net/botfwiki/inde ... _Variables
Cool!
I just backed it up. If there's anything you want (like having access to the database for creating backups yourself too), let me know. :)

Posted: Sat Dec 05, 2009 8:14 am
by Gowron
Spocks-cuddly-tribble wrote: 592BF8: address of loaded race.rst / 5CB2F8: a corresponding count

5A36CC: address of stellInfo (see savegames)
5A36D8: address of sector.lst (see savegames)
5A36E0: address of treaty (see savegames) /5A3748: a corresponding count
Included now, thank you :)

Posted: Thu Mar 10, 2011 12:44 pm
by Spocks-cuddly-tribble
Hi Flocke,

some notes wrt:

http://flocke.bplaced.net/botfwiki/inde ... &oldid=153



@ the following seems to match gameInfo doc:

Be careful. If at all, at least they're somehow converted when writing to savegame, ini or crashlog - resulting in inconsistencies and even some bugs:

E.g. "5A2B78: generated monsters bitmask" is not stored in savegames or at least not loaded from savegames, see Scheme of the Random Events (2.4)

Also, as you noted, the difficulty level here has a deviation!



@ removed galInfo content duplicate

In the assembler code they're accessed directly (via the removed asm-addresses). So they're easy to miss now, if one just enters the address of an unkown/unclear variable into F3 page search (that's what I do in this case).

Code analysis still should be the focus of the page. So I'd suggest to keep all directly accessed addresses and maybe just move & mark related stuff as you did w.r.t. gameInfo.



For extra noob clarity, maybe we should also add some notes like:

5A2B40: Minor Races setting (0=none, ..., 3=many) -> sometimes gets loaded at [+2] to read the difficulty level

Posted: Thu Mar 10, 2011 3:04 pm
by Flocke
hi Tribble, funny you address me that way here but well,
if there's partially really a difference I agree it should be made clear, and I also understand you want them accessible by browser search function.

duplicates of completely same data however isn't much of use in my opinion and only lessening the overview, that's why I removed parts and I also incorporated some stuff to the savegame listing that's been missing over there and most likely in there even if eventually unread.
Not all of my research has ever been confirmed anyway so if there's a false one just fix it, that's the intent of a wiki.

But as you noted, some difference made me cautious not to simply remove all the gameInfo. I'm fine if we keep all the previous dynamic variables in boxes like with gameInfo, and if you have disproof, simply revert my changes of the savegame listing.
Though I already thought if we shouldn't split all these file infos like gameInfo,... into seperate topics, link there from dynamic key variables as well as from the savegame listing and just note differences in there.
This would help to preserve overview AND consistency.
What ya think?

Btw, I'm not claiming lead on the wiki, don't hesitate to correct me,
actually cause you're working on that area most actively I'd be happy to give you the lead. :)

Oh, and a note on what got me to take a look in that area, and also cause I think this fits well to the dynamic key variable topic, today I figured how to dynamicly access and probably also change all of the key variables during runtime. I'd just wish you learn some C++ Tribble. :D

In a dll loaded by trek.exe, it can simply be achieved using a reinterpret_cast on one of those dynamic key variables.

Edit: now I also figured how to pass functions to trek.exe and call them using asm code, allowing for unlimited additional code space, so if you need some, you know where to go *haha* :D
therefore I reuse an old key variable or empty space, store a pointer to a function pointer array and call any of the functions with the corresponding function pointer offset in the array like this:

Code: Select all

// get function pointer array
MOV EAX,DWORD PTR DS:[5CD658]
//get 2nd function
MOV EAX,DWORD PTR DS:[EAX+4]
// call it
CALL EAX
5CD658 is just a random address in data segment of trek.exe
of cause also parameters could be added and a return value retrieved,
and cause C++ also supports embedding asm code you could even move some code from trek.exe to whatever dll got wrapped for the job, eventually even without adjustment :roll:

I always thought it would be lots more complicated than this. I didn't even get the idea to access a key variable that directly till today. :?

Edit2:
Hey, now I also found the subroutines for loading a game, saving a game, starting a new one and ending turn!
Well hasn't been that hard and I wouldn't wonder if you already knew them. They've been missing in the wiki though, so I added them.
I don't have to tell ya what this could be used for in combination with above, do I? :D

cheers

Posted: Sat Mar 12, 2011 6:24 am
by Spocks-cuddly-tribble
Flocke wrote:funny you address me that way here but well
I just prefer to use the corresponding afc-topics instead of wiki talk pages (cause see below). :)


Flocke wrote:Though I already thought if we shouldn't split all these file infos like gameInfo,... into seperate topics, link there from dynamic key variables as well as from the savegame listing and just note differences in there.
This would help to preserve overview AND consistency.
What ya think?
I'd rather tolerate some duplicates in the savegame / asm data:
me wrote:they're easy to miss now, if one just enters the address of an unkown/unclear variable into F3 page search
Your way, a noob would have to search through all wiki pages for an unknown variable, cause "unknown" means, at the time, it's unknown to which file it belongs (a simple case of deductive logic), but it's your choise in the end.

All in all my work is done, and I have no further ambitions. It's the turn of the upcoming modders now, therefor I addressed this in public, so that people who are interested in participation can point out their preferences (and I think there're some lurking in background, despite of not posting yet). :)


Flocke wrote:now I also figured how to pass functions to trek.exe and call them using asm code... I always thought it would be lots more complicated than this. I didn't even get the idea to access a key variable that directly till today.
IIRC suchlike stuff is already a common procedure in BotF.

And yes, this danymic stuff is *really* useful if one knows how to use it. :wink:

Flocke wrote:I also found the subroutines for loading a game, saving a game, starting a new one and ending turn!
Well hasn't been that hard and I wouldn't wonder if you already knew them. They've been missing in the wiki though, so I added them.
There're tons of useful & known sub's waiting for the wiki (just read some of the modding topics), but as I said, it's the turn of the upcoming modders now...



PS: At the end of the year I'll see to reinstall BotF and then I'm expecting some cool stuff in mods. Otherwise I'd be forced to suggest some unproductive afc-member to the new borg queen sisters (TM) as a replacement for their runaway android for "special purposes": :mrgreen:

:up:

Posted: Sat Mar 12, 2011 9:23 am
by Flocke
Spocks-cuddly-tribble wrote:
Flocke wrote:funny you address me that way here but well
I just prefer to use the corresponding afc-topics instead of wiki talk pages (cause see below). :)
I know and would have missed discussion over there, but addressing me directly in a forum I havn't posted is a little funny though. :lol:
Spocks-cuddly-tribble wrote:
Flocke wrote:Though I already thought if we shouldn't split all these file infos like gameInfo,... into seperate topics, link there from dynamic key variables as well as from the savegame listing and just note differences in there.
This would help to preserve overview AND consistency.
What ya think?
Your way, a noob would have to search through all wiki pages for an unknown variable, cause "unknown" means, at the time, it's unknown to which file it belongs (a simple case of deductive logic), but it's your choise in the end.
Well, we could still list these offsets... :roll:
Spocks-cuddly-tribble wrote: All in all my work is done, and I have no further ambitions. It's the turn of the upcoming modders now, therefor I addressed this in public, so that people who are interested in participation can point out their preferences (and I think there're some lurking in background, despite of not posting yet). :)
Comeon, learning some basic C++ isn't that hard, not for a person with your skill, I'd help ya. :D
Spocks-cuddly-tribble wrote:
Flocke wrote:now I also figured how to pass functions to trek.exe and call them using asm code... I always thought it would be lots more complicated than this. I didn't even get the idea to access a key variable that directly till today.
IIRC suchlike stuff is already a common procedure in BotF.
I know, but not access them directly with a simple *reinterpret_cast<value_type>(asm_address) through dll boundary. Just didn't expect this, thought this would be prevented by dll scope. :)
Spocks-cuddly-tribble wrote:And yes, this danymic stuff is *really* useful if one knows how to use it. :wink:
Don't tell me it's not tempting you. ;)

Posted: Fri Mar 18, 2011 1:30 pm
by DCER
I know this technically isn't the place but since the wiki is already being discussed here...

It seems the wiki site is currently "invisible" to the rest of the net. It doesn't show up in search results even if you search for the site itself - only afc shows up. If possible this should really be fixed. I'm guessing the robots file is telling crawlers to go away(?).

Posted: Fri Mar 18, 2011 2:18 pm
by robert_defore
Whoohoo, I think I just made a mess in my shorts reading this outstanding news, since this is OT I will keep it short but I suppost this might be the possible "future breakthrough in computers" I was hinted to about. I really appreciate you guys blazing the trail on this, I havent had much time to delv into the code hacking part of modding with BOTF but at the rate the community is going we should have meade BOTF into BOTF2 before the official BOTF2 is ready.... :lol: 8)

Posted: Fri Mar 18, 2011 3:33 pm
by Flocke
DCER wrote:I know this technically isn't the place but since the wiki is already being discussed here...

It seems the wiki site is currently "invisible" to the rest of the net. It doesn't show up in search results even if you search for the site itself - only afc shows up. If possible this should really be fixed. I'm guessing the robots file is telling crawlers to go away(?).
Yes that is right, I excluded crawlers by a meta tag. The wiki was meant for afc and as long there's only modding stuff within I see no reason to change that.

Posted: Fri Mar 18, 2011 3:48 pm
by DCER
Oh, ok. I thought that was by mistake.