Jump to content
Sign in to follow this  
Tsukihime

FP: Event Features

Recommended Posts

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 by Tsukihime

Share this post


Link to post
Share on other sites

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

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 by Tsukihime

Share this post


Link to post
Share on other sites

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

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

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

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 by Tsukihime

Share this post


Link to post
Share on other sites

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

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 by Tsukihime

Share this post


Link to post
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted