editing main structure population per bar

General Modding Information/Questions; support/discussion/questions

Moderator: thunderchero

Forum rules
:idea: Please search before starting new topic. :idea:
There is a good chance it has already been asked.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7851
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Structure of edifice.bst

Post by thunderchero »

Axis wrote:Here`s the hexcode,
working from hexcode is next to impossible. :wink:

here is a little tip when using ida databases

first setting up some options/general settings
before.jpg
before.jpg (548.82 KiB) Viewed 5046 times
select the options shown above will display this
after.jpg
after.jpg (658.32 KiB) Viewed 5046 times
green highlighted area is assbly offset (line prefix)
red is hex used (number of opcode bytes)
blue is auto comment (auto comment)

thunderchero
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7851
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: editing main structure population per bar

Post by thunderchero »

Axis wrote:I got a sort of response when changed 0A -> 32 at 004650C6 (workerstuff), it emptied the whole industry and intel laborpools in one click on each.
that statement is a jump if

Code: Select all

AUTO:004650C4                         loc_4650C4:             ; Compare Two Operands
AUTO:004650C4 80 FC 0A                cmp     ah, 0Ah
AUTO:004650C7 0F 82 E4 FE FF FF       jb      loc_464FB1      ; Jump if Below (
it compare ah to 0A and jumps to 464fb1 if below

I found this subroutine interesting but had no effect 43E290 div_0A_cmp_0A_? proc near

thunderchero
User avatar
Axis
Commander
Commander
Posts: 489
Joined: Sun Aug 16, 2015 8:28 am
Location: Finland
Contact:

Re: editing main structure population per bar

Post by Axis »

Found that too, tried this and that, then that and this, even thas and thit! :)

Now, I`ve lost one note, it said "population cost?" it was in grey, in the area where the hexcode is seen now (I followed those general settings instructions, to the letter).
Last edited by Axis on Mon Feb 13, 2023 6:50 am, edited 1 time in total.
Impress the Empress.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7851
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: editing main structure population per bar

Post by thunderchero »

Axis wrote:Now, I`ve lost one note, it said "population cost?" it was in grey, in the area where the hexcode is seen now (I followed those general settings instructions, to the letter).
QD's and sct's ida databases do not use same notations, "popcost?" was in QD's data base, SCT did not use this.

thunderchero
User avatar
Axis
Commander
Commander
Posts: 489
Joined: Sun Aug 16, 2015 8:28 am
Location: Finland
Contact:

Re: editing main structure population per bar

Post by Axis »

Here, without those general settings you can see (sct database) :

Subroutine
00445DF0 add_building_ID_edx__System_ax proc near

and here is
004460BC population_cost?
Last edited by Axis on Mon Feb 13, 2023 6:50 am, edited 1 time in total.
Impress the Empress.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7851
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: editing main structure population per bar

Post by thunderchero »

Axis wrote:Here, without those general settings you can see (sct database) :

Subroutine
00445DF0 add_building_ID_edx__System_ax proc near

and here is
004460BC population_cost?
the notation is still there for me after changing options it just move to center

here is areas to change in options (blue highlight)
options.jpg
options.jpg (100.14 KiB) Viewed 5028 times
by the way that statement is checking the edifice.bst offset 0x80 if it is set to 0 (non main structure)
when a new main structure is built it will check if population is available to man the new structure or to leave it unmanned.

also keep in mind the value/values have not been found, so there is a good chance the sub-section will not have a description/notation. :wink:

thunderchero
User avatar
Axis
Commander
Commander
Posts: 489
Joined: Sun Aug 16, 2015 8:28 am
Location: Finland
Contact:

Re: editing main structure population per bar

Post by Axis »

After some pondering, I came to the conclusion that those values are so basic, they must be somewhere in the beginning.

So, found some stuff in subroutine :
0040B710 Structure_IDs_aibldreq_bin_T4 proc near

And this caught my eye :
beginning at 0040BC2B there`s 25 times almost the same values, almost in perfect alignment (it must be 5 races x 5 building types).
Impress the Empress.
User avatar
Axis
Commander
Commander
Posts: 489
Joined: Sun Aug 16, 2015 8:28 am
Location: Finland
Contact:

Re: editing main structure population per bar

Post by Axis »

If... No, when! We figure this out, I`ve been thinking of creating a mod, maybe "Some realism" or just plain "Realism" -mod someday.

1. It will have those larger populations I`ve been planning (So far 1000 is the max pop of Gaia-type with all bonuses on high).
2. There will be a second upgrade to all ships, that "Ship x III" (I`ve already done that, although if we succeed, I must increase lethality x10, you don`t want to bomb a system for 100 turns in order to kill everyone :) ).
3. Larger maps, perhaps.
4. More buildings than in Vanilla (I already created an "Exotic fruit farm" for jungle type, and have copied some from those other mods as well for my own use at the moment, mostly from this new Ultimate Mod 5 from Dafedz).
5. That 1024 x 768 resolution from the beginning.
6. Tuned graphics (You`ve seen what I have done to the Federation ("What have I done!" ;) ). It`s just that the original colors were a little like an assortment of fruits, I mean the feds were for the kids. I`ll tune the Romulans and Klingons also a little (just minor color changes in interface).
7. I`ve thought about replacing the Ferengi with the Dominion too.
8. Some modifications to the original ships (for example I have replaced the clumsylooking Nebula-class with the Galaxy-X (more predatory) as strike cruiser, and that UM4 Utopia-class heavy cruiser is now in Galaxy-X`s place).
9. Some QD patches, range and speed increases, territory claims larger etc.
10. There`s no 10 because there`s not enough room in the trek.exe! :D :D :D
Impress the Empress.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7851
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: editing main structure population per bar

Post by thunderchero »

Axis wrote:And this caught my eye :
beginning at 0040BC2B there`s 25 times almost the same values, almost in perfect alignment (it must be 5 races x 5 building types).
I do not see what you are seeing there. and I doubt it would have race/structure type control

But I started thinking, what are we looking for?

current system population (not max population) divided by 10 (0A)
tested all multiplied by 0.1 (CD CC CC 3D) and (9A 99 99 99 99 99 B9 3F) with no change

result will give the system "labor pool".

after that it may or may not need other changes.

thunderchero
User avatar
Axis
Commander
Commander
Posts: 489
Joined: Sun Aug 16, 2015 8:28 am
Location: Finland
Contact:

Re: editing main structure population per bar

Post by Axis »

Well, you`re the Admiral, I`m just an young ensign ;)

I thought I`d be helpful and point some things out, but I truly have no idea what to do with all this data.

Try to make the trek.exe or edifice.bst (or both, dunno) understand I want to have the population cost (per bar) to be 50, or 100, or 500 or whatever, instead of changing their production output when entering that particular value to the edifice.bst.

I`ll try to explain a little more : If you edit that basic value of 0A (10) in the edifice.bst to F4 01 (500), then the game must understand, that bar costs 500 population, not 10 anymore. There should (I hope, and guess) be somewhere a value, that controls that 0A in the edifice.bst, so that you could change those 0As to F4 01s, and have that 500 people per bar. And then you can try to change those values in edifice.bst for example to 1000, and then have half production (I guess it should work that way if my math is correct).

Also, when using the UE, it should show the population cost options as 0 and 500, not 0 and 10. It worked well when I changed Gas giants to Gaias, although that might have been an easy modification, well of course it has been thoroughly researched.
Impress the Empress.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7851
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: editing main structure population per bar

Post by thunderchero »

Axis wrote:Also, when using the UE, it should show the population cost options as 0 and 500, not 0 and 10.
this is a separate issue UE does not read the edifice.bst for new value. it is preset to a value of 10 (0A) and when stbof is loaded by UE it will automatically try to correct edifice.bst to 10. :shock:

but 1 issue at a time.

thunderchero
User avatar
Axis
Commander
Commander
Posts: 489
Joined: Sun Aug 16, 2015 8:28 am
Location: Finland
Contact:

Re: editing main structure population per bar

Post by Axis »

O.K.

I think I may have gotten something regarding the population in the Supremacy, so if someone can`t find a solution to this "problem", then this "project" can be discontinued.

But anyway, thanks to Thunderchero for help!
Impress the Empress.
Post Reply

Return to “General Modding Information/Questions”