Jump to content

Hybrid Learn By Use (Action Skills) - 1.0 XML modlet


JoeSloeMoe

Recommended Posts

7 hours ago, JoeSloeMoe said:

 

- The Perk action has a trigger and it fires but its value is small enough that it would affect the balance if it was used in Learn By Use.

   e.g. Cardio: The Perk tree increases cardio to a max of 30%. Splitting this between the LBU and the Cardio Perk would mean investing 3 Perk Points only gets a total of 15% increase in the Cardio Perk. So there wouldn't be much incentive to invest any points in the Cardio Perk tree, which may change the balance a bit too much.

 

Am open to comments on balance and any feedback on how to add more of the Perks to Learn By Use. Outside of one or two I'm still playing with, I dont know if I should add any more at this time.

Cheers

 

I personally think 5% for the first level in cardio is fine, since it is unlocked already, so only 1 point investment. Level 2 could be 7% and level 3 8% for a total of 20%, and LBU is the remaining 10%

Link to comment
Share on other sites

21 hours ago, FranticDan said:

I personally think 5% for the first level in cardio is fine, since it is unlocked already, so only 1 point investment. Level 2 could be 7% and level 3 8% for a total of 20%, and LBU is the remaining 10%

 

Thats not a bad idea (splitting it 10/20) - I dont usually use that Perk so will play around with it. Am working on a short side story/challenge for the Survival No Trader mod at the moment but it shouldnt take much to add it if it fits. Appreciate the feedback.

cheers

Link to comment
Share on other sites

12 hours ago, Onlineritter said:

The Hybrid Learn by Use (Action Skills) mod works in single player but not in multiplayer.

Hi Onlineritter,

Are you able to be a little more specific? Are there any errors in the log file? I was also wondering if there is no progression regardless of use or something else that not working

Any feedback you could provide would be appreciated.

Cheers

Link to comment
Share on other sites

Posted (edited)
On 4/11/2024 at 5:17 AM, Onlineritter said:

The Hybrid Learn by Use (Action Skills) mod works in single player but not in multiplayer.

 

Dropped a 1.0.5 update that puts in a fix for this but am not able to fully test.

 

It looks like the OnSelfEnteredGame trigger in progression.xml (that sets the config vars) does not get called in multiplayer within the context of an Attribute.

Moved all config variable initialisation from progression.xml to buffs.xml.

Cheers

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

On 4/17/2024 at 1:55 AM, KoolaLobita said:

Nice mod!

 

Please be aware that 7d2d on linux is case sensitive. So lower case config folder and localization will not be read. Should be "Config" and "Config/Localization.txt".

 

 

I should have know that, thanks for the heads up. Will correct it this evening and drop an update.

Cheers

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Posted (edited)
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

 

 

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

Hey Joe, thanks for your answer.

It seems like DF is gaining the experience from applying buffs and also using SCore Mechanics along the way to implement the loot progress. I was not able yet to copy the behaviour and did not understand it fully yet, but if you want to check it out the relevant buffs in DF are:

 

buffScavengingSkillLvl

buffScavengingDisassembleSkillXPTick

buffScavengingServerHack

 

Those are also tied to the MinEventActionModifySkillSDX (you can find that in SCore/Scripts/Mini Events). Maybe I also missed something else, cause even by copying the buffs and getting it to work roughly it does not work properly (it always adds a level to my perk despite the xp not being reached yet, quite strange).

 

 

Thanks for your tips with the containers, already tried that and its working like a charm.

 

I can also confirm that the loot actions dont work, figured that out as well.

 

 

 

Link to comment
Share on other sites

12 hours ago, flogi said:

Hey Joe, thanks for your answer.

It seems like DF is gaining the experience from applying buffs and also using SCore Mechanics along the way to implement the loot progress. I was not able yet to copy the behaviour and did not understand it fully yet, but if you want to check it out the relevant buffs in DF are:

 

buffScavengingSkillLvl

buffScavengingDisassembleSkillXPTick

buffScavengingServerHack

 

Those are also tied to the MinEventActionModifySkillSDX (you can find that in SCore/Scripts/Mini Events). Maybe I also missed something else, cause even by copying the buffs and getting it to work roughly it does not work properly (it always adds a level to my perk despite the xp not being reached yet, quite strange).

 

 

Thanks for your tips with the containers, already tried that and its working like a charm.

 

I can also confirm that the loot actions dont work, figured that out as well.

 

 

 

The SCore lib is this mod - forum link here. You probably need to download that mod to use any of the SCore interface.

I dont use it at the moment as the current Learn By Use implementation is xml only. I will probably move in that direction when the Bandits gets introduced (specifically for the Survival No Trader storyline) and fully use it then.

I do think I can squeeze looting in using the '_xpFromLoot' variable I mentioned before (also cardio using Frantic Dan's suggestion from a few posts back.) so there still room to grow for Learn By Use.

cheers

Link to comment
Share on other sites

Hey Joe, demo expert seems bugged (for me at least). Leveled up like crazy and maxed out while fighting horde night

 

Spoiler

<perk name="lbu_DemolitionsExpert" max_level="100" parent="lbu_IntellectSkills" base_skill_point_cost="0" name_key="lbu_DemolitionsExpertName" desc_key="lbu_DemolitionsExpertDesc" long_desc_key="lbu_DemolitionsExpertDesc" icon="ui_game_symbol_explosion">
            <!--initialise if first time-->
            <effect_group>
                <requirement name="ItemHasTags" tags="perkDemolitionsExpert"/>
                <requirement name="CVarCompare" cvar="lbu_Demolition_XPIncrement" operation="LT" value="@lbu_DefaultInitialIncrement"/>
                    <triggered_effect trigger="onSelfExplosionDamagedOther" action="ModifyCVar" cvar="lbu_Demolition_XPIncrement" operation="set" value="@lbu_DefaultInitialIncrement"/>
            </effect_group>
            <!--BCK verify ProgressionLevel, backup var should always be equal to ProgessionLevel-->
            <effect_group>
                <requirement name="!HasBuff" buff="buffVerifyLBU_ProgressLevels"/>                                
                <requirement name="ProgressionLevel" progression_name="lbu_Demolition" operation="NotEquals" value="@lbu_Demolition_Lvl"/> 
                    <triggered_effect trigger="onSelfDamagedOther" action="AddBuff" buff="buffVerifyLBU_ProgressLevels"/>    
            </effect_group>
            <!--apply current effect as per level-->
            <effect_group>
                <requirement name="ItemHasTags" tags="perkDemolitionsExpert"/>
                <passive_effect name="DismemberChance" operation="base_add" level="1,100" value=".002,.2" tags="perkDemolitionsExpert"/>
                <passive_effect name="BlockDamage" operation="perc_add" level="1,100" value="0.005,.5" tags="perkDemolitionsExpert"/>
                <passive_effect name="DamageModifier" operation="perc_add" value=".003,0.3" level="1,100" tags="entity"/>
                <passive_effect name="DamageModifier" operation="perc_add" value=".0045,0.45" level="1,100" tags="head"/>
                <passive_effect name="DamageModifier" operation="perc_add" value=".003,0.3" level="1,100" tags="Glass,Stone,Cloth,Concrete,Boulder,Metal,Wood,Earth,Snow,Plants,Leaves"/>
                <passive_effect name="ExplosionRadius" operation="perc_add" level=".005,.5" value="1,100" tags="perkDemolitionsExpert"/>
            </effect_group>
            <!--apply any level xp gain for damage or kill triggers-->
            <effect_group>
                <requirement name="ItemHasTags" tags="perkDemolitionsExpert"/>
                <requirement name="ProgressionLevel" progression_name="lbu_DemolitionsExpert" operation="LT" value="100"/>
                <triggered_effect trigger="onSelfExplosionDamagedOther" action="ModifyCVar" cvar="lbu_DemolitionsExpert_XP" operation="add" value="5">
                    <requirement name="StatCompareCurrent" target="other" stat="health" operation="GT" value="0"/>
                </triggered_effect>
                <triggered_effect trigger="onSelfKilledOther" action="ModifyCVar" cvar="lbu_DemolitionsExpert_XP" operation="add" value="10"/>
            </effect_group>
            <!--Increase ProgressLevel if xp greater than value for next level-->
            <effect_group>
                <requirement name="ItemHasTags" tags="perkDemolitionsExpert"/>
                <requirement name="CVarCompare" cvar="lbu_DemolitionsExpert_XP" operation="GTE" value="@lbu_DemolitionsExpert_XPIncrement"/>
                <requirement name="ProgressionLevel" progression_name="lbu_DemolitionsExpert" operation="LT" value="100"/>
                <triggered_effect trigger="onSelfExplosionDamagedOther" action="ModifyCVar" cvar="lbu_DemolitionsExpert_XPIncrement" operation="multiply" value="@lbu_DefaultIncrementIncrease">
                    <!--taper off level xp increase at level 40 (xxx_XPIncrement about 2400). xxx_XPIncrement will grow to 4700  without the cap-->
                    <requirement name="ProgressionLevel" progression_name="lbu_DemolitionsExpert" operation="LTE" value="@lbu_DefaultLevelCap"/>
                </triggered_effect>
                <triggered_effect trigger="onSelfExplosionDamagedOther" action="ModifyCVar" cvar="lbu_DemolitionsExpert_XP" operation="set" value="0"/>
                <triggered_effect trigger="onSelfExplosionDamagedOther" action="AddProgressionLevel" progression_name="lbu_DemolitionsExpert" level="1"/>
                <!--Upadate BCK var in line with ProgressionLevel progress-->
                <triggered_effect trigger="onSelfExplosionDamagedOther" action="ModifyCVar" cvar="lbu_Demolition_Lvl" operation="add" value="1"/> 
                <triggered_effect trigger="onSelfExplosionDamagedOther" action="ShowToolbeltMessage" message="[4FC3F7]Demolitions Expert Skill Increased![-]"/>
                <!--if max level then give free Skill Point-->
                <triggered_effect trigger="onSelfExplosionDamagedOther" action="CallGameEvent" event="lbu_action_give_points">
                    <requirement name="ProgressionLevel" progression_name="lbu_DemolitionsExpert" operation="EQ" value="100"/>
                </triggered_effect>
            </effect_group>
        </perk>

 

Link to comment
Share on other sites

10 hours ago, FranticDan said:

Hey Joe, demo expert seems bugged (for me at least). Leveled up like crazy and maxed out while fighting horde night
 

 

Demo is a tricky one. It covers a number of different weapons (fire, grenades,timed charges). If the physical grenade misses a target the explosion doesnt seem to trigger the hit event even if it kills a zombie. If the grenade hits a zombie then it seems to trigger a hit for every zombie that the explosion effects. This can mean that one grenade in a group of 30 zombies can trigger the xp increase 30 times for that one grenade. I would be interested to know what Demo weapons you were using, do you have a rough guess as to how many you used?

 

I notice that you removed the line

 

<triggered_effect trigger="onSelfExplosionMissEntity" action="ModifyCVar" cvar="lbu_Demolition_XP" operation="add" value="11"/>

 

The onSelfExplosionMissEntity trigger is used to cater for Timed Charges. Timed Charges dont have an 'other' to damage or kill, but they will call the onSelfExplosionMissEntity trigger. This also means that if you throw a grenade and it misses a zombie and so does the resulting explosion, you would still get xp (11) - I think thats ok as its a tiny amount for the leveling up and grenades are expensive so its not expected that this is abused.

 

It has been tricky testing the Demo code, its one Perk thats hard to balance between daily use and hordenight.

Will adjust the current xp levels, thanks for the heads up.

Cheers

Link to comment
Share on other sites

I was using explosive arrows with a bow, nothing else.

There's no timed charges in my mod so no need for onSelfExplosionMissEntity ? Or manby having it helps stop the bug from triggering?
(This feels similar to miner 69er bugging if you got xp from both hit and destroy in the very first hit)

Each hit/kill instantly leveled up the skill, I went from level 0 to level 100 within about a 15 arrows

https://clips.twitch.tv/SecretiveLittlePizzaSMOrc-r-lM93WSMJpjXqzQ

Link to comment
Share on other sites

Posted (edited)
On 5/1/2024 at 7:58 PM, FranticDan said:

I was using explosive arrows with a bow, nothing else.

There's no timed charges in my mod so no need for onSelfExplosionMissEntity ? Or manby having it helps stop the bug from triggering?
(This feels similar to miner 69er bugging if you got xp from both hit and destroy in the very first hit)

Each hit/kill instantly leveled up the skill, I went from level 0 to level 100 within about a 15 arrows

https://clips.twitch.tv/SecretiveLittlePizzaSMOrc-r-lM93WSMJpjXqzQ

Am testing some changes and doing code cleanup, will post an update soon.

I moved all the intialisation code to a startup buff and under testing it isnt the cause. I've added a tag to molotovs to separate them from the other demo stuff.  Reduced xp to 1 for all but molys and timed changes (increased xp for molys). It seemed ok in testing given the limitations - I still need to test it on a proper horde night.

Did you notice any change for archery? In testing it seemed to be effected by the number of zombies hit by the blast and I'll put in a control for that as well.

cheers

PS. Yes, it would be fine to leave out onSelfExplosionMissEntity  if there are no Timed Charges.

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

22 hours ago, JoeSloeMoe said:

Am testing some changes and doing code cleanup, will post an update soon.

I moved all the intialisation code to a startup buff and under testing it isnt the cause. I've added a tag to molotovs to separate them from the other demo stuff.  Reduced xp to 1 for all but molys and timed changes (increased xp for molys). It seemed ok in testing given the limitations - I still need to test it on a proper horde night.

Did you notice any change for archery? In testing it seemed to be effected by the number of zombies hit by the blast and I'll put in a control for that as well.

cheers

PS. Yes, it would be fine to leave out onSelfExplosionMissEntity  if there are no Timed Charges.

It bugs even with pipes bombs, regardless if one zombie or many zombies are hit

Link to comment
Share on other sites

Posted (edited)
22 hours ago, FranticDan said:

It bugs even with pipes bombs, regardless if one zombie or many zombies are hit

 

New version update 1.0.9

 

I've gone through all the Demo code and have modified the code so that all demo items have similar progression times.

I have made changes to buffs.xml (intialisation now occurs in buffs.xml, so the only trigger relied on for intialisation  is onSelfEnteredGame)

Also added items.xml to set some tag stuff.

Changed the lbu_Demolition Perk code. The current xp gains of 4 appear balanced under testing (within limitations - see below).

Added a requirement to the lbu_Archery progress leveling code.

 

Horde Night Testing- Day 35, 100 max alive zombies, 64 bloodmoon size, Player lvl 68, Gamestage 175.

The demo perk progress was exactly on 3/50 at the start of the hordenight test.

Runs: approx 3 dozen or more test runs.

Outcome: Pipe bombs, Explosive arrows & bolts, grenades and molotovs were adjusted so that they all took an average of roughly 30 uses in order to progress from 3/50 to 4/50.

 

(removed incorrect info)

Cheers

 

 

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

  • 1 month later...

I really like the learn by use principle. Problem for me though as a stealthy silent archer type is that although my skills go up by use of the bow which is fine, I still have crappy tier 1 bow because cannot put any points into anything that will increase chances of getting skill magazines for archery. Therefore cannot increase chances of improving my bow weapon - still at level 1 after 3 weeks in game play even though it is my main weapon

 

Link to comment
Share on other sites

On 3/11/2024 at 7:46 AM, JoeSloeMoe said:

Hi again Adagio,

The issue is now fixed along with a couple other changes in the latest version. It will fix any current game but unfortunately it doesn't effect the game if you already drank the Forgetin Elixer.

Cheers

 


Hello, Joe!

Very sorry that I went missing after posting a question!
Thank you for addressing that issue, I'm going to start a new playthrough after quite a while tonight and definitely will put this mod on!

Link to comment
Share on other sites

15 hours ago, Adagio said:


Hello, Joe!

Very sorry that I went missing after posting a question!
Thank you for addressing that issue, I'm going to start a new playthrough after quite a while tonight and definitely will put this mod on!

Hi Adagio,

 

Have been away on holiday so havent been checking the posts. I made some additional changes to the mod before the update just need to test now I'm back.

The major change is that each point you invest in the default Perk increases the xp gained for the corresponding Lbu_Perk on a kill by 20%.

e.g  Default for lbu_archery is each archery kill gives 24 progression xp. With 2 points in the Archery Perk (perkArchery) the progression xp is 28.8 (40% increase).

I also added a number of config options as well.

Will release 1.0 version shortly after testing.

cheers

Link to comment
Share on other sites

  • JoeSloeMoe changed the title to Hybrid Learn By Use (Action Skills) - 1.0 XML modlet
On 7/7/2024 at 3:09 PM, MrSamuelAdams said:

thank you! 

 

I was using another action skill based mod, but was just getting alot of errors. I really like how this is and it seems to work well with https://www.nexusmods.com/7daystodie/mods/4067 at least so far :D which I like cause I enjoy both of these systems! 

Hey MrSamuelAdams, glad the mod is of use to you. Would be interested to know if you run into any problems running alongside the other mod.

cheers

Link to comment
Share on other sites

  • 2 weeks later...

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