Jump to content


Photo

Command Setup


  • Please log in to reply
23 replies to this topic

#1 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 25 May 2012 - 08:00 PM

Command Setup
Author: Tsukihime

Posted Image

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.

Posted Image

Download

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

Edited by Tsukihime, 25 May 2012 - 09:40 PM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#2 e-COS

e-COS

    ...

  • Member
  • 7 posts
  • LocationBrazil
  • RM Skill - Jack of All Trades

Posted 25 May 2012 - 08:41 PM

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.

#3 SuperNurse

SuperNurse

    RPG RN

  • Member
  • 27 posts
  • LocationNYC
  • RM Skill - Writer

Posted 25 May 2012 - 09:00 PM

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.

#4 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 25 May 2012 - 09:11 PM

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, 25 May 2012 - 09:20 PM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#5 Sidbot

Sidbot

    Advanced Member

  • Member
  • 60 posts

Posted 25 May 2012 - 09:22 PM

You just continue to amaze with these fun scripts. Thanks!

#6 SuperNurse

SuperNurse

    RPG RN

  • Member
  • 27 posts
  • LocationNYC
  • RM Skill - Writer

Posted 25 May 2012 - 09:31 PM

Awesome, now that's fixed. What are the appropriate script calls for this? I can't seem to get it to show up in my modified menu.

#7 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 25 May 2012 - 09:38 PM

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.
All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#8 johan

johan

    Newbie

  • Member
  • 7 posts

Posted 29 May 2012 - 09:26 AM

your script doesn't include skill cost.

#9 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 29 May 2012 - 10:28 AM

What do you mean?
All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#10 johan

johan

    Newbie

  • Member
  • 7 posts

Posted 02 June 2012 - 01:30 PM

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.

#11 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 02 June 2012 - 01:53 PM

I didn't add it cause the default window doesn't have enough space.
Long names already look kind of weird.
All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#12 Lanechology

Lanechology

    Member

  • Member
  • 23 posts
  • LocationViet Nam
  • RM Skill - Writer

Posted 02 June 2012 - 10:32 PM

This make me remember about FF8 :). Thanks you so much :)

#13 ∑-sigma-

∑-sigma-

    Advanced Member

  • Member
  • 200 posts
  • LocationAustralia.
  • RM Skill - Writer

Posted 25 June 2012 - 08:37 PM

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~
Posted Image

#14 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 26 June 2012 - 11:37 AM

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, 26 June 2012 - 11:38 AM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#15 ∑-sigma-

∑-sigma-

    Advanced Member

  • Member
  • 200 posts
  • LocationAustralia.
  • RM Skill - Writer

Posted 27 June 2012 - 12:20 AM

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.
Posted Image

#16 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 27 June 2012 - 10:57 AM

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, 27 June 2012 - 10:59 AM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#17 Tammsyn

Tammsyn

    Advanced Member

  • Member
  • 173 posts

Posted 13 August 2012 - 12:43 PM

hiya im trying to get this to work with yanflys menu engine
http://yanflychannel...ce-menu-engine/
but i cant seam to get it to work any suggestions?

#18 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 13 August 2012 - 12:45 PM

It shouldn't be anything special. It's just a scene call, which his script should allow you to do fairly easily. I don't know how his script works though.
All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#19 Tammsyn

Tammsyn

    Advanced Member

  • Member
  • 173 posts

Posted 18 August 2012 - 01:59 PM

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, 18 August 2012 - 02:00 PM.


#20 Whale

Whale

    Advanced Member

  • Member
  • 74 posts

Posted 18 August 2012 - 07:30 PM

This is without a doubt one of my favorite scripts to add. This is just such a nice game mechanic.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users