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

Modlet help for can pick up mines

Jolly

New member
I can't figure ourt the correct syntax for this:

<config>

<set xpath="/blocks/block[@name=mineCandyTin]/property[@name=CanPickup]/@value="true"/>

</set>

Anyone know how to make this work ? The console says there is an error after value= but i don't know what it should be.

thx

 
make sure its in your blocks.xml file in your mods folder and don't copy over that <config> reference if you already have one at the top of the blocks.xml file. I just stuck in with another modlet.

 
make sure its in your blocks.xml file in your mods folder and don't copy over that <config> reference if you already have one at the top of the blocks.xml file. I just stuck in with another modlet.
I have the following in my blocks.xml file

Code:
<configs>
<!-- Edit mines so they can be picked up. -->
<set xpath="/blocks/block[@name='mineCandyTin']/property[@name='CanPickup']/@value">"true"</set> 
</configs>
EDIT: Last time, I tried it without the quotes around true as well and it still didn't work for me.

 
i cheated and put it in the ladder speed modlet file like so

<configs>

<!-- Movement speed adjustments for Ladders -->

<!--Wood Ladder -->

<append xpath="/blocks/block[@name=ladderWood]">

<property name="MovementFactor" value="2.0"/>

</append>

<!--Iron Ladder -->

<append xpath="/blocks/block[@name=ladderMetal]">

<property name="MovementFactor" value="2.3"/>

</append>

<!--Steel Ladder -->

<append xpath="/blocks/block[@name=ladderSteel]">

<property name="MovementFactor" value="2.6"/>

</append>

<!--Burning barrel -->

<append xpath="/blocks/block[@name=burningBarrelPlayer]">

<property name="BuffsWhenWalkedOn" value="buffBurningMolotov"/>

</append>

<!--Mines -->

<set xpath="/blocks/block[@name=mineCandyTin]/property[@name=CanPickup]/@value">true</set>

</configs>

 
I just added it to another modlet that mods the blocks.xml file and it suddenly started working. That is extremely strange that it wont work in a modlet on it's own.

 
did you make a modinfo.xml file for it ?
Yup, I did. I don't know what was wrong but I made a copy of the one it was working in and then deleted everything else but that one line and it is still working even by itself. There had to have been an invisible character somewhere in the text that I had before that was causing the problem. That's the problem with editors, sometimes invisible characters are inserted and you can't see them to know they are there. It used to happen all the time back during the old DOS pre-Windows days. I really hate that it seems to have made a comeback.

 
Back
Top