I can not seem to load 2 seperate mods that add custom menu items?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
aJynks
Posts: 30
Joined: Fri Aug 30, 2024 6:19 pm

I can not seem to load 2 seperate mods that add custom menu items?

Post by aJynks »

Hi.. am am trying to do a test here... I simply have two mods... with nothing but "MENUDEF" in them...

one is...

This makes a options called "MOD : aJynksed Options" and a submenu called "Cheat Binding" that has a few simple cheat codes as a tests.

Code: Select all

AddOptionMenu "OptionsMenu"
{
	Submenu "MOD : aJynksed Options", "Jynked_Options"
}

OptionMenu "Jynked_Options"
{
	Title "The Jynksed Options"
    StaticText ""
    Submenu "Cheat Bindings", "Jynked_Options_Cheats"
}

OptionMenu "Jynked_Options_Cheats"
{
	Title "Cheat Bindings"
    StaticText ""
    Control "Turn on God Mode", "god"
    Control "Turn on No Clip", "noclip"
    Control "Give All", "give all"
}
the other is

This is the MENUDEF from another mod I made that works fine.... it currently makes a menu called "MOD : aJynksed LevelInfo".

Code: Select all

AddOptionMenu "OptionsMenu"
{
	Submenu "MOD : aJynksed LevelInfo", "LI_Options"
}

OptionMenu "LI_Options"
{
	Title "The Jynksed LevelInfo Options"
    StaticText ""
    TextField  "How far in from the left : ", "ajynks_levelInfo_posX"
    TextField  "How far down from the Top : ", "ajynks_levelInfo_posY"
    TextField  "Set Scale : ", "ajynks_levelInfo_Scale"
}

loading either of the test mods works fine.... but if I load both on them.. neither show up?

this is my run.bat

Code: Select all

"d:\Projects\Doom\_resources\_MainApps\_engine\gzdoom\gzdoom.exe" -config "d:\Projects\Doom\_resources\_MainApps\_engine\gzdoom\_modn.ini" -warp 1 -skill 4 -file "d:\Projects\Doom\v2test\" "d:\Projects\Doom\v2test2\"
Again.. both work fine, by themselves

The end goal is that I want to have both options show.... but the original idea was to make a Menu called "MOD : aJynksed Options" and then add any mods I make that need options as a sub menu to that..... (see the top menudef)....

1) Am I writing the bat file correctly to load more than 1 directory? -file "dir1" dir2" ?
2) How can I simply get both menu options to load, when loading 2 different mods.
3) Is it possible to have different mods, that need options, to have those options as a subMenu to a single menuOption.
4) Why do my options only ever show if I have "show full options" set to on?

Thanks!

The end Goal, if possible, is to have two completely perseverate mods loaded and the options menu have a single submenu to the main options, and then both mod options added as a submenu to that.

MOD : aJynksed Options
  • Options for Test Mod 1
  • Options for Test Mod 1
aJynks
Posts: 30
Joined: Fri Aug 30, 2024 6:19 pm

Re: I can not seem to load 2 seperate mods that add custom menu items?

Post by aJynks »

I have simplified the test setup...

Test 1

Code: Select all

AddOptionMenu "OptionsMenu"
{
	Submenu "MOD : TEST 1", "menu_test1"
}

OptionMenu "menu_test1"
{
	Title "test menu item 1"
    StaticText ""
    Control "Turn on God Mode", "god"
    Control "Turn on No Clip", "noclip"
}
Test 2

Code: Select all

AddOptionMenu "OptionsMenu"
{
	Submenu "MOD : TEST 2", "menu_test2"
}

OptionMenu "menu_test2"
{
	Title "test menu item 2"
    StaticText ""
    Control "Give All", "give all"
}
bat File

Code: Select all

"d:\Projects\Doom\_resources\_MainApps\_engine\gzdoom\gzdoom.exe" -config "d:\Projects\Doom\_resources\_MainApps\_engine\gzdoom\_modn.ini" -warp 1 -skill 4 -file "d:\Projects\Doom\MenuTest\test1\" "d:\Projects\Doom\MenuTest\test2\"
Both menu items are defined in "MENUDEF"... I'm sure it has something to do with that... as in both mods have a "MENUDEF"... but then how do you load more than one set of options? i know you must be able to as I have seen it when I load multi-mods form other people.
aJynks
Posts: 30
Joined: Fri Aug 30, 2024 6:19 pm

Re: I can not seem to load 2 seperate mods that add custom menu items?

Post by aJynks »

Turns out it was a error in the bat file....

This as an option dose not work

Code: Select all

-file "path1/dir1/" "path2/dir2/"


This as an option DOSE work.. simply make sure the directory path has no trailing /

Code: Select all

-file "path1/dir1" "path2/dir2"


Annoyingly, if you load a single dir, then the trailing / is not a problem : (

Code: Select all

-file "path1/dir1/"
Now I have it working.... it is about trying to get the submenu system working....

Basically, I guess I need to test to see if submenu exists or not, and if it dose, add to it, and if it dose not create it... Is that possible?
aJynks
Posts: 30
Joined: Fri Aug 30, 2024 6:19 pm

Re: I can not seem to load 2 seperate mods that add custom menu items?

Post by aJynks »

I've tried a bunch of other options, as well as fooling around with "protected"... but I can nto work it out...

is there a way to use "AddOptionMenu"... but only add it is it is not already there, and if it is there, add to it, not over write it?
Post Reply

Return to “Scripting”