Hello,
I am a new to modding, but I thought I would try to change the component layout of a ship. I managed to successful change the layout the way I wanted when I modified an existing ship by changing \assets\units\size_l\ship_arg_l_trans_container_05.xml. These changes got pick up by the existing ship and it went well.
However, when I try to turn this into a new ship, I cant get it to show up in the shipyard. Looking through the other threads I thought it would get picked up, but I was wrong. Can anyone help me with out to get get a new ship into the shipyard?
I have mod the following to make a new ship:
assets\units\size_l\ship_dsc_l_trans_container_05.xml (geometry still targets ship_arg_l_trans_container_05_data)
assets\units\size_l\macros\ship_dsc_l_trans_container_05_a_macro.xml
assets\units\size_l\macros\storage_dsc_l_trans_container_05_a_macro.xml
libraries\wares.xml (doing a dif + add to get my ship as a new ware).
Is there something I am missing to get it added or do I jsut need to proof read my updates more?
[Question] adding new ship to npc shipyard
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 229
- Joined: Sun, 30. Mar 08, 17:29
Re: [Question] adding new ship to npc shipyard
You need to add the ship to ships.xml and then add a ware for it in wares.xml. Both of those files are in libraries.
The ship will appear in the ship building stations of the faction you set as the owner of the ware. Please, do note that ALL ships require a license to be specified via the <restriction> tag (see the other ships in wares.xml) for them to show up.
The ship will appear in the ship building stations of the faction you set as the owner of the ware. Please, do note that ALL ships require a license to be specified via the <restriction> tag (see the other ships in wares.xml) for them to show up.
-
- Posts: 18
- Joined: Wed, 15. Mar 17, 21:55
Re: [Question] adding new ship to npc shipyard
Thanks for the reply. When you reference the ships.xml, if I keep most of the information the same in the ship macro, wouldn't it get pick up in the <ship id="argon_trader_container_l" group="arg_trader_container_l">? I basically copied the ware and changed only the ware id tag and the macro used in the component.
Sorry if these are silly question
Sorry if these are silly question
-
- Posts: 229
- Joined: Sun, 30. Mar 08, 17:29
Re: [Question] adding new ship to npc shipyard
No, you need to manually add your macro to that group in shipgroups.xml and adjust the weights for the RNG if you want to add it to an existing group.Discing wrote: ↑Thu, 13. Dec 18, 23:03 Thanks for the reply. When you reference the ships.xml, if I keep most of the information the same in the ship macro, wouldn't it get pick up in the <ship id="argon_trader_container_l" group="arg_trader_container_l">? I basically copied the ware and changed only the ware id tag and the macro used in the component.
Sorry if these are silly question
-
- Posts: 18
- Joined: Wed, 15. Mar 17, 21:55
Re: [Question] adding new ship to npc shipyard
Thank you for your help carmaster. I got it working finally.
Seems like it works without changing ship.xml or shipgroups.xml, however I am guessing it is better practice to add it to an existing ship group or ship.xml so others can use it in scripts?
https://www.nexusmods.com/x4foundations/mods/132
Seems like it works without changing ship.xml or shipgroups.xml, however I am guessing it is better practice to add it to an existing ship group or ship.xml so others can use it in scripts?
https://www.nexusmods.com/x4foundations/mods/132