Jump to content

Help Replacing rawMeat in SDX


tivial01

Recommended Posts

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>

Link to comment
Share on other sites

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

 

like so

 

<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

 

<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>

Link to comment
Share on other sites

alternatively, you could just <set>:

 

<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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

 

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...