Jump to content

Gornemant

Members
  • Posts

    24
  • Joined

Gornemant's Achievements

Refugee

Refugee (1/15)

0

Reputation

  1. Halp! I'm trying to add the hazmat suit in the yeah science 2 perk requirement, already added the recipes. I want to add it here: <perk name="perkYeahScience" parent="skillCraftsmanship" name_key="perkYeahScienceName" desc_key="perkYeahScienceDesc" icon="ui_game_symbol_chemistry"> <SNIP> <effect_group> <SNIP> <passive_effect name="RecipeTagUnlocked" operation="base_set" value="1" level="2,5" tags="thrownDynamite,ammo9mmBulletSteel,ammo44MagnumBulletSteel,ammo762mmBulletFMJSteel,ammoShotgunSlug,ammoArrowSteelAP,ammoCrossbowBoltSteelAP,ammoArrowFlaming,mineAirFilter,rScrapIronPlateMine,resourceMilitaryFiber,modMeleeBunkerBuster"/> <SNIP> </effect_group> </perk> So I thought I'd just append a new passive effect line that resembles the one above, like this: <append xpath="/progression/perk[@name='perkYeahScience']/effect_group"> <passive_effect name="RecipeTagUnlocked" operation="base_set" value="1" level="2,5" tags="hazmatBoots,hazmatPants,hazmatShirt,hazmatGloves,hazmatMask"/> </append> However I'm getting an error that this couldn't be applied, I'm guessing I've done an error in the xpath, but I can't figure out what exactly. Edit: nvm, think hard enough and the answer will come on it's own /perks is missing between progression and perk..... doh!
  2. Yeah, figured that one out, problem is I'd like to be able to specify a different value for each spawn using only one xpath instead of 3, not apply the same value to all spawn nodes. I just wanted to add another example without the index, but it's basically the same request: modify more than one variable on the same xpath instead of using a seperate xpath for each and every property of the same class. Just wanted to know if that is even possible, and if yes how. ;p
  3. Hi, I've been toying around with xpath since yesterday and I couldn't figure out how to set more than one variable (modify an existing variable) with the same set xpath command, I basically just copy pasted the almost same thing 3 times. I was wondering if there was a way to simplify this for future use, thanks! Here's an example where I had to use an index since I don't think I can distinguish the spawner from one another any other way (feel free to correct me on this). Here's the original xml code <biome name="pine_forest"> <spawn maxcount="2" respawndelay="4" time="Any" entitygroup="ZombiesAll" /> <spawn maxcount="1" respawndelay="7" time="Any" entitygroup="EnemyAnimalsForest" spawnDeadChance="0" /> <spawn maxcount="1" respawndelay="7" time="Any" entitygroup="FriendlyAnimalsForest" spawnDeadChance="0" /> </biome> And here's the xpath to change the max count of each line <set xpath="/spawning/biome[@name='pine_forest']/spawn[1]/@maxcount">5</set> <set xpath="/spawning/biome[@name='pine_forest']/spawn[2]/@maxcount">2</set> <set xpath="/spawning/biome[@name='pine_forest']/spawn[3]/@maxcount">3</set> Can this be done in just one xpath? Kinda like this <set xpath="/spawning/biome[@name='pine_forest'] spawn[1]/@maxcount" 5 spawn[2]/@maxcount" 2 spawn[3]/@maxcount" 3 </set> Another example where I'd like to modify a bunch of variables for all zombies, here's the original in entityclasses.xml (just random variables for testing) <entity_class name="zombieTemplateMale"> <!-- other variables --> <property name="Mass" value="170"/> <property name="Weight" value="70"/> <property name="MaxViewAngle" value="180"/> <property name="SightRange" value="30"/> <!-- other variables --> </entity_class> And here's the code to change just one of those variables, but I would basically have to copy paste almost the same set command for each variable I'd like to change. Again if all 4 could be done with just one command I would appreciate a hint or two. ;p <set xpath="/entity_classes/entity_class[starts-with(@name, 'zombie')]/property[@name='Mass']/@value">420</set>
×
×
  • Create New...