Jump to content

XPath - entityclasses.xml - PlayerExpGain


Recommended Posts

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"/>

 

 

 

<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 ?

Edited by M1cromanagement (see edit history)
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 

Quote

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" ?

Edited by M1cromanagement (see edit history)
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

sorry didnt write back after it worked ! was quite late

 

<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>

 

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
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...