Universal Class Changing Item

Discussion in 'RGSS3 Script Requests' started by Amendment50, Aug 6, 2014.

    Tags:
  1. Amendment50

    Amendment50 Veteran Veteran

    Messages:
    45
    Likes Received:
    4
    First Language:
    English
    So I'm looking to make an item that changes classes, but affects different actors in different ways, which is why I can't figure out how to event this.

    Basically, each actor will have 3 or 4 classes that they could potentially have- they start with one, but by using the item they could change to a different one (ala the Second Seal in Fire Emblem Awakening).

    For example:

    Actor A starts as a Warrior, but could become a Mage or an Archer by using the class changing item.

    Actor B meanwhile starts as a Barbarian but could become a Cleric or a Knight by using the same item.

    Additionally, there may or may not be overlap between the classes each can become, and I would also like them to be able to switch BACK to their original class if they were to use the item again. (In other words, I want it to work exactly like the afformentioned Second Seal from FE).

    I don't want to use a whole bunch of items for different classes for actors, nor do I want to use a menu to change classes, because I want the class changing to force you to manage your items. If there were just an item that would change people who could be Barbarians into Barbarians, your choices would be a lot more limited.

    I don't have any scripting knowledge, but I think this could work well with notetags- each actor could have notetags of what classes they could become. Just throwing ideas around here, though.

    I know it's kind of a tall order. Any help pointing me in the direction of a script or scripts that could accomplish this would be greatly appreciated.

    Thanks in advance!
     
    Last edited by a moderator: Aug 6, 2014
    #1
  2. Andar

    Andar Veteran Veteran

    Messages:
    27,977
    Likes Received:
    6,318
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    wrong - any use of notetags requires scripting.


    What you should do is make that item place a "target state" on its user, and then call a common event.


    In that common event, you'll place conditional branches for each actor checking if he has the target state - this allows you to identify the actor using the item.


    In the correct branch, you place a choice command or however you want to control the class change, and then use the event command to change actor class after selecting the correct class.
     
    #2
  3. Amendment50

    Amendment50 Veteran Veteran

    Messages:
    45
    Likes Received:
    4
    First Language:
    English
    I know notetags require scripting. I was just suggesting an idea for what the script I'd like might possibly look like.

    That's an interesting idea though. In fact, it would accomplish exactly what I'm looking for, except that it would take a long time to event for each actor, since I am going to have a large amount of actors.

    I don't mean to sound picky, though. It's a good suggestion, and if I can't get a script that accomplishes this I will probably give up and do that, so thanks for your help.
     
    #3
  4. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,055
    Location:
    Toronto
    First Language:
    English
    You can use tags, which are just strings you add to an object's notes.

    http://www.himeworks.com/2013/03/07/tag-manager/

    These tags can be accessed using script calls (eg: in conditional branches)

    So for example, you have an actor that can change to a mage or an archer.

    So you write

    <tag: mage><tag: archer>Now when you use an item, you can call a common event to perform the class changing.You will need to know who you are using the item on. That can be achieved using common event variables

    http://www.himeworks.com/2013/04/25/common-event-variables/

    So you have some sort of Mage Class Change item that calls the common event when you use it on an actor.

    The common event might look like

    conditional branch: script: $game_temp.common_event_target.has_tag?("mage") script: common_event_target.change_class(CLASS_ID, true)else show text: "Didn't do anything"Note that the tag itself doesn't mean anything. You're just using it as a way to control the event's behavior.If you want to make it so that only actors that CAN be changed to mages can use the item, you can add a tag condition on your item that requires the actor to have the "mage" tag

    <tag cond: mage>This would require an add-on: http://himeworks.wordpress.com/2013/11/04/use-condition-tags/If the solution works for you, consider posting a tutorial describing how you set it up, or just tweet or share the solution on facebook
     
    Last edited by a moderator: Aug 6, 2014
    #4
  5. Amendment50

    Amendment50 Veteran Veteran

    Messages:
    45
    Likes Received:
    4
    First Language:
    English
    Thanks for the suggestion, but this would only accomplish some of what I'm looking to do, because I would want the item to allow you to change to any of the available classes, not just 'Mage' for instance. This is because having each item correspond to only one class would mean that when you get it, you either use it to change someone to a mage or nothing at all. I feel one item that enables you to change to any of the available classes, combined with having a limited number of these items, would force you to be more strategic with your item management.

    The tag idea is kind of what I was thinking, though. Sort of like when you use the item on an actor, it would bring up a menu of the classes tagged for that actor.
     
    Last edited by a moderator: Aug 6, 2014
    #5
  6. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,055
    Location:
    Toronto
    First Language:
    English
    That's up to you to figure out how to make your event. I simply provided an example of how to check whether they can become a mage, given a tag.
     
    Last edited by a moderator: Aug 6, 2014
    #6

Share This Page