Page 1 of 1

Change character modifiers to a table?

Posted: Wed May 03, 2017 7:09 am
by sparr
Currently if two mods want to modify the player's running speed modifier dynamically at the same time, there's a problem.

Instead of having a single integer multiplier for speed, what if there was a table? Mods could read and write the table. Keys would be free-form; most mods would put in just one new key. Values would be either +X or *X and would all get applied in some deterministic order (first instinct is + first then *)

Re: Change character speed modifiers to a table?

Posted: Wed May 03, 2017 10:04 pm
by mophydeen
You could do this for all modifiers.

Re: Change character speed modifiers to a table?

Posted: Wed May 03, 2017 10:07 pm
by Ranakastrasz
http://fractalsoftworks.com/starfarer.a ... eStat.html

I would seriously approve of this.
Starsector makes use of this mechanic, and it is very useful.

Re: Change character speed modifiers to a table?

Posted: Tue May 09, 2017 6:29 pm
by sparr
Thanks for that amazing implementation example!

Re: Change character modifiers to a table?

Posted: Thu May 02, 2019 4:24 pm
by sparr
Editing the title of the post, and adding another use case:

If two mods both want to double the player's reach, it would be nice if they could both take effect, with their choice of +X or +X%.

Re: Change character modifiers to a table?

Posted: Thu May 02, 2019 4:37 pm
by Narc
+1 this idea. We could also have all those modifiers shown in the effects window (maybe only in debug mode?).

Re: Change character modifiers to a table?

Posted: Thu May 02, 2019 10:56 pm
by sparr
further elaboration on ways to make this idea more flexible:

allow a priority level for a change, similar to data/date-updates/data-final-fixes in mod creation.

allow changes to associate themselves with textual tags, which other changes can reference (or other mods can just search for).

allow a change to specify whether it intends to change the base value or is operating as a temporary or permanent bonus to the base.

allow a change to specify whether it should not apply if the result exceeds some cap or floor.