Need help updating Xpath in Mod for 1.0

Started by jabbamonkey, December 18, 2018, 02:12:54 PM

Previous topic - Next topic

jabbamonkey

I am trying to update my A17 mod to 1.0, but the xpathing is off. When I load the game, I get a ton of errors from the mod.  I'm mainly a designer, and not very good with xpathing. See the file below...

http://classicgaming.cc/temp/JabbamonkeysGraphics.zip

That is the mod in it's current state. It basically is a bunch of retexturing, with some workbench upgrades (i.e. adds masking, and rotation). If someone could take a look, that would be great.  In the Mods "Patches" folder are 3 xml files. The VGP files are simple path retexturing for the VGP mods (someone else created those).   The workbenches xpathing is in the Patches.xml

Feel free to check out my A17 work in the signature link below...

Shinzy

(Psst! The link goes to 404 page not found)

jabbamonkey

oops... rar, not zip...

http://classicgaming.cc/temp/JabbamonkeysGraphics.rar

Also, I noticed that they changed the naming convention (from _back to _south) for all of the production benches. That may be the cause of some of the problems...

Shinzy

Quote from: jabbamonkey on December 19, 2018, 01:49:45 PM
oops... rar, not zip...

http://classicgaming.cc/temp/JabbamonkeysGraphics.rar

Also, I noticed that they changed the naming convention (from _back to _south) for all of the production benches. That may be the cause of some of the problems...

oh yes all the back/front/side were changed to south/north/east (west is optional but possible)

That might actually fix most of your problems there to be honest ;D
Fix those and we'll have another look at it if there's more errors to spook away

jabbamonkey

I've been redoing alot of the production bench textures. Not only did they change the file name endings ... but they are also different sizes ... oh well, even more work.

Also, I noticed that some of the textures now have stacks. For example, herbal medicine used to just have ONE MedicineHerbal texture. Now there are 3 for various stacks.  MedicineHerbal_a, MedicineHerbal_b, MedicineHerbal_c. 

Let me run through the graphics... this could take some time. I'll update everyone later. Definitely looking good so far.

jabbamonkey

Quote from: Shinzy on December 21, 2018, 08:18:33 AM
Fix those and we'll have another look at it if there's more errors to spook away

I fixed a bunch of the graphics. Still have work to do on some others, but wanted to troubleshoot some issues while I continue the design work. I'm still getting a bunch of error when I load the mod, even though the "error textures" are showing up in the game ...

For example, I am getting errors for the TableButcher ... yet the texture for the butcher table shows up in my game.

Also, I have Leather_a, Leather_b and Leather_c textures .... Leather_a shows up for SMALL stacks, and Leather_b shows up for MED stacks. But I get a red X for LARGE stacks (where leather_c should be showing up).

Also, not sure why my prosthetic textures aren't showing up. This is probably a pathing issue that I can't figure out. One of my complaints is that the "core textures" (from the core textures thread) are not provided with the actual directory structure.  So, I don't know where to place things ... and in these cases, the DEF files aren't providing the answer (or, I'm just "missing" something).

Below is the current file...
http://classicgaming.cc/temp/JGraphics.zip

jabbamonkey

Quote from: Shinzy on December 21, 2018, 08:18:33 AM
Fix those and we'll have another look at it if there's more errors to spook away

So, I think some of the issues may have to do with my xpath'ing... As mentioned, I'm not a programmer. Below is how I am "modding" the butcher table. I am adding a MASK to the butcher table via the code below. Let me know if that is correct (because I am getting an error for the Butcher table)...

   <Operation Class="PatchOperationInsert"> <!-- "Adding CutoutComplex to TableButcher" -->
<xpath>/ThingDefs/ThingDef[DefName = "TableButcher"]/graphicData/graphicClass</xpath>
<value>
<shaderType>CutoutComplex</shaderType>
</value>
</Operation>

kwang4

Okay two things. First, start of the xpath doesn't really work, you could either do "*/Defs/ThingDef" or perhaps "Defs/ThingDef" even though I didn't try that one yet. Second, if PatchOperationInsert isn't working, try patchOperationAdd, which is my personal preference. In this case, <shaderType> is in graphicData, so the graphicClass won't be needed, like :
<Operation Class="PatchOperationAdd"> <!-- "Adding CutoutComplex to TableButcher" -->
<xpath>Defs/ThingDef[DefName = "TableButcher"]/graphicData</xpath>
<value>
<shaderType>CutoutComplex</shaderType>
</value>
</Operation>


jabbamonkey

Just tried it... didn't work ....

<Operation Class="patchOperationAdd"> <!-- "Adding CutoutComplex to TableButcher" -->
<xpath>*/Defs/ThingDef[DefName = "TableButcher"]/graphicData/graphicClass</xpath>
<value>
<shaderType>CutoutComplex</shaderType>
</value>
</Operation>


http://classicgaming.cc/temp/JGraphicsv3.zip

kwang4

Use this xpath:
<xpath>*/ThingDef[defName = "TableButcher"]/graphicData</xpath>