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

XPath - entityclasses.xml - PlayerExpGain

Hello Guys i´m struggling with some xpath lines, i want to make a game without exp gain when you kill a zombie,harvesting,repairing, etc , just learning the schematics gives you exp and quests.

entityclasses.xml line 227 -248

<!-- Notes from meeting 03 Jun
increase upgrade xp by 500%
increase repair xp by 1000%
nerf quest XP 50%
nerf kill 25%

remove sell xp (to be determined)

PlayerExpGain, Tags: Kill, Harvesting, Upgrading, Crafting, Selling, Quest, Looting, Party, Other
-->

<!-- wasteland gamestage bonus
<passive_effect name="GameStage" operation="base_add" value="75">
<requirement name="InBiome" biome="8"/>
</passive_effect>
-->

<!-- <passive_effect name="PlayerExpGain" operation="perc_add" value=".2" tags="Repairing"/>
<passive_effect name="PlayerExpGain" operation="perc_add" value="-.25" tags="Kill"/>
<passive_effect name="PlayerExpGain" operation="perc_add" value="-.5" tags="Quest"/>
-->
<passive_effect name="PlayerExpGain" operation="perc_add" value="5" tags="Upgrading"/>







Code:
<configs>
<!--
<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@value">-1</set>
-->
<set xpath="/entity_classes/entity_class[contains(@name, 'player')]/property[@name='ExperienceGain']/@value">0</set>
<set xpath="/entity_classes/entity_class[contains(@name, 'zombie')]/property[@name='ExperienceGain']/@value">0</set>
<set xpath="/entity_classes/entity_class[contains(@name, 'animal')]/property[@name='ExperienceGain']/@value">0</set>



<append xpath="/entity_classes/entity_class/[@name='playerMale']">  

	<effect_group name="PlayerExpGain">
		<passive_effect name="PlayerExpGain" operation="perc_add" value="-1" tags="Kill"/>
		<passive_effect name="PlayerExpGain" operation="perc_add" value="-1" tags="Harvesting"/>
		<passive_effect name="PlayerExpGain" operation="perc_add" value="-1" tags="Upgrading"/>
		<passive_effect name="PlayerExpGain" operation="perc_add" value="-1" tags="Crafting"/>
		<passive_effect name="PlayerExpGain" operation="perc_add" value="-1" tags="Selling"/>
	</effect_group>
	
	
</append>	
</configs>

<!--
<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@value">-1</set>
--> thats working but how i can set/edit the tag to ?

or/and

how i can make this correct for the tags for the kill,harvesting upgrading etc ?

 
Last edited by a moderator:
Not entirely sure what you're looking for, as the stuff in your configs mod file dont exist in vanilla. Are you trying to mod a mod's configs?
If i understand, you want to change the value of the tags property... if that's what you're after, simply change the @value to @tags in your set xpath.
 

<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@tags">yourtagshere</set>




If that's not what you're wanting, it's a bit hard for me to picture what you're after, since that effect group doesnt exist in vanilla files.

 
yeah like that ! :D   but i got confused, i want to make for example 5 seperate lines... for upgrading to selling and make a value to

<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@tags">Upgrading</set>
<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@tags">Kill</set>
<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@tags">Harvesting</set>
<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@tags">Crafting</set>
<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@tags">Selling</set>




or im changing the whole time the first line from upgrading to harvesting to upgrading to selling.

or it makes a new one ?

<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@tags">Upgrading</set>
<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@value">-1</set>


these two lines i want to create in one line

and the final idea is like that

<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@tags">Upgrading</set>
<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@value">-1</set>

<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@tags">Kill</set>
<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@value">-1</set>

<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@tags">Harvesting</set>
<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@value">-1</set>

<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@tags">Crafting</set>
<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@value">-1</set>

<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@tags">Selling</set>
<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@value">-1</set>




that i have got 5 lines with a value change and a tag change.

If that's not what you're wanting, it's a bit hard for me to picture what you're after, since that effect group doesnt exist in vanilla files.


so i need to "append xpath" ?

 
Last edited by a moderator:
Ok i think i get you now... you're wanting to add those additional playerexp things, but your original xpath wasnt working. Looking back on it, you had the right idea, just wrong xpath.

 

<append xpath="/entity_classes/entity_class[@name='playerMale']">



This one is what you need. That will add the effectgroup of playerexpgains you're wanting to put in. What you had currently in the original post was /entity_class/[@name.... so you were close, just one / too many.

 
sorry didnt write back after it worked ! was quite late

Code:
<configs>

<set xpath="/entity_classes/entity_class[contains(@name, 'player')]/property[@name='ExperienceGain']/@value">0</set>
<set xpath="/entity_classes/entity_class[contains(@name, 'zombie')]/property[@name='ExperienceGain']/@value">0</set>
<set xpath="/entity_classes/entity_class[contains(@name, 'animal')]/property[@name='ExperienceGain']/@value">0</set>

<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='PlayerExpGain']/@value">-1</set>


<append xpath="/entity_classes/entity_class[@name='playerMale']/effect_group">
	<passive_effect name="PlayerExpGain" operation="perc_add" value="-1" tags="Kill"/>
	<passive_effect name="PlayerExpGain" operation="base_set" value="0" tags="Harvesting"/>
	<passive_effect name="PlayerExpGain" operation="perc_add" value="-1" tags="Crafting"/>
	<passive_effect name="PlayerExpGain" operation="perc_add" value="-1" tags="Selling"/>
	<passive_effect name="PlayerExpGain" operation="perc_add" value="-1" tags="Looting"/>
</append>

</configs>



Code:
[B]I'll have to look into the perc_add and base_set options, but I can work with them now and slowly move on to the next one[/B]



 
FYI you might have already realized this, but if someone has the nerdy googles on, they will earn 10% XP for anything that you set at perc_add value of - (since -1+0.1 will be -0.9)

 
Back
Top