• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Help Replacing rawMeat in SDX

tivial01

New member
I am trying to replace the rawMeat from a rabbit with rabbitMeat but I seem to be doing somthing wrong. I can get it to add the rabbitMeat but cant seem to get it to remove the raw meat.

<configs>

<!-- This tells SDX to add to the Items.xml -->

<config name="items">

<append xpath="/items">

</append>

</config>

<config name="recipes">

<append xpath="/recipes" >

</append>

</config>

<remove xpath="/entity_classes/entity_class/animalRabbit[@name=rawMeat]">

<config name="entityclasses">

<append xpath="/entity_classes/entity_class[@name=animalRabbit]">

<drop event="Harvest" name="rabbitMeat" tool_category="Butcher" count="2" />

</append>

</config>

</configs>

 
I think your remove xpath needs to be underneath the config name

like so

Code:
<config name="entityclasses">
<remove xpath="/entity_classes/entity_class/animalRabbit[@name='rawMeat']">
<append xpath="/entity_classes/entity_class[@name='animalRabbit']">
<drop event="Harvest" name="rabbitMeat" tool_category="Butcher" count="2" />
</append>
</config>
After a second look I noticed that remove line doesn't end right nor does that line work correctly

You might try the following

Code:
<config name="entityclasses">
<remove xpath="/entity_classes/entity_class[@name='animalRabbit']/drop[@name='rawMeat']"/>
<append xpath="/entity_classes/entity_class[@name='animalRabbit']">
	<drop event="Harvest" name="rabbitMeat" tool_category="Butcher" count="2" />
</append>
</config>
 
Last edited by a moderator:
OMG man you are a life save thx sooooo much
alternatively, you could just <set>:

Code:
<set xpath="/entity_classes/entity_class[@name='animalRabbit']/drop[@event='Harvest']/@name">rabbitMeat</set>
typed in, not validated, but you get the idea :)

 
alternatively, you could just <set>:

Code:
<set xpath="/entity_classes/entity_class[@name='animalRabbit']/drop[@event='Harvest']/@name">rabbitMeat</set>
typed in, not validated, but you get the idea :)
I tried that but it changes both drop events to rabbit meat then Lol

 
Gotcha back :)

Code:
   <set xpath="/entity_classes/entity_class[@name='animalRabbit']/drop[@event='Harvest' and @name='rawMeat']/@name">rabbitMeat</set>
 
thx man.. Big Big help but I am running into a problem with the recipes. When I build the mod I have no errors but for some reason the recipes cancel each other out. Ive tried doing multiple separate mods and one big one and it all the same

http://www.mediafire.com/file/cffjesrj3n63flx/Ztown.xml

this is the big config file where i added all of them together

 
Last edited by a moderator:
thx man.. Big Big help but I am running into a problem with the recipes. When I build the mod I have no errors but for some reason the recipes cancel each other out. Ive tried doing multiple separate mods and one big one and it all the same

http://www.mediafire.com/file/cffjesrj3n63flx/Ztown.xml

this is the big config file where i added all of them together
What do you mean they cancel each other out?

Code:
Config\Ztown.xml...
AddXmlByXPath: /items
Found 92
AddXmlByXPath: /blocks
Found 19
AddXmlByXPath: /blocks
Found 1
AddXmlByXPath: /blocks
Found 1
AddXmlByXPath: /blocks
Found 1
AddXmlByXPath: /blocks
Found 1
AddXmlByXPath: /blocks
Found 1
AddXmlByXPath: /recipes
Found 29
AddXmlByXPath: /entity_classes/entity_class[@name='animalRabbit']
Found 1
AddXmlByXPath: /entity_classes/entity_class[@name='animalBear']
Found 1
AddXmlByXPath: /entity_classes/entity_class[@name='animalBoar']
Found 2
AddXmlByXPath: /entity_classes/entity_class[@name='animalSnake']
Found 1
AddXmlByXPath: /entity_classes/entity_class[@name='animalWolf']
Found 1
AddXmlByXPath: /entity_classes/entity_class[@name='animalDireWolf']
Found 1
AddXmlByXPath: /progression/skills
Found 4
AddXmlByXPath: /lootcontainers/lootgroup[@name='weaponsPistol+ammo']
Found 1
AddXmlByXPath: /lootcontainers/lootgroup[@name='weaponsAnyShotguns']
Found 1
AddXmlByXPath: /lootcontainers/lootgroup[@name='weaponsMP5+ammo']
Found 2
AddXmlByXPath: /lootcontainers/lootgroup[@name='weaponsAK47+ammo']
Found 2
AddXmlByXPath: /lootcontainers/lootgroup[@name='weaponsSniperRifle+ammo']
Found 1
AddXmlByXPath: /lootcontainers/lootgroup[@name='weaponsCompoundBowParts']
Found 4
AddXmlByXPath: /lootcontainers/lootgroup[@name='weaponsMagnumParts']
Found 4
AddXmlByXPath: /lootcontainers/lootgroup[@name='weaponsMilitaryParts']
Found 20
 
none of the recipes show up in game. I have all the vanilla recipes but none of the custom ones
Have you checked your output_log.txt? Maybe there was an error parsing the XML, and it'll display it in there. SDX doesn't do any validation on what you are doing, other than making sure it's valid XML.

 
Back
Top