Script Call Support Boards

Discussion in 'RPG Maker VX Ace' started by Archeia, Apr 5, 2014.

  1. boyflea

    boyflea boyflea Veteran

    Messages:
    51
    Likes Received:
    14
    Location:
    Southampton, England
    First Language:
    English
    Primarily Uses:
    RMVXA
    Thanks the pair of you: entering just that in a script will throw the error.
    There are a few scripts in-game that I suspect change how things are parsed: entering on a blank project works. ah well, perhaps there is another way to change class, perhaps with an item. thanks, I suspect A moonless Night is right.
     
  2. A-Moonless-Night

    A-Moonless-Night WINTER IS COMING Veteran

    Messages:
    476
    Likes Received:
    341
    Location:
    New Zealand
    First Language:
    English
    Primarily Uses:
    RMVXA
    @boyflea I was having an error with that script call with Moghunter's Damage Pop-up script (specifically the aliased 'change_exp' method). Do you have anything like that?
     
    boyflea likes this.
  3. boyflea

    boyflea boyflea Veteran

    Messages:
    51
    Likes Received:
    14
    Location:
    Southampton, England
    First Language:
    English
    Primarily Uses:
    RMVXA
    I'm not sure if I've got that pop-up involved, but am certainly using Moghunter's battle system: in fact it's all a mix-up of various battle-systems and pop-ups etc... well that gives me something to aim for at least, :). I've not been terribly good at maintaining my code it seems so will have to see if there is another way to force a class change perhaps. Desperation is the mother of invention: thanks for the feedback.
     
  4. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,145
    Likes Received:
    4,580
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    You can try to search in script editor by pressing CTRL + SHIFT + F
    Type either "def change_class" or "change_class"
    See where the search result pointed out.
     
    boyflea likes this.
  5. FAGC54

    FAGC54 What was that variable for? Veteran

    Messages:
    48
    Likes Received:
    2
    Location:
    dotNET Productions
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    Hello!
    I need some help finding the script call to check if an actor has a weapon or armour equipped.
    I want to make basic conditional branches like this one:

    if #put condition here
    # do stuff
    else
    # do stuff
    end

    This is because my project uses a clone script, and I have to check it with a script that stores the actor ID equipping the item in a variable.
    For example I use the variable like this:

    actor = $game_actors[$game_variables[1999]]
    actor.change_class(193)

    Like @KanaX teached me to do :kaothx:
     
  6. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,145
    Likes Received:
    4,580
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Try these, I forgot if it works ....
    Code:
    $game_actors[id].equips.include?($data_weapons[id])
    $game_actors[id].equips.include?($data_armors[id])
    
     
  7. FAGC54

    FAGC54 What was that variable for? Veteran

    Messages:
    48
    Likes Received:
    2
    Location:
    dotNET Productions
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    It's a shame, they may be the right script calls, but script input is to small and doesn't recognices the second line as the same string.
    [​IMG]
    [​IMG]
     
  8. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,145
    Likes Received:
    4,580
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Mine is wide though
    Screenshot_58.jpg
    Try to redownload the latest version
     
  9. Shiro-chan

    Shiro-chan Veteran Veteran

    Messages:
    80
    Likes Received:
    15
    First Language:
    German
    Primarily Uses:
    RMVXA
    If you have problems with the script window being too small and even updating doesn't help for whatever reason (a friend of mine had that issue), try a program called "ResizeEnable".
     
  10. Indoril

    Indoril Warper Member

    Messages:
    2
    Likes Received:
    0
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMVXA
    Hi everyone,
    I was just having an issue with a script call.
    (very first( NOOB )):
    Code:
    class Game_BattlerBase
      def is_Phased?
        return
          if a.state(26)and b.state(26);
            $game_variables[9];
          elsif a.state(26);
            0;
          elsif b.state(26);
            0;
          else;
            $game_variables[9];
          end
        end
    
    Upon Starting My game I get:
    Code:
    Script 'Phasedcheck' line 13:Syntax error occured.
    
    Code:
    unexpected $end, expecting keyword_end
       end
    
    Any help would be greatly appreciated.

    Thanks in advance.
     
  11. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,145
    Likes Received:
    4,580
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    The syntax correct one would be
    Code:
    class Game_BattlerBase
      def is_Phased?
         if a.state(26)and b.state(26);
           $game_variables[9];
         elsif a.state(26);
           0;
         elsif b.state(26);
           0;
         else;
           $game_variables[9];
         end
       end
    end
    
    But it isn't a script call, it's supposed to be an actual script deserve their own script slot.
     
    Indoril likes this.
  12. Indoril

    Indoril Warper Member

    Messages:
    2
    Likes Received:
    0
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMVXA
    Thank you so much...
    Yes, but I thought because it is a script just to be called from the formula box that I was still in the right area.
    Thank you again.
     
  13. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,145
    Likes Received:
    4,580
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Figures, but I suggest it would be better to be something like this
    Code:
    class Game_BattlerBase
      def is_phased?(a,b)
        if a.state?(26) && b.state?(26);
          $game_variables[9];
        elsif a.state?(26);
          0;
        elsif b.state?(26);
          0;
        else;
          $game_variables[9];
        end
       end
    end
    
    And in formula box
    Code:
    a.is_phased?(a,b)
    In case if the skill deal no damage, or no effect.
     
    Indoril likes this.
  14. FAGC54

    FAGC54 What was that variable for? Veteran

    Messages:
    48
    Likes Received:
    2
    Location:
    dotNET Productions
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    Hi again everyone!
    I been trying to come up with items that casts skills on battle. I know that an item can call a common event and in that common event you can force a battle action. But it doesn't do what I want, because it makes you choose the target (I think it´s the position of the enemies), but I want to select the target in the battle, like you normaly do with skills.
    Is there a script call for "Force Battle Action" that I can use to modify the way it uses the skill?
     
  15. Rinobi

    Rinobi Veteran Veteran

    Messages:
    565
    Likes Received:
    210
    First Language:
    English
    Primarily Uses:
    RMVXA
    @FAGC54 Items and siills are very similar. Just recreate this skill as an item instead.
     
  16. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,403
    Likes Received:
    2,817
    Location:
    Philippines
    First Language:
    Tagalog
    Just do the effects of that skill in the item itself.. Unless you still want the forced skill to only be casted if the user has enough MP/TP
     
  17. FAGC54

    FAGC54 What was that variable for? Veteran

    Messages:
    48
    Likes Received:
    2
    Location:
    dotNET Productions
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    You two are right, but I'm using a Tactical Battle System for my game, and skills have a range of attack and area of effect. So I can't replicate that feature with items, only with skills.
     
  18. Vis_Mage

    Vis_Mage Novice Magician Veteran

    Messages:
    364
    Likes Received:
    135
    Location:
    Ridge Island
    First Language:
    English
    Primarily Uses:
    RMVXA
    Hey,

    I've been really trying to streamline my messy event-based class system, which I'm guessing can be made much simpler with script calls.

    Pretty much, what I'm trying to do is...
    -Check which actor knows a given skill (each skill will only be known by 1 actor at a time)
    -If an actor currently knows the skill, increase the variable equal to the actor's ID +100 by 1. If not, do nothing.

    As a side note, I'll be doing this exact script call 56 times in a row to check for each individual skill, in case there's an easier way to combine it into one or two calls.

    If worse comes to worse, I'm sure this can be done through an absolute mountain of conditional branches, but I'm really hoping I can save my sanity here.
     
  19. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,403
    Likes Received:
    2,817
    Location:
    Philippines
    First Language:
    Tagalog
    @FAGC - your system doesn't allow the range and aoe to also be used for items? That's sad, most tactical battle games I played have aoe and range for items too, and they're handled almost same in Ace anyway.. anyway, since were now dealing with something related to a certain script you're using, I think its better to make a new thread for it and please tell which tactical system you are using (with links too). A general "fix" might work with the default system but not in your tactical system so its better if people have an idea what you are using.

    @Vis

    something like this maybe (havent tested this, Im travelling)

    Code:
    (1..56).each do |skill_id|
      $game_actors.each do |actor|
        if actor.skill_learned?(skill_id)
          $game_variables[actor.id+100] += 1
        end
      end
    end
    
    Assuming your skills are skill 1 to 56.. else just adjust the start and end values.. if they are not a series, make an array contaning each of the 56 skill IDs first and use it instead of the (1..56)

    PS: you might want to use $game_party.members instead of $game_actors in case you want to make sure that it only checks the actors in your party at that moment
     
    Last edited: Oct 31, 2018
  20. CodeHunterEx

    CodeHunterEx Hunter of the Perfect Code Veteran

    Messages:
    133
    Likes Received:
    62
    Location:
    Coder's Tech Cave
    First Language:
    English
    Primarily Uses:
    RMVXA
    I am trying to run a script and when I paste it in, it seems to get cut off.

    I am trying learn the scripts so I could have the code incorrect.

    Here is the script:
    $game_map.events[1].set_graphic("!E2H",$game_variables[58])

    What I am trying to do:
    For every count of the Flip variable (0-3) change the graphic of the first event on the map to the graphic in "!E2H" and index is grabbed from the value in the Flip variable (Variable 58 in this case).

    Error Message:
    Script 'Game Interpreter' line 1411: SyntaxError occurred.
    unexpected tIDENTIFIER, expecting ')'
    _variables[58])
     

Share This Page