News: Go to the front page portal to create a Torchmodders account | Visit the wiki!
February 19, 2019, 11:47:53 AM
collapse

*
Information

Please contribute to our


Sign up for a forum account at the Front Page. | Remember to Tag your posts.
Having problems logging in to the forums? Go the front page, log out and back in again.

Author Topic: Stat affecting duration instead of chance  (Read 2170 times)

Offline Avocados

  • Enchanted
  • *
  • Posts: 73
  • Country: 00
    • status idle
    • View Profile
  • Mood: mood smiley
Stat affecting duration instead of chance
« on: December 04, 2018, 10:17:07 PM »
Wondering if it's at all possible to have a stat alter an effect (such as stun, silence, or something more general like a "x% slow") by duration instead of percent chance?
I know the "hardcoded" effects such as stun,silence,and charm have corresponding effects like "Stun Resistance" which seem to be a chance to negate the effect entirely?
And for affixes, you can have a stat modify the affix,  though again this seems pretty set to affecting the "magnitude" rather than duration as far as I understand it.

More specifically in my case, I was hoping to have a general stat called something like Resilience or Status Resistance that reduce the duration of negative effects. I am starting to think this is not possible but was hoping someone might have some ideas to achieve something like that.

Online Phanjam

  • Operator
  • Legendary
  • *
  • Posts: 2595
  • Country: ph
    • status ready
    • View Profile
  • Mood: mood angel
Re: Stat affecting duration instead of chance
« Reply #1 on: December 05, 2018, 07:08:56 AM »
I kind of recall a method where you could make the effect have a fixed duration (say 1 sec) but put it inside a looping layout which checks that SOME_STAT is greater than zero at the start of each loop (if zero, the loop won't fire).

I know stats can be set to decrement like say by "1" every sec. So if SOME_STAT starts at 10 it can be at zero in 10 secs, the layout will stop looping and the effect will expire.

I know the starting value of a stat can be set to match the value of some other stat so you can vary what the starting value of SOME_STAT will be, but i cant recall offhand how!  If u dont mind doing the spadework (im at work atm) u can rev-engineer the tl1cp destro's "second wind" skill to have look at its stats, because I know one of them gets set to whatever the charge value is at the start of the skill.
« Last Edit: December 05, 2018, 09:13:49 AM by Phanjam »



Offline doudley

  • Cosmic Reality Entanglement Ethereal Probability
  • Rare
  • *
  • Posts: 245
  • Country: 00
  • Its personal...
    • status food
    • View Profile
    • Steam Profile
  • Mood: mood rolleyes
Re: Stat affecting duration instead of chance
« Reply #2 on: December 06, 2018, 03:34:02 AM »
Some effect have 2 graph modifiers, the 2nd could be for range or duration, I'm not sure.

Stat that modifies effect duration...might lead to multiple version of affixes controlled by stat watchers.

Online Phanjam

  • Operator
  • Legendary
  • *
  • Posts: 2595
  • Country: ph
    • status ready
    • View Profile
  • Mood: mood angel
Re: Stat affecting duration instead of chance
« Reply #3 on: December 06, 2018, 08:01:00 AM »
Thanks doudley!

Stat that modifies effect duration...might lead to multiple version of affixes controlled by stat watchers.

Yes that might be a simpler way to do it actually. It would not even need stat watchers - the skill level can just point to the affix with the duration corresponding to the skill level. Only drawback is, if u have 15 skill levels u will need 15 affixes (and @Anarch16sync will get mad at us :P )



Offline Avocados

  • Enchanted
  • *
  • Posts: 73
  • Country: 00
    • status idle
    • View Profile
  • Mood: mood smiley
Re: Stat affecting duration instead of chance
« Reply #4 on: December 06, 2018, 09:50:08 PM »
hmm I haven't really tested this yet but I think I might have a way that works...
have a stat called "status resistance" that goes from 0 to 100, then a hidden stat "status resist multiplier" thats always set to equal 1, minus "status resistance"/100. AKA an affix of add stat, using "status resistance" and a multiplier of (-0.01), with the default value of "status resist mult" being 1.


So now I have a derived stat that I can used to multiply by things to get a new magnitude, so 47 status resistance should decrease the magnitude of statuses by 47%, and our "status resistance multiplier" stat will be equal to 0.53, perfect.


But I still have the problem that most effects/affixes seem to use the stats to affect the chance of success, and I'm trying to really reduce chance based stuff in general because its not great for balance/consistency/predictability.

So instead of using the "stun" or "silence" effects directly, we're going to add a triggerable or a passive skill to the base monster and player files, that ensures that the unit is STUNNED and SILENCED or whatever (100% chance, like 0.01 duration or something? or no duration?) with a statwatcher that checks a new set of custom stats, counter_stun, counter_silence, counter_charm, etc. They all default to zero, and decrease by say 1 or 10 a second or something (if 10 I could probably use INTS, otherwise might need to use floats...). The passive skill/triggerable of all units STUNS as long as this counter stat is greater than zero.


So now, say I wanna give my monster a skill that stuns the player for 1.5 seconds, instead of using the stun effect directly, we use ADD STAT  to ad 1.5 or 15 or whatever scale we want to use to the "counter_stun" stat of their target (I guess use TRANSFER? Will this work?) . Ideally, sincethe target has that passive skill, they should be stunned while their stat "conuter_stun" is greater than zero and remain so until it ticks down to zero. We can then use the STAT SOURCE TYPE of the target, and use the STAT "status resistance multiplier" to multiply the 1.5 added to the counter (FALSE on StatModifierIsBonus) so if they have 47% status resistance, (status resistance multiplier is 0.53,  thus 0.53*1.5 =  0.795) they should be stunned for 0.795 seconds.

IF this works, which idk I need to throw all that pasta into GUTS, the downside is that tooltips aren't going to be automatically generated. I.e. normally its going to generate "100% chance to stun target for 2 seconds", but now since the skill is just using ADD STAT all that tooltip stuff will have to be written specifically for that skill.

IDK if this is gonna work, but I hope so because its making me think about implementing a poise system for interrupts/stuns a la dark souls instead of the chance based things. Is there any parts of this that wont work/aka I'm assuming the engine works a certain way that it actually doesn't?

Offline Avocados

  • Enchanted
  • *
  • Posts: 73
  • Country: 00
    • status idle
    • View Profile
  • Mood: mood smiley
Re: Stat affecting duration instead of chance
« Reply #5 on: December 07, 2018, 03:05:38 AM »
well I can't get it to work. To have something like that that will continually check if its to be applied (stat>0) do I have to use a looping layout?

EDIT: Basically, does anyone have any idea what the best way to have a unit stay stunned as long as some stat is greater than zero?
Triggerables?
A passive skill?
A passive skill that has a looping aura type layout that loops every 0.1 seconds?
« Last Edit: December 07, 2018, 03:14:30 AM by Avocados »

Online Phanjam

  • Operator
  • Legendary
  • *
  • Posts: 2595
  • Country: ph
    • status ready
    • View Profile
  • Mood: mood angel
Re: Stat affecting duration instead of chance
« Reply #6 on: December 08, 2018, 07:21:27 AM »
Hey dropped by and decided to say 'grats on getting this to work (from the discord chat)!

Am excited to see how this develops. Keep it up (but dont burnout!) and remember to just ask if u get stuck! ;)



Tags:
 

* Quick Search


* Member Information

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Mod Boards Activity

* Who's Online

  • Dot Guests: 6
  • Dot Hidden: 0
  • Dot Users: 2
  • Dot Users Online:

* Calendar

February 2019
Sun Mon Tue Wed Thu Fri Sat
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 [19] 20 21 22 23
24 25 26 27 28

No calendar events were found.

* Recent Topics

Classless Character Mod by Phanjam
[Today at 08:58:06 AM]


Pet Variants Mod by Sch123
[Today at 04:12:39 AM]


Cool basics by TwinkleToes
[February 18, 2019, 05:58:12 AM]


Deathknight class by Sch123
[February 17, 2019, 12:45:51 PM]


[TOOL] TLDatLexer Rebuild by Phanjam
[February 17, 2019, 03:44:39 AM]


[CLASS] Emberdrake V2 by Phanjam
[February 17, 2019, 03:43:37 AM]


Variant Classes Mod Information by Sch123
[February 12, 2019, 05:40:25 PM]


Need help on an issue with no help anywhere by Phanjam
[February 11, 2019, 12:00:02 PM]


Hello TorchModders! Super late to the party by Phanjam
[February 05, 2019, 07:45:08 AM]


Requesting a mod: anybody to help? by Giallo
[February 01, 2019, 03:29:07 PM]


[CLASS] Emberdrake by Lord Nyriox
[January 21, 2019, 09:08:23 PM]


Torchlight Frontiers announced by Kva3imoda
[January 19, 2019, 01:33:56 AM]


Lord Nyriox's Blog by Lord Nyriox
[January 16, 2019, 07:18:27 AM]


[TL2] Ultra Respec by Phanjam
[January 09, 2019, 01:27:56 PM]


Playable Zealot by Lord Nyriox
[January 08, 2019, 06:55:49 PM]

* Popular Topics