How do I add Features via Event?

Discussion in 'RPG Maker VX Ace' started by Blair Pendragon, Apr 4, 2014.

  1. Blair Pendragon

    Blair Pendragon Veteran Veteran

    Messages:
    91
    Likes Received:
    41
    First Language:
    English
    I thought I had it all planned out, then very far into my game, I realized a major flaw.
    I dont think RPG Maker VX Ace can add features to characters via events.

    Characters can START with features, Classes can START with features, Items can allow features while equipped, and states can allow features while active.

    But I dont see a means to just simply ADD a feature to a character, mid way into a games story, w/o resorting to one of the above. (Which is currently impossible, with how crazy i use the above options.)

    This alone makes combat a 100% impossible to complete, and prevents me from progressing my story.

    So, the question is, what other possible ways can I go about giving my characters permanent features, that doesnt require gear, states, classes, or simply starting off with the feature?
    (with how complex i set up characters customization, im limited in my options. each event can only have 99 pages, and each map can only have so many events on a page. I currently cant afford to do too many options, when im nearly maxed out on events, switches, and event pages. So if there is a simple call script command i dont know of, that would help a ton. Also, I cant rely on comment events too much either, as i doubt the game could handle 1,500+ parallel events running at once.)


    TL;DR Is there a call script command, to give a character a "Feature"?
     
    Last edited by a moderator: Apr 4, 2014
    #1
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    37,970
    Likes Received:
    11,629
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    The only default way to add features is to set up a state with the given features, and then apply that state to your character.


    Here's my Dynamic Features Script which is the only non-state way to change them mid-game.
     
    #2
    boldpaste2 likes this.
  3. Blair Pendragon

    Blair Pendragon Veteran Veteran

    Messages:
    91
    Likes Received:
    41
    First Language:
    English
    Thanks Shaz. I dont like clicking on external links on my good PC, so when i get to a friends house to check it out, ill let u know if i have any questions :)

    Based on peoples reactions, looks like there shouldnt be any issues.
     
    #3
  4. Shaz

    Shaz Veteran Veteran

    Messages:
    37,970
    Likes Received:
    11,629
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    ezmash is my own site. It's just a blog :)
     
    #4
  5. Blair Pendragon

    Blair Pendragon Veteran Veteran

    Messages:
    91
    Likes Received:
    41
    First Language:
    English
    Ok, I got it in the game, but I think the example you gave of "what to put into the call script" is a bit vague for me, since i avoid scripts like the plague.

    The example you gave is;

    add_feature(class, id, feature_code, data_id, value)

    To whcih leaving Value alone gave a game crash, so I figured to try leaving it as 0, or cutting it out.
    But I'm obviously doing it wrong, if nothing is happening.
    So here is how I tried to type in dual wield
    add_feature:)actor, 1, :slot_type, 0, 0).

    So now that it doesnt work, I assume its some sort of combination of what u put, and something like ==0 or something between each.

    Well, everything i try leaves an error, so i assume it has to do with allowing shields equipped, messing with dual wield. But then again, dual wield turns shields off by default, so idk.
     
    Last edited by a moderator: Apr 4, 2014
    #5
  6. Shaz

    Shaz Veteran Veteran

    Messages:
    37,970
    Likes Received:
    11,629
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Yeah, it's really hard to figure out the codes. You've got it almost there, and this might be a case of what I THOUGHT were the rules are actually NOT the rules, so maybe I've added to your confusion.


    You don't need to pass the last argument, as it's 0 by default.


    The number after :slot_type should be 1. I've just tried that, and it toggles between dual and single weapon slots.


    So:

    add_feature:)actor, 1, :slot_type, 1)If you then want to change them back to a single weapon, you have to use
    Code:
    remove_feature(:actor, 1, :slot_type, 1)
    rather than just adding another feature to make the value 0, because that would then give them two features for slot type, and the game expects there to only be one (or none).
    I will add a to-do to my list to make a tool that will help figure out what codes to use. In the meantime, I'm more than happy for you and others to make a post in the thread for the script to ask for the specific values to pass, and I will look them up and test them for you.
     
    Last edited by a moderator: Apr 5, 2014
    #6

Share This Page