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

Why would a modlet only work on the first load?

Zagan

Refugee
I made a modlet and I tried using set xpath and then append xpath but both times it worked when I started a new game. But when I went back into the game it didn't work. Is there some reason this would happen?

I'm basically trying to change a paint that is set to hidden to not be. I can edit the xml manually and it works so I'm confused why it's not working with a modlet. Can anyone show me an example of what will work everytime I load a game and will work on a dedicated server?

I'm trying to get this code to work.

Code:
<Configs>
<append xpath="/painting">
		<paint id="138" name="txName_Drywall_orange">
		<property name="TextureId" value="430"/>
		<property name="Group" value="txGroupPainted"/>
		<property name="PaintCost" value="1" />
		<property name="Hidden" value="false" />
	</paint>
	<paint id="148" name="txName_Tarpaper">
		<property name="TextureId" value="571"/>
		<property name="Group" value="txGroupWood"/>
		<property name="PaintCost" value="3" />
		<property name="Hidden" value="false" />
	</paint>
</append>
</Configs>
 
Last edited by a moderator:
I made a modlet and I tried using set xpath and then append xpath but both times it worked when I started a new game. But when I went back into the game it didn't work. Is there some reason this would happen?
I'm basically trying to change a paint that is set to hidden to not be. I can edit the xml manually and it works so I'm confused why it's not working with a modlet. Can anyone show me an example of what will work everytime I load a game and will work on a dedicated server?

I'm trying to get this code to work.

Code:
<Configs>
<append xpath="/painting">
		<paint id="138" name="txName_Drywall_orange">
		<property name="TextureId" value="430"/>
		<property name="Group" value="txGroupPainted"/>
		<property name="PaintCost" value="1" />
		<property name="Hidden" value="false" />
	</paint>
	<paint id="148" name="txName_Tarpaper">
		<property name="TextureId" value="571"/>
		<property name="Group" value="txGroupWood"/>
		<property name="PaintCost" value="3" />
		<property name="Hidden" value="false" />
	</paint>
</append>
</Configs>
138 and 148 already exists. I think you are looking for a <set on them, to change the hidden flag.

 
Yeah, I said in my post that I already tried set and then append but neither of them worked to unhide them. I just pasted the append one to show as an example, pretty much the same just replace append with set. I was hoping someone could give me a code that works every time.

But thanks for the reply.

 
Back
Top