Main Menu
  • Welcome to The RPG Maker Resource Kit.

[VX] Binding Equipment to Actor

Started by fatapi_shadramon, August 10, 2012, 12:53:48 PM

0 Members and 1 Guest are viewing this topic.

fatapi_shadramon

hey MA this is an awesome script but i have a question regarding my current script project...

BTW im ASCIIgod just so you know...

anyway so this script is suppose to be a 'boundable equipment' which make specific equipment that can be bounded only equippable to the first actor that uses it. its similar to some MMORPG equipments with rare properties...

so what i did first is recreate RPG::Weapon and add 2 att_accessor which is named bounded and bounded_by... the bounded is a boolean value of false by default this makes an equipment unbounded just as you get it... and bounded_by is suppose to be an integer value equal to actor that first equip it and is 0 by default. so now here is the catch..

i dont know what to modify next to check if actor is attempting to use a bounded equipment and
to make the current equipment bounded by that specific actor if isnt bounded yet...

and i also want it note tag powered just so only equipments with tag <boundable> will have a bounded property... so can i ask for a little hand on this one?

modern algebra

Well, you would check it like $data_weapons[3].bounded but you would need to set those values somewhere first, and it doesn't look like you're doing that. With regard to setting it up as a notetag, I think you would be better off creating the bounded method manually, so instead of:

attr_accessor :bounded

have:


def bounded
  @bounded = !self.note[/<BOUNDABLE>/i].nil? if @bounded.nil?
  @bounded
end


It doesn't make sense to put the bounded_by variable in RPG::Weapon since the RPG::Weapon data is reloaded with the project - it isn't saved in the game. That means that every time you exit the game and reload, the weapon will no longer be bound to an actor. Even if it was, there is only one instance of any RPG::Weapon, so if you want it to be possible for the party to get more than one of the weapon and have two different actors equip the different weapons, then you would essentially need to make it so that the weapons are saved as instances.

As for what to modify next, you would want to be looking at Game_Actor - specifically methods like equippable? and change_equip.

Anyway, I think you're probably not quite ready to write a script like this. You might want to start with something a little more basic.

fatapi_shadramon

actually i already grasped a little basics in scripting as you may know i already made up to 3 solid scriptlets such as ASCIIgod AGI based HIT system, ASCIIgod Zelda Styled item consuming and ASCIIgod different MP notations.... anyway if thats the case then can you help me out... thanks in advance

modern algebra


fatapi_shadramon

no i mean can you make one for me... i kinda trashed the idea that i can do it...