Multiple shipyards

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: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Multiple shipyards

Post by Tethys »

Hi, I have been thinking about this for a while, and I was just wondering if there may be a way to allow multiple shipyard types buildable by races? For example, for an early tech game, to add strategy, early shipyards would only be buildable in systems with Dilithium, or with an M class planet... then as tech progresses and another shipyard is researched at a later tech, allowing it to be built in any system. This would ideally be an upgrade to the early tech shipyard, but I dont mind having 2 shipyards in the same system, barring crashes. Any info at all would be great, Ive tried using UE but it just seems to only allow the first shipyard (early tech) to be buildable even after new shipyard is researched.
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: Multiple shipyards

Post by Tethys »

I found the shipyard ID's at ASM 43A696, but not sure if I can change them manually, or make the code handle multiple values. I see there is a little room after the shipyard value, but not real sure on what to use to read 2 values. Maybe if I look at the scanner code it could give me some idea..
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: Multiple shipyards

Post by Tethys »

From my limited knowledge, I somehow have to write

Code: Select all

mov   ax (16 bit value)
retn

mov   ax (16 bit value)
retn
or

Code: Select all

mov   ax (16 bit buildlist value)

mov   ax (16 bit buildlist value)
retn
Edit: It appears 16 bit registers are not going to work here, I may have to use 8 bit registers. Assuming the drawback to be maximum value of 255 in this case, I should be able to write it as follows:

Code: Select all

mov    ah, [building id, not to exceed 255]

mov    ah, [build id, nte 255]

B4 XX B4 XX 00 C3

or would it be ?

B4 XX 00 B4 XX C3 (XX being building ID)
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: Multiple shipyards

Post by Tethys »

Ok, so what I am trying to do now is to have the Cardassian empire read off of 2 different ship ID's (my previous attempts failed). What I did is:

at 0x39a6c (the following code is 78 bytes long in dec)

Code: Select all

B4 A6 43 00 				(new) Minor shipyard ID offset	(Replaces 00 00 00 00)
96 A6 43 00 				Cardassian ID offset
9C A6 43 00 				Federation ID offset
A2 A6 43 00 				Ferengi offset
A8 A6 43 00 				Klingon offset
AE A6 43 00 				Romulan offset
66 3D 05 00 				(new) Number of ship ID's minus 1 (?) (replaces 66 3D 04 00)
77 2A 						Short jump to location, points to minor race shipyard ID for edifice.bst (2a = 42, meaning the pointer is located 42 bytes from this position)
25 FF FF 00 00 			Unknown
FF 24 85 6C A6 43 00 	(new) Jump command to offset pointer (points to location of Minor shipyard ID at beginning of code, or 0x39a6c)	(Replaces FF 24 85 70 A6 43 00)
B8 XX 00 00 00 C3 		Location of edifice.bst pointer for Cardassian shipyard ID 
B8 XX 00 00 00 C3 		Location of edifice.bst pointer for Federation shipyard ID
B8 XX 00 00 00 C3 		Location of edifice.bst pointer for Ferengi shipyard ID
B8 XX 00 00 00 C3 		Location of edifice.bst pointer for Klingon shipyard ID
B8 XX 00 00 00 C3 		Location of edifice.bst pointer for Romulan shipyard ID
B8 XX 00 00 00 C3 		Location of edifice.bst pointer for Minor shipyard ID
(XX are shipyard IDs)

What code is supposed to do is put the Minor race shipyard at the front while allowing a second Cardassian shipyard access to the Minor race shipyard ID.

Good news is, when I tested the above code I get no crashes, and the Minor race shipyard DOES show up. Bad news is when research is achieved for the higher tech shipyard, it still does not become available in the build queue (yes it is all properly set up in UE prior to testing, both shipyards show up when checkbox is ticked).

Any help would be greatly appreciated. I will continue testing and see if maybe I missed something, although the code doesnt work, at least it doesnt crash, so that's a success in my book :roll:
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: 7848
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Multiple shipyards

Post by thunderchero »

just thought I would ask, what would make second shipyard any better than first one?

It almost sounds like you want back the Utopia Planitia but for all races.
Tethys wrote:Maybe if I look at the scanner code it could give me some idea..
The scanner code uses a upgrade table.

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

Re: Multiple shipyards

Post by Tethys »

No, my idea is to have a base level shipyard for Cardassians, to be buildable only in Dilithium systems... then, around the time of the Dominion war, I need a 2nd shipyard for the Cardassians (Dominion Shipyard) which will also build ships (maybe an upgrade for Shipyard 1?), but I would set this shipyard to be buildable in any system, or maybe systems with certain planet type. This would give the effect of the Dominion's knack for ship building by giving them a ship building advantage once the Dominion "join".

Ideally, I would prefer a Basic Shipyard for all races, and around a certain tech each of the races get's a 2nd shipyard, which would be THEIR shipyard and be buildable according to planet type. (ex. Fed - Class M, Dom - Anywhere, Borg - Anywhere, Kling - Class L, Rom - Class O)

IDK why it didnt read my 8 bit registers though, unless there is something else I need to change too
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
adi
Commander
Commander
Posts: 442
Joined: Sun Aug 12, 2012 6:53 pm
Location: US East Coast

Re: Multiple shipyards

Post by adi »

I don't have experience with the Galaxy mod, but i tried having shipyards only in dilithium system in UDMdc; it did not work well for the human player; the AI still had lots of ships while many of my systems were idle not being able to build ships.
Even increasing the dilithium chance from 10 to 20% of the systems, it did not work for the human player: viewtopic.php?f=4&t=3189&p=42433#p42433

I went back to shipyard everywhere! But that was just my experience.
Post Reply

Return to “General Modding Information/Questions”