Skill does different things with different targets

Discussion in 'RGSS3 Script Requests' started by Alyon93, Oct 26, 2015.

  1. Alyon93

    Alyon93 Veteran Veteran

    Messages:
    62
    Likes Received:
    2
    Location:
    Milano(MI), Italy
    First Language:
    Italian
    Primarily Uses:
    N/A
    Hi guys,
    Sorry for bothering you,

    I need your help for a script it's bothering me in the past months.

    I even tried do solve it on my own with the help of some guys from the forum.
    Here you can find the post I'm referring too:

    Basically this is the idea:
    I have this skill called "Help" which activates only in certain circumstances, with a limited amount of use per battle (achieved with Yanfly Skill Restrictions) and does different things:

    1) If a character is trapped(paralysis in my game) or asleep an ally can help him(removing the state).

    2) If a character is stunned, an ally using "Help" will defend and take any damage the stunned character would get. This is required since, in my game, "stun" makes unmovable a character for a couple of turns and lowers his defence by 50% leaving the stunned character open to at least one bad hit. 

    3) If a character is K.O.ed an ally can "revive" him (to 1 HP).

    4) In any case, after using this help command, the script should automatically check the items for an administrable item(like a bottle of water) and use it on the "helped" character.
    This is extremely important since in my game poison doesn't remove after K.O. and reviving a character with 1 HP without healing the poison would mean losing him again. So the script should check if the target is poisoned and if the inventory contains an antidote it should use it.

    Also I should state that I'm looking towards a separate bag of items for every character so the script should check the skill-user bag instead of the general one.

    Why this script?
    Because in my game interactions between allies is very limited, it has a very realistic approach, so a character has to take care of himself whenever he can and the others should help him only when he can't move.

    Problems so far:
    The biggest issue is the scope of the skill.
    If you put "an ally" scope it won't target dead allies(preventing case 3).
    If you put "an ally(dead)" scope it will target only dead(preventing case 1 & 2).

    The best option would be to set a completely new scope like "an ally(unmovable)" but I wasn't able to achieve it so far.

    The other issue is about accessing the inventory and eventually use an item showing it's animation and text
    "A used B on C" in some efficient way.

    Thanks for patience and eventually answers guys.
    I really appreciate it. :)

    If you need further informations I suggest to check the post in spoiler, or to ask me directly.
     
    Last edited by a moderator: Oct 27, 2015
    #1
  2. MeowFace

    MeowFace Meow Veteran

    Messages:
    1,034
    Likes Received:
    179
    Location:
    La La Land
    First Language:
    Meowish
    Any script writer working on this will have to deal with a bunch of custom scripts you are using to avoid compatible problem.

    So the work-able area is very limited, making it not an easy job.

    You will need to provide all the details on what actor id, when and how the help should work and what states effect it. And a list of the custom scripts you use that might effect the battle/skill/actions. A link to those script's original tread is needed too (not direct link to script but to the page with instructions)

    Alternatively, it will be easier if you set them up yourself in the damage formula. As far as i can tell, what you want can all be done in the formula itself.

    http://www.rpgmakervxace.net/topic/2340-how-to-make-the-most-of-custom-formulae-part-1/
     
    #2
  3. Alyon93

    Alyon93 Veteran Veteran

    Messages:
    62
    Likes Received:
    2
    Location:
    Milano(MI), Italy
    First Language:
    Italian
    Primarily Uses:
    N/A
    Thanks for answering MeowFace.

    I wondered it would have been difficult to realize it without knowing the other scripts.

    That's why I tried to do it by myself in the first place.

    This afternoon I will post a complete list of the scripts I think might influence this particular one.

    As for the formulas' solution, I don't think it will help for the scope issue, not wondering the difficulty in writing the code in one line only, also I've seen that the formula line has a limited lenght.

    I will try anyway to use it.

    Thanks for the tip anyway :)
     
    #3
  4. MeowFace

    MeowFace Meow Veteran

    Messages:
    1,034
    Likes Received:
    179
    Location:
    La La Land
    First Language:
    Meowish
    You're welcome!

    There are scripts out there that allow you to add the formula using the skill's note box. So the limit can be easily overcome i guess.

    as far as i know, adding/removing states can be done with the formula. healing/damaging is there as you already know. and you can even add exp or level up a character using that formula box. it has more uses to it than meet the eye.
     
    #4
  5. Alyon93

    Alyon93 Veteran Veteran

    Messages:
    62
    Likes Received:
    2
    Location:
    Milano(MI), Italy
    First Language:
    Italian
    Primarily Uses:
    N/A
    Here's the list I think it's comprehensive of every script might have some method in common:

    Yanfly Battle Engine: https://yanflychannel.wordpress.com/rmvxa/battle-scripts/ace-battle-engine/

    Yanfly Battle Command: https://yanflychannel.wordpress.com/rmvxa/battle-scripts/battle-command-list/

    Yanfly Skill Cost: https://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/skill-cost-manager/

    Yanfly Skill Restrictions: https://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/skill-restrictions/

    Actor Inventory by Hime: http://himeworks.com/2013/07/actor-inventory/

    The last one requires:

    Core Inventory by Hime: http://himeworks.com/2013/07/core-inventory/

    I think these are the most relevant ones, of course I'll edit with some more if needed.

    Also please, check out the first post.
    I edited my request.

    Thanks a lot :)
     
    #5
  6. Alyon93

    Alyon93 Veteran Veteran

    Messages:
    62
    Likes Received:
    2
    Location:
    Milano(MI), Italy
    First Language:
    Italian
    Primarily Uses:
    N/A
    Bump!
     
    #6
  7. Alyon93

    Alyon93 Veteran Veteran

    Messages:
    62
    Likes Received:
    2
    Location:
    Milano(MI), Italy
    First Language:
    Italian
    Primarily Uses:
    N/A
    Up!
     
    #7
  8. otonohitoka

    otonohitoka Writer and Composer Member

    Messages:
    25
    Likes Received:
    2
    Location:
    Nebraska, USA
    First Language:
    English
    Couldn't you just use a state (like Unmoveable), and then have the attack run a common event?

    Like, the character is inflicted, and the common event could be something like

    if player is unmoveable

    if player is poision

    remove state poison

    remove state unmoveable

    else

    if player is ko

    remove state ko

    change player hp to 1

    remove state unmoveable

    else...etc

    Something like that?
     
     
    #8
  9. Alyon93

    Alyon93 Veteran Veteran

    Messages:
    62
    Likes Received:
    2
    Location:
    Milano(MI), Italy
    First Language:
    Italian
    Primarily Uses:
    N/A
    Well part of the script itself should be something like that, a sequence of nestled if.

    The advantage in having a script instead of the common event is that you write it only once since it would interact directly between user and target, while in the common event you should set it for every character.

    The real problem stands in both of the situations.

    The scope of the skill.

    In the first post I described very well but I'll summarize here.

    If you set the scope to an ally you cannot target dead allies, while if you set it to an ally(dead) you can't target alive members.

    So even doing it whit a common event wouldn't work because it wouldn't get a target at all.

    Hope you understood, check the first post for better explanations.

    Thanks anyway :)
     
    #9

Share This Page