Jump to content

How do I add a repair class with values to a block in a modlet?


LordoftheMoo

Recommended Posts

I've done a bit of searching on here (and online in general) but I think my case is a little too narrow to find easily. I'm trying to add the ability to repair a block that currently cannot be, and it's easy to do by directly editing the blocks.xml, but I would prefer to pull it out into a modlet so upgrades are painless.

I tried using append to add the line to the block but that failed. I then stared at it a bit and tried splitting out the class and then using set to add the property, but I realized I didn't know how to set both the material and the count in a single line.

Anyone know what would be the right syntax to use for this scenario? Seems like it should be really simple, but I'm stumped. 😕

Link to comment
Share on other sites

Please use the "Discussion and Requests" section for questions.

 

DId you read https://community.7daystodie.com/topic/7653-xpath-modding-explanation-thread/

 

It should have many examples. You also could download other modlets and learn from them.

 

If you need to change two values in the same line you can just use two separate xpath commands.

 

If still stumped, post what you have or the block before and after and someone will tell you the correct xpath for your example.

 

Link to comment
Share on other sites

I did, but the sections I was reading didn't seem to work in the case I had.

I've gone back through more of that thread, though, and found something that led me to the right answer.

 

We can delete this thread if you'd like, and if I trip on something else, I'll see to posting in that thread. Thanks!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...