VE - Custom Vehicles Addon - Menu Access and Save Access Enable and Disable

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
241
Reaction score
15
First Language
Portuguese
Primarily Uses
RMVXA
Good Morning / Day / Afternoon / Evening everyone.

I have a request for a certain kind of addon.


VE's custom vehicles script has a buttload of options, but I would like to add 2 more features

1. The ability to disable the main menu and the save option while the player is riding the custom vehicle.

Is this possible to achieve?

I will appreciate any help I can get.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,960
First Language
English
Primarily Uses
RMMV
In the beginning of the script, above the line VE_VEHICLE_SETTING = {, put

Code:
VE_VEHICLE_DISABLE_MENU = true,
  VE_VEHICLE_DISABLE_SAVE = true,
Then find the get_on_vehicle and get_off_vehicle methods in Game_Player: change the line "enter_vehicle if vehicle" to

Code:
if vehicle
      enter_vehicle
      $game_system.menu_disabled = true if VE_VEHICLE_DISABLE_MENU
      $game_system.save_disabled = true if VE_VEHICLE_DISABLE_SAVE
    end
and underneath "make_encounter_count" in get_off_vehicle to

Code:
$game_system.menu_disabled = false if VE_VEHICLE_DISABLE_MENU
      $game_system.save_disabled = false if VE_VEHICLE_DISABLE_SAVE
 

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
241
Reaction score
15
First Language
Portuguese
Primarily Uses
RMVXA
Maybe I did not set this up correctly.

Z31.png

Z32.png

It did not work, still was able to save and access the menu while on the vehicle.

EDIT:

zaaaaaaaaaaaaaaaa.png

It seems to be having a compatibility problem with this particular code I wrote for the "default vehicles"

is there a way around this?
 
Last edited:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,960
First Language
English
Primarily Uses
RMMV
Oh, if you want different settings for different vehicles my code will need changed.

If you've already done that (how good an idea it is to put this stuff in the update method is a conversation for another time) then just add your custom vehicle symbols to the update overwrite.
 
Last edited:

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
241
Reaction score
15
First Language
Portuguese
Primarily Uses
RMVXA
I really appreciate all of the effort. But please if it is too much please let me know and I'll try to find a way around all this. I kind of wish I was a little better at coding so I wouldn't be asking for so much help.

I assumed that since the code I wrote only applied to the default three vehicles, that the new custom ones wouldn't be affected by this.

Guess I was wrong.

EDIT
zzzz9888.png

I DID try this, since the key name of the custom vehicle was horse

I tried to add horse, and so far it seems to work perfectly!
 
Last edited:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,960
First Language
English
Primarily Uses
RMMV
That "else" will cover every single other scenario where you're not in one of the vehicles you've specified in previous if statements.

btw, you don't need to make vehicle_type an attr_accessor because you're not trying to do anything to it outside of Game_Player.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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.

Forum statistics

Threads
105,868
Messages
1,017,090
Members
137,586
Latest member
Usagiis
Top