Race.rst discussion

Race.rst; support/discussion/questions

Moderator: thunderchero

Post Reply
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Race.rst discussion

Post by Peter1981 »

thanks to a disscussion between myself and tethys we have disected the Race.rst

0x00 2 bytes are Number of races in file default 23 00 = 35 30 minors & 5 majors.

0x02 3134 bytes in 35 blocks of 108 bytes that represent each race as follows:-

0x00 Name of Race
0x28 Name of image files ########.tga
0x3C Race discription address in racedesc.rst
0x40 Homeworld Planet ID
0x42 Starting population
0x44 Growth rate multiplier 1
0x48 Base Moral when rulled by Cards, Fedz, Fergs, Klings, Roms, Neutals
0x4E Ditithium Flag / Space faring
0x4F 00 00 00 00 00
0x54 Unrest (threshold) moral
0x55 00 00 00
0x58 Growth Rate Speed 1
0x5A Growth Rate Speed 2
0x5C 00 33 40 00 00 00 00 00 E8 C9 40 00
0x6A Ground combat multiplier
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys »

Peter and I worked on this for about 2 hours this morning, we think we have decrypted the file down to this:

Code: Select all

00-01	number of races in file default 23 00 = 35 30 minors & 5 majors.

Minus the above 2 bytes from the list to get a table, set your bytes per rown to 108.


3134 bytes in 35 blocks of 108 bytes that represent each race including majors.



BEGIN:


 HEX Offset
[0x00-0x27] 40 bytes:				  Name of Race
[0x28-0x3B] 20 bytes:				  Name of image files ########.tga

[0x3C-0x3D] 2 bytes:					Race discription address in racedesc.rst
[0x3E-0x3F] 2 bytes:					Always 00 00 may be part of race decription address if 4 byte.

[0x40-0x41] 2 bytes:					Planet ID's
[0x42-0x43] 2 bytes:					Starting pop

[0x44-0x47] 4 bytes FLOAT:			Growth rate multiplier

[0x48-0x4D] 1 byte each (6):		 Base morale when ruled by: Card, Fed, Ferg, Klin, Rom, Neut

[0x4E-0x4E] 1 byte:					 Dilithium flag either 00 or 01 (confirmed using UE)

[0x4F-0x53] 5 bytes:					alyways 00 00 00 00 00

[0x54-0x54] 1 byte:					 unrest (threshold) morale

[0x55-0x57] 3 bytes:					always 00 00 00 - unknown

[0x58-0x59] 2 bytes:					EL/Growth rate jump speed 1
[0x5A-0x5B] 2 bytes:					EL/Growth rate jump speed 2

[0x5c-0x67] 12 bytes:				  unknown (most likely a call to -unknown (techtree?))

[0x68-0x6B] 4 bytes FLOAT:			Ground combat multiplier - fe. (CD CC 4C 3F = 0.8)
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
beepo
Lieutenant-Commander
Lieutenant-Commander
Posts: 109
Joined: Sat Apr 26, 2008 2:00 am
Location: Chepachet, Rhode Island U.S.

Post by beepo »

Does this mean that more major powers can be added and minors subtracted? That would be pretty cool.
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys »

We are working on extending both majors and minors (it is doubtful of a new Major due to extensive use of wdf files and limited space in trek.exe for major calls)

but minors look promising, Ive got one to show up in UE ;)
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys »

Just wondering what is a binary record?

ST:BOF Thu May 13 10:04:19 2010

Version Under Test: 72
File: ..\..\source\universe\readrace.c, Line: 145, the total number of binary records does not correspond to max # of races
Initialize State: 31
Player Empire: 2 Starting Seed: 1273759459
Galaxy shape: 0 Galaxy Size: 2
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
DCER
Code Master
Code Master
Posts: 683
Joined: Sat Apr 26, 2008 2:00 am

Post by DCER »

Binary record is probably a race.rst entry.
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys »

Hmm.. I added a 31st minor as a test, the Race shows up in UE under Races > Race Info, however does not show up under AI > Minor Race Attitudes

I am assuming this is because attitudes are not stored in race.rst... also noticing that there is no reference to anything that could be attributed as a 'Minor race attitude' in race.rst.

Other thoughts?
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
DCER
Code Master
Code Master
Posts: 683
Joined: Sat Apr 26, 2008 2:00 am

Post by DCER »

You shouldn't depend on UE too much here, as the index 35 is used as "All races" in some places. Ships and buildings come to mind.

Minor race attitudes are stored in aiminor.wtf, the names of the minors are stored in aiminor.wtf and trek.exe (this is completely separate from race.rst and the name can be completely different). Which race is which is determined by checking the aiminor.wtf race name against a list of races in trek.exe. The resulting index points to the race in race.rst.
User avatar
AlexMcpherson79
Commander
Commander
Posts: 332
Joined: Thu Sep 04, 2008 2:00 am

Post by AlexMcpherson79 »

isn't that rather strange?

I do wonder what went through the minds of the programmers way back when.
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys »

Thanks DCER, me and Peter will have a look at these.. hopefully we will come up with something positive ;)
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1883
Joined: Sun Apr 27, 2008 2:00 am

Post by Spocks-cuddly-tribble »

Tethys wrote:We are working on extending both majors and minors (it is doubtful of a new Major due to extensive use of wdf files and limited space in trek.exe for major calls)

but minors look promising
Don't waste your time, it's madness due to countless trek.exe areas having to be rewritten from scratch and there is no code-space left for that mostly.

Btw you didn't even finish the very easy tech level task or made a proper experiment for extended planet.pst yet...

Anyway I'll see to include the file descriptions by you guys in the next update of my link list. :)
Nothing new, but info is hard to find in UE-code resp. spread over various topics.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys »

SCT are you saying that EACH minor is coded into trek.exe? if so, I had no idea... or else I probably wouldnt have went thru the race file! lol :P
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys »

For the record, I would like to note that when race names are changed in UE, this condenses the Race names toward the beginning of the race list in trek.exe that starts at:

0x1746e8
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
EnPhreg
Lieutenant-Commander
Lieutenant-Commander
Posts: 130
Joined: Thu Jul 10, 2008 2:00 am

Re: Race.rst discussion

Post by EnPhreg »

Tethys wrote:
[0x54-0x54] 1 byte: unrest (threshold) morale
this value is also used to determine, how high the base morale of a minor is, if he's a member of an empire -> base morale for conquered minors (UE: Races Info / Home system morale when ruled by (by the way, the values for major empires effecting also the major colonies if conquered, not only their home system, and the own major specific value influences the base morale of all systems of that major)) + the above mentioned unrest value, e.g. andorians value if ruled (conquered) by FED is 65 and unrest value 25 -> as member of FED andorians have 90 base morale.
Post Reply

Return to “Race.rst”