Help with wares.xml

The place to discuss scripting and game modifications for X Rebirth.

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

Goliathmk2
Posts: 146
Joined: Tue, 3. Jun 14, 17:58
x4

Help with wares.xml

Post by Goliathmk2 »

I'm trying to insert a license parameter to a line like this,

Code: Select all

<ware id="plasmacells" name="{20201,2401}" description="{20201,2402}" group="energy" transport="energy" size="small" specialist="specialistpowerstorage" volume="4" tags="economy energy" license="LICENSE">
I tried this but i'm not sure if it worked,

Code: Select all

<diff>
	<add sel="//wares/ware[@id='plasmacells']">
		<ware licence="intoxicants" />
	</add>
</diff>
Do wares show up as yellow automatically or is there something else to it?

Is it possible without replacing the whole section? or would it be easier/safer to do that?
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

you should re-read the xml patch guide ;)

your diff will result in this file because thats what you tell it to do:

Code: Select all

<ware id="plasmacells" name="{20201,2401}" description="{20201,2402}" group="energy" transport="energy" size="small" specialist="specialistpowerstorage" volume="4" tags="economy energy" license="LICENSE">
  ******
      <ware licence="intoxicants" /> 
</ware>
  
try this instead:

Code: Select all

<diff>
   <add sel="//wares/ware[@id='plasmacells']" type="@license">intoxicants</add>
</diff>
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
Goliathmk2
Posts: 146
Joined: Tue, 3. Jun 14, 17:58
x4

Post by Goliathmk2 »

I knew that's what was happening, I couldn't think of a way around it.

Thanks for the help i've got the illegal part sorted but I can't see carry licenses in the ency page.

EDIT: My mistake i've mispelt licence
Goliathmk2
Posts: 146
Joined: Tue, 3. Jun 14, 17:58
x4

Post by Goliathmk2 »

It's working now,

Thankyou for the help UNI.

Return to “X Rebirth - Scripts and Modding”