I've searched the forums and google a few times but I've only come up with gold stealing skill, which is kind of silly to me, seeing as the Steal skill is almost mandatory with any kind of awesome game.. Has anyone come across one of these?
Ideally the skill would work like this, possibly with being able to edit monster notes or something..
Maybe a percent chance to steal:
33% chance to steel rare item
67% chance to steal common items
If you failed at stealing: "You weren't able to steal anything."
If you successfully stole from the monster it would show: "There is nothing left to steal."
I would like it to be easy to use for someone who is not script savvy to use it as well. (Like me.) Kind of the way Zylos did the Synthesis Script.
Under the enemies tab for note maybe we can have a simple code that allows you to edit the items and percent.
[type 1] = 0 (items)(1 for weapon)(2 for armor)
[id1] = 1 (item id #)
[percent1] = 33 (for rare item 33 out of 100 chance)
[type 2]
[id2]
percent[2] Same as above for for different item.
Can this be done or has it been done?
Well there is this, it's in Japanese. This guy helped decode what to do. http://www.rpgrevolution.com/forums/lofiversion/index.php/t11865.html (http://www.rpgrevolution.com/forums/lofiversion/index.php/t11865.html) But here is the script, I didn't make it, credit goes to kcg. ;D
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/ ? ?? - KGC_Steal ? VX ?
#_/ ? Last update : 2008/09/13 ?
#_/----------------------------------------------------------------------------
#_/ ????????????????????
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#==============================================================================
# ? ???????? - Customize ?
#==============================================================================
module KGC
module Steal
# ? ????????????????
# %s : ??????
VOCAB_STEAL_NO_ITEM = "%s??????????"
# ? ??????????????
VOCAB_STEAL_FAILURE = "???????"
# ? ????????????????
# ???? %s : ??????
# ???? %s : ?????
VOCAB_STEAL_ITEM = "%s??%s?????"
# ? ??????????????
# ???? %s : ??????
# ???? %s : ??
# ???? %s : ??
VOCAB_STEAL_GOLD = "%s?? %s%s ????"
end
end
#???????????????????????????????????????
$imported = {} if $imported == nil
$imported["Steal"] = true
module KGC::Steal
module Regexp
module BaseItem
# ???????
STEAL_PROB_PLUS = /<(?:STEAL_PROB|?????)\s*([\+\-]\d+)[%?]?>/i
end
module Skill
# ??
STEAL = /<(?:STEAL|??)>/i
end
module Enemy
# ?????????
STEAL_OBJECT = /<(?:STEAL|??)\s*([IWAG]):(\d+)\s+(\d+)([%?])?>/i
end
end
end
#???????????????????????????????????????
#==============================================================================
# ? Vocab
#==============================================================================
module Vocab
# ?????????
StealItem = KGC::Steal::VOCAB_STEAL_ITEM
StealGold = KGC::Steal::VOCAB_STEAL_GOLD
StealNoItem = KGC::Steal::VOCAB_STEAL_NO_ITEM
StealFailure = KGC::Steal::VOCAB_STEAL_FAILURE
end
#???????????????????????????????????????
#==============================================================================
# ? RPG::BaseItem
#==============================================================================
class RPG::BaseItem
#--------------------------------------------------------------------------
# ? ????????????
#--------------------------------------------------------------------------
def create_steal_cache
@__steal_prob_plus = 0
self.note.each_line { |line|
case line
when KGC::Steal::Regexp::BaseItem::STEAL_PROB_PLUS
# ???????
@__steal_prob_plus += $1.to_i
end
}
end
#--------------------------------------------------------------------------
# ? ???????
#--------------------------------------------------------------------------
def steal_prob_plus
create_steal_cache if @__steal_prob_plus == nil
return @__steal_prob_plus
end
end
#???????????????????????????????????????
#==============================================================================
# ? RPG::Skill
#==============================================================================
class RPG::Skill < RPG::UsableItem
#--------------------------------------------------------------------------
# ? ????????????
#--------------------------------------------------------------------------
def create_steal_cache
super
@__steal = false
self.note.each_line { |line|
case line
when KGC::Steal::Regexp::Skill::STEAL
# ??
@__steal = true
end
}
end
#--------------------------------------------------------------------------
# ? ??
#--------------------------------------------------------------------------
def steal?
create_steal_cache if @__steal == nil
return @__steal
end
end
#???????????????????????????????????????
#==============================================================================
# ? RPG::Enemy
#==============================================================================
class RPG::Enemy
#--------------------------------------------------------------------------
# ? ????????????
#--------------------------------------------------------------------------
def create_steal_cache
@__steal_objects = []
self.note.each_line { |line|
case line
when KGC::Steal::Regexp::Enemy::STEAL_OBJECT
# ?????????
obj = RPG::Enemy::StealObject.new
case $1.upcase
when "I" # ????
obj.kind = 1
obj.item_id = $2.to_i
when "W" # ??
obj.kind = 2
obj.weapon_id = $2.to_i
when "A" # ??
obj.kind = 3
obj.armor_id = $2.to_i
when "G" # ?
obj.kind = 4
obj.gold = $2.to_i
else
next
end
# ???
if $4 != nil
obj.success_prob = $3.to_i
else
obj.denominator = $3.to_i
end
@__steal_objects << obj
end
}
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def steal_objects
create_steal_cache if @__steal_objects == nil
return @__steal_objects
end
end
#???????????????????????????????????????
#==============================================================================
# ? RPG::Enemy::StealObject
#==============================================================================
class RPG::Enemy::StealObject < RPG::Enemy::DropItem
#--------------------------------------------------------------------------
# ? ??
#--------------------------------------------------------------------------
KIND_ITEM = 1
KIND_WEAPON = 2
KIND_ARMOR = 3
KIND_GOLD = 4
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
attr_accessor :gold # ?
attr_accessor :success_prob # ???
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def initialize
super
@gold = 0
@success_prob = 0
end
#--------------------------------------------------------------------------
# ? ????
#--------------------------------------------------------------------------
def equal?(obj)
return false unless obj.is_a?(RPG::Enemy::StealObject)
return false if self.gold != obj.gold
return false if self.success_prob != obj.success_prob
return true
end
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def ==(obj)
return self.equal?(obj)
end
end
#???????????????????????????????????????
#==============================================================================
# ? Game_Battler
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
attr_accessor :steal_objects # ?????????
attr_accessor :stolen_object # ????????????
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
alias initialize_Battler_KGC_Steal initialize
def initialize
initialize_Battler_KGC_Steal
@steal_objects = []
@stolen_object = nil
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def steal_prob_plus
return 0
end
#--------------------------------------------------------------------------
# ? ????????
# user : ???????
# skill : ???
#--------------------------------------------------------------------------
alias skill_effect_KGC_Steal skill_effect
def skill_effect(user, skill)
skill_effect_KGC_Steal(user, skill)
make_obj_steal_result(user, skill)
end
#--------------------------------------------------------------------------
# ? ?????????????????
# user : ??????????????
# obj : ??????????
# ??? @stolen_object ??????
#--------------------------------------------------------------------------
def make_obj_steal_result(user, obj)
return unless obj.steal? # ??????
return if @skipped || @missed || @evaded # ????
# ????????
if self.steal_objects.compact.empty?
@stolen_object = :no_item
return
end
@stolen_object = nil
stolen_index = -1
self.steal_objects.each_with_index { |sobj, i|
next if sobj == nil
# ??????
if sobj.success_prob > 0
# ????
next if sobj.success_prob + user.steal_prob_plus < rand(100)
else
# ????
if rand(sobj.denominator) != 0
next if user.steal_prob_plus < rand(100)
end
end
# ????
@stolen_object = sobj
stolen_index = i
if $imported["EnemyGuide"]
# ??????????????
self_id = (self.actor? ? self.id : self.enemy_id)
KGC::Commands.set_enemy_object_stolen(self_id, stolen_index)
end
break
}
if stolen_index != -1
@steal_objects[stolen_index] = nil
end
end
end
#???????????????????????????????????????
#==============================================================================
# ? Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def steal_prob_plus
n = 0
equips.compact.each { |item| n += item.steal_prob_plus }
return n
end
end
#???????????????????????????????????????
#==============================================================================
# ? Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# ? ?????????
# index : ????????????
# enemy_id : ???? ID
#--------------------------------------------------------------------------
alias initialize_Enemy_KGC_Steal initialize
def initialize(index, enemy_id)
initialize_Enemy_KGC_Steal(index, enemy_id)
@steal_objects = enemy.steal_objects.clone
end
end
#???????????????????????????????????????
#==============================================================================
# ? Scene_Battle
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# ? ??????? : ???
#--------------------------------------------------------------------------
alias execute_action_skill_KGC_Steal execute_action_skill
def execute_action_skill
skill = @active_battler.action.skill
if skill.steal?
execute_action_steal
@status_window.refresh
else
execute_action_skill_KGC_Steal
end
end
#--------------------------------------------------------------------------
# ? ??????? : ??
#--------------------------------------------------------------------------
def execute_action_steal
skill = @active_battler.action.skill
text = @active_battler.name + skill.message1
@message_window.add_instant_text(text)
unless skill.message2.empty?
wait(10)
@message_window.add_instant_text(skill.message2)
end
targets = @active_battler.action.make_targets
display_animation(targets, skill.animation_id)
@active_battler.mp -= @active_battler.calc_mp_cost(skill)
$game_temp.common_event_id = skill.common_event_id
for target in targets
target.skill_effect(@active_battler, skill)
display_steal_effects(target, skill)
end
end
#--------------------------------------------------------------------------
# ? ????????
# target : ???
# obj : ??????????
#--------------------------------------------------------------------------
def display_steal_effects(target, obj = nil)
unless target.skipped
line_number = @message_window.line_number
wait(5)
if target.hp_damage != 0 || target.mp_damage != 0
display_critical(target, obj)
display_damage(target, obj)
end
display_stole_object(target, obj)
display_state_changes(target, obj)
if line_number == @message_window.line_number
display_failure(target, obj) unless target.states_active?
end
if line_number != @message_window.line_number
wait(30)
end
@message_window.back_to(line_number)
end
end
#--------------------------------------------------------------------------
# ? ????????????
# target : ???
# obj : ??????????
#--------------------------------------------------------------------------
def display_stole_object(target, obj = nil)
if target.missed || target.evaded
display_steal_failure(target, obj)
return
end
case target.stolen_object
when nil # ????
display_steal_failure(target, obj)
when :no_item # ????????
display_steal_no_item(target, obj)
else
if target.stolen_object.kind == RPG::Enemy::StealObject::KIND_GOLD
# ??
display_steal_gold(target, obj)
else
# ???? or ?? or ??
display_steal_item(target, obj)
end
target.stolen_object = nil
end
end
#--------------------------------------------------------------------------
# ? ???????
# target : ??? (????)
# obj : ??????????
#--------------------------------------------------------------------------
def display_steal_failure(target, obj)
@message_window.add_instant_text(Vocab::StealFailure)
wait(30)
end
#--------------------------------------------------------------------------
# ? ?????????????
# target : ??? (????)
# obj : ??????????
#--------------------------------------------------------------------------
def display_steal_no_item(target, obj)
text = sprintf(Vocab::StealNoItem, target.name)
@message_window.add_instant_text(text)
wait(30)
end
#--------------------------------------------------------------------------
# ? ?????????????
# target : ??? (????)
# obj : ??????????
#--------------------------------------------------------------------------
def display_steal_item(target, obj)
# ??????????
sobj = target.stolen_object
case sobj.kind
when RPG::Enemy::StealObject::KIND_ITEM
item = $data_items[sobj.item_id]
when RPG::Enemy::StealObject::KIND_WEAPON
item = $data_weapons[sobj.weapon_id]
when RPG::Enemy::StealObject::KIND_ARMOR
item = $data_armors[sobj.armor_id]
else
return
end
$game_party.gain_item(item, 1)
text = sprintf(Vocab::StealItem, target.name, item.name)
@message_window.add_instant_text(text)
wait(30)
end
#--------------------------------------------------------------------------
# ? ???????????
# target : ??? (????)
# obj : ??????????
#--------------------------------------------------------------------------
def display_steal_gold(target, obj)
gold = target.stolen_object.gold
$game_party.gain_gold(gold)
text = sprintf(Vocab::StealGold, target.name, gold, Vocab.gold)
@message_window.add_instant_text(text)
wait(30)
end
end
Getting Line error at 37.. cant figure it out.
STEAL_PROB_PLUS = /<(?:STEAL_PROB|?????)\s*([\+\-]\d+)[%?]?>/i (Line 37)
Error is:
Syntax Error
The guy who decoded it posted what to do, check the link in my last post. I think he got the same error... ???
Yes, I did everything that was recommended, however, the error I'm getting is at 37, his is at 48.. >.<
I'm not a scripter but what you can do is start a new a game put the script in it and test it to make Sure it isn't a compatibility issue. Or request help in script support.
:lol:
It's a copying error - all the japanese characters got corrupted and messed up the RegExp. Recopy it directly from the actual site (http://f44.aaa.livedoor.jp/~ytomy/tkool/rpgtech/php/tech.php?tool=VX&cat=tech_vx/skill&tech=steal) into your game and see if you get any more syntax errors.
thank you modern algebra, it works perfectly.. so awesome!