Loading ...
Sorry, an error occurred while loading the content.

Re: Help with skill cost

Expand Messages
  • Bjørn Arnesen
    I realized after I d hit the send button, that I d expressed it differently than I meant, it should have been Desired Level Squared - Cost of Current Level.
    Message 1 of 3 , Sep 29, 2005
      I realized after I'd hit the "send" button, that I'd expressed it
      differently than I meant, it should have been Desired Level Squared -
      Cost of Current Level. Realizing that I can't do that now, it's
      irrelevant. This should help a lot. Thank you again.


      BTW I imagine the Magic System isn't the only place World Tree draws
      from Ars Magica.

      --- In cw@yahoogroups.com, Bruce Kvam <bkvam@v...> wrote:
      > You need to express the cost as a function of the current level only.
      > When the designer expresses it in terms of the previous level, you need
      > to determine what the mathematical formula should really be, and
      > that in terms of functions in Metacreator.
      > That is, you cannot reference "c" in your cost function, only "x".
      > For example, Ars Magica says that the basic cost is equal to the
      > score plus the previous cost. That is, a score of 3 costs 3 + 2 + 1
      > experience. Going back to your secondary school algebra, you should
      > realize that this can be expressed as (n (n + 1)) / 2.
      > In programming terms you can write a function that expresses it this
      > func bc(level) {
      > return (level * (level + 1))/2;
      > }
      > There are obviously many ways to skin this cat. Instead of writing this
      > as a "pure" function you could also write a loop that iterates from
      1 to
      > level and added the current count to a total. This is less efficient,
      > but is often conceptually easier to code.
      > Writing the inverse function can be complicated, but with a little
      > algebra you can figure it out. For ArM it is:
      > func costToLev(c) {
      > return integer((sqrt(8*c + 1)-1)/2);
      > }
      > Some game systems have discontiguous functions for their skill costs
      > (3.5, for example, uses a different cost structure depending on the
      > current class). In those cases you must capture the current cost in an
      > option, and then you can use the value of that option in your cost
      > function to compute the total cost for all levels.
      > I will leave the determine of the mathematical formulae as an exercise
      > to the reader. If you need help expressing them as Metacreator
      > I'll be happy to assist.
    Your message has been successfully submitted and would be delivered to recipients shortly.