Post by Venn on Mar 10, 2005 0:13:33 GMT -5
I am currently working on a isometric tactical RPG called Masanis: Counterpoint of Twilight (working title), similar to Final Fantasy Tactics.
I am working on the code for the experience gain engine. In which the character is required to achieve 100 points of exp to level up for all levels. Depending on the range between the character's level and the defeated NPC's level will determine how much experience is gained from the kill, for example:
Masanis: Counterpoint of Twilight's Experience Table
--------------------------------------------------------------------
NPC lvl 14 or higher > Character recieves 100 EXP
NPC lvl 13 > Character = 95 EXP
NPC lvl 12> Character = 90 EXP
NPC lvl 11> Character = 80 EXP
NPC lvl 10> Character = 75 EXP
NPC lvl 9> Character = 70 EXP
NPC lvl 8> Character = 65 EXP
NPC lvl 7> Character = 60 EXP
NPC lvl 6> Character = 55 EXP
NPC lvl 5> Character = 50EXP
NPC lvl 4> Character = 45 EXP
NPC lvl 3> Character = 40 EXP
NPC lvl 2> Character = 35 EXP
NPC lvl 1> Character = 30 EXP
NPC lvl = Character = 25 EXP
NPC lvl 1< Character = 20 EXP
NPC lvl 2< Character = 15 EXP
NPC lvl 3< Character = 10 EXP
NPC lvl 4<Character = 5 EXP
NPC lvl 5 or less < Character = 1 EXP
--------------------------------------------------------------------
Problem is, I need to have the range between the two levels returned in a variable. So I can use it to determine the experience gained. Example: Character's Level = 12 and the NPC's Level = 15, which would give me a range of three and character would then recieve 40EXP.
My question is: How would you go about getting the range between the two number's returned numericly? Any ideas would be a great help. Thank you very much for your time and knowledge.
P.s I did look in the help files and did not see it and tried everthing I can think of .
I am working on the code for the experience gain engine. In which the character is required to achieve 100 points of exp to level up for all levels. Depending on the range between the character's level and the defeated NPC's level will determine how much experience is gained from the kill, for example:
Masanis: Counterpoint of Twilight's Experience Table
--------------------------------------------------------------------
NPC lvl 14 or higher > Character recieves 100 EXP
NPC lvl 13 > Character = 95 EXP
NPC lvl 12> Character = 90 EXP
NPC lvl 11> Character = 80 EXP
NPC lvl 10> Character = 75 EXP
NPC lvl 9> Character = 70 EXP
NPC lvl 8> Character = 65 EXP
NPC lvl 7> Character = 60 EXP
NPC lvl 6> Character = 55 EXP
NPC lvl 5> Character = 50EXP
NPC lvl 4> Character = 45 EXP
NPC lvl 3> Character = 40 EXP
NPC lvl 2> Character = 35 EXP
NPC lvl 1> Character = 30 EXP
NPC lvl = Character = 25 EXP
NPC lvl 1< Character = 20 EXP
NPC lvl 2< Character = 15 EXP
NPC lvl 3< Character = 10 EXP
NPC lvl 4<Character = 5 EXP
NPC lvl 5 or less < Character = 1 EXP
--------------------------------------------------------------------
Problem is, I need to have the range between the two levels returned in a variable. So I can use it to determine the experience gained. Example: Character's Level = 12 and the NPC's Level = 15, which would give me a range of three and character would then recieve 40EXP.
My question is: How would you go about getting the range between the two number's returned numericly? Any ideas would be a great help. Thank you very much for your time and knowledge.
P.s I did look in the help files and did not see it and tried everthing I can think of .
[shadow=blue,left,300]- Venn
[/shadow][/size]