[Question]How to traverse the ID list under \libraries\wares.xml?

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

fsnlan
Posts: 6
Joined: Thu, 23. Mar 17, 19:14
x4

[Question]How to traverse the ID list under \libraries\wares.xml?

Post by fsnlan »

How to traverse the ID list under \libraries\wares.xml?
Now the cheat menu is used to manually enter the ware list. This is inconvenient, and it is cumbersome to MOD compatibility with other authors.
jmattspartacus2
Posts: 73
Joined: Wed, 5. Dec 18, 07:04

Re: [Question]How to traverse the ID list under \libraries\wares.xml?

Post by jmattspartacus2 »

I'm going to start by trying to figure out what you're asking, are you asking how to point to a certain ware with an xml patch? or did you have something else in mind?

If by chance you are trying to point to a certain ware in an xml patch, you can do this

Code: Select all

<add sel="wares/ware[@id='wareid']"> ... </add> 
<replace sel="wares/ware[@id='wareid']"> ... </replace> 
<remove sel="wares/ware[@id='wareid']"> ... </remove> 
fsnlan
Posts: 6
Joined: Thu, 23. Mar 17, 19:14
x4

Re: [Question]How to traverse the ID list under \libraries\wares.xml?

Post by fsnlan »

Thank you for your reply.
What I want to learn is how to get ware list of commands when making MOD.
So i don't have to create $warelist myself and add wares.
Now, if EGO updates, or other authors make ware、ship MODs. I need to add the ware ID manually in $warelist by myself.

Return to “X4: Foundations - Scripts and Modding”