Passive skills with multiple stats

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderator: Nizari

Post Reply
arva
Posts: 26
Joined: Sat Dec 17, 2016 4:00 pm

Passive skills with multiple stats

Post by arva » Wed Mar 25, 2020 3:06 pm

I'm trying to merge skills by gathering their properties (Passivestat1,2) within one skill, such as claw mastery + weapon block and increased stamina and increased speed.
What I do is I copy for example Increased stamina and make it a new skill at the bottom of skills.txt. Then I add the property from increased speed in Passivestat2.
This does not work, eventhough I have seen other skills having multiple stats.

User avatar
Cypress
Posts: 58
Joined: Fri Dec 01, 2017 2:08 am

Re: Passive skills with multiple stats

Post by Cypress » Wed Mar 25, 2020 4:25 pm

I'm not really clear on what you are trying to do. Are you trying to give a character this new merged skill, or is it being added onto equipment? Do you want to replace the skills being merged with the new merged skill, or do you want the individual skills as well as the merged skill? And in what ways is it working and not working?

arva
Posts: 26
Joined: Sat Dec 17, 2016 4:00 pm

Re: Passive skills with multiple stats

Post by arva » Wed Mar 25, 2020 4:36 pm

I simply wish to make for example the passive skill increased stamina to also increase walk/run speed, just like increased speed do.
If I clone increased stamina and add the values from passivestat1+2 and param1+2 in increased speed, the guy still wont run faster.
The same problem occurs when I mege claw mastery andweapon block the same way.

User avatar
Cypress
Posts: 58
Joined: Fri Dec 01, 2017 2:08 am

Re: Passive skills with multiple stats

Post by Cypress » Wed Mar 25, 2020 4:37 pm

In that case, all you need to do is copy the stat from Increased Speed and paste it onto Increased Stamina and set the value of the stat to whatever you want (so if you want it so Increased Stamina's speed enhancement scales exactly the same as Increased Speed, then set param3 to 7 and param4 to 50, and have the stat value for the speed enhancement as dm34). You don't need to make a new skill for that.

arva
Posts: 26
Joined: Sat Dec 17, 2016 4:00 pm

Re: Passive skills with multiple stats

Post by arva » Wed Mar 25, 2020 5:09 pm

This is what
Cypress wrote:
Wed Mar 25, 2020 4:37 pm
In that case, all you need to do is copy the stat from Increased Speed and paste it onto Increased Stamina and set the value of the stat to whatever you want (so if you want it so Increased Stamina's speed enhancement scales exactly the same as Increased Speed, then set param3 to 7 and param4 to 50, and have the stat value for the speed enhancement as dm34). You don't need to make a new skill for that.
This is what I did with no luck. It should work afaik but it doesn't, not in the vanilla skill directly nor in a cloned skill. I cloned the stamina skill and the stamina works properly.

User avatar
Cypress
Posts: 58
Joined: Fri Dec 01, 2017 2:08 am

Re: Passive skills with multiple stats

Post by Cypress » Wed Mar 25, 2020 5:24 pm

Can you paste the entire row of your attempt into a code display?

Code: Select all

Find Item	142	bar	find item	34	72																																									defiance		velocitypercent	100	skill_staminapercent	100																									1		barbarian_findobject_1			barbarian_findheart_1										28	40																	1	0		h2h												SC	SC	xx				1				1		5	1															12	20					Find Potion														1	8	7	0	1										dm12	chance							5	min chance to find heart	60	max chance to find heart	30	% chance high quality	5	% chance magic item									1								8															motl																					512	8000
This is what I created using Find Item as the passive state giver (as far as I know, any skill works just as well for giving passive stats as long as you attach a unique state to it) and I have it set to give 100% increased stamina and 100% increased speed, both of which are given and work as expected.

arva
Posts: 26
Joined: Sat Dec 17, 2016 4:00 pm

Re: Passive skills with multiple stats

Post by arva » Wed Mar 25, 2020 6:25 pm

Code: Select all

Mistral	359	bar	MistralDesc																																											MistralState		skill_passive_staminapercent	ln12	velocitypercent	dm12																																																										1	0		none												SC	SC	xx				1																						12	20																			0	8	0	0	1						1												30	% stamina increase	15	% stamina increase per level	7	min % speed increase	50	max % speed increase									1								8																																				512	8000	
Seems like I put both stats like you did, I even tried to create a new state but none of them worked.

User avatar
Cypress
Posts: 58
Joined: Fri Dec 01, 2017 2:08 am

Re: Passive skills with multiple stats

Post by Cypress » Wed Mar 25, 2020 7:05 pm

You are using dm12 for velocitypercent, where param1 is 30 and param2 is 15. With the diminishing returns formula, the stat will approach param2 as you approach skill level 60. As such, the more you upgrade your skill, the less speed you will get. If you change dm12 to dm34, it will reference param3 (7) and param4 (50) instead, which will make the speed get increasingly higher and closer to 50% as you approach level 60.

The formula for dm12 is:
((110*lvl) * (b-a))/(100 * (lvl+6)) + a
Where lvl is the skill level, a=param1, b=param2 (and for dm34, a=param3, b=param4)

arva
Posts: 26
Joined: Sat Dec 17, 2016 4:00 pm

Re: Passive skills with multiple stats

Post by arva » Wed Mar 25, 2020 7:56 pm

Where do I enter these values then? Bc I want it to increase just like the original skill (max 50%), but the counter is stuck at 15%. I changed passivecalc to 100 and he started running as hell so that seemed to work, but when I have all fields that even hint of handling numbers (passivestat1-2, calc1-2 and param1-2) like the original skill, FRW is stuck at 15%.

Actually, both properties work, I'm just mixing up the numbers and which field they should be in. Gonna try the same thing with adding weapon block to claw mastery and se if the asn blocks.

No success whatsoever with that one. Does SkillDesc has anything to do with the skill effect or is it just for descriptions?
Last edited by arva on Wed Mar 25, 2020 8:10 pm, edited 1 time in total.

User avatar
Cypress
Posts: 58
Joined: Fri Dec 01, 2017 2:08 am

Re: Passive skills with multiple stats

Post by Cypress » Wed Mar 25, 2020 8:04 pm

All you need to do is change dm12 to dm34. Params are just for referencing with calculations, but you are referencing the wrong params since param1/2 correspond to Increased Stamina and param3/4 correspond to Increased Speed. By changing to dm34, you will reference param3/4 which correspond to Increased Speed.

arva
Posts: 26
Joined: Sat Dec 17, 2016 4:00 pm

Re: Passive skills with multiple stats

Post by arva » Wed Mar 25, 2020 8:22 pm

Finally I got it xD. Thx for you help!

Post Reply

Return to “General Mod Making”