Planet Bonus Types

Planet Bonus Types; support/discussion/questions

Moderator: thunderchero

Post Reply
User avatar
Gowron
Code Master
Code Master
Posts: 304
Joined: Sat Apr 26, 2008 2:00 am
Location: 50° N, 11° E

Planet Bonus Types

Post by Gowron » Sat May 31, 2008 2:44 pm

Planets can give food resp. energy bonuses, and their values can be edited using planboni.bin. However, the types can also be changed in trek.exe.

The corresponding entries in trek.exe seem to have no more than 2 valid values: "E9" (energy) or "F6" (food). Any other values that I tested resulted in a crash.

These are the positions:

Code: Select all

position  default  planet type
 0x3E260    E9        desert
 0x3E264    E9     gas giant
 0x3E268    F6        jungle
 0x3E26C    F6       oceanic
 0x3E270    F6        terran
 0x3E274    E9      volcanic
To change the bonus types, simply replace "E9" by "F6" resp. vice-versa.

There are no entries for arctic and barren planets, but they have the bonus type "energy" by default.

Note that any bonus values given to arctic planets, barren planets, or gas giants via planboni.bin will automatically be multiplied by 100 in the game. For example, a bonus value of "2" for suah a planet type in planboni.bin will result in an actual 200% bonus.
A discovery consists in seeing something everybody has seen and at the same time thinking something nobody has thought yet.

User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2065
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys » Tue Jul 27, 2010 9:46 pm

Gowron, have you tried the Dilithium bonus (am assuming you did, but no harm asking)? If not, do you know what its label is so I may try it? I am curious if it might be possible since the game was originally to include 'Asteroid Belt Dilithium' before it was abandoned for unknown reasons... Thanks. No rush btw, whenever u have time as always :)

EDIT: How do i disable a bonus? Am i correct to assume replacing it with a nop (90) will disable it and reap no bonus whatsoever? Will test this...

EDIT2: nops also crash the game, hmm

EDIT3: i suppose i can just edit in UE the bonuses to 0 lol
Not for the weak of heart...
Image
GALM <--- GALM/Galaxies Mod

User avatar
Gowron
Code Master
Code Master
Posts: 304
Joined: Sat Apr 26, 2008 2:00 am
Location: 50° N, 11° E

Post by Gowron » Fri Jul 30, 2010 4:46 am

"E9" and "F6" are not exactly values, but parts of memory addresses. That's why changing them would most probably just crash the game. Actually the code at the two addresses makes the surrounding subroutine store a "0" (energy) or "1" (food) at a certain memory location.

I tried storing a "2" instead of a 1 and got a funny "+60% unknown bonus" on Ferenginar's oceanic planet (and a crash after clicking at the next star system).

The only way to disable a bonus is to change it to zero in UE, as you did.

Availability of Dilithium is a star system bonus, not a planetary bonus. You could still make the Dilithium refinery (or a different Dilithium-generating structure) depend on a certain planet type.
A discovery consists in seeing something everybody has seen and at the same time thinking something nobody has thought yet.

User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2065
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys » Fri Jul 30, 2010 5:22 am

Thanks, I was just curious about how those things worked. Interesting you got an unknown bonus type. Kinda sad that there are only 2 planet bonus types :(
Not for the weak of heart...
Image
GALM <--- GALM/Galaxies Mod

User avatar
Gowron
Code Master
Code Master
Posts: 304
Joined: Sat Apr 26, 2008 2:00 am
Location: 50° N, 11° E

Post by Gowron » Fri Jul 30, 2010 1:08 pm

I found the corresponding subroutine (asm address 4FBB60) for the lexicon entries now, and it only checks for "0" or "1" and loads the lexicon entries for "Food" resp. "Energy". In any other case it displays "Unknown Bonus" (which is not a lexicon entry, but a string in trek.exe at position 0x18055C).
A discovery consists in seeing something everybody has seen and at the same time thinking something nobody has thought yet.

Post Reply

Return to “Planet Bonus Types”

Who is online

Users browsing this forum: No registered users