Nevadathehighelf Posted May 30, 2017 Posted May 30, 2017 Hello, me and my friend are doing a mod. It's going to be a dreaming mod, which allows the player to have nightmares and or dreams whenever they sleep in a bed. They will also have buffs depending upon what dream they have. This is also going to have an mcm for configuration, will use actual 'real-life' dream symbols (like reading a book symbolizes a need for knowledge) all while still being lore friendly, having skyrim and elder lore event related topics ------------- Well that's the concept, what we're having trouble with, is we're having trouble making message boxes allow text for the prompts that pop up, describing the dream. If somebody knows how to do this, or knows ANYTHING to help us please get this awesome mod to work, please post, pm me, or do both. We would greatly appreciate it...
Lodakai Posted May 30, 2017 Posted May 30, 2017 Darkfox made a video tutorial on this here https://www.youtube.com/watch?v=KeP05l7O77E There is a text example here http://wiki.tesnexus.com/index.php/Skyrim_Messagebox_Menu_Tutorial Menu examples would be here https://www.creationkit.com/index.php?title=Options_Menu
Azazellz Posted May 30, 2017 Posted May 30, 2017 What kind of trouble can there be with message boxes? You just create MessageBox in CK, and call it by a simple script like HelloWorld.Show() where "HelloWorld" is a property of your message box. Whole script shall be looks like Scriptname DreamScript extends activemagiceffect Actor Property Player Auto SPELL Property DreamController Auto Message Property DreamMessageBox00 Auto Message Property DreamMessageBox01 Auto SPELL Property AfterDreamEffect00 Auto SPELL Property AfterDreamEffect01 Auto Event OnPlayerLoadGame() If Game.GetPlayer().HasSpell (DreamController) == true ;checking for Dream SpellController (this spell), if player have one - re-applying it Game.GetPlayer().RemoveSpell(DreamController) Game.GetPlayer().AddSpell(DreamController, false) endif EndEvent Event OnEffectStart(Actor akTarget, Actor akCaster) akTarget.RegisterForSleep() ; Before we can use OnSleepStart we must register. endEvent Event OnSleepStop(bool abInterrupted) int random = Utility.RandomInt(0, 30) ;get random number from 0 up to 30 if random == 0 DreamMessageBox00.Show() ;show 00 message box with dream description Game.GetPlayer().AddSpell(AfterDreamEffect00) ;apply 00 spell with after-dream effect elseif random == 1 DreamMessageBox01.Show() ;show 01 message box with dream description and so on - up to 30 dreams Game.GetPlayer().AddSpell(AfterDreamEffect01) endif endEvent I think it should work (but i don't test it ingame). Just attach this script to the effect that will be attached on the player. And sorry about my bad english =)
Guest Posted May 30, 2017 Posted May 30, 2017 What kind of trouble can there be with message boxes? You just create MessageBox in CK, and call it by a simple script like HelloWorld.Show() where "HelloWorld" is a property of your message box. Whole script shall be looks like Scriptname DreamScript extends activemagiceffect Actor Property Player Auto SPELL Property DreamController Auto Message Property DreamMessageBox00 Auto Message Property DreamMessageBox01 Auto SPELL Property AfterDreamEffect00 Auto SPELL Property AfterDreamEffect01 Auto Event OnPlayerLoadGame() If Game.GetPlayer().HasSpell (DreamController) == true ;checking for Dream SpellController (this spell), if player have one - re-applying it Game.GetPlayer().RemoveSpell(DreamController) Game.GetPlayer().AddSpell(DreamController, false) endif EndEvent Event OnEffectStart(Actor akTarget, Actor akCaster) akTarget.RegisterForSleep() ; Before we can use OnSleepStart we must register. endEvent Event OnSleepStop(bool abInterrupted) int random = Utility.RandomInt(0, 30) ;get random number from 0 up to 30 if random == 0 DreamMessageBox00.Show() ;show 00 message box with dream description Game.GetPlayer().AddSpell(AfterDreamEffect00) ;apply 00 spell with after-dream effect elseif random == 1 DreamMessageBox01.Show() ;show 01 message box with dream description and so on - up to 30 dreams Game.GetPlayer().AddSpell(AfterDreamEffect01) endif endEvent I think it should work (but i don't test it ingame). Just attach this script to the effect that will be attached on the player. And sorry about my bad english =) There are a couple of problems in your script. The events you are calling are valid just for a ReferenceAlias, but the script is for MagicEffect. It should be like: Scriptname DreamScript extends ReferenceAlias Actor Property PlayerRef Auto Message[] Property DreamMessages Auto SPELL[] Property AfterDreamEffects Auto Event OnPlayerLoadGame() PlayerRef.RegisterForSleep() ; "Before we can use OnSleepStart we must register." EndEvent Event OnSleepStop(bool abInterrupted) int random = Utility.RandomInt(0, DreamMessages.length - 1) ; "get random number from 0 up to the number of messages in the array" DreamMessages[random].Show() ; "show one of the messages box with dream description" AfterDreamEffects[random].Cast(PlayerRef, PlayerRef) ; "apply one of the spells with after-dream effect to the player" endEvent
Azazellz Posted May 30, 2017 Posted May 30, 2017 There are a couple of problems in your script. The events you are calling are valid just for a ReferenceAlias, but the script is for MagicEffect. Well, seems you are right. I'm not so experience in scripting after all, i'm still learning =)
Nevadathehighelf Posted May 30, 2017 Author Posted May 30, 2017 Everybody, please, please pm this person: "Pigeon the Feathered" He is helping me with this, and is actively working on the papyrus and mcm, he needs help. We could really use thw help to get this awesome mod to work...
Ruffled Pigeon Posted May 30, 2017 Posted May 30, 2017 Hey, I'm the guy making this. There is no problems with the MessageBoxes, it's just the fact that they have a hard limit of (according to CPU) 180 characters. I don't think there is a way arround that, so I'm basically just looking for another way to display the text fully, although there probably is none. I thought of using Books instead, but can't get them to activate reliably. Current plan is to just stick to MessageBoxes but split them up with a page system, or just go for shorter stories. lefttounge isn't too fond of splitting them up, as it "decreases tension", so if nobody knows of another way to display long text we'll be going with short stories instead. If you do know another way, I'd appreciate input.
Guest Posted May 30, 2017 Posted May 30, 2017 ... The only other way I can think of is to create an SWF widget that accepts text. But will require doing some SWF creation and integration with the SkyUI widget system. Apropos uses this way. Maybe you can contact its author and ask for help.
Nevadathehighelf Posted May 30, 2017 Author Posted May 30, 2017 Looks like Apropos, is by a dude named "Gooser" Here on loverslab. I can try asking for assistance. But just to ge clear, would i need to shorten my dreams a little more? I tried to keep them short as is...? :/
Guest Posted May 30, 2017 Posted May 30, 2017 It depends on the way you will "show" your dreams. MessageBoxes are limited, as Dialogues. You can use the Debug.MessageBox with Papyrus, this one can accept up to 2047 characters. But it has a very bad appearance in the game. Or you can try to add a widget that shows the text. In this case, ask @gooser for help.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now