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

Return of Action Skills - perks that level-as-you-use them (Test Release)

Desperately wanting to bring back skills that level up as you use them as opposed to everything requiring skill points, I came up with a way to re-implement Action Skills from A16 through the use of CVars. This is still a work in progress but I wanted to release it to public testing.

What this mod does:

New character skills:

This adds a new attribute category to your character skills screen - Action Skills. These skills level up over time as you use the associated tools/weapons. I left it so you can also use your skill points to increase their level if you want, but until I overhaul the default perk costs and points given per player level, it's kind of a waste. So far I've implemented 8 skills:

Mining Tools

Blunt Weapons

Bladed Weapons

Archery Weapons

Pistol Weapons

Shotgun Weapons

Rifle Weapons

Automatic Weapons

I wanted to grant XP based on damage done, but so far I haven't found a way to pull the player's current weapon damage variable and while it could still be done, it would be fairly complicated and wouldn't be compatible with other mods that alter weapon damage. So for now, each hit grants a small amount of XP, while a kill grants a larger amount of XP. Mining Tools increase per hit on harvestable blocks.

Magazine changes:

Since most people seem to just sell these anyway, I've changed some of the magazines to grant 1 level-up to the associated skill upon reading. The magazines that do this are for the most part the obvious choices - Gunslinger increases Pistol Weapons, Deep Cuts increases Bladed Weapons, etc.

Testing Notes:

I've tested this for a few hours myself but there may still be bugs and it will likely need balanced. A few notes on using this mod:

- Could use feedback on leveling speed. Right now it may be a bit fast, but I also need to balance the leveling curve. Right now XP required increases by x1.015 per level.

- Also need feedback on whether the amount damage etc. increases per level is too powerful.

- Please report any bugs or provide any general feedback you may have.

- The level numbers will show up as green because technically the mod is "permanently temporarily" raising the skills. The only way I know of to properly increase a perk level is through an on-use item.

Installing:

Place the "ActionSkills" folder in 7 Days To Die\Mods. Open ActionSkills\Localization.txt, copy and paste the text to the bottom of your 7 Days To Die\Data\Config\Localization.txt and save the file. This is needed to display the proper desciptions on perks/magazines. This mod should work fine with any previous save you have, but if you do have issues try starting a new game.

View attachment 26214

By the way: If anyone wants to take what I have here so far and re-purpose it or expand upon it, that is totally cool. I'm working on adding more skills and re-balancing the original perks, but if someone beats me to it then more power to em lol.

ActionSkills.zip

 

Attachments

Last edited by a moderator:
Here's how it works on the back-end, just demonstrating Blunt Weapons. Also tweaks windows.xml slightly to properly show 5 entries per page.

Code:
[color="#FFA500"]entityclasses.xml[/color]

<append xpath="/entity_classes/entity_class[@name='playerMale']">
<effect_group name="Action Skills">
	<passive_effect name="PerkLevel" operation="base_add" value="@AS_Blunt_Lvl" tags="perkASBlunt"/>
</effect_group>
</append>

[color="#FFA500"]items.xml[/color]

<append xpath="/items/item[@name='meleeClubWood']">	
<effect_group name="Action Skills">
	<triggered_effect trigger="onSelfAttackedOther" action="ModifyCVar" cvar="AS_Blunt_XP" operation="add" value="10">
		<requirement name="StatCompareCurrent" target="other" stat="health" operation="GT" value="0"/> [color="#FFFF00"]- This is needed to prevent players from gaining XP from zombie corpses.[/color]
	</triggered_effect>
	<triggered_effect trigger="onSelfKilledOther" action="ModifyCVar" cvar="AS_Blunt_XP" operation="add" value="30"/>
</effect_group>
</append>

[color="#FFFF00"]- Magazine level increase -[/color]
<remove xpath="/items/item[@name='magazinePerkHeavyMetal']/property[@class='Action0']/requirement"/>
<remove xpath="/items/item[@name='magazinePerkHeavyMetal']/effect_group/triggered_effect"/>
<append xpath="/items/item[@name='magazinePerkHeavyMetal']">
<property name="DescriptionKey" value="magazinePerkASBluntDesc"/>
</append>
<append xpath="/items/item[@name='magazinePerkHeavyMetal']/effect_group">
<requirement name="CVarCompare" cvar="AS_Blunt_Lvl" operation="LT" value="100"/>
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="AS_Blunt_XP" operation="add" value="@AS_Blunt_LvlNextAdd"/>
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="AS_Blunt_LvlNextAdd" operation="multiply" value="@AS_XP_Mult"/>
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="AS_Blunt_LvlNextTotal" operation="add" value="@AS_Blunt_LvlNextAdd"/>
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="AS_Blunt_Lvl" operation="add" value="1"/>
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="ShowToolbeltMessage" message="Blunt Weapons level increased"/>
</append>

[color="#FFA500"]progression.xml[/color]

<append xpath="/progression/attributes">
<attribute name="attActionSkills" name_key="Action Skills" desc_key="Action Skills level as you use them" max_level="1" icon="ui_game_symbol_resource">

	<effect_group name="Action Skills Lvl 0 Set"> [color="#FFFF00"]- Sets base experience needed for lvl 1 upon first spawn into game[/color]
		<requirement name="CVarCompare" cvar="AS_MiningTools_XP" operation="Equals" value="0"/>
		<requirement name="CVarCompare" cvar="AS_Blunt_XP" operation="Equals" value="0"/>
		<requirement name="CVarCompare" cvar="AS_Bladed_XP" operation="Equals" value="0"/>
		<requirement name="CVarCompare" cvar="AS_Archery_XP" operation="Equals" value="0"/>
		<requirement name="CVarCompare" cvar="AS_Pistols_XP" operation="Equals" value="0"/>
		<requirement name="CVarCompare" cvar="AS_Shotguns_XP" operation="Equals" value="0"/>
		<requirement name="CVarCompare" cvar="AS_Rifles_XP" operation="Equals" value="0"/>
		<requirement name="CVarCompare" cvar="AS_Automatics_XP" operation="Equals" value="0"/>
			<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="AS_XP_Mult" operation="set" value="1.015"/>
			<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="AS_MiningTools_LvlNextAdd" operation="set" value="500"/>
			<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="AS_MiningTools_LvlNextTotal" operation="set" value="500"/>
			<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="AS_Blunt_LvlNextAdd" operation="set" value="500"/>
			<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="AS_Blunt_LvlNextTotal" operation="set" value="500"/>
			<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="AS_Bladed_LvlNextAdd" operation="set" value="500"/>
			<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="AS_Bladed_LvlNextTotal" operation="set" value="500"/>
			<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="AS_Archery_LvlNextAdd" operation="set" value="500"/>
			<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="AS_Archery_LvlNextTotal" operation="set" value="500"/>
			<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="AS_Pistols_LvlNextAdd" operation="set" value="500"/>
			<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="AS_Pistols_LvlNextTotal" operation="set" value="500"/>
			<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="AS_Shotguns_LvlNextAdd" operation="set" value="500"/>
			<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="AS_Shotguns_LvlNextTotal" operation="set" value="500"/>
			<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="AS_Rifles_LvlNextAdd" operation="set" value="500"/>
			<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="AS_Rifles_LvlNextTotal" operation="set" value="500"/>
			<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="AS_Automatics_LvlNextAdd" operation="set" value="500"/>
			<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="AS_Automatics_LvlNextTotal" operation="set" value="500"/>
	</effect_group>

</attribute>
</append>

<perk name="perkASBlunt" parent="skillASWeapons" max_level="100" base_skill_point_cost="1" name_key="Blunt Weapons" desc_key="perkASBluntDesc" icon="ui_game_symbol_sledge">
<effect_group>
	<requirement name="HoldingItemHasTags" tags="blunt"/>
		<passive_effect name="EntityDamage" operation="perc_add" value="0.003,0.3" level="1,100"/>
		<passive_effect name="StaminaLoss" operation="perc_subtract" value="0.003,0.3" level="1,100"/>
</effect_group>
<effect_group name="AS Blunt Lvl Increase"> [color="#FFFF00"]- Triggers when required level XP is reached[/color]
	<requirement name="CVarCompare" cvar="AS_Blunt_Lvl" operation="LT" value="100"/>
	<requirement name="CVarCompare" cvar="AS_Blunt_XP" operation="GTE" value="@AS_Blunt_LvlNextTotal"/>
	<requirement name="HoldingItemHasTags" tags="blunt"/>
		<triggered_effect trigger="onSelfDamagedOther" action="ModifyCVar" cvar="AS_Blunt_LvlNextAdd" operation="multiply" value="@AS_XP_Mult"/>
		<triggered_effect trigger="onSelfDamagedOther" action="ModifyCVar" cvar="AS_Blunt_LvlNextTotal" operation="add" value="@AS_Blunt_LvlNextAdd"/>
		<triggered_effect trigger="onSelfDamagedOther" action="ModifyCVar" cvar="AS_Blunt_Lvl" operation="add" value="1"/>
		<triggered_effect trigger="onSelfDamagedOther" action="ShowToolbeltMessage" message="Blunt Weapons level increased"/>
</effect_group>
<effect_group> [color="#FFFF00"]- Triggers when a level is bought with skill points[/color]
	<triggered_effect trigger="onPerkLevelChanged" action="ModifyCVar" cvar="AS_Blunt_XP" operation="add" value="@AS_Blunt_LvlNextAdd"/>
	<triggered_effect trigger="onPerkLevelChanged" action="ModifyCVar" cvar="AS_Blunt_LvlNextAdd" operation="multiply" value="@AS_XP_Mult"/>
	<triggered_effect trigger="onPerkLevelChanged" action="ModifyCVar" cvar="AS_Blunt_LvlNextTotal" operation="add" value="@AS_Blunt_LvlNextAdd"/>
	<triggered_effect trigger="onPerkLevelChanged" action="ModifyCVar" cvar="AS_Blunt_Lvl_Perm" operation="add" value="1"/>
	<triggered_effect trigger="onPerkLevelChanged" action="ShowToolbeltMessage" message="Blunt Weapons level increased"/>
</effect_group>
</perk>
 
Last edited by a moderator:
Great work. Looking forward to seeing more.

As a suggestion, I would look at A16.4 items.xml and for the XP values, perhaps try to follow the ActionExp and associated multipliers.

While they may apply differently to A17, here are the base values I used for balancing in A16.4 where I modified the progression so that all skills were leveled through the use of the ActionExp:

Initial XP to Level (XP Mulitplier - 1.03)

Blunt Weapons: 100

Blade Weapons: 100

Mining Tools: 500 (multiplier 1.06 - auger added to this group)

Construction Tools: 300 (multiplier 1.04 - fireaxes,nailgun,chainsaw added to this group)

Hanguns (Pistol/Magnum): 75

Blunderbuss: 75 (separate from shotguns)

Shotguns: 75

Rifles (Hunting/Sniper): 75

Archery: 100

Guns:

Pistol

Magazine: 15

ActionExp: 4

Kill XP Multiplier 3

Initial Shots to Level: 19

Magnum

Magazine: 6

ActionExp: 6

Kill XP Multiplier 2

Initial Shots to Level: 13

Blunderbuss

Magazine: 1

ActionExp: 2 (x8.5 approximate)

Kill XP Multiplier 2

Initial Shots to LEvel: 5

Shotguns

Magazine: 8

ActionExp: 1 (x7 approximate)

Kill XPMultiplier 2

Initial Shots to Level: 11

MP5

Magazine: 30

ActionExp: 3

Kill XP Multiplier 4

Initial Shots to Level: 26

AK47

Magazine: 30

ActionExp: 4

Kill XP Multiplier 3

Initial Shots to Level: 19

HuntingRifle

Magazine: 2

ActionExp: 7

Kill XP Multiplier 2

Initial Shots to Level: 11

SniperRifle

Magazine: 5

ActionExp: 7

Kill XPMultiplier 2

Initial Shots to Level: 11

 
I looked at A16 to try to get an idea of where to start. I saw melee weapons had ActionExp values but didn't know where the XP values were for guns. Someone told me weapons gave XP according to damage done, which might have been better. I could set up CVar calculations and plug in the base damage values + multipliers for each weapon then give xp based on the resulting value, I did something like this for another mod I may release eventually. Actually, I suppose it would still work even if another mod changes weapon damages - it could still increase XP according to perception/strength level, mods attached, etc. I do have it so iron tools give slightly more XP than stone, steel more than iron, etc so as you progress it balances out your leveling. I don't know, for now this is simpler.

It may seem like you level fast at first but I tried setting everything up so if you were to use one skill class of weapon exclusively it would take around 2000 zombies to get to lvl 100. This amount of zombies alone would put you at around player level 80. Given that you won't be using one weapon type exclusively, but also factoring in finding magazines that will level you up, it should take you up to player level 100 or more to max out your primary class of weapons. Mining, assuming you're using an iron pickaxe from start to finish, would take 11,440 hits on blocks to get to 100. This might be a bit too low actually.

A16 used an XP multiplier of 1.03 per level. However given that I've set it up so XP is gained per hit and kill, I wanted to lower the XP multiplier because as you progress and your weapons do more damage you're naturally killing enemies with fewer hits and receiving less on-hit XP. We'll see how this works out once in higher level ranges. I've only done testing to make sure everything works for the first ~30 levels so far.

 
Last edited by a moderator:
Oooooh. I actually wanted to put these back into the game for my mod.

Absolutely going to download this and play around with it.

 
The guns in A16 mostly used the default ActionExp which I think was 2 and it too was based on only registering with hits and kills. The value was not listed in the xml which is why you didn’t see it. The problem in A16 was that the code did not discriminate with regards to the type of hits, so it gave rise to the possibility of exploitation (ie hitting the ground). I think this is where A17 has an advantage in that it can differentiate.

 
The guns in A16 mostly used the default ActionExp which I think was 2 and it too was based on only registering with hits and kills. The value was not listed in the xml which is why you didn’t see it. The problem in A16 was that the code did not discriminate with regards to the type of hits, so it gave rise to the possibility of exploitation (ie hitting the ground). I think this is where A17 has an advantage in that it can differentiate.
Yep.

onSelfDamagedOther and onSelfKilledOther ftw. :)

 
Ah I see. IMO weapon leveling was too darn slow in A16. I only managed to get Archery to 20-25ish in the ~50 hours I played A16. Granted there are a lot more zombies in A17, but it needed a bit of a boost.

There may still be an exploit I didn't think if where you could level by shooting someone in your party. May be the difference between using onSelfAttackedOther and onSelfDamagedOther. Will have to test that. I tried using target_tags to ensure you were shooting an enemy but that was giving me NREs for some reason.

I don't think I'm a fan of how the target system works. target="other" doesn't consider something a target if for example you put a trigger on a zombie and the zombie begins chasing you. Target="other" only seems to = the last entity damaged. Plus if you kill a zombie, it still considers its corpse your target for some reason until you attack another zombie. Really think it should clear target on kill. Hence the need for StatCompareCurrent health > 0.

 
So I'm wondering what people's thoughts are on the direction the mod goes in.

1. Make it more like A16. Let you spend 1 skill point to get 1 level of an Action Skill, but increase the amount of skill points you receive per player level up and also increase the amount of points needed per perk. More points needed for higher levels.

2. Make Action Skills ONLY level on-use or by reading magazines, keep the rest of the perks at 1 skill point per level as they are.

I am also considering changing the requirements from attribute/player level based to tied with an associated action skill, or perhaps a combination of attribute and Action Skill without level reqs on the attributes. Want lvl 2 of Gunslinger? Get to lvl 20 in Pistol Weapons, etc.

 
Last edited by a moderator:
I'd keep it as option 1, just because player choice is never a bad thing (though most probably won't spend the points).

Side note - I added a construction skill to the modlet (uses onSelfBlockRepair and onSelfBlockUpgrade), also made a perk for the forge and managed to lock that to needing level 20 in construction before you can buy it.

So the idea of levelling the skills before you can buy a perk I definitely like. :)

 
For myself, I prefer option 2. Being able to spend points to raise a skill just seems cheaty and counter to the spirit of it. For the perks though, I see no reason not to use increasing costs and skill point multipliers.

 
In A16 personally I never used my skill points for action skills. I guess it's a nice option to supplement but, given that I went with the magazines-give-points, I think that's a little bit more exciting to find them for one and allowing you to spend points on top of that may be too much. I like the idea of - you get better by doing or by acquiring knowledge. Putting points in eg. construction from killing zombies seems very disconnected.

Side note - I added a construction skill to the modlet (uses onSelfBlockRepair and onSelfBlockUpgrade), also made a perk for the forge and managed to lock that to needing level 20 in construction before you can buy it.
Nice. Yea I still want to add construction, salvage, and a few others. I kinda wanted to increase crafted speed BY crafting, but if I move crafting over to an Action Skill it makes Int a bit pointless as an attribute on its own. I could split the increases say 50/50 so it's still worth getting Int beyond just meeting perk requirements. Tbh though I miss finding permanent learnable schematics, it was always an exciting moment to find one. But that is another mod...I already changed mod schematics to be one-time learnables. I'll prob release that soon too.

I was thinking about how to re-add Athletics and move the stam reduction from melee skills to that. Essentially, any action that spends stamina will very slowly increase athleticism and reduce stamina costs. But the question is how to do it so time spent running gives xp. There is the onSelfRun trigger, I could have that start an invisible buff with an update_rate and have it give xp on every update. But it only triggers once when you start running and there aren't start/stop triggers like there are on swimming. I'd assume onSelfStand triggers when un-crouching, not when you stop moving. If not, perhaps I could do something like StatComparePercCurrentToModMax LT 0.95, so essentially anytime your stam is regening that buff is ticking and giving very small amounts of XP every few seconds, then remove itself once stam becomes GTE 0.95.

Edit: Hm, I wonder if I could have the buff start on onSelfRun and have it remove on onSelfWalk. Almost always you will be walking directly after running, but there could be the possibility if people go straight from running to not moving they could just AFK and be getting XP. We'll see.

 
Last edited by a moderator:
I'd skip athletics since it was buggy AF in A16 anyways. You could be standing still and gain a point. :D

And yeah, I did the schematics thing too. Converted most recipes to perks so the player can just read a book and unlock the perk OR buy it if RNG hates them.

 
FYI another way to do recipe unlocks if you didn't already know. From buffs.xml:

"<passive_effect name="RecipeTagUnlocked" tags="ammo44MagnumBulletAP,ammoShotgunSlug"/>, or set a cvar named "ammo44MagnumBulletAP""

So I just did this:

Code:
<append xpath="/items/item[@name='schematicMaster']">
<property class="Action0">
	<property name="Class" value="Eat"/>
	<property name="Consume" value="true"/>
	<property name="Delay" value="1.0"/>
	<property name="Use_time" value="..."/>
	<property name="ActionExpBonusMultiplier" value="0"/>
	<property name="Sound_start" value="recipe_unlocked"/>
</property>
</append>

<!-- Gun Mod Schematics -->

<append xpath="/items/item[@name='modGunBarrelExtenderSchematic']">
<property class="Action0">
	<requirement name="CVarCompare" cvar="modGunBarrelExtender" operation="Equals" value="0"/>
</property>
<effect_group tiered="false">
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="modGunBarrelExtender" operation="set" value="1"/>
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="ShowToolbeltMessage" message="Learned how to craft Barrel Extender Mod"/>
</effect_group>
</append>
I ended up changing progression, but I was also going to leave the option to just buy the YeahScience perks for same reasons, RNG.

 
Last edited by a moderator:
That's pretty much what I did to turn recipes into perks. :)

Code:
	<perk name="perkPistol" parent="skillsItemRecipes" max_level="1" base_skill_point_cost="1" cost_multiplier_per_level="1" name_key="perkPistolName" desc_key="perkPistolDesc" icon="ui_game_symbol_pistol">
	<level_requirements level="1"><requirement name="PlayerLevel" target="self" operation="GTE" value="15" desc_base="Player Level 15"/></level_requirements>

	<effect_group>
		<passive_effect name="RecipeTagUnlocked" operation="base_set" level="1" value="1" tags="gunPistol,DFpistolParts,DFpistolBarrel,DFpistolGrip,DFpistolFrame"/>
		<effect_description level="1" desc_key="perkPistolRank1Desc"/>
	</effect_group>
</perk>
Then the schematic just unlocks that.

 
Ah I see you're working on re-adding weapon parts too? Haha. I originally had them as recipe ingredients but wanted a way to get them back out of the gun, so I re-purposed them as mods for mod slots and increased mod slots on the gun. Base pistol has 0 magazine count, a magazine part adds the ammo back. Base pistol has 1,1 degradation, pistol_parts adds the durability back 249,499. Etc. It was the best way I could think of being able to move parts on/off a gun and making them necessary for the gun to function properly. So many works-in-progress atm...

 
Yep!

I did cheat and just use them in the recipe though, but then I also reduced the amount of parts in general (so pistols all use the same base 3 parts + 1 unique to each pistol) and upped the stack size to 25 so you don't need an entire chest JUST for parts. :)

 
I wish there were an easy way to get multiple items out of scrapping an item. Apparently that used to be a thing. The only issues that remain so far are:

- Don't think it's possible through XML to make mods degrade. Not a big deal, may be better having the simplicity of just repairing the base weapon. I miss the 1-600 quality system and how you lost quality on each repair, made continuing to find new parts after a while necessary.

- I can get guns to spawn with 1-4 part mods pre-installed, but no matter what I do I can't get the loot quality templates to apply to the mods it spawns with. Lots of lvl 1 pistols spawning with quality 3-5 parts.

 
Back
Top