Set Yellow Star (Sol)

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.
Post Reply
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Set Yellow Star (Sol)

Post by Tethys »

This is probably a dumb question, but I am trying to change, or better yet add, a star type replacement in sub 4B2C80

I've been puttering around in sub 4B2C80 Major_Placement trying to figure out how to switch the yellow star (06) on Sol to planetary nebula (0D) on Omarion (Cardassia). I was able to get as far as changing the animation and tooltip text on Sol, but I cannot for the life of me locate Federation (01) so I am thinking it may be the EBX and/or EDX register? Any help would be great, I searched far and wide these forums for hours.. :(

Edit: You reference something of particular interest in this topic that I will now investigate: viewtopic.php?f=125&t=3896&p=54376&hili ... nfo#p54376

Edit 2: I was unsuccessful at changing the pointers

SCT has some helpful labels in the idb, however they are not perfect.

Code: Select all

AUTO:004B2E71 BB 06 00 00 00                                  mov     ebx, 6          ; set yellow star ani
AUTO:004B2E76 C6 44 02 31 06                                  mov     [byte ptr edx+eax+31h], 6 ; set yellow tooltip
I have looked all over this subroutine for clues as to where the yellowObj is being placed to no avail. I have a hunch its something to do with EDX and EBX registers, but I have only encountered crashes trying to relocate the star name to Cardassia.

Changing 06 to 0D (new stellar) works fine, no issues there. But we can't have a planetary nebula in Sol, that's not proper...

Edit 3: According to TC the relevant locations are 4B2E60 and 4B2E90: 66 A1 62 23 5B 00 and 66 8B 15 62 23 5B 00
The 62 being the offset of the controlling race contained within RToSInfo. Cardassian = 60, Federation = 62, Ferengi = 64, Klingon = 66, and Romulan = 68
Last edited by Tethys on Mon Dec 27, 2021 12:19 am, 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: 1949
Joined: Sun Apr 27, 2008 2:00 am

Re: Help: Set Yellow Star (Sol)

Post by Spocks-cuddly-tribble »

Thunderchero knows his stuff. :up:

5B235E is starting position of the loaded RToSInfo (dynamic data with fixed position).

5B2362 is a direct index pointer to the second star ID (default race ID 01 federation).

Since the RToSInfo is a list of two byte star IDs you can adjust the loaded index by +/- 2 per index position.
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: Help: Set Yellow Star (Sol)

Post by Tethys »

It would be helpful if there was a complete breakdown of RToSInfo... or did I miss it ?

At least now I can try to play around with this and see if I can apply it to both systems. I appreciate all the help you guys :)
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: 7953
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Help: Set Yellow Star (Sol)

Post by thunderchero »

Tethys wrote: Fri Dec 24, 2021 3:26 pm It would be helpful if there was a complete breakdown of RToSInfo... or did I miss it ?
it is in the saved game info Flocke created.

http://flocke.bplaced.net/botfwiki/inde ... le-Listing
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: Set Yellow Star (Sol)

Post by Tethys »

With alot of help from TC, it is now possible to set star type for each race using relocation table space. Ever since the introduction of the Dominion as a playable race, it's bothered be that Omarion was never a nebula. Now, it can be!

Hat's off to TC for all his help on this one.
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: Set Yellow Star (Sol)

Post by Tethys »

So this does not work for minor races, even though RtoSInfo contains 35x 2 byte entries (opened in HxD, size 46h); using 6A (assumed 1st minor) causes a crash on galaxy generation. Furthermore the offset 5B2362 RToSInfo_read_SOL_plus4 contains 35x + 13x 2 byte entry spaces. So there is plenty of space, for the data, but it does not seem to be present during galaxy generation for minor races possibly ?
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
Post Reply

Return to “General Modding Information/Questions”