Jump to content

Edit History

Please note that revisions older than 365 days are pruned and will no longer show here
JoeSloeMoe

JoeSloeMoe

On 4/26/2024 at 7:52 AM, flogi said:

Hey, I like your idea very much. I was building an unreleased perk mod myself and was wondering if you have taken a look at how Khaine does the Looting Perk in Darkness Falls for example.

I cant really replicate what the perk does with your additions and explanations. My aim was to make some specific looting perks, like just buffing the looting of individual loot sources like trash. I already was successfull adding normal perks that achieve this, but I thought some learning perks would fit better after all.

 

Cheers!

 

PS: Thanks for the very detailed documentation on your code, that really helped a lot. Im not that new to modding, but the xml files are quite different to stuff I'm used to from other games.

Hi Flogi,

Apologies for not getting back to you sooner.

I dont see an action skill in DF for looting but I may have missed it. (the last DF I played was A20) Based on what you said though I found something in the code that I need to test. In the DF xml code in buffs.xml - the buff buffLevelUpTracking is tracking level-ups and has the following code:

 

<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$xpFromLootThisLevel" operation="set" value="@_xpFromLoot"/>

 

The code above is the same in the 7DTD codebase - which means the _xpFromLoot variable is not a DF specific variable. Am wondering if this variable can be used to measure change over time and then used for progression along a loot path.

 

At the bottom of buffs.xml (and also in XML.xml file) there is documentation on the xml code syntax etc. It shows 2 events for looting

onSelfItemLooted, //Hook Up
onSelfLootContainer

I wasnt able to use either of these, they are not hooked into the framework and dont fire. (or at least I couldn't get them to)

e.g.  <triggered_effect trigger="onSelfItemLooted" action="ModifyCVar" cvar="lootXPCounter" operation="add" value="6"/> <!--doesnt work-->

 

The above is only an issue if you want to measure what the player is doing to level the perk up. To just apply a looting perk (without have to monitor a players looting frequency) you could use something like the following:

 

<passive_effect name="LootStage" operation="perc_add" value=".1" tags="some_tag"/>
<passive_effect name="ScavengingTime" operation="perc_subtract" value=".1" tags="some_tag"/>

Where <some_tag> is a tag you add to loot containers that you want the effect to apply to. Either reset the 'tags' property if it already exists for that object:

<set xpath ="/blocks/block[@name='cntToilet01']/property[@name='Tags']/@value">some_tag,existingTag1,existingTag2</set>

or add the 'Tags' property if it doesnt already exist:

<insertAfter xpath ="/blocks/block[@name='cntToilet01']/property[@name='LootList']">
	<property name="Tags" value="some_tag"/>
</insertAfter>

The above adds the Tags property after the 'LootList' property of the toilet.

 

Not sure if any of the above if helpful to you, I may have misunderstood what you were asking. Thanks for the compliment on the code, its commented so that people can pull it apart, reuse it, see examples of the syntax etc. - glad its of help. If you check out the Survival No Trader mod there are a lot more in-depth examples there with similar comments.

Cheers

 

 

JoeSloeMoe

JoeSloeMoe

On 4/26/2024 at 7:52 AM, flogi said:

Hey, I like your idea very much. I was building an unreleased perk mod myself and was wondering if you have taken a look at how Khaine does the Looting Perk in Darkness Falls for example.

I cant really replicate what the perk does with your additions and explanations. My aim was to make some specific looting perks, like just buffing the looting of individual loot sources like trash. I already was successfull adding normal perks that achieve this, but I thought some learning perks would fit better after all.

 

Cheers!

 

PS: Thanks for the very detailed documentation on your code, that really helped a lot. Im not that new to modding, but the xml files are quite different to stuff I'm used to from other games.

Hi Flogi,

Apologies for not getting back to you sooner.

I dont see an action skill in DF for looting but I may have missed it. (the last DF I played was A20) Based on what you said though I found something in the code that I need to test. In the DF xml code in buffs.mls - the buff buffLevelUpTracking is tracking level-ups and has the following code:

 

<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$xpFromLootThisLevel" operation="set" value="@_xpFromLoot"/>

 

The code above is the same in the 7DTD codebase - which means the _xpFromLoot variable is not a DF specific variable. Am wondering if this variable can be used to measure change over time and then used for progression along a loot path.

 

At the bottom of buffs.xml (and also in XML.xml file) there is documentation on the xml code syntax etc. It shows 2 events for looting

onSelfItemLooted, //Hook Up
onSelfLootContainer

I wasnt able to use either of these, they are not hooked into the framework and dont fire. (or at least I couldn't get them to)

e.g.  <triggered_effect trigger="onSelfItemLooted" action="ModifyCVar" cvar="lootXPCounter" operation="add" value="6"/> <!--doesnt work-->

 

The above is only an issue if you want to measure what the player is doing to level the perk up. To just apply a looting perk (without have to monitor a players looting frequency) you could use something like the following:

 

<passive_effect name="LootStage" operation="perc_add" value=".1" tags="some_tag"/>
<passive_effect name="ScavengingTime" operation="perc_subtract" value=".1" tags="some_tag"/>

Where <some_tag> is a tag you add to loot containers that you want the effect to apply to. Either reset the 'tags' property if it already exists for that object:

<set xpath ="/blocks/block[@name='cntToilet01']/property[@name='Tags']/@value">some_tag,existingTag1,existingTag2</set>

or add the 'Tags' property if it doesnt already exist:

<insertAfter xpath ="/blocks/block[@name='cntToilet01']/property[@name='LootList']">
	<property name="Tags" value="some_tag"/>
</insertAfter>

The above adds the Tags property after the 'LootList' property of the toilet.

 

Not sure if any of the above if helpful to you, I may have misunderstood what you were asking. Thanks for the compliment on the code, its commented so that people can pull it apart, reuse it, see examples of the syntax etc. - glad its of help. If you check out the Survival No Trader mod there are a lot more in-depth examples there with similar comments.

Cheers

 

 

×
×
  • Create New...