How do I Seal the Item command?

● ARCHIVED · READ-ONLY
Started by Jericho Swain 19 posts View original ↗
  1. How do I seal the Item command from the Battle menu ?
  2. 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.
  3. Dekita made something like this, that disables the Item command based on a thrown switch.
  4. 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.
  5. Is there a way to reverse this script so that the item command with turn off if a switch is on?
  6. 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
  7. Thank you! ;_;
  8. 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.
  9. 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...?
  10. ksjp17 said:
    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. 
  11. BUMP
  12. kaleemmcintyre said:
    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.
  13. Here we go. 

    Script Titler.png
  14. 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.
  15. Andar said:
    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.  ;_;
  16. 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.
  17. Andar said:
    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
  18. BUMP
  19. kaleemmcintyre said:
    BUMP

    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.