Changing ship capacity for carriers/destroyers, Internal Storage, Hangar, Dock
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
Changing ship capacity for carriers/destroyers, Internal Storage, Hangar, Dock
I have been searching for hours on answers on the files and lines that govern the mechanics of ships internal storage. I just want to increase on asgard the m and s interal storage capacity. Please please I ask for your help.
Re: Changing ship capacity for carriers/destroyers, Internal Storage, Hangar, Dock
This is best discussed in the Scripting and Modding Forum, so over it goes.
Have a great idea for the current or a future game? You can post it in the [L3+] Ideas forum.
X4 is a journey, not a destination. Have fun on your travels.
X4 is a journey, not a destination. Have fun on your travels.
Re: Changing ship capacity for carriers/destroyers, Internal Storage, Hangar, Dock
Let me try to explain:
First, a distinction is made between the dock area and the ship's store.
The Asgard has 1 M dock and 3 S dock as well as ship storage for 40 S ships.
Where the docks (or in this case "the dock") are/is located in the ship is determined in the
ship_atf_xl_battleship_01.xml
in X4 Foundations\extensions\ego_dlc_terran\assets\units\size_xl
What dock is used is described in the associated macro, ship_atf_xl_battleship_01_a_macro.xml,
in extensions\ego_dlc_terran\assets\units\size_xl\macros
with the "macro ref"
The same applies to the ship storage. From the ship_atf_xl_battleship_01_a_macro.xml:
The dockarea_atf_xl_battleship_01_macro is used as the dock, which is located in extensions\ego_dlc_terran\assets\structures\dock\macros and has 4 connections: 1 M dock and 3 S docks.
These again point to other macros: dockingbay_arg_m_01_macro (for the M ship) and dockingbay_arg_s_01_macro (for the S ships)
If you open them, you can see in each macro that only 1 ship can dock at a time:
So now we have 3 S ships and 1 M ship that can dock.
What is interesting now is that independently of this, only one shipstoreage is listed in the ship_atf_xl_battleship_01_a_macro.xml, namely the shipstorage_gen_s_01_macro. It is located in assets\props\SurfaceElements\macros.
Open it an see, that 40 ships fit in it.
But there is no storage for M ships.
To adjust this, you could write a mod that first changes the S shipstorage. Egosoft already has one in the files that can store 100 S ships: shipstorage_gen_s_02_macro.xml
So you have to change in ship_atf_xl_battleship_01_a_macro.xml at
the "shipstorage_gen_s_01_macro" to "shipstorage_gen_s_02_macro"
Or you change the value of the parameter "dock capacity" in the shipstorage_gen_s_01_macro.xml. But this will change the ship storage of all ships (and maybe stations) in the game, which use this ship storage.
Of course, you could also create your own shipstorage, e.g. shipstorage_gen_s_03_macro.xml. But that would be even more effort.
For the M ship storage you have to go a bit further. First you have to tell the ship that it has an M storage. So you have to define where it is located:
You can add the following lines/connection to the ship_atf_xl_battleship_01.xml:
With this code, you add a third ship storage connection at a defined position.
Don't get confused, the first one is already assigned to the xs shipstorage (connection).
Then you have to define in the macro "ship_atf_xl_battleship_01_a_macro" which ship storage it should be:
For this example, we use the shipstorage_gen_m_02_macro, which can hold 30 M-ships. You find the macro in assets\props\SurfaceElements\macros. There you'll find also the shipstorage_gen_m_01_macro which has a capacity of 10 M ships.
Don't forget to set in the content.xml the dependency to the dlc:
I hope that was understandable.
I could also write you the mod, but I won't be able to do it until tomorrow at the earliest.
First, a distinction is made between the dock area and the ship's store.
The Asgard has 1 M dock and 3 S dock as well as ship storage for 40 S ships.
Where the docks (or in this case "the dock") are/is located in the ship is determined in the
ship_atf_xl_battleship_01.xml
in X4 Foundations\extensions\ego_dlc_terran\assets\units\size_xl
Code: Select all
<connection name="con_dockarea_atf_xl_battleship_01" tags="dockarea ">
<offset>
<position x="0" y="86.63132" z="-516"/>
</offset>
</connection>
in extensions\ego_dlc_terran\assets\units\size_xl\macros
with the "macro ref"
Code: Select all
<connection ref="con_dockarea_atf_xl_battleship_01">
<macro ref="dockarea_atf_xl_battleship_01_macro" connection="Connection01" />
</connection>
Code: Select all
<connection ref="con_shipstorage_02">
<macro ref="shipstorage_gen_s_01_macro" connection="object" />
</connection>
These again point to other macros: dockingbay_arg_m_01_macro (for the M ship) and dockingbay_arg_s_01_macro (for the S ships)
If you open them, you can see in each macro that only 1 ship can dock at a time:
Code: Select all
<dock external="1" />
What is interesting now is that independently of this, only one shipstoreage is listed in the ship_atf_xl_battleship_01_a_macro.xml, namely the shipstorage_gen_s_01_macro. It is located in assets\props\SurfaceElements\macros.
Open it an see, that 40 ships fit in it.
Code: Select all
<dock capacity="40" external="0" storage="1" />
<room walkable="0" />
<docksize tags="dock_s" />
To adjust this, you could write a mod that first changes the S shipstorage. Egosoft already has one in the files that can store 100 S ships: shipstorage_gen_s_02_macro.xml
So you have to change in ship_atf_xl_battleship_01_a_macro.xml at
Code: Select all
<connection ref="con_shipstorage_02">
<macro ref="shipstorage_gen_s_01_macro" connection="object" />
</connection>
Or you change the value of the parameter "dock capacity" in the shipstorage_gen_s_01_macro.xml. But this will change the ship storage of all ships (and maybe stations) in the game, which use this ship storage.
Of course, you could also create your own shipstorage, e.g. shipstorage_gen_s_03_macro.xml. But that would be even more effort.
For the M ship storage you have to go a bit further. First you have to tell the ship that it has an M storage. So you have to define where it is located:
You can add the following lines/connection to the ship_atf_xl_battleship_01.xml:
Code: Select all
<connection name="con_shipstorage_03" tags="dockingbay ">
<offset>
<position x="2.700806E-02" y="223.2232" z="-81.40008"/>
</offset>
</connection>
Don't get confused, the first one is already assigned to the xs shipstorage (connection).
Then you have to define in the macro "ship_atf_xl_battleship_01_a_macro" which ship storage it should be:
Code: Select all
<connection ref="con_shipstorage_03">
<macro ref="shipstorage_gen_m_02_macro" connection="object" />
</connection>
For this example, we use the shipstorage_gen_m_02_macro, which can hold 30 M-ships. You find the macro in assets\props\SurfaceElements\macros. There you'll find also the shipstorage_gen_m_01_macro which has a capacity of 10 M ships.
Don't forget to set in the content.xml the dependency to the dlc:
Code: Select all
<dependency id="ego_dlc_terran" optional="false" name="Cradle of Humanity"></dependency>
I could also write you the mod, but I won't be able to do it until tomorrow at the earliest.
Last edited by sprIder on Sat, 9. Apr 22, 11:17, edited 1 time in total.
Re: Changing ship capacity for carriers/destroyers, Internal Storage, Hangar, Dock
I have not tested it myself but you want to check assets\props\SurfaceElements\macros for shipstorage_gen_s (and m) where the ship dock capacity is defined. Make sure you mod the right one (_01 or _02)
Hope that helps.
Cheers Euclid
ps: sprIder beat me to it. E.
Hope that helps.
Cheers Euclid
ps: sprIder beat me to it. E.
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786