New Resource & Building-Output Types Discussion

New Resources & Star System Features; support/discussion/questions

Moderator: thunderchero

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

Re: New Resource & Building-Output Types Discussion

Post by Tethys »

I just got around to testing this in GALM. So far so good, only issue is with the blackhole so far. I will let you know if I have any other issues (that I can't fix) Great work once again. Those artifacts are pretty neat ;)
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: 1961
Joined: Sun Apr 27, 2008 2:00 am

Re: New Resource & Building-Output Types Discussion

Post by Spocks-cuddly-tribble »

Tethys wrote: Tue Oct 03, 2023 6:10 amonly issue is with the blackhole so far.
For your mod its confusing since you have e.g. two different black hole cases/types:

- real anomaly (stellInfo) in adjacent sector of the star system
- habitable 'pseudo' anomaly planet system (systInfo)

In in the latter case you set the value of the replaced star type in edifice.bst (+ different label for star e.g. habitable BH):
12 - Red Giant
13 - Orange Star
14 - Yellow Star
15 - White Star
16 - Green Star
17 - Blue Star
New star IDs might be a bit tricky. Source is [systInfo+31h] (red giant=04, orange=05, yellow=06, white=07, green=08, blue=09)

The original anomaly IDs in stellInfo are unsorted and all over the place (coding this part of the patch was no fun).
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: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: New Resource & Building-Output Types Discussion

Post by Tethys »

Spocks-cuddly-tribble wrote: Tue Oct 03, 2023 11:59 am
Tethys wrote: Tue Oct 03, 2023 6:10 amonly issue is with the blackhole so far.
For your mod its confusing since you have e.g. two different black hole cases/types:

- real anomaly (stellInfo) in adjacent sector of the star system
- habitable 'pseudo' anomaly planet system (systInfo)

In in the latter case you set the value of the replaced star type in edifice.bst (+ different label for star e.g. habitable BH):
12 - Red Giant
13 - Orange Star
14 - Yellow Star
15 - White Star
16 - Green Star
17 - Blue Star
New star IDs might be a bit tricky. Source is [systInfo+31h] (red giant=04, orange=05, yellow=06, white=07, green=08, blue=09)

The original anomaly IDs in stellInfo are unsorted and all over the place (coding this part of the patch was no fun).
Pleased to report that star types allowing buildable structures (not adjacent, but inhabited)
New star IDs might be a bit tricky. Source is [systInfo+31h] (red giant=04, orange=05, yellow=06, white=07, green=08, blue=09)
I cant remember what ID i used, but I tested all my current cases in game with new building and the blackhole doesnt match any of the preexisting 04-09 ID's. I retain all 6 star types with an additional 7th as both blackhole types, with them being shared for the purpose of I believe space was the reason? Regardless, I am fond of them being shared for some reason, probably because they can share the blackhole "frequency" value so it becomes up to the game to decide whether it's going to have planets or not. Like a random variable, you could probably end up with all of one type or the other (but probably super rare) ;)
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: 1961
Joined: Sun Apr 27, 2008 2:00 am

Re: New Resource & Building-Output Types Discussion

Post by Spocks-cuddly-tribble »

Tethys wrote: Tue Oct 03, 2023 1:44 pmI cant remember what ID i used, but I tested all my current cases in game with new building and the blackhole doesnt match any of the preexisting 04-09 ID's.
Then you need to know the used star/object IDs in systInfo for your habitable 'pseudo' anomalies. I think Flocke asked me to assist with the random code for this (can't recall right now). Should be same as the original anomaly IDs in stellInfo :?:

Once you know the IDs you need to edit my patch with extra code to set the systInfo bitmask right for them (right now they set wrong bits = bug :dwn: ).
This is a bit work and has the same effect as a real anomaly in an adjacent sector (for buildings).
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3258
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: New Resource & Building-Output Types Discussion

Post by Flocke »

Spocks-cuddly-tribble wrote: Tue Oct 03, 2023 4:06 pmI think Flocke asked me to assist with the random code for this (can't recall right now). Should be same as the original anomaly IDs in stellInfo :?:
I remember, some while back you asked me to extend the system requirements list in UE, and it is still on my list...
viewtopic.php?p=57648#p57648

BTW, since GALM messed alot with anomaly types, and I implemented to auto-replace messed code with UE, any further changes likely will break UE compatibility again.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1961
Joined: Sun Apr 27, 2008 2:00 am

Re: New Resource & Building-Output Types Discussion

Post by Spocks-cuddly-tribble »

It's not about changing the object IDs again, but just about knowing them to set the systInfo bitmask right in the patch variant for GALM. :idea:

We both wrote a code for random selection of the new 'star' types during galaxy generation for your UE feature IIRC?
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: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: New Resource & Building-Output Types Discussion

Post by Tethys »

Well I must report a problem, probably something on my end or perhaps something unaccounted for ?

edifdesc.bst broke itself somehow. I did add some descriptions to a few new buildings for adjacent anomalous and artifacts. They worked fine last night, but today UE is having an absolute fit with structures.

edifdesc.bst:
"String at address XX XX XX XX not found."


"String at index 297 not found."

I'm wondering if I had hit some limit for adding structures and backed them off a bit before perhaps? But I did not add, only edited old entries.. strange

Edit: I have restored a previous auto backup and everything seems to be back to normal, just the warning about improperly set requirement. :up:
Last edited by Tethys on Tue Oct 03, 2023 6:12 pm, edited 1 time in total.
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: 1961
Joined: Sun Apr 27, 2008 2:00 am

Re: New Resource & Building-Output Types Discussion

Post by Spocks-cuddly-tribble »

edifdesc.bst issues should be unrelated and OT. :wink:
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: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: New Resource & Building-Output Types Discussion

Post by Tethys »

The issue could have been: Editing the description while UE ( 1.8 ) still thinks the requirement index is improper > possibly leading to jumbled up mess in the edifdesc.

I think you would have to change the index to a vanilla value first, then save stbof.res, then edit the building description, add in your edited edifice and all should be well... but I haven't tested it, since reverting the backup is currently working with most current edifice and star gif palette combination.

Otherwise, I may need to upgrade GALM to using the UE latest public release.

Edit: I am wondering why resource level "Asteroid Belt Dilithium" is not showing up in any system in game. Had a look at your asm notes (very handy) and didn't see anything odd. Did I miss something? Seems I might be misunderstanding the Asteroid function: it only comes into play after a comet strike/assimilation/planet destruction event?
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: 1961
Joined: Sun Apr 27, 2008 2:00 am

Re: New Resource & Building-Output Types Discussion

Post by Spocks-cuddly-tribble »

Tethys wrote: Tue Oct 03, 2023 6:16 pmI am wondering why resource level "Asteroid Belt Dilithium" is not showing up in any system in game.
Low probability, many vanilla random default maps won't have any Asteroid Belt Dilithium systems.
This decreases even further for systems with more planets. An unused BotF original feature for the System Resource Level. :wink:

You can lower the planets value (lowering probability for useful asteriod features) here:
004B7ADB         fild    dword ptr [esp+0Ch]               ; number of planets
004B7ADF         fmul    ds:Planets_Impact_ResourceLevel_0_02 ; planets * 0.02 (0x17D9FC)
004B7AE5         fsubr   ds:dilithium_frequnency_0_1       ; ST(0) = 0.1 - ST(0) -> new value 4B7A48 (5* Planets_Impact) 0xB6E48
004B7AEB         faddp   st(1), st                         ; random 0-1 + (0.1 - planets * 0.02)
004B7AED         fst     qword ptr [esp]                   ; random 0-1 + (0.1 - planets * 0.02)
E.g. 0.2 -> 0.15 will give you more asteriod systems, with Asteroid Belt Dilithium still being lowest.

But there is also an anchor value and barrier values, so much testing is needed to get this right if you extended max number of random planets per system (vanilla default max 7 planets).
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: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: New Resource & Building-Output Types Discussion

Post by Tethys »

Redacted. You are absolutely right, its a frequency thing. The asteroid systems frequency is fine, I just want to adjust the one with dilithium and asteroids to be a little more frequent.

This one?

Code: Select all

004B7AF4     DC1D 04FC5700    FCOMP QWORD [57FC04]   // 0.5 for dilithium ResourceLevel 2
Ty for the fast reply, and sorry to bother
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: 1961
Joined: Sun Apr 27, 2008 2:00 am

Re: New Resource & Building-Output Types Discussion

Post by Spocks-cuddly-tribble »

Tethys wrote: Tue Oct 03, 2023 9:23 pmThe asteroid systems frequency is fine, I just want to adjust the one with dilithium and asteroids to be a little more frequent.
Easiest approch is editing System Resource Level 5 to also feature "Asteroid Belt Dilithium":
004B7B92     804D 71 0E     OR BYTE PTR SS:[EBP+71],0E
Here is also System Resource Level 4 if only 10 and 5 is still too low for you:
004B7B71     804D 71 0E     OR BYTE PTR SS:[EBP+71],0E
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: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: New Resource & Building-Output Types Discussion

Post by Tethys »

Code: Select all

0057FBF4     dilithium_frequnency_0_1 dq 1.0e-1                ; DATA XREF: dilithium_0_1__ResourceLevel+64r
0057FBF4                                                       ; dilithium_0_1__ResourceLevel+95r
0057FBFC     Planets_Impact_ResourceLevel_0_02 dq 2.0e-2       ; DATA XREF: dilithium_0_1__ResourceLevel+8Fr
0057FC04     ResourceLevel2__0_5 dq 5.0e-1                     ; DATA XREF: dilithium_0_1__ResourceLevel+A0r
0057FC0C     ResourceLevel3__0_7 dq 7.0e-1                     ; DATA XREF: dilithium_0_1__ResourceLevel+C5r
0057FC14     ResourceLevel4__0_8 dq 8.0e-1                     ; DATA XREF: dilithium_0_1__ResourceLevel+EAr
0057FC1C     ResourceLevel5__0_9 dq 9.0e-1                     ; DATA XREF: dilithium_0_1__ResourceLevel+10Fr
I ended up here and just been adjusting the pointers at 4B7AF4 and 4B7B01 to see what effects they have. Seems like lower numbers like 0.5 make higher frequency of additional Solar Resources™. I am happy with the frequency of dilithium right now, since some races it is required to build a shipyard (Borg I believe). The structure is lucrative enough to warrant a low frequency, though. Maybe I can free up a planet entry, getting rid of the asteroid planet in favor of this mod. The function is the same, just the animation is being moved. I will give your approach a try.

This calls for another set of planet animations. I was thinking: Brown Dwarf? ;)

Edit: I see what's going on now and why its less frequent. You can build all types of dilithium required buildings in that system. Very interesting and I think 0.15 on the frequency is going to be just right (just tested 0.1 and it was a bit much). I think I got it set to what I would like it to be. I had to reduce slightly the overall dilithium frequency from 0.25 to 0.225 and used 0.1 because there was so little difference from 0.11-0.15 and a massive increase at 0.1 I decided to try something else, luckily it seems to be working. Thanks again
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: New Resource & Building-Output Types Discussion

Post by Tethys »

Not sure if you're interested or not @SCT but:

Code: Select all

004FCAA5   EB 3B            JMP SHORT 004FCAE2
no popup text for asteroid in system

Code: Select all

004FCAA5   EB 06            JMP SHORT 004FCAAD
shared popup text for asteroid in system with other resources

Code: Select all

004FCAAD   B0 F2            MOV EAX, 0F2h
lexicon 242 change: % sent dilithium to % > Resource Present

Galaxy map (show system bonus) will still show "Dilithium Present" in system square popup text, in system view you will have resource text for asteroid as well

ps. You left one byte.. its not enough to do what I was hoping, which was make the asteroids a popup text for you :cry: I needed at least 4
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: Extending System Bonuses & Sun Icons - edifice.bst+71h requirements

Post by Tethys »

Here I have created some alternate d.tga and id.tga files in case anyone wants more flavors to taste.
Untitled-3.png
Untitled-3.png (20.34 KiB) Viewed 795 times
Untitled-4.png
Untitled-4.png (20.56 KiB) Viewed 795 times
Files soon to follow. Most obviously is there is now a brown dwarf in the less common systems. Less obvious is I brightened the asteroids up in the less common, and darkened them in the more common and reduced the number of asteroids in the tga as IMO they were too clustered together. Furthermore I will be retiring the stationary asteroid field planet animation and using solely the animated belt, in favor of asteroids near the star (not entirely proper but cleans up the UI a bit). Also added faux stellar/planet type "T" for hot Jupiters/Brown dwarves and D for asteroids; cosmetic feature built into the tga file.
Tethys_Dil_Icons.zip
(17.76 KiB) Downloaded 17 times
Last edited by Tethys on Fri Oct 06, 2023 7:12 pm, edited 2 times in total.
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
Post Reply

Return to “New Resources & Star System Features”