Jump to content

Modding progression.xml to trigger buff


nightrod16

Recommended Posts

Hello all,

 

I searched around on the internet (google) and here but have yet to see anything that points directly to an answer to my question. Keep in mind that I am 100% self-learning how to code these files and by no means an expert so if my code skills suck I apologize in advance.

 

Has anyone been able to successfully mod the progression.xml file to trigger a buff based on skill or perk level? In my example below I do not get any errors in the 7dtd console or logs, but the buff is also not triggered by the skill as I am trying to get it to do. I have verified that the buff does indeed work by using an item so I know that part of the code works fine. Any help would be appreciated. Please feel free to ask me any questions that may help get this sorted.

 

The general idea is that as your skill in athletics increases so does your ability to run faster.

 

From Progression:

 

	<player_skill name="Athletics" icon="run" description_key="athleticsDesc" title_key="athletics" exp_to_level="50" group="health" >
	<effect name="StaminaDegradation">
		<!-- <multiply skill_level= and <multiply perk_level= are completely interchangeable. They parse as the same value. -->
		<multiply skill_level="1,5" value="1.00,0.95"/>
		<multiply skill_level="5,11" value="0.95,0.91"/>
		<multiply skill_level="11,19" value="0.91,0.87"/>
		<multiply skill_level="19,32" value="0.87,0.82"/>
		<multiply skill_level="32,49" value="0.82,0.77"/>
		<multiply skill_level="49,70" value="0.77,0.72"/>
		<multiply skill_level="70,100" value="0.72,0.66"/>
		<multiply skill_level="100,150" value="0.66,0.35"/>
	</effect>
	<effect name="BreathHoldDuration">
		<setvalue skill_level="1,10" value="20,27"/>
		<setvalue skill_level="10,20" value="27,32"/>
		<setvalue skill_level="20,30" value="32,36"/>
		<setvalue skill_level="30,40" value="36,40"/>
		<setvalue skill_level="40,50" value="40,44"/>
		<setvalue skill_level="50,60" value="44,47"/>
		<setvalue skill_level="60,70" value="47,51"/>
		<setvalue skill_level="70,80" value="51,54"/>
		<setvalue skill_level="80,90" value="54,57"/>
		<setvalue skill_level="90,100" value="57,60"/>
		<setvalue skill_level="100,150" value="60,75"/>
	</effect>
	<buff name="athleticsSpeed">
		<setvalue skill_level="0,150" value="1,10"/>
	</buff>
</player_skill>

 

From Buffs:

 

<buff id="athleticsSpeed" duration="0" icon="ui_game_symbol_run" stack="stack" stacklimit="10" actions="increment(speedmodifier,1,0,0,1)">
<modify id="0" stat="speedmodifier" modifyMaxValue="1000"/>
<modify id="1" stat="speedmodifier" modifyValue="1"/>
</buff>

Link to comment
Share on other sites

There no code to allow buffs based on skill so cant be done that way

 

you can give a buff with a quest, but theres nothing in quests to check a skill level, only player level.

 

If the buff you are showing there is your objective then you can actually do it without a buff.

 

try using these effects:

MaxSpeed

WalkSpeed

RunSpeed

Link to comment
Share on other sites

Thanks, StompyNZ!

 

I am wondering, however, where does the list of effects come from? Are they hardcoded? I see that the progression file references effects at the end, but the ones you've provided do not show in this list so there must be other effects not listed?

 

Regardless, I added the following code and tested with three different ways changing the

value="x,x"

(x being numbers) to 1,10 and 100,1000 and 0.01,0.99 and none of them have an effect - movement speed is still at the normal amount. For reference I used stark figures in an effort to test and see the differences quite obviously...these are not my final intended figures.

 

Here is the new code block for Athletics - any ideas?

 

	<player_skill name="Athletics" icon="run" description_key="athleticsDesc" title_key="athletics" exp_to_level="100" group="health" >
	<effect name="StaminaDegradation">
		<!-- <multiply skill_level= and <multiply perk_level= are completely interchangeable. They parse as the same value. -->
		<multiply skill_level="1,5" value="1.00,0.95"/>
		<multiply skill_level="5,11" value="0.95,0.91"/>
		<multiply skill_level="11,19" value="0.91,0.87"/>
		<multiply skill_level="19,32" value="0.87,0.82"/>
		<multiply skill_level="32,49" value="0.82,0.77"/>
		<multiply skill_level="49,70" value="0.77,0.72"/>
		<multiply skill_level="70,100" value="0.72,0.66"/>
		<multiply skill_level="100,150" value="0.66,0.56"/>
	</effect>
	<effect name="BreathHoldDuration">
		<setvalue skill_level="1,10" value="20,27"/>
		<setvalue skill_level="10,20" value="27,32"/>
		<setvalue skill_level="20,30" value="32,36"/>
		<setvalue skill_level="30,40" value="36,40"/>
		<setvalue skill_level="40,50" value="40,44"/>
		<setvalue skill_level="50,60" value="44,47"/>
		<setvalue skill_level="60,70" value="47,51"/>
		<setvalue skill_level="70,80" value="51,54"/>
		<setvalue skill_level="80,90" value="54,57"/>
		<setvalue skill_level="90,100" value="57,60"/>
		<setvalue skill_level="100,150" value="60,75"/>
	</effect>
	<effect name="MaxSpeed">
		<setvalue skill_level="0,150" value="0.01,0.99"/>
	</effect>
	<effect name="WalkSpeed">
		<setvalue skill_level="0,150" value="0.01,0.99"/>
	</effect>
	<effect name="RunSpeed">
		<setvalue skill_level="0,150" value="0.01,0.99"/>
	</effect>
</player_skill>

 

There no code to allow buffs based on skill so cant be done that way

 

you can give a buff with a quest, but theres nothing in quests to check a skill level, only player level.

 

If the buff you are showing there is your objective then you can actually do it without a buff.

 

try using these effects:

MaxSpeed

WalkSpeed

RunSpeed

Link to comment
Share on other sites

...or keep working on your design for A17 where buffs and skills become very hard to tell apart. ;)

 

 

Oddly enough I used one of your posts on https://7daystodie.com/forums/showthread.php?67623-Speed-Mod to get started on all of this. The lines of code you provided that allow for modifying speedmodifier helped me down this road! So thank you for that!

 

A17 must have some pretty major changes. I haven't done much looking around at what it's going to bring but am excited to mess around with the files some more to see what changes can be made. :)

Link to comment
Share on other sites

I had almost the exact same idea you have here, I really wanted to gradually increase my characters run speed as his athletics skill increased. I couldnt find a way to tie a buff to progression, sadly, but after looking around the forums I stumbled on a discussion much like the one you linked.

 

I think it was Stompy, or one of the other resident gurus, that mentioned the speed modifier for the buffs. I had to do a bunch of testing because as mentioned you have to first modify the max (base) value by X then you are able to modify it by a percentage.

 

So the work around I came up with was to create a block that copies the bedroll that also has a buff when walked/stood on. Then insert the recipe for said block into the progression under Athletics Skill. I made 3 "workout rolls" that each gave better speed buffs, something like 5%, 10%, and 15%.

 

The blocks looked something like this...

 

<block id="2031" name="calisthenicsMat">
<property name="Material" value="cloth" />
<property name="StabilitySupport" value="false" />
<property name="MaxDamage" value="100" />
<property name="Shape" value="Ext3dModel"/>	<property name="Texture" value="293"/>
<property name="Mesh" value="models"/>
<property name="Model" value="CampingGear/bedroll_02" param1="main_mesh"/>
<property name="MultiBlockDim" value="1,2,2"/>
<property name="Place" value="TowardsPlacerInverted"/>
<property name="OnlySimpleRotations" value="true"/>
<property name="FuelValue" value="6" />
<property name="CanPickup" value="true" />
<property name="BuffsWhenWalkedOn" value="AthleticSpdBuffTrigger1" />
<property name="IsTerrainDecoration" value="true" />
<property name="Group" value="Basics" />
<property class="RepairItems">
	<property name="cloth" value="10" />
</property>
<drop event="Destroy" name="cloth" count="3,10" />
</block>

 

 

The buff looked something like this...

 

<buff id="AthleticSpdBuff1" mutex="infection0,infection1,infection2,infection3,infection4,hypo1,hypo2,hypo3,sprainedLeg,brokenLeg,splintedLeg" actions="debuff(StretchDuration);setvar(WMstretch, 0)" duration="900t" buffif="WMstretch greater 20" icon="ui_game_symbol_run" name_key="Rdy4Action" description_key="You're limbered up and ready to go!  You feel like you could out run a Zombie Horde no problem." tooltip_key="Stretched">
<modify id="0" stat="speedmodifier" modifyMaxValue=".25" />
<modify id="1" stat="speedmodifier" modifyValue="0.1"/>
</buff>

 

Theres a little more to the buff, its similar to the bed healing buffs with a 'stretching period' which means that you dont get the buff from just stepping on it for a sec. You actually have to stay on it for like 5 seconds, but thats just fluff really and you could make it instant. Of course this just one way to insert a buff. I think Val has some drinks or edibles that basically do the same thing in his mod which could easily be attached to a skill inside progression.xml.

 

Hope this at least a lil helpful and not overly redundant if you already thought of it.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...