M1cromanagement Posted January 18, 2023 Share Posted January 18, 2023 (edited) 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 January 18, 2023 by M1cromanagement (see edit history) Link to comment Share on other sites More sharing options...
Telric Posted January 18, 2023 Share Posted January 18, 2023 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 More sharing options...
M1cromanagement Posted January 19, 2023 Author Share Posted January 19, 2023 (edited) yeah like that ! 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 January 19, 2023 by M1cromanagement (see edit history) Link to comment Share on other sites More sharing options...
Telric Posted January 19, 2023 Share Posted January 19, 2023 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 More sharing options...
M1cromanagement Posted January 20, 2023 Author Share Posted January 20, 2023 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 1 Link to comment Share on other sites More sharing options...
BFT2020 Posted January 20, 2023 Share Posted January 20, 2023 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) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now