Instead of all stats being increased with each level up, is it possible that only one stat is increased, and its the player choice on which one he/she increases?
If so, how would I go about doing this?
Could this be done with text boxes?
Or just with scripting?
I'd also like to show a backdrop when the player levels up.
Textboxes aren't able to directly affect hero stats as far as I'm aware, so I'm guessing you'd need some scripting to do something like this.
Though I think there is a way to make items that permanently increase stats when used outside battle now, without needing scripting. If so, then you might be able to rig up a working "choose which stat to level up" system (by choosing which of the stat-boosting items to get, then having textboxes give you that item) with only textboxes (and maybe menus, for more-than-two-options choices.)
You'd still need some scripting so that the game knows when you've leveled up, though.
FYS:AHS -- Swapping out some step-on NPCs for zones + each step script
Puckamon -- Not until the reserve party is expanded.[/size]
Though I think there is a way to make items that permanently increase stats when used outside battle now, without needing scripting. If so, then you might be able to rig up a working "choose which stat to level up" system (by choosing which of the stat-boosting items to get, then having textboxes give you that item) with only textboxes (and maybe menus, for more-than-two-options choices.)
You'd still need some scripting so that the game knows when you've leveled up, though.
FYS:AHS -- Swapping out some step-on NPCs for zones + each step script
Puckamon -- Not until the reserve party is expanded.[/size]
The script to do this is a little complicated, but something like this should work.
I know some other people have done level-up systems like what you are describing, perhaps some of them can chime in about how they did it for their games.
Code:
include, plotscr.hsd
include, yourgame.hsi
global variable(2, chosen stat)
plotscript, after battle check, begin
variable(hero slot, level up)
for(hero slot, 0, 3) do(
for(level up, 1, hero levelled(hero slot)) do(
level bonus for hero(hero slot)
)
)
end
script, level bonus for hero, hero slot, begin
# Fill Menu 5 with a list of stats.
variable(menu)
menu := open menu(5)
wait for menu(menu)
variable(stat)
stat := get hero stat(hero slot, chosen stat, base stat)
stat += 1
set hero stat(hero slot, stat, chosen stat, base stat)
end
# Assign these plotscripts to the menu items
plotscript, menu choose hp, begin
chosen stat := stat:hp
end
plotscript, menu choose strength, begin
chosen stat := stat:strength
end
plotscript, menu choose agility, begin
chosen stat := stat:agility
end
plotscript, menu choose magic, begin
chosen stat := stat:magic
end
include, plotscr.hsd
include, yourgame.hsi
global variable(2, chosen stat)
plotscript, after battle check, begin
variable(hero slot, level up)
for(hero slot, 0, 3) do(
for(level up, 1, hero levelled(hero slot)) do(
level bonus for hero(hero slot)
)
)
end
script, level bonus for hero, hero slot, begin
# Fill Menu 5 with a list of stats.
variable(menu)
menu := open menu(5)
wait for menu(menu)
variable(stat)
stat := get hero stat(hero slot, chosen stat, base stat)
stat += 1
set hero stat(hero slot, stat, chosen stat, base stat)
end
# Assign these plotscripts to the menu items
plotscript, menu choose hp, begin
chosen stat := stat:hp
end
plotscript, menu choose strength, begin
chosen stat := stat:strength
end
plotscript, menu choose agility, begin
chosen stat := stat:agility
end
plotscript, menu choose magic, begin
chosen stat := stat:magic
end
I know some other people have done level-up systems like what you are describing, perhaps some of them can chime in about how they did it for their games.
Side note: if your level-up bonuses scale with level, then you need to make sure you process them in the right order. Here's an excerpt from Super Penguin Chef:
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
Code:
plotscript, after battle, begin
variable(i, j, levels)
for(i, 0, 3) do (
levels := hero levelled(i)
for (j, levels, 1, -1) do (level hero(i, get hero level(i) + 1 -- j))
# Process levels in numerical order so that HP/MP bonuses scale up instead of bouncing around
)
end
variable(i, j, levels)
for(i, 0, 3) do (
levels := hero levelled(i)
for (j, levels, 1, -1) do (level hero(i, get hero level(i) + 1 -- j))
# Process levels in numerical order so that HP/MP bonuses scale up instead of bouncing around
)
end
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks



