Jump to content


Photo

Actor Requirement

feature

  • Please log in to reply
1 reply to this topic

#1 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7,120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 19 October 2012 - 07:12 PM

Feature: Actor Requirement
-Tsukihime

This script allows you to set actor requirements for weapons and armors.

Download

Script: http://db.tt/Q0t35QUJ
Required: Feature Manager

Usage

Tag weapons/armors with

<ft: actor_req id>

Where `id` is the actor ID in the database.
The requirement means that only specific actors may equip it. Your actor must be able to equip the type of weapon/armor.

Edited by Tsukihime, 19 October 2012 - 07:36 PM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#2 Ata Nacius

Ata Nacius

    Member of Ace Academy as a Student in House of Spades

  • Ace Member
  • 30 posts
  • LocationFrance
  • RM Skill - Coder

Posted 28 March 2015 - 09:57 PM

Hello Tsukihime, I think (I think heh..) you have made an error in your script.

 

Assuming our command as NOTETAG must be: actor_req..

Why is there 'class_req' in this block of ruby code:

  alias :ft_actor_req_armor_ok? :feature_equip_armor_ok?
  def feature_equip_armor_ok?(item)
    set = item_features_set(item, :class_req, 0) ## HERE
    return false if !(set.empty? || set.include?(@actor_id))
    ft_actor_req_armor_ok?(item)
  end

So.. This is why it seems the right code should be:

  alias :ft_actor_req_armor_ok? :feature_equip_armor_ok?
  def feature_equip_armor_ok?(item)
    set = item_features_set(item, :actor_req, 0)
    return false if !(set.empty? || set.include?(@actor_id))
    ft_actor_req_armor_ok?(item)
  end

No?

 

By the way... Your scripts are amazing, I will use some for sure, and if one day I want sell my games, be sure I'll buy a commercial license from you!


Elves haven't any negative traits and are perfect then!

 (Well.. This is that my parents keep saying to me since I'm a child !)






Also tagged with one or more of these keywords: feature

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users