Torchmodders

Modding => Modding Questions => Topic started by: Ings on August 07, 2018, 02:36:19 pm


Title: Level scaling affixes
Post by: Ings on August 07, 2018, 02:36:19 pm
I wanted to create legendaries/uniques that have copies every 5 levels. So every existing legendary i have to modify each copy so that the affixes are more or less balanced according to the item level. I could make it manually but it would take quite some time, so i was wondering if there is a way to make them scale automatically with item level. I think LAO 3 does something similar but i cant find info on it
Title: Re: Level scaling affixes
Post by: Phanjam on August 07, 2018, 03:32:47 pm
Hi Ings! Affixes can be modified by stats. Pretty sure there is an "item level" kind of stat too. You tell the affix to react to a stat using a STATMODIFYNAME line in the affix code. There are other lines which go along with using STATMODIFYNAME too. U can search through the vanilla affixes for examples to reverse-engineer ;)
Title: Re: Level scaling affixes
Post by: Ings on August 07, 2018, 05:04:28 pm
I searched for examples as you said but i couldnt find any :/
Title: Re: Level scaling affixes
Post by: Phanjam on August 07, 2018, 05:55:15 pm
I don't think there are any examples using ITEM LEVEL specifically as the modifying stat, but there are a lot of vanilla affixes which use this general stat-modifying mechanic.

This is from ARBITER_FROST_WAVE10.DAT in MEDIA\AFFIXES\SKILLS\

(https://i.imgur.com/bdfsDSZ.jpg)

This affix actually uses 2 ways to modify its effects.  In the first orange box you can see it's using EFFECT LEVEL - this is the <INTEGER>AFFIXLEVEL: setting you have for your affix in the skill. Basically it says "set the level of this effect by multiplying the affix level from the skill by 6.3829787234".

From here you just need to find the right stat to use for "ITEM LEVEL" and experiment with the multiplier value until you get the affix behaviour that you want.

In the second orange box, the effect gets modified by OWNER LEVEL.  This particular stat doesnt seem to need any multiplier; I think it adjusts the effect level directly.  You might still be able to use it for your weapon affixes though ;)
Title: Re: Level scaling affixes
Post by: Ings on August 09, 2018, 12:22:12 pm
So lets say i want to take the the following affix and make a version that scales with level:

Code: [Select]
[AFFIX]
<STRING>NAME:OFTHETIGER
<TRANSLATE>PREFIX:Hasty [ITEM]
<INTEGER>RANK:7
<INTEGER>MIN_SPAWN_RANGE:3
<INTEGER>MAX_SPAWN_RANGE:999
<FLOAT>DURATION:0
<INTEGER>WEIGHT:32
<INTEGER>SLOTS_OCCUPY:1
[UNITTYPES]
<STRING>UNITTYPE:WEAPON
[/UNITTYPES]
[EFFECT]
<STRING>NAME:OFTHETIGER PERCENT ATTACK SPEED
<STRING>ACTIVATION:PASSIVE
<STRING>DURATION:0
<STRING>TYPE:PERCENT ATTACK SPEED
<FLOAT>MIN:2
<FLOAT>MAX:3
[/EFFECT]
[/AFFIX]

I can think of 2 different ways to do it but i dont know if they are correct

First one would be adding "USEOWNERLEVEL:TRUE" , maybe that would make the affix multiply its values according to the affix level (7) or according to the item level?

And the second one would be using STATMODIFYNAME:ITEMLEVEL and STATMODIFYPERCENT:X to scale the effect values according to the item level. Still not sure how STATMODIFYPERCENT works
Title: Re: Level scaling affixes
Post by: Phanjam on August 11, 2018, 06:10:28 pm
Hey @Ings ! Since youre after the affix getting ajusted by item level, looks like the second option is what you want.

Did you actually find an affix that uses ITEMLEVEL? Cause like i said ive never seen one (yet) myself and its important that whatever stat you use actually exists :P If any mod is using, theres a good chance its in "Expanded Skills" mod by @doudley and others. U can try search in there.

Title: Re: Level scaling affixes
Post by: Ings on August 13, 2018, 02:59:33 pm
I think what im going to do is instead of using affixes, just apply effects and manually set the number values for each copy