Klokreations

You are not connected. Please login or register

Adding New Map Commands

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Adding New Map Commands on Fri Feb 08, 2013 6:21 pm

Guest


Guest
First off, I'm not 100% clear on how to do this just yet, so don't consider this a tutorial.
If anything this is just a basis for us to try and figure it out fully.

I know how to insert the command.
I know how to make the command exclusive to one or more actors.
I know how to link the activation of that command to a certain effect.
I just don't know how you code the effects. But we can find that out through experimentation.

Anyway, I'll share what I know.

INSERTING THE COMMAND:
Spoiler:
Okay, go to your FE Scene_Map - Menus and find the part where it says:
Code:
# Attack
      if enemy_range.length > 0
        event.make_attack_range
        s.push('Attack')
        @index_redirect.push(0)
      end
All you have to do to add in a new command is make a new entry in this section of the code and replace the 's.push('Attack')' part with whatever you want the command to be called. You can get rid of the make_attack_range part if you want, unless your new command is going to be a form of attack, in which case you'll want to keep it. The @index_redirect.push tells the script which code to jump to when this command is actually used, so you have to keep that.
MAKING THE COMMAND EXCLUSIVE:
Spoiler:
Where it says 'if enemy_range.length > 0', it's essentially saying this command should only show up when you're in attacking range. So all you have to do to make the command exclusive to a class or character is to replace the if statement. For example, here's what I've done to make it so Divinity commands will only appear for a certain actor when a certain counter is at 10:
Code:
if event.actor_id == 7 and $game_variables[50] == 10
GIVING THE COMMAND ITS EFFECT:
Spoiler:
To do this, you have to tell the script to jump to a new section of code when the command is used. That means changing the '0' value in 'index_redirect.push'.
If you scroll down, you can actually find the codes which 'index_redirect.push' takes you to.
Code:
def fe_command_window_select(option, event)
    case option
is where these are listed. The effect for using the attack command, for example, is written under 'when 0', because attack's index_redirect.push is 0. The last used value for this is 14 for seize, so if you want to add an entirely new command, you should start with 15. Change the index_redirect.push part of your command's code to 15.
CODING THE EFFECT:
Spoiler:
I have no friggin idea. But I might in a few days - I only discovered this stuff an hour ago.

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum