Equipment TP Reset ACE
by Kyonides Arkanthes
Introduction
Did you ever wanted to make your heroes lose all of their TP for changing specific types of equipment?
Now you can do that!
Here's how you do it:
Leave a note in your favorite Actor's note box like the following:
<equip tp reset: As,Many,Positions,As,Deemed,Necessary>
Translation:
<equip tp reset: 0,2>
<equip tp reset: 0,1,3>
That's it!
Q: What happens if an actor has no such note?
A: Nothing. It's business as usual.
Ruby: - # * Equipment TP Reset ACE - Note Version
- # Scripter : Kyonides Arkanthes
- # * Overwritten method: Game_Actor#change_equip
- # * Instructions * #
- # Leave a note in the Actor's Note Box:
- # <equip tp reset: As,Many,Positions,As,Deemed,Necessary>
- # Nothing will happen if a given Actor has no such note.
- class Game_Actor
- TP_RESET_SLOTS_REGEX = /<equip tp reset: (...)>/i
- def change_equip(slot_id, item)
- return unless trade_item_with_party(item, equips[slot_id])
- return if item && equip_slots[slot_id] != item.etype_id
- @equips[slot_id].object = item
- actor.note[TP_RESET_SLOTS_REGEX]
- slot_ids = $1.to_s.split(/,/).map(&:to_i)
- @tp = 0 if slot_ids.include?(slot_id)
- refresh
- end
- end
复制代码
Terms & Conditions
Free as in beer and as in speech.
Just don't forget to mention me in your game credits.
本贴来自国际rpgmaker官方论坛作者:kyonides处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址: https://forums.rpgmakerweb.com/threads/equipment-tp-reset-ace.152400/ |