RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[VX] Binding Equipment to Actor

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 83
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?
« Last Edit: August 10, 2012, 11:57:12 PM by modern algebra »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, you would check it like
Code: [Select]
$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:

Code: [Select]
attr_accessor :bounded

have:

Code: [Select]
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.

**
Rep: +0/-0Level 83
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

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member

**
Rep: +0/-0Level 83
no i mean can you make one for me... i kinda trashed the idea that i can do it...