RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[RESOLVED] calculating exp without an equation?

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 82
We learn by living...
Say I wanted arbitrary experience lists, like prime numbers...

you know, like

3
5
7
11
13
17

etc.

Is there a way to make my own custom chart? Like either with a series of if...return statements or an array like [3,5,7,13,17...] ?

I can do equation based experience fine, but when I try to do if then statements,
this little monster causes an error.

Code: [Select]
    while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
« Last Edit: November 21, 2010, 07:13:57 PM by shintashi »

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween

***
Rep:
Level 82
We learn by living...
got a modified version of it to work ^^

will probably have to come back to it to make multiple charts for different classes, since I couldn't get the base code to work (probably have to insert it into main)

***
Rep:
Level 82
We learn by living...
Here's a working version of three different classes. To make more classes, just add another when #... and "@exp_list = {" before the "else"

Code: [Select]
    def make_exp_list
    actor = $data_actors[@actor_id]
    case actor.class_id
    when 1 #first class
    @exp_list = {
      1 => 0,
      2 => 2200,
      3 => 4400,
      4 => 8800,
      5 => 16500,
      6 => 30000,
      7 => 55000,
      8 => 100000,
      9 => 200000,
      10 => 400000,
      11 => 600000,
      12 => 800000,
      13 => 1000000,
      14 => 1200000,
      15 => 1500000,
      16 => 1800000,
      17 => 2100000,
      18 => 2400000,
      19 => 2700000,
      20 => 3000000
      }
    when 2 #second class
    @exp_list = {
      1 => 0,
      2 => 3000,
      3 => 5500,
      4 => 10000,
      5 => 22000,
      6 => 44000,
      7 => 88000,
      8 => 150000,
      9 => 250000,
      10 => 500000,
      11 => 750000,
      12 => 1000000,
      13 => 1250000,
      14 => 1500000,
      15 => 1750000,
      16 => 2000000,
      17 => 2250000,
      18 => 2500000,
      19 => 2750000,
      20 => 3000000
      }
    else #base class
          @exp_list = {
      1 => 0,
      2 => 2000,
      3 => 4000,
      4 => 8000,
      5 => 16000,
      6 => 32000,
      7 => 64000,
      8 => 125000,
      9 => 250000,
      10 => 500000,
      11 => 750000,
      12 => 1000000,
      13 => 1250000,
      14 => 1500000,
      15 => 1750000,
      16 => 2000000,
      17 => 2250000,
      18 => 2500000,
      19 => 2750000,
      20 => 3000000
      }
      end #end case
  end # end exp list
« Last Edit: November 21, 2010, 07:13:33 PM by shintashi »

***
Rep:
Level 82
We learn by living...
to use, insert the code listed in my previous post in your "Calculate EXP" section of Game Actor, and comment out or delete the previous def make_exp_list. I recommend commenting it out first in case of a glitch.