Multi-level menuing within menumode 1075?

Post » Wed Jan 20, 2010 4:39 pm

Is there a trick to doing multi-level messagebox menuing within a specific menumode instead of gamemode?

I have this multilevel menu which, when I roll it in gamemode, it's fine (only speaking of the multilevel function here, the last-level buttons are not yet configured all the way). But it falls apart when I put it into menumode 1075 - - - putting it into this menu should cause it to overlay the 'companion wheel'.

What I end up getting is, I have to re-click the companion wheel itself to make the menuing advance, and then after a little bit of that, it fails completely.

I doan feel so strong at this eh ...

Here's my code if it helps.

Spoiler
begin menumode 1075	If awaitinginput		If Menulevel == 0			Set button0 to GetButtonPressed			If button0 == -1				Return			ElseIf button0 == 0 											; Group commands				showmessage PhalanxMenuGroup				set menulevel to 1				return			ElseIf button0 == 1 ; placeholder				return			ElseIf button0 == 2 ; placeholder				return			ElseIf button0 == 3 ; placeholder				return			ElseIf button0 == 4 ; placeholder				return			ElseIf button0 == 5											; Settings				showmessage PhalanxMenuSettings				set awaitinginput to 1				set menulevel to 5				Return			ElseIf button0 == 6											; Utilities, Help, Cheats				showmessage PhalanxMenuUtil				set awaitinginput to 1				set menulevel to 6				Return			ElseIf button0 == 7											; Exit				set menulevel to 0				set awaitinginput to 0				RemoveMe			endif		elseif MenuLevel == 1											; Submenu for Group Commands-------------------------------------		elseif MenuLevel == 5											; Submenu for Settings-----------------------------------------------------			Set button1 to GetButtonPressed			If button1 == -1				Return			ElseIf button1 == 0 								; remove number limits				set VNPCFollowers.nolimit to 1				set VNPCFollowers.bHumanoidInParty to 0				set VNPCFollowers.bCritterInParty to 0 				ShowMessage PhalanxWheelMain1MSG				set PhalanxOptionsMenuQUEST.EnableLimits to 0	; this is in case player hit button repeatedly				stopquest PhalanxOptionsMenuQUEST 					; same				set awaitinginput to 1				Return			ElseIf button1 == 1								 ; Turn on follower number limits				set VNPCFollowers.nolimit to 0				startquest PhalanxOptionsMenuQUEST				set PhalanxOptionsMenuQUEST.EnableLimits to 1				ShowMessage PhalanxWheelMain1MSG				set awaitinginput to 1				Return			ElseIf button1 == 2								; make wait behavior = sandbox				set vNPCFollowers.WaitSandbox to 1				Set awaitingInput to 1				return			ElseIf button1 == 3 								; make wait behavior = guard				set vNPCFollowers.WaitSandbox to 0				Set awaitingInput to 1				return			ElseIf button1 == 4								; Go back				Set awaitinginput to 1				Set menulevel to 0				Showmessage PhalanxMenuTop				Return			EndIf		elseif Menulevel == 6											; Submenu for Utils/help/cheats---------------------------------------			Set button1 to GetButtonPressed			If button1 == -1				Return			ElseIf button1 == 0				if player.getitemcount PhalanxCheatController == 0					player.additem PhalanxCheatController 1					player.AddItem Pencil01 1 1					player.RemoveItem Pencil01 1 1				endif				Set awaitinginput to 0				Set menulevel to 0				RemoveMe			ElseIf button1 == 1 						; Go back				Set awaitinginput to 1				Set menulevel to 0				Showmessage PhalanxMenuTop				Return			EndIf		endif	Endif

User avatar
BEl J
 
Posts: 3397
Joined: Tue Feb 13, 2007 8:12 am

Post » Wed Jan 20, 2010 5:32 pm

Have you tried it in a quest script?
Maybe when the wheel is open, it is kinda pausing the NPC script?
User avatar
Mark Hepworth
 
Posts: 3490
Joined: Wed Jul 11, 2007 1:51 pm

Post » Wed Jan 20, 2010 7:40 pm

Have you tried it in a quest script?
Maybe when the wheel is open, it is kinda pausing the NPC script?


I think in the past I did work something like this out of a quest script.

hmm.
User avatar
David Chambers
 
Posts: 3333
Joined: Fri May 18, 2007 4:30 am

Post » Wed Jan 20, 2010 6:25 pm

What I end up getting is, I have to re-click the companion wheel itself to make the menuing advance, and then after a little bit of that, it fails completely.

Does it work when you set it to menumode (no qualifier) and use a different method of triggering it? I've not dived into the complexities of scripting, but from a pure programming standpoint it sounds like it's considering your menu to be a different menumode than the companion wheel, maybe?
User avatar
KiiSsez jdgaf Benzler
 
Posts: 3546
Joined: Fri Mar 16, 2007 7:10 am

Post » Wed Jan 20, 2010 5:23 pm

Does it work when you set it to menumode (no qualifier) and use a different method of triggering it? I've not dived into the complexities of scripting, but from a pure programming standpoint it sounds like it's considering your menu to be a different menumode than the companion wheel, maybe?


I get different behavior when I set the completely wrong menumode. Setting a menumode that catches everything behaves the same.

Trying to work some tricks with it now ... I'd sorta prefer not to roll this out of a quest script but maybe it is necessary.
User avatar
Josh Sabatini
 
Posts: 3445
Joined: Wed Nov 14, 2007 9:47 pm

Post » Thu Jan 21, 2010 4:32 am

Got it.

Here is what it required.

begin menumode 1075	if menumode 1001	else; all of the menuing code here

User avatar
Donald Richards
 
Posts: 3378
Joined: Sat Jun 30, 2007 3:59 am

Post » Wed Jan 20, 2010 10:13 pm

Infinimenu...
Spoiler
scn InfinimenuOptionsTokenSCPTInt iMessageInt iButtonBegin OnAdd	Set iMessage to -1	DisablePlayerControls 1 1 0 0 1 0 0EndBegin GameMode	If (iMessage > 0)		Set iButton to GetButtonPressed		If (iButton == -1)			Return		Else			Set iMessage to (iMessage * -1)			If (iMessage == -1)				If (iButton == 0)				ElseIf (iButton == 1)				ElseIf (iButton == 2)				ElseIf (iButton == 3)				ElseIf (iButton == 4)				ElseIf (iButton == 5)				ElseIf (iButton == 6)				ElseIf (iButton == 8) ; More					Set iMessage to -2				ElseIf (iButton == 9) ; Done					EnablePlayerControls 1 1 0 0 1 0 0					RemoveMe				EndIf			ElseIf (iMessage == -2)				If (iButton == 0)				ElseIf (iButton == 1)				ElseIf (iButton == 2)				ElseIf (iButton == 3)				ElseIf (iButton == 4)				ElseIf (iButton == 5)				ElseIf (iButton == 6)				ElseIf (iButton == 7)				ElseIf (iButton == 8) ; More					Set iMessage to -3 				ElseIf (iButton == 9) ; Back					Set iMessage to -1				EndIf			ElseIf (iMessage == -3)				If (iButton == 0)				ElseIf (iButton == 1)				ElseIf (iButton == 2)				ElseIf (iButton == 3)				ElseIf (iButton == 4)				ElseIf (iButton == 5)				ElseIf (iButton == 6)				ElseIf (iButton == 7)				ElseIf (iButton == 8) ; More					Set iMessage to -4				ElseIf (iButton == 9) ; Back					Set iMessage to -2				EndIf			ElseIf (iMessage == -4)				If (iButton == 0)				ElseIf (iButton == 1)				ElseIf (iButton == 2)				ElseIf (iButton == 3)				ElseIf (iButton == 4)				ElseIf (iButton == 5)				ElseIf (iButton == 6)				ElseIf (iButton == 7)				ElseIf (iButton == 8) ; More					Set iMessage to -5				ElseIf (iButton == 9) ; Back					Set iMessage to -3				EndIf			ElseIf (iMessage == -5)				If (iButton == 0)				ElseIf (iButton == 1)				ElseIf (iButton == 2)				ElseIf (iButton == 3)				ElseIf (iButton == 4)				ElseIf (iButton == 5)				ElseIf (iButton == 6)				ElseIf (iButton == 7)				ElseIf (iButton == 8) ; More					Set iMessage to -6				ElseIf (iButton == 9) ; Back					Set iMessage to -4				EndIf			ElseIf (iMessage == -6)				If (iButton == 0)				ElseIf (iButton == 1)				ElseIf (iButton == 2)				ElseIf (iButton == 3)				ElseIf (iButton == 4)				ElseIf (iButton == 5)				ElseIf (iButton == 6)				ElseIf (iButton == 7)				ElseIf (iButton == 8) ; More					Set iMessage to -7				ElseIf (iButton == 9) ; Back					Set iMessage to -5				EndIf			ElseIf (iMessage == -7)				If (iButton == 0)				ElseIf (iButton == 1)				ElseIf (iButton == 2)				ElseIf (iButton == 3)				ElseIf (iButton == 4)				ElseIf (iButton == 5)				ElseIf (iButton == 6)				ElseIf (iButton == 7)				ElseIf (iButton == 8) ; More					Set iMessage to -8				ElseIf (iButton == 9) ; Back					Set iMessage to -6				EndIf			ElseIf (iMessage == -8)				If (iButton == 0)				ElseIf (iButton == 1)				ElseIf (iButton == 2)				ElseIf (iButton == 3)				ElseIf (iButton == 4)				ElseIf (iButton == 5)				ElseIf (iButton == 6)				ElseIf (iButton == 7)				ElseIf (iButton == 8) ; More					Set iMessage to -9				ElseIf (iButton == 9) ; Back					Set iMessage to -7				EndIf			ElseIf (iMessage == -9)				If (iButton == 0)				ElseIf (iButton == 1)				ElseIf (iButton == 2)				ElseIf (iButton == 3)				ElseIf (iButton == 4)				ElseIf (iButton == 5)				ElseIf (iButton == 6)				ElseIf (iButton == 7)				ElseIf (iButton == 8) ; More					Set iMessage to -9				ElseIf (iButton == 9) ; Back					Set iMessage to -8				EndIf			ElseIf (iMessage == -10)				If (iButton == 0)				ElseIf (iButton == 1)				ElseIf (iButton == 2)				ElseIf (iButton == 3)				ElseIf (iButton == 4)				ElseIf (iButton == 5)				ElseIf (iButton == 6)				ElseIf (iButton == 7)				ElseIf (iButton == 8) ; Back					Set iMessage to -9				ElseIf (iButton == 9) ; Done					EnablePlayerControls 1 1 0 0 1 0 0					RemoveMe				EndIf			EndIf		EndIf	Else		Set iMessage to (iMessage * -1)		If (iMessage == 1)			ShowMessage Options01MESG		ElseIf (iMessage == 2)			ShowMessage Options02MESG		ElseIf (iMessage == 3)			ShowMessage Options03MESG		ElseIf (iMessage == 4)			ShowMessage Options04MESG		ElseIf (iMessage == 5)			ShowMessage Options05MESG		ElseIf (iMessage == 6)			ShowMessage Options06MESG		ElseIf (iMessage == 7)			ShowMessage Options07MESG		ElseIf (iMessage == 8)			ShowMessage Options08MESG		ElseIf (iMessage == 9)			ShowMessage Options09MESG		ElseIf (iMessage == 10)			ShowMessage Options10MESG		EndIf	EndIfEnd
...can be adapted to work in MenuMode, but I've not tinkered with the companion wheel.
User avatar
Sabrina garzotto
 
Posts: 3384
Joined: Fri Dec 29, 2006 4:58 pm


Return to Fallout: New Vegas