Tsukihime

Command Setup

24 posts in this topic

Command Setup

Author: Tsukihime

 

OIzJW.jpg

 

Overview

 

This script allows you to choose which commands are available in battle.

You can also tag skills that should be treated as "command skills"; that is, they will be set up as commands rather than skills you choose from a skill list.

 

Features

  • Customize your battle commands
  • Limit the number of commands you can choose
  • Treat skills as commands
  • Customize how many commands an actor has
  • Increase/decrease that limit using script calls

Usage

 

Set up your skills in the "Battle" menu.

 

In the database, tag any skills that should be treated as command skills using

<skilltype: 1>

 

Tag an actor with

<max-cmd: 10>

to give him 10 command slots by default.

 

Use the script calls

gain_commands(actor_id, amount)
lose_commands(actor_id, amount)

To increase or decrease the limit.

 

5lrcC.jpg

 

Download

 

Script: http://db.tt/2PMA25EG

Edited by Tsukihime
dbchest2 and oriceles like this

Share this post


Link to post
Share on other sites

Man, each time I verify this forum, you have evolved more in coding. Really, I'm amazed how day after day, you're becoming a professional in RGSS.

Share this post


Link to post
Share on other sites

I love the idea behind this but it seems to clash with some of YF's stuff, mainly stuff that involves Equipping or Changing (Equipping Weapons, Armor or changing classes). Getting this error:

 

no marshal_dump is defined for class Method

 

I tried getting rid of YF Equip Engine and it produces the same error with the default equip engine.

Share this post


Link to post
Share on other sites

Oh wow, I can't store "method" objects in variables cause Marshal like it...

Well, that kind of makes it a little annoying then. I was hoping to dump all "enable" conditions in that thing.

 

Anyways I've fixed the issue, but now it's less flexible than I would like it to be.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

SceneManager.call(Scene_Command_Setup) will open the selection menu. Pageup and pagedown to scroll through actors.

 

I've also added features to control how many commands an actor has

 

Tag an actor with

 

<max-cmd: 10>

 

To give him 10 command slots by default.

 

Use the script calls

 

gain_commands(actor_id, amount)
lose_commands(actor_id, amount)

 

To increase or decrease the limit.

Share this post


Link to post
Share on other sites

excuse me I misunderstood your script but the problem is that whenever a skill is added in the actor command window the skill cost (mp or tp) are not displayed. That's all ; beside it your skill is fully functional.

Share this post


Link to post
Share on other sites

Is there a way to set which commands an actor has by default? I'm using other scripts of yours that require a Draw skill, which I made a command but when I go into the game I always have to set it up myself through the menu before it's active, which is alright when you've been through the menu a bit and it makes sense but I'm the kind of person who wants the people playing my game not to have so many things put on them to understand at once and without being explained, so I was hoping if there was some way we could set what commands an actor has through a script call or something?

 

If not, I don't mind, was just curious afterall. Thanks for your time~

Share this post


Link to post
Share on other sites

Default commands was on the to-do list, but I ended up finding that it was pretty hard to determine how you would actually specify that.

 

Commands can be basically anything: skills, window calls, etc.

 

If everything was based on skill ID's, then I could just use that, but since it's not, it becomes quite a problem.

 

Each actor has a list of commands available. I've hardcoded "attack", "guard", and "item" as the first 3 commands so I know exactly where they are, but the rest can be arbitrary.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

I just read through the script and found the spot where it says:

def setup_basic_commands

@command_list << Actor_Command.new(Vocab::attack, :attack, true, attack_skill_id)

@command_list << Actor_Command.new(Vocab::guard, :guard, true, guard_skill_id)

@command_list << Actor_Command.new(Vocab::item, :item)

end

Are people capable of adding to this list? If so, could you explain what I would put in the sections at the end of the line, as I'm clueless as to what the different "-:---" parts entail.

Sorry if I'm bothering you, it's just I've chosen to disable to menu for the first part of my game, when you play a different character other than the main one, but I would like to have a battle that introduces the draw system, yet it's not in the selectable commands yet cause you have to put it there in the in-game menu, hopefully that'll explain the road bump I've hit.

Share this post


Link to post
Share on other sites

The general syntax for creating a Command is

 

Actor_Command.new(command_name, command_symbol, enabled, extra_info)

 

For skill types, the symbol is always :skill (refer to setup_stype_commands), and the extra information is the stype_id

 

For skills that should be treated as commands (setup_skill_commands),

the symbol is always :use_skill, and the extra information is the skill ID.

 

An actor's list of starting battle commands is setup through setup_battle_commands.

 

Obviously the code is designed poorly because I'm unable to "find" a particular command without doing a lot of silly things just to get one.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

it appears to use command handlers

but will keep trying

 

actually doesnt matter just noticed it has a common event thing so could add the scene call there

Edited by Pheebes

Share this post


Link to post
Share on other sites

Tsukihime Hello!

 

Brazileiro am and decided to use his Three Scripts Modification battle: Units Magic, Magic Draw and Comand Setup.

 

However unfortunately I could not configure the Command Setup using the tag <skilltype: 1>

 

I put the tag in the Notes box, but nothing happens.

Could you correct me and tell how to configure the Command Setup?

 

Thank you!

Edited by Gilmar da Silva Lopes

Share this post


Link to post
Share on other sites

Not supporting this script anymore. Well, it pretty much was not functional since you couldn't customize who started with what. There is also too much hard-coding and awkward things like tagging a skill with skilltype = 1?

 

The only reason the skills were tagged was to be treated as a command, but that really shouldn't matter.

 

I'm going to write a new one in the future using a plugin-based design so that you can register your own commands, so if you're using other people's scripts and want to add it to the command list you can use the note tag system. Yes, that also means creating your own commands.

 

The note-tag system would handle the issue where you couldn't decide who starts with what commands, and also allows integration with other scripts.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

I'm getting an error that says:

 

Script 'Command Setup' line342:NoMethodError occured.

undefined method 'name' for "ATTACK": string

 

any idea what's going on?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.