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

Is it possible to change description keys from xpath?

mjrice

New member
In a nutshell, I can easily change what recipes are unlocked at different levels of a given perk like the example below, where I make leather armor available under Hammer & Forge level 1 instead of level 2:

Code:
<set xpath="/progression/perks/perk[@name='perkHammerForge']/effect_group/passive_effect[@level='1,5']/@tags">forge,toolAnvil,armorLeatherBoots,armorLeatherGloves,armorLeatherHood,armorLeatherChest,armorLeatherPants</set>
<set xpath="/progression/perks/perk[@name='perkHammerForge']/effect_group/passive_effect[@level='1,5']/@tags">meleeToolFireaxeIron,meleeToolPickaxeIron,meleeToolHoeIron,meleeToolShovelIron,meleeToolClawHammer,meleeToolSledgehammer,meleeToolHuntingKnife</set>
But I can't change the description shown in the UI for those levels, because they are not stored in xml but rather in a csv file called localization.txt.

I tried to do something like this in case it would take a "desc" value in addition to "desk_key" but it didn't work:

Code:
<remove xpath="/progression/perks/perk[@name='perkHammerForge']/effect_group/effect_description[@level='1']"/>

<append xpath="/progression/perks/perk[@name='perkHammerForge']/effect_group">
		<effect_description level="1" description="You can craft a forge and make leather armor"/>
</append>
Is it not possible to alter the text resources? This seems like a big hindrance to modding A17 if so.

 
It turns out you can get it to do it, you just have to remove the desc_id key and add a desc_base string like so:

Code:
<remove xpath="/progression/perks/perk[@name='perkHammerForge']/effect_group/effect_description[@level='1']"/>

<append xpath="/progression/perks/perk[@name='perkHammerForge']/effect_group">
<effect_description level="1" desc_base="You can craft a forge and make leather armor"/>
</append>
 
It turns out you can get it to do it, you just have to remove the desc_id key and add a desc_base string like so:

Code:
<remove xpath="/progression/perks/perk[@name='perkHammerForge']/effect_group/effect_description[@level='1']"/>

<append xpath="/progression/perks/perk[@name='perkHammerForge']/effect_group">
<effect_description level="1" desc_base="You can craft a forge and make leather armor"/>
</append>
Nice find. Sadly it won’t be localized

 
Nice find. Sadly it won’t be localized
Yeah, they should really put all that in localization.xml and make it accessible properly.

This same trick does not work for the pop-up help on perk progression unfortunately. So the text that you get when you hover over a locked perk seems to be inaccessible from xpath.

 
Back
Top