Level gain and permanent stat boosts

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

Post Reply
User avatar
Willy Elektrix
Liquid Metal Slime
Posts: 910
Joined: Sun Aug 15, 2010 11:30 pm

Level gain and permanent stat boosts

Post by Willy Elektrix »

If the player uses an expendable item that grants a permanent stat boost, how does that affect the stats gained when they level up? If I understand the system correctly, if the player gets +1 Attack and then is supposed to gain +1 Attack upon leveling up, they won't get the +1 Attack because they already have it.

I'm not sure if I'm explaining this well. Does this make any sense?
User avatar
Mewmew
Red Slime
Posts: 47
Joined: Thu May 05, 2011 5:19 am
Contact:

Post by Mewmew »

Hmm... I did a few tests...

default stat at level 41-43
ATK 98 -> ATK 101 (gained 3 ATK)

I then loaded and used a +5 STR stat booster... leveled twice.

Stat at level 41-43
ATK 98(+5)=103 -> 106 (gained 3 ATK)

I think they'll still gain their errr umm... default leveling stats then add on the bonus ones from items. Err... Not sure if this helps at all XD
ImageImage Arien and Fran HD Sprites
ncw64
Slime Knight
Posts: 223
Joined: Mon Jun 21, 2010 4:11 am
Location: Edinboro, PA

Post by ncw64 »

Good call! Something cool to keep in mind! On a somewhat related question, is it possible to actually mess with the leveling curve? I see that in General Options there is a place where you can set the percentage of gain to a level, essentially making it as linear or non-linear as you want, but there was no way to confirm it that I could figure out. Is this implemented or an upcoming thing perhaps?
You can't fix stupidity.
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Mewmew is correct. Scripted stat bonuses do not make the hero's next level up bonus smaller.

ncw64: No, you cannot adjust the level-up curve yet. You can change the numbers in the "Stat Growth Options" menu but those numbers are not actually used for anything yet. We decided we needed a different curve formula because that one isn't very expressive and easily curves the wrong way if you set the midpoint below 22% or above 78%
Last edited by Bob the Hamster on Wed Nov 16, 2011 4:33 pm, edited 1 time in total.
User avatar
mjohnson092088
Metal Slime
Posts: 428
Joined: Sun Jan 09, 2011 9:33 pm
Location: earth.

Post by mjohnson092088 »

James Paige wrote:Mewmew is correct. Scripted stat bonuses do not make the hero's next level up bonus smaller.
i noticed that the command for altering a character's stats using scripting has two arguments. the first is current stat and the second is max stat. current stat is obvious enough, but does max stat stand for the character's stat when they reach the max level (99)?

if this is true, let's say that you had set the character's stats to be the same at level 0 through level 99 so that leveling up normally would incur no changes to the character's stats. if you were to script bonuses to the character's current stat, would they begin to lose them as they level, much in the same way that setting a character's stats lower at level 99 than level 0 would?
Hey, I just met you, and this is crazy... So here's some lunchmeat... Sandwich, maybe?
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

No, current stat and max stat has nothing to do with leveling up.

For HP and MP, current and max should be obvious.

For all other stats, the current stat is the value that is actually used, and the max stat is what the stat gets reset to after a battle ends.

That means that if you are altering any stat other than HP and MP, you want to set both current and max to the same value (and yes, that means you have to call set hero stat twice)
User avatar
mjohnson092088
Metal Slime
Posts: 428
Joined: Sun Jan 09, 2011 9:33 pm
Location: earth.

Post by mjohnson092088 »

i figured as much, so i already did this. i was just kinda hoping that i could skip a step or two.
Hey, I just met you, and this is crazy... So here's some lunchmeat... Sandwich, maybe?
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

One way to simplify things is to make a helper script:

Code: Select all

script, set hero stat both, who, stat, value, begin
  set hero stat(who, stat, value, current stat)
  set hero stat(who, stat, value, maximum stat)
end
because it is much simpler to write:

Code: Select all

  set hero stat both(find hero(hero:Bob), stat:Strength, 100)
than it is to write:

Code: Select all

  set hero stat(find hero(hero:Bob), stat:Strength, 100, current stat)
  set hero stat(find hero(hero:Bob), stat:Strength, 100, maximum stat)
User avatar
mjohnson092088
Metal Slime
Posts: 428
Joined: Sun Jan 09, 2011 9:33 pm
Location: earth.

Post by mjohnson092088 »

interesting. i had no idea that you could do that.

i noticed that you type "script" instead of "plotscript". i was under the impression that you could call a plotscript from a plotscript. this is still true, correct?
Hey, I just met you, and this is crazy... So here's some lunchmeat... Sandwich, maybe?
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Yes. a "plotscript" script can be called from anywhere. A "script" script can only be called from other scripts. it will not show up in the script browser in custom.

Here is another useful helper script. Since most of the time you use "set hero stat" together with "get hero stat" to add a bonus to a stat, you can make a helper script like this:

Code: Select all

script, set hero stat both, who, stat, value, begin
  set hero stat(who, stat, value, current stat)
  set hero stat(who, stat, value, maximum stat)
end 

script, stat bonus, who, stat, bonus, begin
  set hero stat both(who, stat, get hero stat(who, stat, maximum stat) + bonus)
end
because it is much simpler to write:

Code: Select all

stat bonus(find hero(hero:Bob), stat:Strength, 5)
than it is to write:

Code: Select all

set hero stat(find hero(hero:Bob), stat:Strength, get hero stat(find hero(hero:Bob, stat:Strength), maximum stat) + 5, current stat)
set hero stat(find hero(hero:Bob), stat:Strength, get hero stat(find hero(hero:Bob, stat:Strength), maximum stat) + 5, maximum stat)
User avatar
Nathan Karr
Liquid Metal Slime
Posts: 1215
Joined: Fri Jan 25, 2008 3:51 am
Contact:

Post by Nathan Karr »

James Paige wrote:That means that if you are altering any stat other than HP and MP, you want to set both current and max to the same value
Unless you want the bonus not to kick in until after the next battle. Right?
Last edited by Nathan Karr on Thu Nov 17, 2011 1:26 am, edited 1 time in total.
Remeber: God made you special and he loves you very much. Bye!
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Nathan Karr wrote: Unless you want the bonus not to kick in until after the next battle. Right?
Correct. Set only the max if you want to bonus to kick in after the end of the next battle, or set only the current if you want the bonus to disappear at the end of the next battle.
Post Reply