Koda Posted January 6, 2016 Posted January 6, 2016 Hello. I've begun working on my first mod, which focuses heavily on (sexy) conversation and dialogue. To make things more interactive I wanted to place Message boxes within conversations, then adjust the conversation according to the player's choices.The good news is this I have a working method to do this, but since I'm so inexperienced I figured I'd ask if anyone could suggest any improvements (or an easier / cleaner way of doing some things) before I use my methodology to flesh out my mod's actual content. Currently, I am adding an End Script to various Dialogue Topics, chaining Messages within that Script, as well as setting a GlobalVariable with the script to use as a conditional for other conversations/messages. For example: an NPC says: "Do you prefer Apples or Oranges?" The NPC's question would have an End Script as follows: ;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment ;NEXT FRAGMENT INDEX 1 Scriptname TIF__0700230A Extends TopicInfo Hidden ;BEGIN FRAGMENT Fragment_0 Function Fragment_0(ObjectReference akSpeakerRef) Actor akSpeaker = akSpeakerRef as Actor ;BEGIN CODE int ibutton = koda_ApplesOrOranges.show() koda_Dialogue.SetValue(0) if ibutton == 0 koda_Dialogue.SetValue(1) koda_ApplesOrOranges_Apples.show() else koda_Dialogue.SetValue(2) koda_ApplesOrOranges_Oranges.show() endif ;END CODE EndFunction ;END FRAGMENT ;END FRAGMENT CODE - Do not edit anything between this and the begin comment Message Property koda_ApplesOrOranges Auto Message Property koda_ApplesOrOranges_Apples Auto Message Property koda_ApplesOrOrnages_Oranges Auto GlobalVariable Property koda_Dialogue Auto koda_ApplesOrOranges would read something like: "You think about it for a moment and decide on..." with Apples/Oranges being its two buttons koda_ApplesOrOranges_Apples provides a message immediately following the first, perhaps reading: "You decide you prefer apples over oranges, finally overcoming your life's biggest philosophical hurdle." koda_ApplesOrOranges_Oranges meanwhile might read: "Some say nothing rhymes with oranges; but to you, nothing compares." koda_Dialogue is so I can track (in the short term) which buttons the player chooses. I still haven't delved into the most responsible way to make/track long-term quest variables or pseudo-stats (like "Submissiveness" or something). At any rate, the current use of koda_Dialogue is as a conditional for the remainder of the conversation. In this example, the NPC's question links to three followup topics: 1) "I prefer apples." (requires koda_Dialogue == 1 to be available) 2) "I prefer oranges." (requires koda_Dialogue == 2 to be available) 3) "None of your business!" (available in either case) Again, all of this compiles and works, but it has some clunky elements I wanted to ask about. 1) Is there a cleaner way to place the Message between topics that the Topic End Script? Ideally I would like to use an ordinary script so that it's saved "normally" and I can attach it to other things as is useful. The Topic End Scripts seem isolated and require jumping through hoops for me to get working (just because CK is a bit quirky with them). 2) Is there a gentler way to make my conversation scratch variable than a GlobalVariable? I'm asking because I hear GlobalVariables are to be avoided if possible. 3) One potentially more organized alternative I was considering (I haven't tested or researched it yet) is using empty Topics with "Invisible Continue" that only contain the Message Box scripts. Please let me know if this sounds viable or hilariously not. And of course -- any other suggestions or advice~ Thanks!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.