Modding Stats - Strength, Dexterity, Vitality, Willpower
- David Ward
- Posts: 103
- Joined: Wed Jan 07, 2015 11:44 pm
- Location: Vancouver, BC, Canada
Modding Stats - Strength, Dexterity, Vitality, Willpower
How moddable are the base stats in Grimrock 2? So far, we have not been able to figure out how to make any adjustments to how this works. Would making an adjustment be akin to making all new stats and then defining them as such? Or is that just not doable because of the hard-coding of the stats themselves?
Re: Modding Stats - Strength, Dexterity, Vitality, Willpower
You want to add new stats like Luck, which could affect crit, loot or experience?
- David Ward
- Posts: 103
- Joined: Wed Jan 07, 2015 11:44 pm
- Location: Vancouver, BC, Canada
Re: Modding Stats - Strength, Dexterity, Vitality, Willpower
Well....I hadn't considered that. I was thinking of changing the existing stats so that Strength, for example, yielded more damage per point; Dexterity would 2 evasion and 3 accuracy, instead of 1 and 2 respectively...that sort of thing.
But luck as a stat....could be very interesting. Tell me more.
But luck as a stat....could be very interesting. Tell me more.
Re: Modding Stats - Strength, Dexterity, Vitality, Willpower
A luck stat would probably work best in a game with a weighted percentile skill system; unless the plan was to check it via script for encounters.
The original Fallout games [the good ones IMO ] used Luck to affect everything that involved a bit of chance; including critical hits. It was double edged, as a low luck would have a negative effect on one's chances, and cause critical failures more often. Weapons would drop or even fall apart.
The original Fallout games [the good ones IMO ] used Luck to affect everything that involved a bit of chance; including critical hits. It was double edged, as a low luck would have a negative effect on one's chances, and cause critical failures more often. Weapons would drop or even fall apart.
Re: Modding Stats - Strength, Dexterity, Vitality, Willpower
Simple increasing those stats would result in the same. But I would like to know the exact formulas are used for attacks and then see how we can modify them with new stats. Let's say attack damage = roll random (min dmg, max dmg) x crit and damage applied = attack damage - armor - (evade x random roll) - protection (- resist). Luck could affect it like this: attack dmg = roll random ( (min dmg, max dmg) + luck ) x crit and damage applied = attack damage - ( (evade - luck) x random roll) - protection (- resist)I was thinking of changing the existing stats so that Strength, for example, yielded more damage per point....
- David Ward
- Posts: 103
- Joined: Wed Jan 07, 2015 11:44 pm
- Location: Vancouver, BC, Canada
Re: Modding Stats - Strength, Dexterity, Vitality, Willpower
It's something on the list to consider. Will get back to you guys on here regarding a *luck* stat.
In the mean time....is there no way to really modify the stats already in the game? Making strength provide more/less carrying capacity per point is also something we're trying to do. Of course, we can just change item weights, but if there's a way to work around with the stats, that would be better.
In the mean time....is there no way to really modify the stats already in the game? Making strength provide more/less carrying capacity per point is also something we're trying to do. Of course, we can just change item weights, but if there's a way to work around with the stats, that would be better.
Re: Modding Stats - Strength, Dexterity, Vitality, Willpower
You could probably put code in all onRecomputeStats/onComputeAccuracy/onComputeCritChance hooks that figures out which one is called last (so you get the correct stat values) and then apply your additional stat bonuses there, but that won't work for something like attack power of course.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
- David Ward
- Posts: 103
- Joined: Wed Jan 07, 2015 11:44 pm
- Location: Vancouver, BC, Canada
Re: Modding Stats - Strength, Dexterity, Vitality, Willpower
Ok. Thank you.
- David Ward
- Posts: 103
- Joined: Wed Jan 07, 2015 11:44 pm
- Location: Vancouver, BC, Canada
Re: Modding Stats - Strength, Dexterity, Vitality, Willpower
So, it appears that weapons that are equipped do not add their +Dexterity or +Strength bonuses on a point by point basis. For example, if I equip an axe that has Damage + Strength, and I have 20 strength, it only adds (from what I've seen) around 10 damage or so.
So, if I wanted the +Strength to be added to the weapon's damage on a point-by-point basis, would it be best to use the onRecomputeStats hook for that?
So, if I wanted the +Strength to be added to the weapon's damage on a point-by-point basis, would it be best to use the onRecomputeStats hook for that?
Re: Modding Stats - Strength, Dexterity, Vitality, Willpower
You cannot do that at all, as far as I know. The final attack power value cannot be changed. You can only change it by modifying the champion's stat (if the weapon uses a stat) or the weapon's attack power value.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.