How do I Seal the Item command?

Jericho Swain

Noxus Tyrant
Veteran
Joined
Oct 18, 2013
Messages
92
Reaction score
19
First Language
English
Primarily Uses
How do I seal the Item command from the Battle menu ?
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
you need to use a script for this, that isn't possible by default.


Depending on what you want to do, you can either use a simple script modification to remove that command permanently, or you can use one of the existing command manager scripts (there are two, one by Yanfly and one by Tsukihime, that I know of) to change the command lists depending on a lot of things or conditions.
 

Solo

Veteran
Veteran
Joined
Jul 26, 2013
Messages
1,104
Reaction score
154
First Language
English
Primarily Uses
RMVXA
Dekita made something like this, that disables the Item command based on a thrown switch.
 

Euphoria

Veteran
Veteran
Joined
Jun 27, 2013
Messages
378
Reaction score
93
First Language
English
Primarily Uses
module Euphoria module Itemoff SWITCH_ID = 1 #Switch To Disable/Enable Items In Battle, Turn Switch On To #Enable Items, Off To Disable endend#===============================================================================class Window_ActorCommand < Window_Command def add_item_command add_command(Vocab::item, :item) if $game_switches[Euphoria::Itemoff::SWITCH_ID] end endJust insert this script, by default items will be unavailable, if you want items back on in battle turn the switch on.
 

kaleemmcintyre

Blue Dragon
Veteran
Joined
Jan 23, 2013
Messages
73
Reaction score
8
First Language
english
Primarily Uses
RMMV
Is there a way to reverse this script so that the item command with turn off if a switch is on?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Code:
module Euphoriamodule ItemoffSWITCH_ID = 1 #Switch To Disable/Enable Items In Battle, Turn Switch Off To#Enable Items, On to Disableendend#===============================================================================class Window_ActorCommand < Window_Commanddef add_item_commandadd_command(Vocab::item, :item) unless $game_switches[Euphoria::Itemoff::SWITCH_ID]endend
 

kaleemmcintyre

Blue Dragon
Veteran
Joined
Jan 23, 2013
Messages
73
Reaction score
8
First Language
english
Primarily Uses
RMMV
Can someone tell me what I'm doing wrong with this script, cause it ain't workin',  >_>


module Euphoria
  module Itemoff
    SWITCH_ID = 4 
    #Switch To Disable/Enable Items In Battle, Turn Switch Off To
    #Enable Items, On to Disable
  end
end


#===============================================================================
class Window_ActorCommand < Window_Command
  def add_item_command
    add_command(Vocab::item, :item) 
    unless $game_switches[Euphoria::Itemoff::SWITCH_ID]
    end
  end
end


Please and Thank you.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
First check your switch.  That snippet uses switch #1.  Are you already using that for something else?  If you are, then chose another switch (and name it clearly so that you don't use it for something else) and change the switch number in the snippet to the new switch number.


If that is not the issue, then tell us more precisely what "ain't working" means.  Does it do nothing at all?  Does it stop part way through? Does it...?
 

kaleemmcintyre

Blue Dragon
Veteran
Joined
Jan 23, 2013
Messages
73
Reaction score
8
First Language
english
Primarily Uses
RMMV
First check your switch.  That snippet uses switch #1.  Are you already using that for something else?  If you are, then chose another switch (and name it clearly so that you don't use it for something else) and change the switch number in the snippet to the new switch number.


If that is not the issue, then tell us more precisely what "ain't working" means.  Does it do nothing at all?  Does it stop part way through? Does it...?
Sorry that I wasn't being clear enough. :D  What's not working is the entire script. I've changed the switch but even with changing this factor the item command remains on even when I toggle said switch on or off. 
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Sorry that I wasn't being clear enough. :D  What's not working is the entire script. I've changed the switch but even with changing this factor the item command remains on even when I toggle said switch on or off. 
Then most probably you either placed it wrong or have another incompatible script.


Please give us a screenshot of the script editor window showing that script snippet, so that we can check where you placed it and which other scripts you have installed.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Yanfly Battle engine restructures a lot of the command menues on the battlescreen, it might be incompatible to this small snippet


Test what happens if you place the snippet above the battle engine, and test what happens if you temporarily disable the battleengine.
 

kaleemmcintyre

Blue Dragon
Veteran
Joined
Jan 23, 2013
Messages
73
Reaction score
8
First Language
english
Primarily Uses
RMMV
Yanfly Battle engine restructures a lot of the command menues on the battlescreen, it might be incompatible to this small snippet


Test what happens if you place the snippet above the battle engine, and test what happens if you temporarily disable the battleengine.
Hey, 


Sadly nothing happens either way. Taking out the battle engine, putting the script above or below, all results in the same thing.  ;_;
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
how and when did you control the switch? it needs to be done before entering battle, it can't be done while inside the battlescreen because then the command is already added.


Please show a screenshot of how you use the switch and how you call the battle.
 

kaleemmcintyre

Blue Dragon
Veteran
Joined
Jan 23, 2013
Messages
73
Reaction score
8
First Language
english
Primarily Uses
RMMV
how and when did you control the switch? it needs to be done before entering battle, it can't be done while inside the battlescreen because then the command is already added.


Please show a screenshot of how you use the switch and how you call the battle.
I used a character event just to show that the switch works.


I'm thinking that the script itself isn't written correctly. 


If this script is working correctly for anyone else, please share it. 


Thank you.  BD

Item Off Plight 1.png

Item Off Plight 4.png

Item Off Plight 3.png
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
You didn't give the screenshots I asked for, no one can help you without that info.


We don't care what your maps look like, we need to see the event pages with the commands where you call the battle and where you control the switch.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top