KLUD Bonus Points
(Kyonides's Level Up / Down Bonus Points)
Version: 0.1.0
By Kyonides-Arkanthos
Introduction
This script allows your heroes to earn stats bonus points after leveling up (or lose them if leveling down).
Features
* Semi Plug & Play (You still need to define what kind of stats bonus points each selected hero class will get if any. The rest will be executed automatically.)
* Your heroes may get stats bonus points (if that's what you want).
* They can get their hp and sp points replenished (if allowed).
* It works both ways, it doesn't matter if your hero is leveling up and down. (You can disable the latter if deemed necessary.)
Screenshots
Since it works only with your hero's stats, there's no such a thing as a screenshot to show the changes, just check your stats before and after you level up or down in the menu window.
Demo
<NONE is required anyway.>
Script
[rgss]# KLUD Bonus Points - KLUD BP - XP
# from : Kyonides's Level Up or Down Bonus Points for XP
# version 0.1.0 - 08.02.2010
# Usage:
# Hero's Class ID => HP, SP, STR, DEX, AGI, INT, Replenish HP & SP?
# You can leave a 0 (number zero) in any of those slots
# if you don't want them to earn that kind of stats bonus points
# Delete or Comment Out (Put a # before the code line) a Class ID
# if you don't want that hero class to earn any bonus points at all
# Keep in mind that this script adds and substracts the bonus points
# if you level up or down.
# If you don't want to ever lose them, delete or comment out this line:
# lose_extra_stats_points
module Stats
CLASS_BONUS_POINTS = {
# Hero's Class ID => HP, SP, STR, DEX, AGI, INT, Replenish HP & SP?
1 => [12, 7, 10, 0, 0, 0, true],
2 => [0, 0, 0, 0, 0, 0, false],
3 => [0, 0, 0, 0, 0, 0, true],
4 => [0, 0, 0, 0, 0, 0, true],
5 => [0, 0, 0, 0, 0, 0, false],
6 => [0, 0, 0, 0, 0, 0, true],
7 => [0, 0, 0, 0, 0, 0, true],
8 => [0, 0, 0, 0, 0, 0, false],
}
end
class Game_Actor
def exp=(exp)
@exp = [[exp, 9999999].min, 0].max
# Level up
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1
get_extra_stats_points
# Learn skill
for j in $data_classes[@class_id].learnings
if j.level == @level
learn_skill(j.skill_id)
end
end
end
# Level down
while @exp < @exp_list[@level]
@level -= 1
lose_extra_stats_points
end
# Correction if exceeding current max HP and max SP
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
# If Replenishing Actor's HP & SP is allowed
if Stats::CLASS_BONUS_POINTS[@class_id][6]
@hp, @sp = self.maxhp, self.maxsp
end
end
def get_extra_stats_points(plus=true)
return if !Stats::CLASS_BONUS_POINTS.keys.include? @class_id
sign = plus ? 1 : -1
@maxhp_plus += sign * Stats::CLASS_BONUS_POINTS[@class_id][0]
@maxsp_plus += sign * Stats::CLASS_BONUS_POINTS[@class_id][1]
@str_plus += sign * Stats::CLASS_BONUS_POINTS[@class_id][2]
@dex_plus += sign * Stats::CLASS_BONUS_POINTS[@class_id][3]
@agi_plus += sign * Stats::CLASS_BONUS_POINTS[@class_id][4]
@int_plus += sign * Stats::CLASS_BONUS_POINTS[@class_id][5]
end
def lose_extra_stats_points
get_extra_stats_points(false)
end
end
[/rgss]
Instructions
Read the comments included in my script.
FAQ
None yet.
Compatibility
For XP only.
Terms and Conditions
Not intended for Commercial Use and you should always include my name and/or url.
(Kyonides's Level Up / Down Bonus Points)
Version: 0.1.0
By Kyonides-Arkanthos
Introduction
This script allows your heroes to earn stats bonus points after leveling up (or lose them if leveling down).
Features
* Semi Plug & Play (You still need to define what kind of stats bonus points each selected hero class will get if any. The rest will be executed automatically.)
* Your heroes may get stats bonus points (if that's what you want).
* They can get their hp and sp points replenished (if allowed).
* It works both ways, it doesn't matter if your hero is leveling up and down. (You can disable the latter if deemed necessary.)
Screenshots
Since it works only with your hero's stats, there's no such a thing as a screenshot to show the changes, just check your stats before and after you level up or down in the menu window.
Demo
<NONE is required anyway.>
Script
[rgss]# KLUD Bonus Points - KLUD BP - XP
# from : Kyonides's Level Up or Down Bonus Points for XP
# version 0.1.0 - 08.02.2010
# Usage:
# Hero's Class ID => HP, SP, STR, DEX, AGI, INT, Replenish HP & SP?
# You can leave a 0 (number zero) in any of those slots
# if you don't want them to earn that kind of stats bonus points
# Delete or Comment Out (Put a # before the code line) a Class ID
# if you don't want that hero class to earn any bonus points at all
# Keep in mind that this script adds and substracts the bonus points
# if you level up or down.
# If you don't want to ever lose them, delete or comment out this line:
# lose_extra_stats_points
module Stats
CLASS_BONUS_POINTS = {
# Hero's Class ID => HP, SP, STR, DEX, AGI, INT, Replenish HP & SP?
1 => [12, 7, 10, 0, 0, 0, true],
2 => [0, 0, 0, 0, 0, 0, false],
3 => [0, 0, 0, 0, 0, 0, true],
4 => [0, 0, 0, 0, 0, 0, true],
5 => [0, 0, 0, 0, 0, 0, false],
6 => [0, 0, 0, 0, 0, 0, true],
7 => [0, 0, 0, 0, 0, 0, true],
8 => [0, 0, 0, 0, 0, 0, false],
}
end
class Game_Actor
def exp=(exp)
@exp = [[exp, 9999999].min, 0].max
# Level up
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1
get_extra_stats_points
# Learn skill
for j in $data_classes[@class_id].learnings
if j.level == @level
learn_skill(j.skill_id)
end
end
end
# Level down
while @exp < @exp_list[@level]
@level -= 1
lose_extra_stats_points
end
# Correction if exceeding current max HP and max SP
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
# If Replenishing Actor's HP & SP is allowed
if Stats::CLASS_BONUS_POINTS[@class_id][6]
@hp, @sp = self.maxhp, self.maxsp
end
end
def get_extra_stats_points(plus=true)
return if !Stats::CLASS_BONUS_POINTS.keys.include? @class_id
sign = plus ? 1 : -1
@maxhp_plus += sign * Stats::CLASS_BONUS_POINTS[@class_id][0]
@maxsp_plus += sign * Stats::CLASS_BONUS_POINTS[@class_id][1]
@str_plus += sign * Stats::CLASS_BONUS_POINTS[@class_id][2]
@dex_plus += sign * Stats::CLASS_BONUS_POINTS[@class_id][3]
@agi_plus += sign * Stats::CLASS_BONUS_POINTS[@class_id][4]
@int_plus += sign * Stats::CLASS_BONUS_POINTS[@class_id][5]
end
def lose_extra_stats_points
get_extra_stats_points(false)
end
end
[/rgss]
Instructions
Read the comments included in my script.
FAQ
None yet.
Compatibility
For XP only.
Terms and Conditions
Not intended for Commercial Use and you should always include my name and/or url.