The place to discuss scripting and game modifications for X Rebirth.
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
Vovva
- Posts: 32
- Joined: Thu, 15. Dec 11, 05:11
Post
by Vovva » Tue, 6. Mar 18, 20:22
Hello! I make small mod for de vries ships and I want to add new rocket turret. Everything was fine until the moment I start to edit Wares.xml. Is it possible to add several <component> entries to a single <ware>?
Code: Select all
<diff>
<replace sel="/wares/ware[@id='dumbfiremissile']">
<ware id="dumbfiremissile" name="{20201,3801}" description="{20201,3802}" group="missiles" transport="container" size="small" specialist="specialistweapons" volume="12" tags="container economy">
<price min="1486" average="1616" max="1745" />
<production time="3600" amount="592" method="default" name="{20206,101}">
<primary>
<ware ware="bioopticwiring" amount="10" />
<ware ware="energycells" amount="480" />
<ware ware="foodrations" amount="360" />
<ware ware="microchips" amount="10" />
<ware ware="quantumtubes" amount="10" />
<ware ware="warheads" amount="40" />
</primary>
<secondary>
<ware ware="medicalsupplies" amount="160" />
<ware ware="narcotics" amount="260" />
</secondary>
<effects>
<effect type="secondaryresource" product="0.15" />
<effect type="specialist" product="0.1" />
<effect type="manager" product="0.03" />
<effect type="engineer" product="0.03" />
<effect type="defencecontrol" product="0.03" />
</effects>
</production>
<production time="3600" amount="592" method="omicron" name="{20206,301}">
<primary>
<ware ware="bioelectricneurongel" amount="10" />
<ware ware="bofu" amount="150" />
<ware ware="energycells" amount="480" />
<ware ware="plasmapumps" amount="10" />
<ware ware="quantumtubes" amount="10" />
<ware ware="warheads" amount="40" />
</primary>
<secondary>
<ware ware="medicalsupplies" amount="180" />
<ware ware="narcotics" amount="290" />
</secondary>
<effects>
<effect type="secondaryresource" product="0.15" />
<effect type="specialist" product="0.1" />
<effect type="manager" product="0.03" />
<effect type="engineer" product="0.03" />
<effect type="defencecontrol" product="0.03" />
</effects>
</production>
<component ref="missile_turret_dumbfire_macro" amount="1" />
<component ref="missile_turret_dumbfire_newt_macro" amount="1" /> - this one I want to add!!
<container ref="props_sm_container_s_generic_macro" />
<icon active="ware_dumbfiremissile" video="wrs_dumbfiremissile_macro" />
<restriction sell="-0.01" />
</ware>
</replace>
</diff>
Edit: Changed the title to make it more obvious what the topic is about. X2-Illuminatus
-
eliseeff
- Posts: 255
- Joined: Wed, 26. Jan 05, 17:17
Post
by eliseeff » Wed, 7. Mar 18, 01:57
Single ware can't refering multiple macro. If you want to add a new thing - you have to add a new ware. Something about this:
Code: Select all
<diff>
<add sel="/wares">
<ware id="dumbfiremissile_newt" name="{20201,3801}" description="{20201,3802}" group="missiles" transport="container" size="small" specialist="specialistweapons" volume="12" tags="container economy">
<price min="1486" average="1616" max="1745" />
<production time="3600" amount="592" method="default" name="{20206,101}">
<primary>
<ware ware="bioopticwiring" amount="10" />
<ware ware="energycells" amount="480" />
<ware ware="foodrations" amount="360" />
<ware ware="microchips" amount="10" />
<ware ware="quantumtubes" amount="10" />
<ware ware="warheads" amount="40" />
</primary>
<secondary>
<ware ware="medicalsupplies" amount="160" />
<ware ware="narcotics" amount="260" />
</secondary>
<effects>
<effect type="secondaryresource" product="0.15" />
<effect type="specialist" product="0.1" />
<effect type="manager" product="0.03" />
<effect type="engineer" product="0.03" />
<effect type="defencecontrol" product="0.03" />
</effects>
</production>
<production time="3600" amount="592" method="omicron" name="{20206,301}">
<primary>
<ware ware="bioelectricneurongel" amount="10" />
<ware ware="bofu" amount="150" />
<ware ware="energycells" amount="480" />
<ware ware="plasmapumps" amount="10" />
<ware ware="quantumtubes" amount="10" />
<ware ware="warheads" amount="40" />
</primary>
<secondary>
<ware ware="medicalsupplies" amount="180" />
<ware ware="narcotics" amount="290" />
</secondary>
<effects>
<effect type="secondaryresource" product="0.15" />
<effect type="specialist" product="0.1" />
<effect type="manager" product="0.03" />
<effect type="engineer" product="0.03" />
<effect type="defencecontrol" product="0.03" />
</effects>
</production>
<component ref="missile_turret_dumbfire_newt_macro" amount="1" />
<container ref="props_sm_container_s_generic_macro" />
<icon active="ware_dumbfiremissile" video="wrs_dumbfiremissile_macro" />
<restriction sell="-0.01" />
</ware>
</add>
</diff>
And IMHO it would be nice to add the new name and description...
-
Vovva
- Posts: 32
- Joined: Thu, 15. Dec 11, 05:11
Post
by Vovva » Wed, 7. Mar 18, 05:00
eliseeff wrote:Single ware can't refering multiple macro. If you want to add a new thing - you have to add a new ware.
And IMHO it would be nice to add the new name and description...
I planed it as first, temporary variant. But if it impossible, where I could find gide about adding new ware to the game? It should be produced anywhere and bought by de vries shipyard.
-
Vovva
- Posts: 32
- Joined: Thu, 15. Dec 11, 05:11
Post
by Vovva » Thu, 8. Mar 18, 12:57
Nobody knows?