Post new topic    
Red Slime
Send private message
Changing level up system 
 PostWed Aug 28, 2013 2:31 am
Send private message Reply with quote
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.
Metal Slime
Send private message
 
 PostWed Aug 28, 2013 3:26 am
Send private message Reply with quote
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]
Liquid Metal King Slime
Send private message
 
 PostWed Aug 28, 2013 3:30 am
Send private message Reply with quote
The script to do this is a little complicated, but something like this should work.

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


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.
Super Slime
Send private message
 
 PostWed Aug 28, 2013 7:26 pm
Send private message Reply with quote
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:

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

Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
Display posts from previous: