Race.rst discussion
Moderator: thunderchero
-
- Rear-Admiral
- Posts: 1118
- Joined: Tue May 06, 2008 2:00 am
- Location: England
Race.rst discussion
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
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
-
- Past Administrator
- Posts: 2404
- Joined: Fri Jul 18, 2008 2:00 am
- Location: Your mom's bed ;)
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)
-
- Lieutenant-Commander
- Posts: 109
- Joined: Sat Apr 26, 2008 2:00 am
- Location: Chepachet, Rhode Island U.S.
-
- Past Administrator
- Posts: 2404
- Joined: Fri Jul 18, 2008 2:00 am
- Location: Your mom's bed ;)
-
- Past Administrator
- Posts: 2404
- Joined: Fri Jul 18, 2008 2:00 am
- Location: Your mom's bed ;)
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
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
-
- Code Master
- Posts: 683
- Joined: Sat Apr 26, 2008 2:00 am
-
- Past Administrator
- Posts: 2404
- Joined: Fri Jul 18, 2008 2:00 am
- Location: Your mom's bed ;)
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?
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?
-
- Code Master
- Posts: 683
- Joined: Sat Apr 26, 2008 2:00 am
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.
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.
-
- Commander
- Posts: 332
- Joined: Thu Sep 04, 2008 2:00 am
-
- Code Master
- Posts: 1962
- Joined: Sun Apr 27, 2008 2:00 am
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.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
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.
-
- Lieutenant-Commander
- Posts: 130
- Joined: Thu Jul 10, 2008 2:00 am
Re: Race.rst discussion
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.Tethys wrote:
[0x54-0x54] 1 byte: unrest (threshold) morale