Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,215
|
I'm working on a set of data files (for the Secret of Zir'An game system), and I'm having trouble changing the handling of derived traits from the skeleton files to these files.
The traits in this game (called primary stats) each have minimums and maximums determined by the character's origin (aka birthplace/nationality) - that part I'll get to when I get to the origin component. Then the user gets to spend a pool of points to increase the base values. The problem is that there are also derived traits - each has a base value derived from the primary stats, and then there's a separate pool of points to use increasing the derived stats. I can't figure out how to modify the derived stat thing to allow user modification, and I can't figure out how to modify the attribute thing to allow me to calculate a base value. P.S. Is there a better way than this to get the maximum of 4 things: var max as number max = maximum(a,b) max = maximum(max,c) max = maximum(max,d) One of the derived stats = average(Highest Primary Stat, Lowest Primary Stat) |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,215
|
I figured out how to make the derived traits user-modifiable; in the panel_basics.dat file it defines the look and available selectors for the things that belong on that panel.
My question about a better way to get a maximum still stands. |
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
Unfortunately, there is no better way to get the maximum of four values. There are times when the scripting language, in the interest of keeping things relatively simple, results in some clunky code being written. This is one of them. :-(
|
#3 |
|
|