Jump to content
Vodun

Unlock Menu Commands (with Switches)

Recommended Posts

Hello

I know how to remove different commands (like items, formation, save, skill, status) from menu using Window_MenuCommand in script editor.
(like on image attached to post).

 

Spoiler

426456042_PostElement.png.a39a529d41fe97c0c35eef3b11294900.png



My question is. How can I connect this to switches that could be turned on/off in the game? Could be a nice tool for game progression unlocking certain menu options.

Help is appreciated.

  • Like 1

Share this post


Link to post
Share on other sites

"Help me! Reptilians are trying to take over the world!" gave me a giggle, lolz

Okay. Try this. In place of main_commands_enabled, use $game_switches[x].

  • Like 1

Share this post


Link to post
Share on other sites

I think you can mess around with Yanfly's Ace Menu Engine to do that... I think you would need to use custom commands though. Not too hard to make custom command versions of default menu items though I think?

 

also: I personally say that it's best to avoid editing the default scripts. I mean you can, but it makes it harder to keep track of what has been changed.

 

Edited by Kayzee
  • Like 2

Share this post


Link to post
Share on other sites

/Sorry for a late respone, things in recent days have been hectic

Kayzeetried Yanfly's Ace Menu Engine but I would like to use it as the last resort. It changes quite a few things beside the commands so first I'll try some other method.

PhoenixSoulI did put $game_switches[x] but it didn't work. I got a screenshot showing the error and how I did this. Sadly I am not that quite in some manner good in doing RUBY scripting so the chance of me ducking things up is very high.

Thanks for the reponses :)

 

Spoiler


1922811809_postElement2.thumb.png.70a5c4217ed74ed64d65035d5262eba2.png

 

 

  • Like 1

Share this post


Link to post
Share on other sites
5 hours ago, Vodun said:

$game_switches[x] but it didn't work

Try instead of putting the condition inside the brackets, but at the end

add_command(Vocab::item,    :item,   main_commands_enabled) if $game_switches[1] == true

Edited by roninator2
  • Like 1

Share this post


Link to post
Share on other sites

It works!
 

I thought about using If or When with $game_switches[1] but thanks to my limited skills I couldn't get it to work.
But now I know :)

 

Thank so very much.

  • Like 1

Share this post


Link to post
Share on other sites

Yeah; I had thought of placing that outside the bracket but wondered if main_commands_enabled was something that could be replaced.
It was something I thought of on a whim. I typically use Yanfly's Menu Engine anyway.

Anyway, glad ya got it to work.

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.

×
Top ArrowTop Arrow Highlighted