this seems like hassle for a single item, however it's no hassle compared to the amount of conditional branches you'd need instead for the item.
i need a script, quite specifically for an item, i've searched and searched and i can't find a script for a move deleter/move deleting item.
if anyone has played FFVIII you'll remember amnesia greens... it was used to forget GF abilities so they could learn more once they reached their limit.
anyway i plan to include many magics and skills in my game, which will clog up a player with useless old skills, rather than a move deleter i'd rather an item that works like this.
[spoiler](https://rmrk.net/proxy.php?request=http%3A%2F%2Fi416.photobucket.com%2Falbums%2Fpp247%2FL_and_misa%2FAmnesia1.png&hash=4826ae45de6a80e29a76dd45e91fbe1d4ded1702)
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi416.photobucket.com%2Falbums%2Fpp247%2FL_and_misa%2FAmnesia2.png&hash=486ff2b8a88e6dc2de913169adef86cf1211390a)
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi416.photobucket.com%2Falbums%2Fpp247%2FL_and_misa%2FAmnesia3.png&hash=35eab372e8dbedeb870d19c22f7cd7df2d98d236)
[/spoiler]
in essence, using an item on a person brings up their skill menu and tells you to select a skill to forget. selecting the skill should delete that skill and a message should say something like "<actor's name> forgot <skill name>" or something similar. also you should be able to cancel if you don't want to delete a skill after all (the "esc" key would be fine)
i think it should only be a relatively small script... maybe the most annoying part will be bringing up screens and messages for using the item i think.
(yes i don't have 10 posts yet but i'm not gonna spam ... it's fairly inactive right now so no chances to talk :( )
[spoiler]as for this in the read before posting section...
the link is broken
"7. All of the Script Forum Rules.
http://rmrk.net/index.php/topic,20694.0.html
Anyone who ignores these rules will have one strike, then I fuck up their posts."[/spoiler]
thank you anyone who replies... and i'm sorry, but i'll talk when people are on but i'm not an idiot who'll spam everything when it's inactive just so they don't look like leeches.
i plan to use this forum throughout creating my game but for now the game is just planned for personal use. if it's any good obviously i'll share.
It seems you are over complicating something that should be very simple.
If you plan on having many skills and giving people the ability to remove them, you should have it all in one scene like scene skill, and allowing the option to Remove right there instead of having them to go through a bunch of menus even if an item is required for the removal.
I'll make the scene skill edit to allow the removal of skills and you let me know if you like it or not.
EDIT:
Like this.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fa.imageshack.us%2Fimg821%2F2413%2Ftdsskillremoval.png&hash=ae45186e9f820a6c47ed4ca864847ffbd25430ba)
yeah that would probably be better... i've been looking for a few days and couldn't find one :(
This should do it then.
#==============================================================================
# ** Scene_Skill
#------------------------------------------------------------------------------
# This class performs the skill screen processing.
#==============================================================================
class Scene_Skill < Scene_Base
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
@actor = $game_party.members[@actor_index]
@viewport = Viewport.new(0, 0, 544, 416)
@help_window = Window_Help.new
@help_window.viewport = @viewport
@status_window = Window_SkillStatus.new(0, 56, @actor)
@status_window.y = 112
@status_window.viewport = @viewport
@skill_window = Window_Skill.new(0, 112 + 56, 544, 304 - 56, @actor)
@skill_window.viewport = @viewport
# Create Command Window
@command_window = Window_Command.new(544, ["Use Skill", "Remove Skill"], 2)
@command_window.draw_item(1, !@actor.skills.empty?)
@command_window.y = 56
@command_window.visible = true
@command_window.active = true
# Create Prompt Window
@prompt_window = Window_Command.new(544, ["Yes", "No"], 2)
@prompt_window.y = 56
@prompt_window.visible = false
@prompt_window.active = false
@target_window = Window_MenuStatus.new(0, 0)
# Selection mode
@selection_mode = "Use"
hide_target_window
@skill_window.active = false
# Wait for input flag
@wait_for_input = false
# Update Help Display
update_help_display
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
alias tds_skill_remove_scene_skill_terminate terminate
def terminate
tds_skill_remove_scene_skill_terminate
dispose_menu_background
@command_window.dispose
@prompt_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_menu_background
# Update Help Display
update_help_display
@help_window.update
@status_window.update
@skill_window.update
@target_window.update
# Update command window
@command_window.update
# Update Prompt Window
@prompt_window.update
if @wait_for_input
if Input.trigger?(Input::B) or Input.trigger?(Input::C)
Sound.play_decision
@prompt_window.visible = false
@prompt_window.active = false
@command_window.active = @actor.skills.empty? ? true : false
@command_window.visible = true
@skill_window.active = @actor.skills.empty? ? false : true
@wait_for_input = false
return
end
elsif @command_window.active
update_command_selection
elsif @prompt_window.active
update_prompt_selection
elsif @skill_window.active
update_skill_selection
elsif @target_window.active
update_target_selection
end
end
#--------------------------------------------------------------------------
# * Update Prompt Window selection
#--------------------------------------------------------------------------
def update_prompt_selection
if Input.trigger?(Input::B)
Sound.play_cancel
@prompt_window.visible = false
@prompt_window.active = false
@command_window.active = false
@command_window.visible = true
@skill_window.active = true
elsif Input.trigger?(Input::C)
case @prompt_window.index
when 0 # Yes
Sound.play_decision
@actor.forget_skill(@skill_window.skill.id)
@help_window.set_text(sprintf("%s has forgotten the skill: %s", @actor.name, @skill_window.skill.name))
@skill_window.index = 0
@skill_window.refresh
@wait_for_input = true
@command_window.draw_item(1, !@actor.skills.empty?)
@prompt_window.active = false
@prompt_window.visible = false
@command_window.visible = true
return
when 1 # No
Sound.play_decision
@prompt_window.visible = false
@prompt_window.active = false
@command_window.active = false
@command_window.visible = true
@skill_window.active = true
end
end
end
#--------------------------------------------------------------------------
# * Update Command Window selection
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
return_scene
elsif Input.trigger?(Input::R)
Sound.play_cursor
next_actor
elsif Input.trigger?(Input::L)
Sound.play_cursor
prev_actor
elsif Input.trigger?(Input::C)
case @command_window.index
when 0 ; @selection_mode = "Use"
when 1
return Sound.play_buzzer if @actor.skills.empty?
@selection_mode = "Remove"
end
@skill_window.index = 0
Sound.play_decision
@command_window.active = false
@skill_window.active = true
end
end
#--------------------------------------------------------------------------
# * Update Help Window Display Information
#--------------------------------------------------------------------------
def update_help_display
# Return if wait for input is true
return if @wait_for_input
# If Prompt Window is active
if @prompt_window.active
@help_window.set_text("Are you sure you want to remove this skill?")
return
end
# If command window is active
if @command_window.active
case @command_window.index
when 0 # Use Skills
@help_window.set_text("Use Selected Skill")
when 1 # Remove Skills
@help_window.set_text("Remove Selected Skill")
end
return
end
# If Skill window is active
if @skill_window.active
case @selection_mode
when "Use"
@help_window.set_text(@skill_window.skill == nil ? "" : @skill_window.skill.description)
when "Remove"
@help_window.set_text("Choose a skill to remove")
end
return
end
end
#--------------------------------------------------------------------------
# * Update Skill Selection
#--------------------------------------------------------------------------
def update_skill_selection
if Input.trigger?(Input::B)
Sound.play_cancel
@skill_window.active = false
@command_window.active = true
return
elsif Input.trigger?(Input::R)
Sound.play_cursor
next_actor
elsif Input.trigger?(Input::L)
Sound.play_cursor
prev_actor
elsif Input.trigger?(Input::C)
case @selection_mode
when "Use"
@skill = @skill_window.skill
if @skill != nil
@actor.last_skill_id = @skill.id
end
if @actor.skill_can_use?(@skill)
Sound.play_decision
determine_skill
else
Sound.play_buzzer
end
when "Remove"
Sound.play_decision
@skill_window.active = false
@command_window.active = false
@command_window.visible = false
@prompt_window.index = 1
@prompt_window.visible = true
@prompt_window.active = true
return
end
end
end
end
It needs to be placed above main and below Scene Skill.
Let me know if it works for you and what to chance and have a nice day.
thanks it works brilliantly and you did it so quickly :D
as soon as i work out how to rep on this forum i will... there should be a button on your post somewhere XD
Glad you liked it
I made a small add-on to it that should help you out later on.
#==============================================================================
# ** RPG::Skill Module
#------------------------------------------------------------------------------
# This module handles skill information.
#==============================================================================
module RPG
class Skill < UsableItem
#--------------------------------------------------------------------------
# * Check if a skill cannot be removed
#--------------------------------------------------------------------------
def unremovable?
return self.note.include?("UNREMOVABLE")
end
#--------------------------------------------------------------------------
# * Make array of actors that can remove skills
#--------------------------------------------------------------------------
def removable_by?
self.note[/REMOVABLE_BY: (.*)/]
# Return false if match is nil or collected array of ID's
return $1 == nil ? false : $1.split.collect! {|id| id.to_i}
end
end
end
#==============================================================================
# ** Scene_Skill
#------------------------------------------------------------------------------
# This class performs the skill screen processing.
#==============================================================================
class Scene_Skill < Scene_Base
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
@actor = $game_party.members[@actor_index]
@viewport = Viewport.new(0, 0, 544, 416)
@help_window = Window_Help.new
@help_window.viewport = @viewport
@status_window = Window_SkillStatus.new(0, 56, @actor)
@status_window.y = 112
@status_window.viewport = @viewport
@skill_window = Window_Skill.new(0, 112 + 56, 544, 304 - 56, @actor)
@skill_window.viewport = @viewport
# Create Command Window
@command_window = Window_Command.new(544, ["Use Skill", "Remove Skill"], 2)
@command_window.draw_item(1, !@actor.skills.empty?)
@command_window.y = 56
@command_window.visible = true
@command_window.active = true
# Create Prompt Window
@prompt_window = Window_Command.new(544, ["Yes", "No"], 2)
@prompt_window.y = 56
@prompt_window.visible = false
@prompt_window.active = false
@target_window = Window_MenuStatus.new(0, 0)
# Selection mode
@selection_mode = "Use"
hide_target_window
@skill_window.active = false
# Wait for input flag
@wait_for_input = false
# Update Help Display
update_help_display
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
alias tds_skill_remove_scene_skill_terminate terminate
def terminate
tds_skill_remove_scene_skill_terminate
dispose_menu_background
@command_window.dispose
@prompt_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_menu_background
# Update Help Display
update_help_display
@help_window.update
@status_window.update
@skill_window.update
@target_window.update
# Update command window
@command_window.update
# Update Prompt Window
@prompt_window.update
if @wait_for_input
if Input.trigger?(Input::B) or Input.trigger?(Input::C)
Sound.play_decision
@prompt_window.visible = false
@prompt_window.active = false
@command_window.active = @actor.skills.empty? ? true : false
@command_window.visible = true
@skill_window.active = @actor.skills.empty? ? false : true
@wait_for_input = false
return
end
elsif @command_window.active
update_command_selection
elsif @prompt_window.active
update_prompt_selection
elsif @skill_window.active
update_skill_selection
elsif @target_window.active
update_target_selection
end
end
#--------------------------------------------------------------------------
# * Update Prompt Window selection
#--------------------------------------------------------------------------
def update_prompt_selection
if Input.trigger?(Input::B)
Sound.play_cancel
@prompt_window.visible = false
@prompt_window.active = false
@command_window.active = false
@command_window.visible = true
@skill_window.active = true
elsif Input.trigger?(Input::C)
case @prompt_window.index
when 0 # Yes
Sound.play_decision
@actor.forget_skill(@skill_window.skill.id)
@help_window.set_text(sprintf("%s has forgotten the skill: %s", @actor.name, @skill_window.skill.name))
@skill_window.index = 0
@skill_window.refresh
@wait_for_input = true
@command_window.draw_item(1, !@actor.skills.empty?)
@prompt_window.active = false
@prompt_window.visible = false
@command_window.visible = true
return
when 1 # No
Sound.play_decision
@prompt_window.visible = false
@prompt_window.active = false
@command_window.active = false
@command_window.visible = true
@skill_window.active = true
end
end
end
#--------------------------------------------------------------------------
# * Update Command Window selection
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
return_scene
elsif Input.trigger?(Input::R)
Sound.play_cursor
next_actor
elsif Input.trigger?(Input::L)
Sound.play_cursor
prev_actor
elsif Input.trigger?(Input::C)
case @command_window.index
when 0 ; @selection_mode = "Use"
when 1
return Sound.play_buzzer if @actor.skills.empty?
@selection_mode = "Remove"
end
@skill_window.index = 0
Sound.play_decision
@command_window.active = false
@skill_window.active = true
end
end
#--------------------------------------------------------------------------
# * Update Help Window Display Information
#--------------------------------------------------------------------------
def update_help_display
# Return if wait for input is true
return if @wait_for_input
# If Prompt Window is active
if @prompt_window.active
@help_window.set_text("Are you sure you want to remove this skill?")
return
end
# If command window is active
if @command_window.active
case @command_window.index
when 0 # Use Skills
@help_window.set_text("Use Selected Skill")
when 1 # Remove Skills
@help_window.set_text("Remove Selected Skill")
end
return
end
# If Skill window is active
if @skill_window.active
case @selection_mode
when "Use"
@help_window.set_text(@skill_window.skill == nil ? "" : @skill_window.skill.description)
when "Remove"
@help_window.set_text("Choose a skill to remove")
end
return
end
end
#--------------------------------------------------------------------------
# * Update Skill Selection
#--------------------------------------------------------------------------
def update_skill_selection
if Input.trigger?(Input::B)
Sound.play_cancel
@skill_window.active = false
@command_window.active = true
return
elsif Input.trigger?(Input::R)
Sound.play_cursor
next_actor
elsif Input.trigger?(Input::L)
Sound.play_cursor
prev_actor
elsif Input.trigger?(Input::C)
case @selection_mode
when "Use"
@skill = @skill_window.skill
if @skill != nil
@actor.last_skill_id = @skill.id
end
if @actor.skill_can_use?(@skill)
Sound.play_decision
determine_skill
else
Sound.play_buzzer
end
when "Remove"
return Sound.play_buzzer if @skill_window.skill.unremovable?
# Actor Remove Array
actor_remove = @skill_window.skill.removable_by?
# If Skill removal by character is not false
if actor_remove != false
return Sound.play_buzzer if !actor_remove.include?(@actor.id)
end
Sound.play_decision
@skill_window.active = false
@command_window.active = false
@command_window.visible = false
@prompt_window.index = 1
@prompt_window.visible = true
@prompt_window.active = true
return
end
end
end
end
By adding these things to a skills note box you will prevent removal.
UNREMOVABLE
The above will prevent removal by all characters.
REMOVABLE_BY: # # # # #
# = Actor ID by the database.
The above will prevent removal of the skill unless it's ID is included in the notebox.
Example:
REMOVABLE_BY: 1 2 3
The example above means that only actors 1 2 and 3 can remove the skill.
Enjoy and have a nice day.
thankyou it's better than i could have hoped :D