Tsukihime 1,487 Posted May 17, 2012 (edited) FP: Event Features Author: Tsukihime Overview You can add features through script calls, such as learning a skill, or enabling a skill type. Features Add, remove, or seal skill types or skills from actor through event calls Add or remove weapon type from actor through event calls Add or remove armor type from actor through event calls Seal or lock equip types Specify actor based on actor ID or position in party Change class features by class ID (affects all actors of that class) Features can be added/removed for all actors, classes, skills, items, weapons, armors, enemies, states. More on request Usage Just use script boxes in your events. You have 4 functions to work with add_feature lose_feature seal_feature unseal_feature The keywords you will be using are skill - add/remove/seal a skill stype - add/remove/seal skill type wtype - add/remove weapon type atype - add/remove armor type etype - seal equip type elock - lock an equip type If you want to add a skill type, you just say add_feature("stype", 1) Which will add the first skill type to the leader of your party. If you want to give it to someone other than the leader, specify the position of that member in the party lose_feature("stype", 1, 2) Now the second member of the party will lose skill type 1 If you want to specify an actor by ID, you can write add_feature("stype", 1, 2, "actor") To indicate that you mean a specific actor in the game. If you want to change a feature for a class, you can say add_feature("stype", 1, 3, "class") This will add stype 1 to the third class. Downloads Script: http://db.tt/wLDnjkAN Notes You can request for more features added to the script while I look for a way to reduce redundant code Edited May 26, 2012 by Tsukihime 2 Galv and Chaos17 reacted to this Share this post Link to post Share on other sites
Galv 1,387 Posted May 18, 2012 Can we specify by Actor ID? Position in the party is useful too, but what if the player is playing around with his party formation and we wanted a certain actor to gain/lose a feature? Share this post Link to post Share on other sites
Tsukihime 1,487 Posted May 18, 2012 (edited) Not really sure the best way to do it. add_feature('wtype', 1, 1, "actor") ? add_actor_feature('wtype', 1, actor_id) ? But yes both options are necessary. Edited May 18, 2012 by Tsukihime Share this post Link to post Share on other sites
Galv 1,387 Posted May 18, 2012 Not exactly sure what the difference is with those, but I keep all syntax in the script's comments to refer to so it doesn't matter which way to me (from a non-scripter point of view). Share this post Link to post Share on other sites
Tsukihime 1,487 Posted May 18, 2012 Well, I have added support for actor ID'ing add_feature("stype", 1, 3, "actor") By default it is "party", which means it will check the party. There is one thing to watch out for: I am only changing actor features. This means if you have defined features for the class, those are not removed. I'm not sure if it is useful to remove class features. Share this post Link to post Share on other sites
Galv 1,387 Posted May 18, 2012 For my purposes, I'd be happy to just have the ability to just change actor features. This is a very handy script! For other people's projects, I can see the possibility of someone wanting to add/remove features to a class only (If they are building a class-heavy game). Share this post Link to post Share on other sites
Tsukihime 1,487 Posted May 18, 2012 That's true. Well, I will add support for classes as well. See if anyone runs into problems lol Share this post Link to post Share on other sites
Tsukihime 1,487 Posted May 18, 2012 (edited) Class support has been added. add_feature('etype', 1, 2, 'class') This will add etype 1 to the second class, based on the database ID. You know in that case I could probably just extend it to weapons, armors, items, skills, enemies, and states since they are all RPG::BaseItem objects anyways... however, weapons/armors are currently not compatible with my FP Inventory script because each weapon is a unique object and not related to $data_weapons Edited May 18, 2012 by Tsukihime Share this post Link to post Share on other sites
+ Shadow Fox 5 Posted May 28, 2012 This is a stupid question, since I have several weapon and armor types in my game, how would I go about actually adding specific weapon and armor types to my main character? EG: The player character needs to be able to equip a sword in a specific map, but only in that specific map, what would I need to put in for the sword to be equippable for that map, if the sword is type id 19 and the armor is a heavy suit of armor and the armor type is 17? Share this post Link to post Share on other sites
Tsukihime 1,487 Posted May 28, 2012 (edited) When you enter the map you would auto-run an event that says add_feature("atype", 17, 1, "actor") That means atype 17 should be added to the actor with ID 1 And then erase the event (so when you return to the map, it will trigger again) You would set your transfer events to say lose_feature("atype", 17, 1, "actor") Which undoes the feature. However, this doesn't actually de-quip your weapon. I guess I could run a check to see if all of your equips are "equippable", but I haven't looked into how that would be done. Note that this is wtype/atype, not the ID of the weapon/armor in the database (eg: weapon/armor tabs). I'm guessing you decided to create separate types for special equips. Edited May 28, 2012 by Tsukihime Share this post Link to post Share on other sites
+ Shadow Fox 5 Posted May 28, 2012 Thanks and sorry for the stupid question. Share this post Link to post Share on other sites
Tsukihime 1,487 Posted May 28, 2012 I was reading over the instructions I wrote for usage and wasn't really sure how to use it either. Cause of the scope ID part. Share this post Link to post Share on other sites
theabcguy 0 Posted December 12, 2012 I came accross an issue. Everything runs fine.. Until I save my game and come back. When I check to see if the skill is still there, its not?? This is me script tag add_feature("stype", 3, 3, "actor") I created a skill named call and its set to number 3. the actor that is recieving the skill, is number 3 as well on the database (Ironic lol) Share this post Link to post Share on other sites
Tsukihime 1,487 Posted December 12, 2012 The script probably didn't take into consideration saving/loading. Share this post Link to post Share on other sites