(Download) ST:BotF Galaxies MOD v0.4.0

Galaxies MOD; showcase and support/discussion/questions/suggestions/reviews

Moderator: thunderchero

User avatar
Axis
Captain
Captain
Posts: 501
Joined: Sun Aug 16, 2015 8:28 am
Location: Finland
Contact:

Re: (Download) ST:BotF Galaxies MOD v0.3.6x1

Post by Axis »

In the beginning, when I started modding BotF, I tried to make everything as big as possible, but I gave up on them because of the infamous CTD phenomenon, I also gave up on this spiral galaxy modifier thingy too, I just couldn't find the right values, so that it would not clump everything in the middle.

So, this work you've done looks good to me, keep it up. :up:
Impress the Empress.
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: (Download) ST:BotF Galaxies MOD v0.3.6x1

Post by Tethys »

I found there are a few different ways to "build" the spiral. I still don't understand it very well, but I now have some generalized idea.

What also potentially affects the galaxy shape is the distance between the major races. Higher distances "forces" the other majors into the required locations to be x sectors away from another major home system. So there becomes patches of major races and stars in places where the star/anomaly generator has to work around. It is one cause of galactic inconsistency.

I am glad at least someone is enjoying the work I am putting toward making things look nicer. Spiral is becoming my favored shape over Irregular for the last few years now, and seems to have the most options/modability in regards to shape (other than boring ring galaxy). With the spiral galaxy, you can even make little dwarf galaxies in the outer edges of them. It might even be possible to have a "patchwork" of small dwarf galaxies around the central spiral with a little more work (have already had some success with it) though one of the arm multipliers may need to be changed to allow this to take effect.
Image

I'd really like to make the map 2x larger but this is outside the scope of possibility at this time. The AI needs some serious help managing itself in the larger galaxy. I might have a look at galaxy sizes and see if there is way to maybe have some more options/sizes. Longer term project but I'd like to think its going to be one of the easier ones.
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: (Download) ST:BotF Galaxies MOD v0.3.6x1

Post by Tethys »

Also adding a few new images to the game, replacing some lower quality imagery
New.png
New.png (68.69 KiB) Viewed 1267 times
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7965
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: (Download) ST:BotF Galaxies MOD v0.3.6x1

Post by thunderchero »

Tethys wrote: Sat Oct 21, 2023 11:50 am I am glad at least someone is enjoying the work I am putting toward making things look nicer.
I just wish you would have explain what you where doing before posting 20 images (some posts with images only) I don't think you even explained numbers on left as your edited values.

and no to me it was just you showing your good luck on spiral galaxy generation when I posted this.
thunderchero wrote: Fri Oct 20, 2023 3:05 pm that is almost 20 images of the same thing yes it is generating good
so what is your conclusion on values anything new other than it is trial and error and even with the best setting for current map size you are lucky to get 2 out of 5 map generations you really like?
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: (Download) ST:BotF Galaxies MOD v0.3.6x1

Post by Tethys »

Some of the galaxies are consistent, they are named according to the value, Large2 and 2a use the same values for generation. Some of them are very consistent and they can be identified by checking the filename and associated values for that spiral. I can probably do a separate post about it when I get more time and just a little better understanding.

First value: Large Spiral Major axis. Second value: Minor axis. Third: Arm width.
Fourth value: Inner arc
Fifth: Middle arc
Sixth: Outer arc

Galaxy size 65x47, 35x26, 27x20 (spiraling much less pronounced in smaller galaxies)

I still have to test vanilla spiraling ;)
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: (Download) ST:BotF Galaxies MOD v0.3.6x1

Post by Tethys »

Tethys wrote: Fri Oct 20, 2023 2:31 pm I really like this one, but feels like the core needs to be more denseLarge10.pngLarge10a.pngLarge10b.png
@Thunderchero for example, these 3 galaxies are all generated from the same value. And all 3 are almost exactly the same. I opted for a little variation, so I changed one of the arm multipliers so it would make a little different shape on occasions.

My current values:

110 85 8
5
6
7.05

and it gives results like this (extremely consistent, 3 out of 3) :
LargeCurrent.png
LargeCurrent.png (519.96 KiB) Viewed 1251 times
LargeCurrent1.png
LargeCurrent1.png (513.24 KiB) Viewed 1251 times
LargeCurrent2.png
LargeCurrent2.png (506.95 KiB) Viewed 1251 times
You see, there are little dwarf galaxies in the outer edges :)
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:

Spiral Galaxy Analysis

Post by Tethys »

So apparently adjusting the avg number of space objects for small and medium galaxy affects large galaxy as well even if value for large is unchanged. Weird. I'm going to have to look at the subroutines and see which values are shared. Maybe I can come up with something.

What a strange subroutine.

Code: Select all

004B0BF0                             Spiral_galaxy_form proc near
There seems to be a set of alternate arm arc multipliers independent to the arm arc multipliers in the same subroutine, which are editable through UE.

Code: Select all

004B0D5E                             outer_loc_4B0D5E:       ; 1.570796327
004B0D5E 030 B9 50 45 52 54          mov     ecx, 54524550h
004B0D63 030 BB FB 21 F9 3F          mov     ebx, 3FF921FBh

004B0D71                             inner_loc_4B0D71:       ; 4.712388981
004B0D71 030 B8 FC B3 3D 7F          mov     eax, 7F3DB3FCh
004B0D76 030 BA 7C D9 12 40          mov     edx, 4012D97Ch
Changing the values does not seem to have any affects on the general shape, however I have noticed a condition of particular mention?

For each time I am generating a Large Spiral, on the first generation it will match exactly the settings installed by UE. If you go start a new game without closing BotF, you will get a skewed galaxy on the next generation, and possibly next one as well if the values are not "uniform"? If you close BotF and reopen the game, start a new game will get the "good" galaxy. What I mean is their rotational values should match, or be close to matching. I am still trying to figure out those rotational values (possibly hidden or calculated covertly). I think I got lucky with my settings earlier, I have since broken them and even with my established values, am no longer having the 100% success rate I was having yesterday. Its more like 60% now. This is due to adjustments made to the small and medium galaxy density "avg num space objects" and also another hidden density value not touched by UE. So small and medium densities ARE SHARED or otherwise multiplied/added to the Large spiral density. Super weird I know. And trying to understand the subroutine is proving a challenge too, but I have narrowed down what I think are the arc arm ID's esp+8h inner arm, esp+10h outer arm, and in between (jump if above 8h and below 10h) is the middle arm. Weird, I know.

Inner arm multiplier affects middle and outer arm densities (real world analysis, not code). Strange here is that if you put the inner arm too large, it will function as if you put it on 0.

And what the hell is all this fldz Load 0.0 crap? Calculating the section against a 0? Thinking maybe getting rid of some of this stuff might stablize the galaxy shape, but I'd have to run more tests. First test will be replacing fldz (D9 EE) with fldpi (D9 EB) and compare the results.

FPATAN is also important > https://www.felixcloutier.com/x86/fpatan

On second thought, first test will be disabling the first set of jumps to the static values. They might control something, who knows.
Disabling the jumps: 4b0c57, 4b0c7a, 4b0c94 seems to have increased the chances to generated desired outcome? 80% now out of 10 tests.
See if reenabling them and changing the fldz's above each jump to fld1's for different comparisons
LOL, now the minors are accumulated on the right :!: (2 of 2 tests 100%)
MinorsOnRight.png
MinorsOnRight.png (475.19 KiB) Viewed 1185 times
Lets now fldpi and compare...
Minors are more central but galaxy gets skewed more often. 6 tests, 2 tests had "good" galaxy, sometimes minors can go left OR right as well
MinorsCenter.png
MinorsCenter.png (469.37 KiB) Viewed 1181 times
A last test will adjust the arm arc multiplier fldz's for compare (I expect very bad result)
Inconsistent. Patchy galaxy (clusters usually in the arms). Some sort of "filling out" the arms here
60% favorable, good minors spread usually centered, skewed left. 30% patchy.

4B0DA7, 4B0DD2, 4B0DFA fldz to fldpi for every 2 minor on left there was 3 on right. Decent minors spread, inconsistent galactic shape (patchy)
Last edited by Tethys on Mon Oct 23, 2023 10:12 am, edited 1 time in total.
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: (Download) ST:BotF Galaxies MOD v0.3.6x1

Post by Tethys »

Thunderchero, I had to remove the "move 8" patch because it did break the major race AI expansion. Not sure if that happens in your mods, but for GALM they seem to not be able to colonize "near minor" and this is most evident with Borg. Removing the patch, AI colonize and subjugate build outposts and such. With the patch they freeze up and do not explore. I think its a combination of new map/starsystems being further away and the inability to properly read minor race density ? :mad:
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7965
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: (Download) ST:BotF Galaxies MOD v0.3.6x1

Post by thunderchero »

Tethys wrote: Sun Oct 22, 2023 8:12 pm Thunderchero, I had to remove the "move 8" patch because it did break the major race AI expansion. Not sure if that happens in your mods, but for GALM they seem to not be able to colonize "near minor" and this is most evident with Borg. Removing the patch, AI colonize and subjugate build outposts and such. With the patch they freeze up and do not explore. I think its a combination of new map/starsystems being further away and the inability to properly read minor race density ? :mad:
try this patch (don't know why I did not think of doing this way first time)

this patch forces use of only sub 004B22A0 for min and max minors so UE will adjust both.
Note: for this patch to work galaxy generation must have enough systems
force_sub_004B22A0.patch
(563 Bytes) Downloaded 34 times
NAME: force use of only sub 004B22A0 for min and max minors
AUTHOR: thunderchero
DESC: This patch forces use of only sub 004B22A0 for min and max minors
DESC: Note: for this patch to work galaxy generation must have enough systems
DESC: patch file name: force_sub_004B22A0.patch
URL: viewtopic.php?p=60559#p60559
TAG: fix

# >>  = vanilla/original value

# <<  = new value


>> 0x000b15db 71 01
>> 0x000b161d 2f 01
>> 0x000b164f fd



<< 0x000b15db c1 00
<< 0x000b161d 7f 00
<< 0x000b164f 4d
Note; if this patch is used sub 4B2350 is un-used
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: (Download) ST:BotF Galaxies MOD v0.3.6x1

Post by Tethys »

Do I use with "move 8" patch?

I see, so this consolidates the minor race density into a single entry ? Or am I misunderstanding this patch?

"Always max minors" ?

Patch applied, I understand how it works now. So the game was choosing a range of minors from min-max so you still have chance for less than 30. I tested 4 games all had 30 minors without "move 8" patch. Works perfectly so far, thanks so much :)

I do still need to test the AI so I will let you know if anything is amiss.
Last edited by Tethys on Sun Oct 22, 2023 10:01 pm, edited 2 times in total.
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7965
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: (Download) ST:BotF Galaxies MOD v0.3.6x1

Post by thunderchero »

Tethys wrote: Sun Oct 22, 2023 9:43 pm Do I use with "move 8" patch?

I see, so this consolidates the minor race density into a single entry ? Or am I misunderstanding this patch?

"Always max minors" ?
correct remove "move 8" (btw patch was mis-named with carry over text from different patch) move 8 should not been part of patch name. :evil:

yes "Always max minors"

I think min system to get max 30 minors (whatever you set value in UE) is about 150 - 200
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: (Download) ST:BotF Galaxies MOD v0.3.6x1

Post by Tethys »

Tested 50 turn game, Klingons and Romulans having issues but that can be fixed with colony values table (changed them when I used "move 8" patch).

Borg are really expanding well, Dominion and Federation as well. Great patch :up:
Good.png
Good.png (478.38 KiB) Viewed 1149 times
Minor note: Game seems to prefer to place "combat drone" in the middle arm arc. Usually in the top left or right. Wonder if there is some controlling factors... :neutral: I just went back and looked over all my screenshots (30 or so) and most of them showed the drone in either upper right or left quadrant. If it wasn't there, it couldn't be found ??? Interesting.
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:

Spiral Galaxy Analysis

Post by Tethys »

Good news! I think I found one of the randomization values that makes the galaxy inconsistently shaped

Code: Select all

0057F4D4     spiral_shape_6_283185308 dq 6.283185308           ; DATA XREF: spiral_Shape+5Ar
which when overwritten with 00's (8 bytes) nullifies the following:

Code: Select all

004AF5E5 02C E8 66 88 05 00          call    Random_float_0_1_to_st0 ; Call Procedure
004AF5EA 02C DC 0D D4 F4 57 00       fmul    ds:spiral_shape_6_283185308 ; 6.283185308 (pi*2)
Now, it could just be a fluke. So... I generated a large spiral galaxy 20x. 20x the same exact form, 100% consistency. I'd say we got a winner?

There is another value down lower, pi/4 or 0.7 something... from looksies it doesnt make the galaxy shape different, I have not tested the values and I do not plan to. I was going to see next how a very low number works instead of zeroing it.

I found my number. -0.0 or 00 00 00 00 00 00 00 80
It produces a very ever so slight change to each galaxy spiral, enough to see but not enough to skew the spiral off the screen :grin:

I wonder now if the 2 values below are for medium and small :neutral: I'd like to get more spiraling on those if possible. Maybe its just too much of a jump in size for it to take effect? I bet the arms are way off the screen

You might have to split this topic a few posts ago, into a new topic. Because I just found the arm placement value ;) 2 of 2 tests made this galaxy shape when using 1.0 x pi instead of 2.0 x pi @ 4AF62A (57F4D4 value loc 2.0)
InteractingGalaxyType.png
InteractingGalaxyType.png (492.23 KiB) Viewed 1108 times
Using 3.0 x pi causes enlarged arms and more of a ring shape galaxy

The next set of values down controls the galaxy offset (how much diagonally skewed) changed from pi/4 to pi/2 the result looks something like this: (4 of 4 tests 100% consistent, E9 was replaced with F9)

Code: Select all

004AF687 02C 68 FB 21 E9 3F          push    3FE921FBh       ; both together
004AF68C 030 68 50 45 52 54          push    54524550h       ; 0.7853981635 (pi/4)
PerfectCircle.png
PerfectCircle.png (513.82 KiB) Viewed 1099 times
Personally I like the offset look better, as I feel you lose less galaxy (appears some part of the arm is missing above), but let me try something....

I now almost have complete control over spiral generation. I even gave the small and medium galaxies the "inner arm" so they too, now have spiral arms :grin:
NewGALM.png
NewGALM.png (509.2 KiB) Viewed 1093 times
Though I may have to settle for the non-rotated galaxy versions so the spiral for the small and medium shows nicely, if I cannot get it to move...
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7965
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: (Download) ST:BotF Galaxies MOD v0.3.6x1

Post by thunderchero »

here is one you might also need

Here is a patch that will address the issue of minor mainly on left of map on larger maps.
patch adds cmp for horizontal edge of med and large (small uses default/original density values offset)
also add 2 new density values offsets 1 med, 1 large.
Patch must be edited to your needs
edit;
horizontal edge med (only used to get to proper offset)
horizontal edge large (only used to get to proper offset)
and all 3 density values offsets (s, m, l)
relocation patch required

if offset value is too high minor group on left
if offset is too low you will get less than max minors.

viewtopic.php?p=53964#p53964
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: (Download) ST:BotF Galaxies MOD v0.3.6x1

Post by Tethys »

I got the tab open ready to grab the patch and edit it. Need to check the locations and see if it conflicts with current changes. In the meantime, here if full control over spiral generation: (all one image, gets small if you click on it)

I decided to give the small and medium galaxy the outer arm because it looked better on all 3 spirals
3NewGALM.png
3NewGALM.png (1.32 MiB) Viewed 1082 times
full image link > download/file.php?id=4349

This one was just for fun lol
toothpick.png
toothpick.png (479.87 KiB) Viewed 1076 times
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
Post Reply

Return to “Galaxies MOD”