How to make ships buildable

Mehr
05 Mär 2019 21:10 - 06 Mär 2019 02:25 #89622 von Imperial
Since this question arises every once in a while please feel free to reference it to who ever needs it:

Yes there are two ways to get units of foreign factions in game, making them build able and cheat spawning them with the tool Imperialware here:
stargate-eaw.de/en/forum/help-desk-bug-r...-6/4064-imperialware


-/ Option 1, making it build able:

- Open the mod directory, which probably lies in
.\Star Wars Empire at War Forces of Corruption\Mods\Stargate <-- Pegasus Chronicles
.\Star Wars Empire at War\GameData\Mods\Stargate <-- Old Stargate EAW 1.3

For the Old Stargate 1.3 EAW search for the Space unit in either one of these files:
Spaceunitscapital.xml
Spaceunitsfrigates.xml
Spaceunitscorvettes.xml
Squadrons.xml


-/ For Pegasus Chronicles

- Lets say you wish to spawn for example a ancient ship, then you would go into Stargate\Data\Xml and you would scroll down until you find Unit_Space_Ancients_Ships.xml.

In that .xml directory all units are named and ordered after their faction, means after ancients the ashen follow like
Unit_Space_Aschen_*what_ever*.xml and so on...

- In Unit_Space_Ancients_Ships.xml you will find units that start in their code by the "Tag" <Variant_Of_Existing_Type> </Variant_Of_Existing_Type>.

Means the game will simply copy all code of the original parent unit that was inserted into <Variant_Of_Existing_Type> and use this unit as modified version of it. Means the game created a modified version of the original unit and overwrites its tag entries with the entries of this variant.

- Note: Once you found the unit you are looking for you could actually already spawn it by its ingame name using Imperialware, that ingame name looks like this <SpaceUnit Name="Ingame_Name"> .

- Note 2: Figher units can't really be spawned by the units themselfes, you would need the version of their "Squadron", as example you are not supposed to spawn Ancient_Jumper but Ancient_Jumper_Squadron instead.


We are going to edit a .xml now, but be careful as the game can already crash if you manage put even A SINGLE LETTER at the WRONG PLACE!

It crashes if you forget a single < or > sign at any tag, or if there is one > sign too much.
or if any closing tag misses the / sign at the end, as tags need to keep this syntax <tag> </tag>.
This also means there are no letters allowed outside of these tags.

Thus please always copy the file you're currently editing anywhere to your desktop and work safely on a copy.

To prevent errors please have a look at part 12-15 of my xml coding tutorials:
www.youtube.com/playlist?list=PLild8kZ8-...aGqLWuJdGFSSXlrv3B_9


- Now you are supposed to either open a parent unit and to edit these build requirement tags or to copy the following code (if these tags do not already exist) in its <Variant_Of_Existing_Type> child, in order to make it playable for our example faction "Underworld":

<!-- Build Dependencies -->
<Affiliation>Underworld, Rebel, Empire</Affiliation>
<Build_Tab_Space_Units>Yes</Build_Tab_Space_Units>
<Build_Initially_Locked>No</Build_Initially_Locked>
<Build_Can_Be_Unlocked_By_Slicer>No</Build_Can_Be_Unlocked_By_Slicer>
<Slice_Cost_Credits>1400</Slice_Cost_Credits>
<Score_Cost_Credits>14000</Score_Cost_Credits>
<Build_Cost_Credits>800</Build_Cost_Credits>
<Build_Time_Seconds>12</Build_Time_Seconds>
<Tech_Level>0</Tech_Level>
<Required_Star_Base_Level>1</Required_Star_Base_Level>
<Required_Ground_Base_Level>0</Required_Ground_Base_Level>
<Required_Special_Structures></Required_Special_Structures>
<Required_Planets></Required_Planets>
<Required_Timeline>0</Required_Timeline>
<Tactical_Build_Cost_Multiplayer>800</Tactical_Build_Cost_Multiplayer>
<Tactical_Build_Time_Seconds>20</Tactical_Build_Time_Seconds>
<Tactical_Production_Queue>Tactical_Units</Tactical_Production_Queue>


The most important factions I marked red for you. It's also vital which faction(s) are supposed to be able to build it.

-/ Explanation of the code:
Affiliation specifies which Faction(s) are able to build the unit and to who it belongs.
You can type the following;
For Stargate TPC:Underworld = Tau'ri, Empire = Wraith, Rebel = Goa'uld ( These 3 are playable by an active AI )
For the original Stargate - EAW: Rebel= Tau'ri, Empire = Goa'uld there is no 3rd playable faction.
There are even more factions like Hostile, Pirates, Grace, Aschen and so on, but you can't play those.
Pattern:
<Affiliation>Empire</Affiliation>

In <Build_Tab_Space_Units> the game expects Yes or No as entry.
This tab specifies whether the build button of a unit appears at the menu, but that button depends on more of the tags below
<Build_Tab_Space_Units>Yes</Build_Tab_Space_Units>

Specifies whether the unit starts locked and the player can unlock it later on.
<Build_Initially_Locked>No</Build_Initially_Locked>

Unit costs that much
<Build_Cost_Credits>2000</Build_Cost_Credits>

It takes this long to build the unit
<Build_Time_Seconds>40</Build_Time_Seconds>

The player need to reach at least this tech level in order to be able to build the unit:
<Tech_Level>3</Tech_Level>

There is one special thing you need to consider here; Rebels start at Tech Level 0 and Empire starts at 1
So for Rebel its 0-4
And Empire + Underworld is 1-5

The Human or AI Player needs a space station of this level in planetary orbit, in order to be able to build the unit:
<Required_Star_Base_Level>1</Required_Star_Base_Level>

The Human or AI Player needs to acquire at least this level of ground base:
<Required_Ground_Base_Level>0</Required_Ground_Base_Level>

The player can't build the unit unless he has this special structure on the construction planet:
<Required_Special_Structures></Required_Special_Structures>
For example here the tag <Required_Special_Structures>Asagard_Shipyard</Required_Special_Structures> prevents the player from building the unit unless he has a Asagard_Shipyard on the build planet.

The player can build the unit only on the listed plants here:
<Required_Planets></Required_Planets>

The Game needs to reach this timeline in order to make the unit build able (as player you can't control the timeline it's specified by devs):
<Required_Timeline>0</Required_Timeline>

I need to mention I set all requirements to lowest state, means as the code is written here it's build able.
Just search your unit for these tags and make sure they don't longer block your unit, replace them by my values (except for the shipyard of course).
Once the game launches your unit should be build able now for the specified Faction!

Now if you want your unit to also be playable in multiplayer there are some values for Multiplayer mode, they usually start under
<!--<MULTIPLAYER SKIRMISH VALUES BEGIN>-->

Note: Multiplayer units are not build able by default, you will need to add their in game name to the list tag of build able objects in the star base of the right level and for the right station.
Multiplayer special structures like the SuperGate require these entries as well.




-/ Option 2 to get your Ship/Unit: Cheat spawn it with Imperialware:
stargate-eaw.de/en/forum/help-desk-bug-r...-6/4064-imperialware
Letzte Änderung: 06 Mär 2019 02:25 von Imperial.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
07 Mär 2019 09:44 #89624 von baal
Hey Imperial, nice tutorial, as usual! :)

But could you please post such topics into the "Modding Corner" section in the future?
The TPC Help Desk forum is, as the title says, really meant for "Bug reports, feature requests and technical questions", not so much for general modding tutorials (even if they use TPC as an example) or how EaW generally works "under the hood".

I'll move a bunch of topics to that section now - you might wanna check if you need to update any links in your posts.

"The way I see it, every life is a pile of good things and bad things .
The good things don’t always soften the bad things, but vice versa the bad things don’t always spoil the good things and make them unimportant."

- The Doctor

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
09 Mär 2019 09:01 - 09 Mär 2019 09:06 #89632 von Imperial
I posted these links a few hundred times and there's no chance I remember where to adjust it, great.
But I'm really happy they're in the right category now..
Letzte Änderung: 09 Mär 2019 09:06 von Imperial.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
09 Mär 2019 14:28 - 09 Mär 2019 14:28 #89635 von baal
Actually never mind that. The forum is smart enough to keep track of moved topics.
https://stargate-eaw.de/en/forum/help-desk-bug-reports,-feature-requests-and-technical-questions-6/4064-imperialware
now simply redirects to
https://stargate-eaw.de/en/forum/projekte-7/4064-imperialware#87697

Sorry :rolleyes:

"The way I see it, every life is a pile of good things and bad things .
The good things don’t always soften the bad things, but vice versa the bad things don’t always spoil the good things and make them unimportant."

- The Doctor
Letzte Änderung: 09 Mär 2019 14:28 von baal.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
09 Mär 2019 20:51 #89638 von Imperial
Oh then it's fine ^^

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Ladezeit der Seite: 1.861 Sekunden