Using stats to calculate chain % chance - hard to implement?
Moderators: marionline, SDHawk
Using stats to calculate chain % chance - hard to implement?
I feel lousy asking about potentially adding a feature with you guys backed up and busy enough as it is, but would implementing the ability to make attack chain chance based on stats (e.g. tying a critical hit chance to Luck) be doable without much trouble?
I had just typed up a pretty long schematic of how that would work in a critical hit example, but... At the very end I realized that it wouldn't work for an instead-chain to a critical attack, because it can't do a % chance instead-chain to the critical damage attack and also do an instead-chain to the next 'rung' down to lower and lower % chain chance versions of the attack if a "Luck" stat were below a certain threshold. (I even just confused myself.) Also I'm not sure that Else-Chains can replace failed Instead-Chains, or only failed Regular Chains.
Maybe there's a different way to do this and I just haven't thought it through enough yet. In any case, it's still annoying and kind of hacky to do a ton of attack chains for a single attack so there aren't huge jumps between % chain chance intervals. If anything, I might only incorporate crits into a single character's skill set, to limit the overhead of doing it this way.
Maybe there's a different way to do this and I just haven't thought it through enough yet. In any case, it's still annoying and kind of hacky to do a ton of attack chains for a single attack so there aren't huge jumps between % chain chance intervals. If anything, I might only incorporate crits into a single character's skill set, to limit the overhead of doing it this way.
If you do decide to hack it, try having the logical checks not inflict damage, but instead chain to the relevant attacks "next". For example:
atkCRIT = the critical damage attack
atk1A = no damage
if(luck<75) do atk2A INSTEAD
chain to atk1B NEXT
atk1B = normal attack
75% chance to do atkCRIT INSTEAD
atk2A = no damage
if(luck<50) do atk3A INSTEAD
chain to atk2B NEXT
atk2B = normal attack
50% chance to do atkCRIT INSTEAD
etc.
atkCRIT = the critical damage attack
atk1A = no damage
if(luck<75) do atk2A INSTEAD
chain to atk1B NEXT
atk1B = normal attack
75% chance to do atkCRIT INSTEAD
atk2A = no damage
if(luck<50) do atk3A INSTEAD
chain to atk2B NEXT
atk2B = normal attack
50% chance to do atkCRIT INSTEAD
etc.
I am Srime
- Bob the Hamster
- Lord of the Slimes
- Posts: 7660
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
This should definitely be a built-in feature of chains.
Having to do a half-assed version with a painful series of complicated chains is way too much work.
I have been looking at the code, and I am trying to decide on the best way to express this.
So suppose you have named a stat LUCK. And you want 0 luck to mean no criticals ever, and 100 should mean critical every single time
So the chain checking code should pick a random number from 1 to 100 and if that number is <= to your luck stat then the chain happens.
So in the chain editor, you would edit the Chain Conditional and set it to "Attacker stat random%" and then under that you would see "Random% stat LUCK" (or whatever stat you choose)
Does that seem to make sense? I will probably hold off on doing this until after the callipygous stable release, but it is totally doable.
Having to do a half-assed version with a painful series of complicated chains is way too much work.
I have been looking at the code, and I am trying to decide on the best way to express this.
So suppose you have named a stat LUCK. And you want 0 luck to mean no criticals ever, and 100 should mean critical every single time
So the chain checking code should pick a random number from 1 to 100 and if that number is <= to your luck stat then the chain happens.
So in the chain editor, you would edit the Chain Conditional and set it to "Attacker stat random%" and then under that you would see "Random% stat LUCK" (or whatever stat you choose)
Does that seem to make sense? I will probably hold off on doing this until after the callipygous stable release, but it is totally doable.
That does make sense, and would be greatly appreciated. Even if it were just a linear "0-100 Luck = 0-100% chain chance" situation, that'd be totally workable and a great option to have.
I don't know if it'd be much more complicated to be able to choose an x2, x3, or x0.5 factor for that though. In other words:
0-200 stat number-> 0-100% chain chance (e.g. a Luck stat of 70 would give you 35% chance)
0-300 stat number -> 0-100% chain chance (e.g. a Luck stat of 63 would give you 21% chance)
0-50 stat number -> 0-100% chain chance (e.g. a Luck stat of 25 would give you 50% chance)
Or something along those lines. It could come in handy for calculating chain % for stats that tend to get pretty high, like Str for fighters and Int for mages.
EDIT:
I have no idea what happened to my post, maybe using lesser than/greater than symbols messed something up.
I don't know if it'd be much more complicated to be able to choose an x2, x3, or x0.5 factor for that though. In other words:
0-200 stat number-> 0-100% chain chance (e.g. a Luck stat of 70 would give you 35% chance)
0-300 stat number -> 0-100% chain chance (e.g. a Luck stat of 63 would give you 21% chance)
0-50 stat number -> 0-100% chain chance (e.g. a Luck stat of 25 would give you 50% chance)
Or something along those lines. It could come in handy for calculating chain % for stats that tend to get pretty high, like Str for fighters and Int for mages.
EDIT:
I have no idea what happened to my post, maybe using lesser than/greater than symbols messed something up.
Last edited by Foxley on Wed Feb 17, 2016 1:12 am, edited 1 time in total.