Jump to content
Sign in to follow this  
Tdanger

Passive Skills not related to combat.

Recommended Posts

I've been looking and I haven't found anything so far, maybe it already exists? I think what I want is pretty simple, a set of skills separate from the combat abilities that would essentially just be variables attached to characters that can be seen from the menu and would be manipulated through events. For example I have an Acrobatics skill that needs to be at a certain level in order for the character to cross a rooftop to a secret area, if the skill were not high enough the character would fall to the ground. Right now I've been doing this with basic skills that call on common events which essentially works, it's just kind of cluttered and confusing for the player and it really limits what I can do with the "skills". Does any of this make sense? Is there something like this that already exists? Thanks in advance for any info!

Share this post


Link to post
Share on other sites

Thanks Wren, but unless I'm missing something I don't think that's going to work for me. I guess what I really need is for a skill to display a variable that's attached to it so the player can see the level of their skill in the menu, it's not necessary for it to have it's own section in the menu, but that would be preferable. That might be an easier way of achieving what I want, I'm not sure really, but I have 16 skills that I want to work this way, so that particular script probably wont work for me.

Share this post


Link to post
Share on other sites

Thanks Wren, but unless I'm missing something I don't think that's going to work for me. I guess what I really need is for a skill to display a variable that's attached to it so the player can see the level of their skill in the menu, it's not necessary for it to have it's own section in the menu, but that would be preferable. That might be an easier way of achieving what I want, I'm not sure really, but I have 16 skills that I want to work this way, so that particular script probably wont work for me.

You didn't mention 16 skills, lol.

 

Uh, you may need a whole scene set up.

Share this post


Link to post
Share on other sites

Yeah, seems a little out of my league. I can keep doing it the way I do it now, but I have all these skills that show up during combat that have no use there. Super cluttered. I'm not really sure how to go about commissioning one from someone who actually knows Ruby well enough to script it up. I'm learning slowly, but I'm not sure I'll ever get past simple modifications to existing script. Regardless, thanks for trying!

Share this post


Link to post
Share on other sites

I actually cut it down to ten skills, but it only needs to apply to the "main character" you have 14 choices at the start of the game so it would only have to apply to whatever character is chosen. I found a Yanfly script that lets me hide the skills during battle which is a step in the right direction, but you still end up with an empty and ultimately useless skill category. And again, it would be really nice for the players to be able to see the level of the skill from the game menu, I was thinking if all else fails I can set the skills up to present a message that would let them know the skill level but as I'm planning on selling the game it really needs to be as user friendly and streamlined as possible.  
 

I don't know if I'm explaining this well, but all I really need is a menu option (Field Skills) that would display the name of the "skill" (just a word not an actual skill in the game) and a variable that would be the "level" of that skill, it's only going to be used in events. And it only applies to your main character, so it doesn't actually have to be bound to a character at all, the variables will just be set to different levels depending on which character you choose.
 

Edited by Tdanger

Share this post


Link to post
Share on other sites

This could provide some nice visuals for skill levels: http://www.rpgmakervxace.net/topic/7477-skill-levels/

 

Thanks pencilcase27, I was considering using a similar script I found on the master list, but I'm really aiming at something that doesn't actually use "Skills" per se. The entire Field Skill system I'm using operates entirely off variables, and so if I had a menu option that displayed the "skills" and their current variable "level" I would be set. I just need a way for the players to see what their skill levels are in a manner that's not so obtrusive.

Share this post


Link to post
Share on other sites

For one thing I created a sort of passive traits... it is actually set of statuses, that if they have <trait> in the notebox, the game does not delete them on death, and also a custom menu with window below skills that lists the traits. As states do not have description as such, I  am passing a second line from the note box into the help window at the top of the screen. Since it is help window, it should be able to work with the message window stuff like \v[number], that way, since it is one actor, you would know which variable is which trait/passive.

 

Would that work for you?

 

EDIT:

Perhaps it could also be bypassed by the skills of none type... that would probably be even easier and it seems they do not show on the list for the player at all so ... If you want I will tinker with that. creating a special out-of-battle menu for that... but today, I am going to bed, sorry.

(getting up in like 5 hours)

Edited by Intocabille

Share this post


Link to post
Share on other sites

It sounds like it might work perfectly! That's actually a really flexible way to do things, lots of different ways you could utilize that, very good idea. Is this a script you are currently working on, or one you finished already?

Share this post


Link to post
Share on other sites

I have it finished, it seems to work. The version with the states anyway (and if they dont have icon, they dont even show up anywhere... or at least not in vanilla or yanfly battle engine).

I can try to make one with the "none category" if you want?

But it is a bit in a mess, having the code all over the place.... I will need it to put it together, somewhat. I will do it tomorrow and post it here for you to try. As I said... I am off to bed now, sorry.

Share this post


Link to post
Share on other sites

Don't be sorry! I'm in no rush and I really appreciate your help. I just noticed the second method you suggested and that would probably work even better, it sounds like it would give me more options on how the Skills are used in game. Thanks again!

Share this post


Link to post
Share on other sites

Aaaalright... I tried to make it with the "none" category of skills.

 

 

#--------------------------------------------------------------------------
# * Adjustments for the main menu window - adding the traits item to list
#--------------------------------------------------------------------------
class Window_MenuCommand < Window_Command
  #--------------------------------------------------------------------------
  # * For Adding Original Commands
  #--------------------------------------------------------------------------
  def add_original_commands
    add_command("Traits",  :traits,  main_commands_enabled)              #added
  end

end

#--------------------------------------------------------------------------
# * Adjustments for the main menu - adding the new item and things with it
#--------------------------------------------------------------------------
class Scene_Menu < Scene_MenuBase  
  #--------------------------------------------------------------------------
  # * Create Command Window - add the name of the menu item there
  #--------------------------------------------------------------------------
  def create_command_window
    @command_window = Window_MenuCommand.new
    @command_window.set_handler(:item,      method(:command_item))
    @command_window.set_handler(:skill,     method(:command_personal))
    @command_window.set_handler(:traits,    method(:command_personal))    #new
    @command_window.set_handler(:equip,     method(:command_personal))
    @command_window.set_handler(:status,    method(:command_personal))
    @command_window.set_handler(:formation, method(:command_formation))
    @command_window.set_handler(:save,      method(:command_save))
    @command_window.set_handler(:game_end,  method(:command_game_end))
    @command_window.set_handler(:cancel,    method(:return_scene))
  end
  #--------------------------------------------------------------------------
  # * [OK] Personal Command - added option for the traits menu
  #--------------------------------------------------------------------------
  def on_personal_ok
    case @command_window.current_symbol
    when :skill
      SceneManager.call(Scene_Skill)
    when :equip
      SceneManager.call(Scene_Equip)
    when :status
      SceneManager.call(Scene_Status)
    when :traits                                                          #new
      SceneManager.call(Scene_Traits)                                     #new
    end
  end
end

#--------------------------------------------------------------------------
# * Class for the Traits Scene
#--------------------------------------------------------------------------
class Scene_Traits < Scene_ItemBase
  #--------------------------------------------------------------------------
  # * Start Processing
  #--------------------------------------------------------------------------
  def start
    super
    create_help_window
    create_status_window
    create_item_window
    @item_window.activate
    @item_window.select_last
  end
  #--------------------------------------------------------------------------
  # * Create Status Window - changed width of the window, no command window
  #--------------------------------------------------------------------------
  def create_status_window
    y = @help_window.height
    @status_window = Window_SkillStatus.new(0, y)
    @status_window.width = Graphics.width
    @status_window.viewport = @viewport
    @status_window.actor = @actor
  end
  #--------------------------------------------------------------------------
  # * Create Item Window - changed the commands while in item window
  #--------------------------------------------------------------------------
  def create_item_window
    wx = 0
    wy = @status_window.y + @status_window.height
    ww = Graphics.width
    wh = Graphics.height - wy
    @item_window = Window_Traits.new(wx, wy, ww, wh)
    @item_window.actor = @actor
    @item_window.viewport = @viewport
    @item_window.help_window = @help_window
    @item_window.set_handler(:ok,     method(:on_item_ok))   
    @item_window.set_handler(:cancel,   method(:return_scene))
    @item_window.set_handler(:pagedown, method(:next_actor))
    @item_window.set_handler(:pageup,   method(:prev_actor))
  end
  #--------------------------------------------------------------------------
  # * Get Skill's User
  #--------------------------------------------------------------------------
  def user
    @actor
  end
  #--------------------------------------------------------------------------
  # * Item [OK]
  #--------------------------------------------------------------------------
  def on_item_ok
    @actor.last_skill.object = item
    determine_item
  end
  #--------------------------------------------------------------------------
  # * Play SE When Using Item
  #--------------------------------------------------------------------------
  def play_se_for_item
    Sound.play_use_skill
  end
  #--------------------------------------------------------------------------
  # * Use Item
  #--------------------------------------------------------------------------
  def use_item
    super
    @status_window.refresh
    @item_window.refresh
  end
  #--------------------------------------------------------------------------
  # * Change Actors - adjusted behavior
  #--------------------------------------------------------------------------
  def on_actor_change
    @status_window.actor = @actor
    @item_window.actor = @actor
    @item_window.activate    
    @item_window.select_last
  end
end

class Window_Traits < Window_SkillList
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    super
  end
end

 

 

You should note that it will override some native methods, namely the add_original_commands from Window_MenuCommand, then the create_command_window and on_personal_ok from Scene_Menu, so if you made any adjustments there, you will need to make them in this script too.

 

Next I went the way of least resistance and shamelesly copied the sklil window, just gutted the commands from there, so when you go from menu to Traits, there is nothing to select, the list with commands is active right away.

On cancel it takes you back to menu. On confirm of useable trait, it will try to use that sklil.

Skills that appear in the Traits window are the skills of "none" category.

You can switch between actors with the pageup and pagedown mapped buttons (default Q and W ?)

On Traits option selection from menu you are to select the actor to see his or her traits (or passive skills), so you can have anyone with passives, though it is shared, like normal skills. I guess it can be altered so only main hero is selected, but this leaves a good option, I guess.

Oh right, since I removed the sklil category selection (the command list in skill window) the status window (between help and skill list) is stretched and it will probably leave a bit of blank space... as I said, least resistance.

 

Now since the description goes to the help window, and help window behaves like message window, you can use \v[number_of_variable] in the skill description to call upon a variable. Thus you can display variables in skill levels and hence their level, if stored in said variable.

Now if you decide for other actors having traits as well, you could add "eval" functionality, so the game recognizes not only things like \v[number_of_variable], but also something like \eval<your_equation_here> and in that manner use more variables in sense of using the actor ID as a offset to the variable you want.

For example, lets say you have 2 actors with ID 1 and 2. You said you have 10 skills now? Well in that case the skill description would read something like

\v[\eval<offset>] which would in the end result in 11 for skill 1, 12 for skill 2 etc for first actor and 21 for skill 1 and 22 for skill 2 for the second actor. Detail in the end of post

I already tampered with the eval function, it would be this:

class Window_Base < Window
  def convert_escape_characters(text)
    result = text.to_s.clone
    result.gsub!(/\\/)            { "\e" }
    result.gsub!(/\e\e/)          { "\\" }
    result.gsub!(/\eV\[(\d+)\]/i) { $game_variables[$1.to_i] }
    result.gsub!(/\eV\[(\d+)\]/i) { $game_variables[$1.to_i] }
    result.gsub!(/\eN\[(\d+)\]/i) { actor_name($1.to_i) }
    result.gsub!(/\eP\[(\d+)\]/i) { party_member_name($1.to_i) }
    result.gsub!(/\eG/i)          { Vocab::currency_unit }
    result.gsub!(/\eAID/i) { $game_variables[0].to_s }
    result.gsub!(/\eEVAL<(.*?)>/i) { eval($1) }
    result
  end
end

Added to the end of the script I posted.

Together with adjusting two spots from the previous script

  def start
    super
    create_help_window
    create_status_window
    create_item_window
    $game_variables[0] = @actor.id
    @item_window.activate
    @item_window.select_last
  end

  def on_actor_change
    $game_variables[0] = @actor.id
    @status_window.actor = @actor
    @item_window.actor = @actor
    @item_window.activate   
    @item_window.select_last
  end

 These make it so that when you display the traits the actor ID is saved into variable 0, so either you call upon it as \v[0] or to make it more convenient as \aid in the text. So the result description of your skill could ho like this

\v[\eval<\aid+10>] would result for 11 for actor ID == 1, 12 for actor ID == 2 and so on. 

 

Be aware that if you use Yanfly message codes or actor codes or similar script, you might need to add the

    result.gsub!(/\eAID/i) { $game_variables[0].to_s }
    result.gsub!(/\eEVAL<(.*?)>/i) { eval($1) }

to apropriate spot, especially the EVAL part, that is if you vant it to work with other message codes as well.

 

I hope I was not extra confusing and I hope it will be helpful.

 

EDIT: Now that I think about it... it is not even that close to what you wanted... if you wish I can tamper with it a bit more, so the variable of your chosing will be displayed besides the skill name, where the mana/TP cost usually is? Would that be better?

 

EDIT 2: Oh well, did it anyway... to make it work add this to the first script, inside the Window_Traits

  def draw_skill_cost(rect, skill)
    variable = $game_variables[@actor.id * 10 + skill.id]
    draw_text(rect, "Lvl: "+variable.to_s, 2)
  end

It will make it so that instead of the skill cost in the Traits window there will be written value of variable that is actor ID * 10 + skill ID, so adjust that variable equation to your liking.

This eliminates the need for the EVAL part I wrote and the skill level will be written besides the skill name, instead of the skill description, making it more easy to look over the levels.

The whole script, without the eval parts (no actor ID stored in variable 0 etc), will look like this then:

 

 

#--------------------------------------------------------------------------
# * Adjustments for the main menu window - adding the traits item to list
#--------------------------------------------------------------------------
class Window_MenuCommand < Window_Command
  #--------------------------------------------------------------------------
  # * For Adding Original Commands
  #--------------------------------------------------------------------------
  def add_original_commands
    add_command("Traits",  :traits,  main_commands_enabled)              #added
  end

end

#--------------------------------------------------------------------------
# * Adjustments for the main menu - adding the new item and things with it
#--------------------------------------------------------------------------
class Scene_Menu < Scene_MenuBase  
  #--------------------------------------------------------------------------
  # * Create Command Window - add the name of the menu item there
  #--------------------------------------------------------------------------
  def create_command_window
    @command_window = Window_MenuCommand.new
    @command_window.set_handler(:item,      method(:command_item))
    @command_window.set_handler(:skill,     method(:command_personal))
    @command_window.set_handler(:traits,    method(:command_personal))    #new
    @command_window.set_handler(:equip,     method(:command_personal))
    @command_window.set_handler(:status,    method(:command_personal))
    @command_window.set_handler(:formation, method(:command_formation))
    @command_window.set_handler(:save,      method(:command_save))
    @command_window.set_handler(:game_end,  method(:command_game_end))
    @command_window.set_handler(:cancel,    method(:return_scene))
  end
  #--------------------------------------------------------------------------
  # * [OK] Personal Command - added option for the traits menu
  #--------------------------------------------------------------------------
  def on_personal_ok
    case @command_window.current_symbol
    when :skill
      SceneManager.call(Scene_Skill)
    when :equip
      SceneManager.call(Scene_Equip)
    when :status
      SceneManager.call(Scene_Status)
    when :traits                                                          #new
      SceneManager.call(Scene_Traits)                                     #new
    end
  end
end

#--------------------------------------------------------------------------
# * Class for the Traits Scene
#--------------------------------------------------------------------------
class Scene_Traits < Scene_ItemBase
  #--------------------------------------------------------------------------
  # * Start Processing
  #--------------------------------------------------------------------------
  def start
    super
    create_help_window
    create_status_window
    create_item_window
    @item_window.activate
    @item_window.select_last
  end
  #--------------------------------------------------------------------------
  # * Create Status Window - changed width of the window, no command window
  #--------------------------------------------------------------------------
  def create_status_window
    y = @help_window.height
    @status_window = Window_SkillStatus.new(0, y)
    @status_window.width = Graphics.width
    @status_window.viewport = @viewport
    @status_window.actor = @actor
  end
  #--------------------------------------------------------------------------
  # * Create Item Window - changed the commands while in item window
  #--------------------------------------------------------------------------
  def create_item_window
    wx = 0
    wy = @status_window.y + @status_window.height
    ww = Graphics.width
    wh = Graphics.height - wy
    @item_window = Window_Traits.new(wx, wy, ww, wh)
    @item_window.actor = @actor
    @item_window.viewport = @viewport
    @item_window.help_window = @help_window
    @item_window.set_handler(:ok,     method(:on_item_ok))   
    @item_window.set_handler(:cancel,   method(:return_scene))
    @item_window.set_handler(:pagedown, method(:next_actor))
    @item_window.set_handler(:pageup,   method(:prev_actor))
  end
  #--------------------------------------------------------------------------
  # * Get Skill's User
  #--------------------------------------------------------------------------
  def user
    @actor
  end
  #--------------------------------------------------------------------------
  # * Item [OK]
  #--------------------------------------------------------------------------
  def on_item_ok
    @actor.last_skill.object = item
    determine_item
  end
  #--------------------------------------------------------------------------
  # * Play SE When Using Item
  #--------------------------------------------------------------------------
  def play_se_for_item
    Sound.play_use_skill
  end
  #--------------------------------------------------------------------------
  # * Use Item
  #--------------------------------------------------------------------------
  def use_item
    super
    @status_window.refresh
    @item_window.refresh
  end
  #--------------------------------------------------------------------------
  # * Change Actors - adjusted behavior
  #--------------------------------------------------------------------------
  def on_actor_change
    @status_window.actor = @actor
    @item_window.actor = @actor
    @item_window.activate    
    @item_window.select_last
  end
  
  #--------------------------------------------------------------------------
  # * Class for the Traits Scene
  #--------------------------------------------------------------------------
end

class Window_Traits < Window_SkillList
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    super
  end
  #--------------------------------------------------------------------------
  # * Draw Skill Use Cost - writes a variable
  #--------------------------------------------------------------------------
  def draw_skill_cost(rect, skill)
    variable = $game_variables[@actor.id * 10 + skill.id]
    draw_text(rect, "Lvl: "+variable.to_s, 2)
  end
end

 

 

and the skills on list will have "Lvl: x" added to their name, aligned to right.

 

EDIT :

Corrected few things, now the variable the skill will display is equal to actor ID *10 + skill ID

so for actor 1 and skill ID 21 it will produce variable 31, for actor 2 it will be variable 41,

If you order your skills nicely, it should work, or just adjust the equation

Edited by Intocabille
  • Like 2

Share this post


Link to post
Share on other sites

Holy crap, you're amazing! I'm going to play with this a while and I may have questions, but it sounds like this will work perfectly, and showing the level in place of the cost is genius. Also, being able to set the skills up for multiple characters is fantastic, I just didn't think it would be worth the hassle. I really can't believe how quickly you did that, thank you!

Edited by Tdanger

Share this post


Link to post
Share on other sites

Holy crap, you're amazing! I'm going to play with this a while and I may have questions, but it sounds like this will work perfectly, and showing the level in place of the cost is genius. Also, being able to set the skills up for multiple characters is fantastic, I just didn't think it would be worth the hassle. I really can't believe how quickly you did that, thank you!

Well as I wrote, I had msot of it done in my other project, and using "none" category skills made it a lot simpler.

If there are troubles with it, or something like that, let me know.

Share this post


Link to post
Share on other sites

I gave it a quick try before I go to bed. So far it works perfectly, everything looks perfect, better than I could have hoped for and it's so easy to use! Thank you so much Intocabille, this is going to save me so much work and it's going to look better than anything I could have done on my own. Truly fantastic work.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted