Getting a multiple-choice Message Box by reading a book?

Post » Wed Jun 20, 2012 2:41 am

Hello there,
the new player wants to mod something again ^^

Thanks for the help with the AOMM mod in Oblivion, by the way :biggrin:

Now it was hard for me to understand the changes of the creation kit but i already made it to compile a script successfully XD

I tried to made a book which opens a message box like Oghma Infinium. I also have made a similar script like the Oghma Infinium Script but when I read my book no message box is showing up :(
The weird thing is that I also added the Oghma Infinium into my inventory and there also happens nothing when I read it :ohmy:

Since the Oghma Infinium needs a quest which is also mentioned in the script it is possible that this is the reason why it not works now.
But is there a possibility to let a message box show up every time a book is read without any dummy quest active?

I would be very please for some hints from a pro :wink:

Cheers

EDIT:
Blargh! Seems like i forgot some important event coding it works now :o
My fault... Nevermind ;)
User avatar
Lynette Wilson
 
Posts: 3424
Joined: Fri Jul 14, 2006 4:20 pm

Post » Wed Jun 20, 2012 2:51 am

Just tested and...
ScriptName BookOptionsScript extends ObjectReference  Message Property YourMessageMESG AutoEvent OnRead()	Int iButton = YourMessageMESG.Show()	If (iButton != -1)		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)		ElseIf (iButton == 9)		EndIf	EndIf	EndEvent
...works (repeatedly) without needing quest to handle the options. Here's an http://www.mediafire.com/?bqozm2zgjgnoh31. If you need more than 10 options, that's possible too.
User avatar
Avril Churchill
 
Posts: 3455
Joined: Wed Aug 09, 2006 10:00 am

Post » Wed Jun 20, 2012 4:03 am

Thanks for the answer :D
I didn't know there is a OnRead Event too :(

I've now used the same event coding like the Oghma Infinium except the auto-deleting code after reading it.

That works too so I think I will stick with it.

But still thank you for that nice example =)

I got more than 10 options but i just made 3 books out of it XD
Since I need exactly 18 options it perfectly fit ;)
User avatar
Flutterby
 
Posts: 3379
Joined: Mon Sep 25, 2006 11:28 am

Post » Wed Jun 20, 2012 1:06 am

Sorry for the double post but it I got some weird problem.

It seems that the mod isn't working for everyone. I surely compiled the scripts and since those scripts aren't custom scripts which extends other custom scripts they should work, don't they?

So I really have no idea why the mod is only working for me :(

Is there a special option to compile the scripts into an ESP?

Cheers
User avatar
Melly Angelic
 
Posts: 3461
Joined: Wed Aug 15, 2007 7:58 am

Post » Wed Jun 20, 2012 9:25 am

Have you included the Data\Scripts\YourScriptName.PEX file(s)? If not, Skyrim scripts are external and not contained in the plugin as Oblivion/Fallout SCPT forms were, so that may explain why it isn't working for others.
User avatar
Catharine Krupinski
 
Posts: 3377
Joined: Sun Aug 12, 2007 3:39 pm

Post » Wed Jun 20, 2012 9:20 am

Thanks for the answer that was exactly the problem XD
I didn't realize that the CK don't compile a script direclty into an ESP like the CS does before :(

Papyrus... :shakehead:

Thanks :biggrin:
User avatar
Reven Lord
 
Posts: 3452
Joined: Mon May 21, 2007 9:56 pm

Post » Wed Jun 20, 2012 10:01 am

Papyrus... :shakehead:
The cool part is the properties are in the plugin as part of the form(s) they're attached to, so you can have a single script attached to multiple forms and set it up to work differently according to where the properties are pointed.
User avatar
Claudia Cook
 
Posts: 3450
Joined: Mon Oct 30, 2006 10:22 am

Post » Wed Jun 20, 2012 5:05 am

I didn't want to say i don't like papyrus :wink:
It's just something new to learn in comparison with the scripts of the CS.

There is still a little thing of my mod which going on my nervs XD

If I train my skills with my modded books the counting "skill increases" and "training sessions" in the general stats does not change :(
But this is just a normal training menu where i also have to refer on the actor who provide the master training.
So I don't know why this does not count as normal training. Is there some way to program that?

I looked into the normal script of training and also checked the actors if there is something special.
The only thing is that they're in special training job factions. Maybe because I don't talk direclty with that charakter the training menu doesn't count as such. :confused:

Does someone have a hint how I can solve this problem? :smile:

Cheers

EDIT:
Why this weird things ever happen to me?
I justed started a new char with V2.0 and now the counting of the stats seems normal?! :ahhh:
User avatar
Marion Geneste
 
Posts: 3566
Joined: Fri Mar 30, 2007 9:21 pm

Post » Wed Jun 20, 2012 3:58 am

Hi, it's me again XD

After the successful launch of the mod I wanted to provide the possibility that the message box of choosing one skill to train appear again after a training menu is closed.
But the problem is that I cannot find any Event which could trigger at the close of the training menu.

Is it even possible to find out if the player has closed the training menu?

Cheers

EDIT: Another idea was to reopen the message box with left or right mouse button (like turning pages) but I have doubts if this won't trigger the message box even if a training menu is already open. So I didn't tried this.
Maybe it would be able if I insert a dummy page into the book. But I also have no idea which Event I should use if pages are turned and how it would be possible to NOT let the player switch to the dummy page but use it only for a trigger to reopen the message box.
User avatar
mimi_lys
 
Posts: 3514
Joined: Mon Apr 09, 2007 11:17 am

Post » Wed Jun 20, 2012 2:08 am

I've had a play around with this idea of seeing if and when the player closes the menu - enough to know that the http://www.creationkit.com/OnRelease_-_ObjectReference doesn't fire when putting the book down - unless you are dumping it directly out of your inventory and its opposite number is the http://www.creationkit.com/OnGrab_-_ObjectReference which fires only if you hold the activation key down without releasing it. Not very helpful so far, and I've also checked a number of seemingly unrelated events that might have fired in a previous incarnation but I've found no solution.
.
So, it seems to me that you have an http://www.creationkit.com/OnRead_-_ObjectReference to work with but that what you have planned when the player puts the book down may have to be either placed in the http://www.creationkit.com/OnRead_-_ObjectReference somewhere within the conditional code or it may have to depend on another trigger - perhaps from another object's events. What if you were to expand your training manual into a set of volumes? The first book volume could explain how to select from one level of options through the player's choice of subsequent volume. You could then allow the subsequent choice to handle the details in the volume's own http://www.creationkit.com/OnRead_-_ObjectReference or even send the player off on one of a number of different sub-quests to acquire their choice of volume and attached skill upgrades. That would give you the opportunity to tailor part of the attached plot to the nature of the character being played. Who knows, maybe inject just a little irony when the player avatar isn't looking, no? :foodndrink:
.
But this is just a little alternative idea in case you have to tiptoe around this issue...
User avatar
Rachel Cafferty
 
Posts: 3442
Joined: Thu Jun 22, 2006 1:48 am

Post » Wed Jun 20, 2012 7:40 am

Thanks for the suggestions. :D
Actually I use this Script:

Scriptname DiaryOfArchmageSCR extends ObjectReference  Message Property SkillMsgBox  Auto  Actor Property NPCTolfdir  Auto  Actor Property NPCFalion  Auto  Actor Property NPCFaralda  Auto  Actor Property NPCHamal  Auto  Actor Property NPCDrevis  Auto  Actor Property NPCDanica  Auto  Function ReadDiaryOfArchmage(bool fromWorld)    int choice = SkillMsgBox.Show()    if	 (choice == 0)        Game.ShowTrainingMenu(NPCTolfdir)    elseif (choice == 1)        Game.ShowTrainingMenu(NPCFalion)    elseif (choice == 2)        Game.ShowTrainingMenu(NPCFaralda)    elseif (choice == 3)        Game.ShowTrainingMenu(NPCHamal)    elseif (choice == 4)        Game.ShowTrainingMenu(NPCDrevis)    elseif (choice == 5)        Game.ShowTrainingMenu(NPCDanica)    else        ; WTF    endifEndFunctionEvent OnEquipped(Actor reader)    if (reader != Game.GetPlayer())        return    endif    Utility.WaitMenuMode(2.0)    ReadDiaryOfArchmage(false)EndEventEvent OnActivate(ObjectReference reader)    if (reader != Game.GetPlayer() || IsActivationBlocked())        return    endif    Utility.WaitMenuMode(2.0)    ReadDiaryOfArchmage(true)EndEvent

It's from Oghma Infinium and works fíne.
I also don't want to change the amount of books nor the easy handling (except the bad behaviour to reopen the book everytime for the messagebox).

I had an activator variable in mind which turns true if the training menu is open and false if it is closed.
The Event who triggers the message box is if those activator variable changes from true to false. But I highly doubt that this is possible in Papyrus :(
For the exit of the book i planned to insert another button for "Close the book" which doesn't trigger any training menu for breaking the loop.
User avatar
Sophie Payne
 
Posts: 3377
Joined: Thu Dec 07, 2006 6:49 am

Post » Wed Jun 20, 2012 8:56 am

So, what you want is to have the message box shown again after the training menu is closed, right? Then you would want to use the http://www.creationkit.com/Wait_-_Utility function. Unlike the WaitMenuMode function, time is not counted while in menu mode. Since the training menu is a menu, time is not counted until after you exit that menu.

So this should work (remember to add a last option to close the menu instead of training a skill):

Function ReadDiaryOfArchmage(bool fromWorld)    int choice = SkillMsgBox.Show()    if   (choice == 0)	    Game.ShowTrainingMenu(NPCTolfdir)    elseif (choice == 1)	    Game.ShowTrainingMenu(NPCFalion)    elseif (choice == 2)	    Game.ShowTrainingMenu(NPCFaralda)    elseif (choice == 3)	    Game.ShowTrainingMenu(NPCHamal)    elseif (choice == 4)	    Game.ShowTrainingMenu(NPCDrevis)    elseif (choice == 5)	    Game.ShowTrainingMenu(NPCDanica)    else	    Return    ;closes the menu    endif    Utility.Wait(0.5)    ReadDiaryOfArchmage(fromWorld)EndFunction
User avatar
Marine x
 
Posts: 3327
Joined: Thu Mar 29, 2007 4:54 am

Post » Wed Jun 20, 2012 1:17 pm

OMG I'm gonna try that immediately. :biggrin:
Thanks for the suggestion =)

EDIT:
Unfortunately it doesn't work :(
The problem is that as you said the time is not counted during menu mode. But since this messagebox and the training menu pop up while I'm in menu mode the messagebox only pops up after I leave the menu mode.
And if I choose a training menu outside the menu mode the messagebox rapidly pops up again so I've the messagebox AND the training menu open but book and menu mode is closed :(
User avatar
cutiecute
 
Posts: 3432
Joined: Wed Sep 27, 2006 9:51 am

Post » Wed Jun 20, 2012 12:50 pm

The modified function calls itself at the end. For a slight improvement, try changing this:
.
Spoiler
Function ReadDiaryOfArchmage(bool fromWorld)    int choice = SkillMsgBox.Show()    if   (choice == 0)            Game.ShowTrainingMenu(NPCTolfdir)    elseif (choice == 1)            Game.ShowTrainingMenu(NPCFalion)    elseif (choice == 2)            Game.ShowTrainingMenu(NPCFaralda)    elseif (choice == 3)            Game.ShowTrainingMenu(NPCHamal)    elseif (choice == 4)            Game.ShowTrainingMenu(NPCDrevis)    elseif (choice == 5)            Game.ShowTrainingMenu(NPCDanica)    else            Return    ;closes the menu    endif    Utility.Wait(0.5)    ReadDiaryOfArchmage(fromWorld)EndFunction
.
To this:
.
Spoiler
Function ReadDiaryOfArchmage(bool fromWorld)    int choice = SkillMsgBox.Show()    if   (choice == 0)            Game.ShowTrainingMenu(NPCTolfdir)    elseif (choice == 1)            Game.ShowTrainingMenu(NPCFalion)    elseif (choice == 2)            Game.ShowTrainingMenu(NPCFaralda)    elseif (choice == 3)            Game.ShowTrainingMenu(NPCHamal)    elseif (choice == 4)            Game.ShowTrainingMenu(NPCDrevis)    elseif (choice == 5)            Game.ShowTrainingMenu(NPCDanica)    else            Return    ;closes the menu    endif    Utility.Wait(0.5)EndFunction
.
I think that might deal with the extra menus/book openings...
User avatar
RUby DIaz
 
Posts: 3383
Joined: Wed Nov 29, 2006 8:18 am

Post » Wed Jun 20, 2012 12:18 pm

Thanks, but that's not really necessary.
This script is perfect since I already released the mod with this script and therefore I don't need this timing event.

Scriptname DiaryOfArchmageSCR extends ObjectReference  Message Property SkillMsgBox  Auto  Actor Property NPCTolfdir  Auto  Actor Property NPCFalion  Auto  Actor Property NPCFaralda  Auto  Actor Property NPCHamal  Auto  Actor Property NPCDrevis  Auto  Actor Property NPCDanica  Auto  Function ReadDiaryOfArchmage(bool fromWorld)	int choice = SkillMsgBox.Show()	if	 (choice == 0)		Game.ShowTrainingMenu(NPCTolfdir)	elseif (choice == 1)		Game.ShowTrainingMenu(NPCFalion)	elseif (choice == 2)		Game.ShowTrainingMenu(NPCFaralda)	elseif (choice == 3)		Game.ShowTrainingMenu(NPCHamal)	elseif (choice == 4)		Game.ShowTrainingMenu(NPCDrevis)	elseif (choice == 5)		Game.ShowTrainingMenu(NPCDanica)	else		; WTF	endifEndFunctionEvent OnEquipped(Actor reader)	if (reader != Game.GetPlayer())		return	endif	Utility.WaitMenuMode(2.0)	ReadDiaryOfArchmage(false)EndEventEvent OnActivate(ObjectReference reader)	if (reader != Game.GetPlayer() || IsActivationBlocked())		return	endif	Utility.WaitMenuMode(2.0)	ReadDiaryOfArchmage(true)EndEvent

A user bring up the idea to trigger the message box again when a training menu is closed so that's why I'm looking to improve my script.
My goal is not to make a big change.
It should be possible to ask somehow if the training menu is closed.
There is a GameSetting called "sTopicSubtypeTextServiceTrainingExit". It sounds good but I don't know how to interact with it :/
User avatar
Rachel Cafferty
 
Posts: 3442
Joined: Thu Jun 22, 2006 1:48 am

Post » Wed Jun 20, 2012 6:22 am

Having 's' at the beginning of the name means it's a string. Not sure that there's anything you can do with it.

And sorry that my suggestion didn't work for you. I have no idea how to catch the event of the training menu closing.
User avatar
ZzZz
 
Posts: 3396
Joined: Sat Jul 08, 2006 9:56 pm

Post » Wed Jun 20, 2012 11:44 am

Don't worry ;) It's just a cosmetical change since the normal mod works fine and the only thing is to reopen the book for a new training exercise.
I'm also glad I was able to code this bit of behaviour into my 3 diaries :D
User avatar
ONLY ME!!!!
 
Posts: 3479
Joined: Tue Aug 28, 2007 12:16 pm

Post » Wed Jun 20, 2012 4:31 am

Are you, perhaps, are thinking of a routine reminiscent of the Luscher tests? Are the options to change and be narrowed according to previous selections? There is a little bit of heavy-handedness I use for things like this which involves the enabled-states of objects in the world or cell but not necessarily visible to the player. Here is a little crazy-code I wrote to test whether I could use and set the enable state of a mannequin based on the options selected:
.
Spoiler
Scriptname zqzzSlBookCloseTEST Extends ObjectReference;When activated puts activator into the correct postureImport GameImport DebugMessage Property zqzzMsPickACard AutoMessage Property zqzzMsPickAShovel AutoObjectReference Property zqzzArOddMannequin AutoEvent OnRead()debug.Notification ("Elvis has Left the building, oops, I mean Ferdinand has opened the book")If !zqzzArOddMannequin.IsDisabled()Int iButton = zqzzMsPickACard.Show()		If (iButton != -1)				If (iButton == 0)				ElseIf (iButton == 1)				ElseIf (iButton == 2)				ElseIf (iButton == 3)	 zqzzArOddMannequin.disable()				ElseIf (iButton == 4)				ElseIf (iButton == 5)				ElseIf (iButton == 6)				ElseIf (iButton == 7)				ElseIf (iButton == 8)				ElseIf (iButton == 9)				EndIf		EndIf  Utility.Wait(2.0)ElseInt iButton = zqzzMsPickAShovel.Show()		If (iButton != -1)				If (iButton == 0)				ElseIf (iButton == 1)				ElseIf (iButton == 2)				ElseIf (iButton == 3)	 zqzzArOddMannequin.enable()				ElseIf (iButton == 4)				ElseIf (iButton == 5)				ElseIf (iButton == 6)				ElseIf (iButton == 7)				ElseIf (iButton == 8)				ElseIf (iButton == 9)				EndIf		EndIf  Utility.Wait(3.0)EndIfEndEVENT
.
As you can see, which message (with its particular options) pops up depends on whether a certain objects have been enabled or disabled which, in turn, can be controlled from within the conditional scripting attached to player selections. What can be seen, for example, is that button three controls the mannequin enable-state and, you may imagine that the text of that button changes depending on which message is activated (I.e. "Display Mannequin" vs. "Stow Mannequin") - or, in the case of your book, there need be no mention of these objects which need not appear anywhere the player has access to. Using this approach you could, conceivably, deploy quite a dynamic menu system, if that would be useful to you.
User avatar
Dale Johnson
 
Posts: 3352
Joined: Fri Aug 10, 2007 5:24 am

Post » Tue Jun 19, 2012 9:33 pm

To make it loop, try:

ScriptName BookOptionsScript extends ObjectReference  Message Property YourMessage01MESG AutoMessage Property YourMessage02MESG AutoMessage Property YourMessage03MESG AutoMessage Property OtherMessage AutoEvent OnRead()	If Utility.IsInMenuMode()		Game.DisablePlayerControls(False, False, False, False, False, True)		Game.EnablePlayerControls(False, False, False, False, False, True)	EndIf	Menu()EndEventFunction Menu(Int aiMessage = 1, Int aiButton = 0)	While aiMessage		If (aiButton == -1)			Return		ElseIf (aiMessage == 1) ; Main			aiButton = YourMessage01MESG.Show()			If (aiButton == 0) ; Zuh/Blah				aiButton = OtherMessage.Show()				If aiButton = 0) ; Zuh					; zuh stuff				ElseIf aiButton = 1) ; Blah					; blah stuff				EndIf			ElseIf (aiButton == 1)			ElseIf (aiButton == 2)			ElseIf (aiButton == 3)			ElseIf (aiButton == 4)			ElseIf (aiButton == 5)			ElseIf (aiButton == 6)			ElseIf (aiButton == 7)			ElseIf (aiButton == 8) ; More				aiMessage = 2 ; To Page 02			ElseIf (aiButton == 9) ; Done				aiMessage = 0 ; Leave Menu			EndIf		ElseIf (aiMessage == 2) ; Page 02			aiButton = YourMessage02MESG.Show()			If (aiButton == 0)			ElseIf (aiButton == 1)			ElseIf (aiButton == 2)			ElseIf (aiButton == 3)			ElseIf (aiButton == 4)			ElseIf (aiButton == 5)			ElseIf (aiButton == 6)			ElseIf (aiButton == 7) ; Back				aiMessage = 1 ; To Page 01			ElseIf (aiButton == 8) ; More				aiMessage = 3 ; To Page 03			ElseIf (aiButton == 9) ; Done				aiMessage = 0			EndIf		ElseIf (aiMessage == 3) ; Page 03			aiButton = YourMessage03MESG.Show()			If (aiButton == 0)			ElseIf (aiButton == 1)			ElseIf (aiButton == 2)			ElseIf (aiButton == 3)			ElseIf (aiButton == 4)			ElseIf (aiButton == 5)			ElseIf (aiButton == 6)			ElseIf (aiButton == 7)			ElseIf (aiButton == 8) ; Back				aiMessage = 2 ; To Page 02			ElseIf (aiButton == 9) ; Done				aiMessage = 0			EndIf		EndIf	EndWhile		EndFunction
You won't leave the menu until pressing a "Done" button and can 'turn' the pages.
User avatar
kirsty joanne hines
 
Posts: 3361
Joined: Fri Aug 18, 2006 10:06 am

Post » Tue Jun 19, 2012 10:27 pm

Thanks for that coding I just tried it out :biggrin:

But the problem is that even with this coding I get the messagebox again when a training menu is open :(
I just wanted to avoid that.
Oh and the complete book doesn't show up what was not my goal to do XD
But the message box with more pages work great ;)

Well I will let my books as they are :wink:
User avatar
Assumptah George
 
Posts: 3373
Joined: Wed Sep 13, 2006 9:43 am

Post » Wed Jun 20, 2012 4:53 am

Before opening a training menu, aiMessage = 0 and it'll stop Menu().
User avatar
Craig Martin
 
Posts: 3395
Joined: Wed Jun 06, 2007 4:25 pm

Post » Tue Jun 19, 2012 9:36 pm

Please god use arrays

Spoiler
ScriptName BookOptionsScript extends ObjectReference Message[] Property YourMessageMESG AutoMessage Property OtherMessage AutoEvent OnRead()If Utility.IsInMenuMode()  Game.DisablePlayerControls(False, False, False, False, False, True)  Game.EnablePlayerControls(False, False, False, False, False, True)EndIfMenu()EndEventFunction Menu(Int aiMessage = 1, Int aiButton = 0)While aiMessage  If (aiButton == -1)   Return  ElseIf (aiMessage == 1) ; Main   aiButton = YourMessageMESG[aiMessage - 1].Show()   If (aiButton == 0)   ElseIf (aiButton == 1)   ElseIf (aiButton == 2)   ElseIf (aiButton == 3)   ElseIf (aiButton == 4)   ElseIf (aiButton == 5)   ElseIf (aiButton == 6)   ElseIf (aiButton == 7) ; Back    If aiMessage > 1	 aiMessage -= 1    EndIf   ElseIf (aiButton == 8) ; More    aiMessage += 1   ElseIf (aiButton == 9) ; Done    aiMessage = 0 ; Leave Menu  EndIfEndWhileEndFunction
User avatar
Elisabete Gaspar
 
Posts: 3558
Joined: Thu Aug 31, 2006 1:15 pm

Post » Wed Jun 20, 2012 2:04 am

Please god use arrays

Spoiler
ScriptName BookOptionsScript extends ObjectReferenceMessage[] Property YourMessageMESG AutoMessage Property OtherMessage AutoEvent OnRead()If Utility.IsInMenuMode()  Game.DisablePlayerControls(False, False, False, False, False, True)  Game.EnablePlayerControls(False, False, False, False, False, True)EndIfMenu()EndEventFunction Menu(Int aiMessage = 1, Int aiButton = 0)While aiMessage  If (aiButton == -1)   Return  ElseIf (aiMessage == 1) ; Main   aiButton = YourMessageMESG[aiMessage - 1].Show()   If (aiButton == 0)   ElseIf (aiButton == 1)   ElseIf (aiButton == 2)   ElseIf (aiButton == 3)   ElseIf (aiButton == 4)   ElseIf (aiButton == 5)   ElseIf (aiButton == 6)   ElseIf (aiButton == 7) ; Back	If aiMessage > 1	 aiMessage -= 1	EndIf   ElseIf (aiButton == 8) ; More	aiMessage += 1   ElseIf (aiButton == 9) ; Done	aiMessage = 0 ; Leave Menu  EndIfEndWhileEndFunction
No. That would totally bork an options menu as the button coding wouldn't necessarily match the message shown.
User avatar
M!KkI
 
Posts: 3401
Joined: Sun Jul 16, 2006 7:50 am

Post » Wed Jun 20, 2012 8:17 am

No. That would totally bork an options menu as the button coding wouldn't necessarily match the message shown.
.
Ha ha, but then it really would be an array in the hands of a god. After all, only a theologian would dare speculate what it would do next - and then invoke another array to explain why things did not turn out as planned!
.
Seriously, though - I think that we're already using arrays. They're called state arrays but Microsoft later came along and called them "objects" and then called their elements "properties". Now, in Papyrus, we call state arrays "properties" - and I like to suppose that some people may actually take the time to wonder why all of this unnecessary linguistic maneuvering might be just a wee bit confusing for some of us. Meanwhile many of us (and I am certain I can at least speak for myself here) use all the dialect variations interchangeably.
.
Of course, the "moral of the story", to blatantly and mercilessly plagiarize countless black & white film-writers, is not to unnecessarily vary existing structures in a given language - which is exemplified by your explanation. Thank you.
.
And I have been following your contributions on this thread because I suspect they may be relevant to something I have in mind. For example, there are some books which really don't yield much until their second or third reading - usually when we are dealing with something we've never conceived of before or, of which, we have incorrect preconceptions. I think http://www.gamesas.com/user/663163-altdunmer/ has made the point on another thread that cultural preconceptions can also color our perspective. And so the book which does not yield its secrets immediately is certainly something to be expected, especially if it were written from a different cultural perspective than that of Skyrim. So, thank you, http://www.gamesas.com/user/663163-altdunmer/ for getting this thread going.
.
And thank you, http://www.gamesas.com/user/408976-justinother/ for your ongoing assistance.
User avatar
meghan lock
 
Posts: 3451
Joined: Thu Jan 11, 2007 10:26 pm

Post » Wed Jun 20, 2012 9:12 am

No. That would totally bork an options menu as the button coding wouldn't necessarily match the message shown.

The menu example is using paging, the number of buttons on the Messages should all be the same, what the buttons actually do is dependent on the page and the Message result. You have 10 options, 3 are generic any of the 10 options can be conditioned by a script boolean with the conditional keyword if the Message has an owning quest.

You don't wanna know what this would look like if I didn't use arrays or conditioning
Spoiler
State PluginMenu	Function activateMenu(Actor followerActor = None, string previousState = "", int page = 0)		Int Command_Plugin_Back = 7		Int Command_Plugin_Next = 8		Int Command_Plugin_Exit = 9				If previousState != "" ; There is a menu state to go back to, show the Back button			XFL_MessageMod_Back = 1		EndIf						int ret = 0		While ret != Command_Plugin_Exit					; If there are more mods then what are displayed			If FollowerMenuPlugins.GetSize() > (page + 1) * 7				XFL_MessageMod_Next = 1			Else				XFL_MessageMod_Next = 0			EndIf						; Setup plugin menu options			int i = 0			int itemIndex = 0			While i < XFL_FollowerMenuAliases.Length				bool incrementAlias = true				If FollowerMenuPlugins.GetSize() >= (page * 7) + itemIndex ; Check if there are still more mods to process					XFLMenuPlugin plugin = (FollowerMenuPlugins.GetAt((page * 7) + itemIndex) As XFLMenuPlugin)					If plugin && plugin.isEnabled(followerActor)						XFL_FollowerMenuAliases[i].ForceRefTo(plugin.MenuRef) ; Force the Menu Object into the menu alias for text replacement						XFL_ShowOptionByAlias(XFL_FollowerMenuAliases[i], true)					Else						incrementAlias = false ; Skip the item and stay on this alias					EndIf				Else					XFL_FollowerMenuAliases[i].ForceRefTo(FollowerMenuOption_None) ; Reaching end of list, rest of the aliases are empty					XFL_ShowOptionByAlias(XFL_FollowerMenuAliases[i], false)				EndIf				If incrementAlias					i += 1				EndIf				itemIndex += 1			EndWhile							ret = XFL_MessagePlugins.Show(page + 1)						If ret < Command_Plugin_Back ; Activate the correct menu				XFLMenuPlugin plugin = XFL_GetMenuPlugin(XFL_FollowerMenuAliases[ret].GetRef())				If plugin					plugin.activateMenu(page, followerActor)				EndIf				ret = Command_Plugin_Exit ; Discontinue menu loop			Elseif ret == Command_Plugin_Back				If page == 0					XFL_TriggerMenu(followerActor, previousState, "FollowerMenu") ; Third level menu, need parent of parent					ret = Command_Plugin_Exit ; Discontinue menu loop				Else					page -= 1										If page == 0 && previousState == "" ; Returning to the first page of the menu, but we had no previous menu						XFL_MessageMod_Back = 0					EndIf				EndIf			Elseif ret == Command_Plugin_Next				XFL_MessageMod_Back = 1 ; We have previous pages				page += 1			Elseif ret == Command_Plugin_Exit				; Do nothing			EndIf		EndWhile				deactivateMenu()	EndFunction		Function deactivateMenu()		XFL_MessageMod_Plugin_0 = 0		XFL_MessageMod_Plugin_1 = 0		XFL_MessageMod_Plugin_2 = 0		XFL_MessageMod_Plugin_3 = 0		XFL_MessageMod_Plugin_4 = 0		XFL_MessageMod_Plugin_5 = 0		XFL_MessageMod_Plugin_6 = 0		XFL_MessageMod_Next = 0		XFL_MessageMod_Back = 0		GoToState("")	EndFunctionEndState
User avatar
Love iz not
 
Posts: 3377
Joined: Sat Aug 25, 2007 8:55 pm

Next

Return to V - Skyrim