Jump to content

Script for Alternate Game Start


Allannaa

Recommended Posts

I'm not even sure this question belongs in this forum, so if it gets moved, I don't mind.

 

I want to skip the whole Cart-to-Helgen, Alduin-wrecks-the-town, Player-escapes-thru-cave business.  I mean, come on, I've played Skyrim since Day One, and I don't want to sit through it anymore.

 

I've tried quite a few Alternate Start mods, but they all do way more than I want, many of them are script-heavy, and a lot of them are really buggy.

 

So, I thought I'd make my own.  Below is what I have so far -- it's uncompiled because obviously I haven't set the properties yet.

 

I'd like someone who understands scripting to take a look and see if I'm at least on the right track.

 

Also, if this part works -- don't I also need to add something or another that sets Helgen to "destroyed and full of bandits, but with the gates open so Barbas can lead me through later when I'm forced to help him", or something like that?  I know I can just skip that and FT to Haemar's Shame anyway, but sometimes beating up bandits is fun, hence the desire to set the area properly.

 

Here's my script so far:

 

 

 

Scriptname AllaDoesntKnowWhatShesDoing extends WhateverOughtToGoHere

Event OnInit()
	If 
		MQ101.GetStage() == 0 && PlayerREF.GetLevel() <= 1	
		   ;Makes sure this is a new game, not loading a save
		PlayerREF.MoveTo(GuardianStonesMapMarker, 0, -15)
		GameHour.SetValue(9)

		Wait(0.1)
		
		FadeOutGame(False, False, 1.0, 5.0)	
		   ;Fade in game from white screen
		SetInChargen(True, True, True)
		SkyrimClear.ForceActive()
		  ;Decent weather for RaceMenu
		PlayerREF.UnequipAll()
		
		Wait(1)
		ShowRaceMenu()
		
		Wait(0.2)	
		   ;Stop stuff from happening until ShowRaceMenu finishes
		iLock = 1	
		   ;Prevent OnUpdate from running code more than once
		UnregisterForUpdate()
		SetInChargen(False, False, False)
		
		Wait(0.2)
		RequestSave()	
		  ;Save game
		
		Wait(0.2)
		SetInChargen(True, True, True)
		   ;Disable saves for setup
		
		PlayerREF.AddItem(FoodApple)
		PlayerREF.AddItem(FoodNordMead)
		PlayerREF.AddItem(FoodSweetRoll)
		PlayerREF.AddItem(RestoreHealth)
		PlayerREF.AddItem(HideCuirass)
		PlayerREF.AddItem(HideBoots)
		PlayerREF.AddItem(HideGauntlets)
		PlayerREF.AddItem(SteelGreatsword)
		PlayerREF.AddItem(HuntingBow)
		PlayerREF.AddItem(SteelArrows)
	
		CompleteAllObjectives MQ101
		CompleteQuest MQ101
   		   ;completes Unbound and allows start of Before the Storm

		SetObjectiveCompleted MQ102 10 1
		SetObjectiveCompleted MQ102 20 1
		Setstage MQ102 30
		   ;starts Before the Storm
		
		iLock = 0	
		   ;Unlock OnUpdate

	EndIf
EndEvent

 

 

 

 

Link to comment

...

 

Here some fixed code. Remember to fill the properties (they should be auto-filling)

 

 

 

Scriptname AllaDoesntKnowWhatShesDoing extends Quest
 
; "Properties that you use but are missing"
Quest Property MQ101 Auto
Quest Property MQ102 Auto
Actor Property PlayerREF Auto
GlobalVariable Property GameHour Auto
ObjectReference Property GuardianStonesMapMarker Auto
Weather Property SkyrimClear Auto
Potion Property FoodApple Auto
Potion Property FoodNordMead Auto
Potion Property FoodSweetRoll Auto
Potion Property RestoreHealth1 Auto
Armor Property HideCuirass Auto
Armor Property HideBoots Auto
Armor Property HideGauntlets Auto
Weapon Property SteelGreatsword Auto
Weapon Property HuntingBow Auto
Ammo Property SteelArrow Auto
 
int iLock = 0
 
Event OnInit()
  If MQ101.GetStage() == 0 && PlayerREF.GetLevel() <= 1  ;Makes sure this is a new game, not loading a save
    PlayerREF.MoveTo(GuardianStonesMapMarker, 0, -15)
    GameHour.SetValue(9)
    Utility.Wait(0.1)
    Game.FadeOutGame(False, False, 1.0, 5.0)  
    Game.SetInChargen(True, True, True) ;Fade in game from white screen
    SkyrimClear.ForceActive() ;Decent weather for RaceMenu
    PlayerREF.UnequipAll()
    Utility.WaitMenuMode(1.0)
    ShowRaceMenu()
    
    Utility.Wait(0.2)  ;Stop stuff from happening until ShowRaceMenu finishes
    if iLock==0
      iLock = 1  ;Prevent OnUpdate from running code more than once
      UnregisterForUpdate()
      Game.SetInChargen(False, False, False)
      Utility.Wait(0.2)
      Game.RequestSave()  ;Save game
      Utility.Wait(0.2)
      Game.SetInChargen(True, True, True)
       ;Disable saves for setup
      PlayerREF.AddItem(FoodApple, 2)
      PlayerREF.AddItem(FoodNordMead, 1)
      PlayerREF.AddItem(FoodSweetRoll, 1)
      PlayerREF.AddItem(RestoreHealth1, 2)
      PlayerREF.AddItem(HideCuirass, 1)
      PlayerREF.AddItem(HideBoots, 1)
      PlayerREF.AddItem(HideGauntlets, 1)
      PlayerREF.AddItem(SteelGreatsword, 1)
      PlayerREF.AddItem(HuntingBow, 1)
      PlayerREF.AddItem(SteelArrow, 20)
  
      MQ101.CompleteAllObjectives() ;completes Unbound and allows start of Before the Storm
      MQ101.CompleteQuest()
      MQ102.SetObjectiveCompleted(10, true)
      MQ102.SetObjectiveCompleted(10, true)
      MQ102.Setstage(30)
       ;starts Before the Storm
    endIf
  EndIf
EndEvent

 

Link to comment

 

...

 

Here some fixed code. Remember to fill the properties (they should be auto-filling)

 

 

 

Scriptname AllaDoesntKnowWhatShesDoing extends Quest
 
; "Properties that you use but are missing"
Quest Property MQ101 Auto
Quest Property MQ102 Auto
Actor Property PlayerREF Auto
GlobalVariable Property GameHour Auto
ObjectReference Property GuardianStonesMapMarker Auto
Weather Property SkyrimClear Auto
Potion Property FoodApple Auto
Potion Property FoodNordMead Auto
Potion Property FoodSweetRoll Auto
Potion Property RestoreHealth1 Auto
Armor Property HideCuirass Auto
Armor Property HideBoots Auto
Armor Property HideGauntlets Auto
Weapon Property SteelGreatsword Auto
Weapon Property HuntingBow Auto
Ammo Property SteelArrow Auto
 
int iLock = 0
 
Event OnInit()
  If MQ101.GetStage() == 0 && PlayerREF.GetLevel() <= 1  ;Makes sure this is a new game, not loading a save
    PlayerREF.MoveTo(GuardianStonesMapMarker, 0, -15)
    GameHour.SetValue(9)
    Utility.Wait(0.1)
    Game.FadeOutGame(False, False, 1.0, 5.0)  
    Game.SetInChargen(True, True, True) ;Fade in game from white screen
    SkyrimClear.ForceActive() ;Decent weather for RaceMenu
    PlayerREF.UnequipAll()
    Utility.WaitMenuMode(1.0)
    ShowRaceMenu()
    
    Utility.Wait(0.2)  ;Stop stuff from happening until ShowRaceMenu finishes
    if iLock==0
      iLock = 1  ;Prevent OnUpdate from running code more than once
      UnregisterForUpdate()
      Game.SetInChargen(False, False, False)
      Utility.Wait(0.2)
      Game.RequestSave()  ;Save game
      Utility.Wait(0.2)
      Game.SetInChargen(True, True, True)
       ;Disable saves for setup
      PlayerREF.AddItem(FoodApple, 2)
      PlayerREF.AddItem(FoodNordMead, 1)
      PlayerREF.AddItem(FoodSweetRoll, 1)
      PlayerREF.AddItem(RestoreHealth1, 2)
      PlayerREF.AddItem(HideCuirass, 1)
      PlayerREF.AddItem(HideBoots, 1)
      PlayerREF.AddItem(HideGauntlets, 1)
      PlayerREF.AddItem(SteelGreatsword, 1)
      PlayerREF.AddItem(HuntingBow, 1)
      PlayerREF.AddItem(SteelArrow, 20)
  
      MQ101.CompleteAllObjectives() ;completes Unbound and allows start of Before the Storm
      MQ101.CompleteQuest()
      MQ102.SetObjectiveCompleted(10, true)
      MQ102.SetObjectiveCompleted(10, true)
      MQ102.Setstage(30)
       ;starts Before the Storm
    endIf
  EndIf
EndEvent

 

 

CPU --

 

I'm going to nominate you for "Paladin of the Century".  You seem to spend so much time rescuing damsels like me when we're in script distress.  Thank you!  Between you and Wraithslayer, I've actually learned a lot over the past two weeks, and I've actually gotten things to start working the way I hoped they might!

 

Link to comment

I'm going to nominate you for "Paladin of the Century".  You seem to spend so much time rescuing damsels like me when we're in script distress.  Thank you!  Between you and Wraithslayer, I've actually learned a lot over the past two weeks, and I've actually gotten things to start working the way I hoped they might!

@WraithSlayer is a friend and he is one of the best modders on this community. For scripting, objects management, and config.

If I am a paladin, he should be an emperor.

Link to comment
  • 2 weeks later...

 

...

 

Here some fixed code. Remember to fill the properties (they should be auto-filling)

 

 

 

Scriptname AllaDoesntKnowWhatShesDoing extends Quest
 
; "Properties that you use but are missing"
Quest Property MQ101 Auto
Quest Property MQ102 Auto
Actor Property PlayerREF Auto
GlobalVariable Property GameHour Auto
ObjectReference Property GuardianStonesMapMarker Auto
Weather Property SkyrimClear Auto
Potion Property FoodApple Auto
Potion Property FoodNordMead Auto
Potion Property FoodSweetRoll Auto
Potion Property RestoreHealth1 Auto
Armor Property HideCuirass Auto
Armor Property HideBoots Auto
Armor Property HideGauntlets Auto
Weapon Property SteelGreatsword Auto
Weapon Property HuntingBow Auto
Ammo Property SteelArrow Auto
 
int iLock = 0
 
Event OnInit()
  If MQ101.GetStage() == 0 && PlayerREF.GetLevel() <= 1  ;Makes sure this is a new game, not loading a save
    PlayerREF.MoveTo(GuardianStonesMapMarker, 0, -15)
    GameHour.SetValue(9)
    Utility.Wait(0.1)
    Game.FadeOutGame(False, False, 1.0, 5.0)  
    Game.SetInChargen(True, True, True) ;Fade in game from white screen
    SkyrimClear.ForceActive() ;Decent weather for RaceMenu
    PlayerREF.UnequipAll()
    Utility.WaitMenuMode(1.0)
    ShowRaceMenu()
    
    Utility.Wait(0.2)  ;Stop stuff from happening until ShowRaceMenu finishes
    if iLock==0
      iLock = 1  ;Prevent OnUpdate from running code more than once
      UnregisterForUpdate()
      Game.SetInChargen(False, False, False)
      Utility.Wait(0.2)
      Game.RequestSave()  ;Save game
      Utility.Wait(0.2)
      Game.SetInChargen(True, True, True)
       ;Disable saves for setup
      PlayerREF.AddItem(FoodApple, 2)
      PlayerREF.AddItem(FoodNordMead, 1)
      PlayerREF.AddItem(FoodSweetRoll, 1)
      PlayerREF.AddItem(RestoreHealth1, 2)
      PlayerREF.AddItem(HideCuirass, 1)
      PlayerREF.AddItem(HideBoots, 1)
      PlayerREF.AddItem(HideGauntlets, 1)
      PlayerREF.AddItem(SteelGreatsword, 1)
      PlayerREF.AddItem(HuntingBow, 1)
      PlayerREF.AddItem(SteelArrow, 20)
  
      MQ101.CompleteAllObjectives() ;completes Unbound and allows start of Before the Storm
      MQ101.CompleteQuest()
      MQ102.SetObjectiveCompleted(10, true)
      MQ102.SetObjectiveCompleted(10, true)
      MQ102.Setstage(30)
       ;starts Before the Storm
    endIf
  EndIf
EndEvent

 

 

I think I'm doing something wrong, because the CK is crashing, or refusing to allow me to enter properties for the script -- or both!

 

What I've done thus far is:

Open the CK

Select Skyrim and Update

Hit OK, allow the CK to load, click "Yes to All" on that "This navmesh is screwy" popup message (basically the same thing you always do to open the CK)

Right-click in Character > Quests, Select NEW

Named the new quest AllaAltStartQuest for its ID and Alla Skyrim Alternate Start for its Quest Name.

Clicked OK at the bottom right of the Quest window to save; Clicked SAVE from the File dropdown, and named it "AllaSkyrimAltStart.ESP

 

Then I shut down the CK because someone once told me that will help force the new quest to save.

 

I opened CK, selected the new plugin, made it the Active file, clicked OK, let the CK load.

Opened the AllaAltStartQuest and clicked the Scripts tab to add the script CPU had corrected for me, clicked COMPILE -- which it did, but designated the script as Failed.

I figured that doesn't matter, since I haven't defined properties yet, so I told it to "Save anyway" and used Exit to close that window.

Then the CK freaked out.

 

So I closed it, reopened it as above, and saw that the script is there, with the + sign that means something needs to be finished.

I clicked PROPERTIES and tried to Add New, but... It's not allowing any properties to be added.  They don't "hold" when I select or define them, and the CK crashes.

 

Here's the message I'm getting when I compile the script:

 

C:\...etc...\skyrim\Data\Scripts\Source\temp\AllaAltStartQuest.psc(5,0): missing EOF at 'Scriptname'

 

Sooooo....

 

What's going wrong, or what am I forgetting, or what did I not do?

 

Thanks!

 

 

EDIT!

It now compiles and allows me to add properties -- buuuut -- now I have a different problem.

 

"ShowRaceMenu" and "RaceMenu" aren't recognized.  What should I be using instead?  Something to do with CharGen perhaps?

 

And I'd still like to know why it originally crashed the CK.  Weird stuff freaks me out.

Link to comment

I swear, I'm at the FML stage....

 

As it turns out, the wording (syntax? whatever) I needed was Game.ShowRaceMenu

 

So, everything compiled, all the properties got filled in.

 

I saved, exited the CK.

 

I generated the SEQ file and moved it from Skyrim to Skyrim > Data > SEQ

 

I opened SKSE loader and made sure AllaSkyrimAltStart was enabled.

 

I clicked Play.... Game loaded... I clicked NEW and said "Yes" to "Start a new game?"

 

Aaaand -- the cart ride plays.  Not my alternate start.

 

What in the heck am I doing wrong?

 

Link to comment

I really have no idea about modding at this level ( I can change NPC properties, armor values, etc) but one thing I remember seeing was LAL having an INI file, and directions a long time about changing the start cell in ? skyrim.ini or one of the base game ini files.

 

I'd have to check what the LAL files modify, but that might be what you need to change.

 

EDIT

 

Having checked, no, the LAL ini files don't change the starting cell. Maybe that can be done in the ESP?

Link to comment

To get a alternate gamestart you have to modify the Mainquest (MQ101) script. If you want to make it softly - change the Global Variable MQQuickstart in CreationKit to a value that is not used in Stage 0 of MQ101 and add a new conditional fragment for the value of your choice.

 

In your fragment you have to prepare some data to keep the main quest intact:

; close all the town gates
NorthGate.SetOpen(false)
NorthGate.SetLockLevel(5)
EastGate.SetOpen(false)
EastGate.SetLockLevel(5)


; get rid of music etc.
;remove music
MUSDungeonChargen.Remove()
MUSCombatBossChargen.Remove()
ExtHelgenAttackASREF.Disable() ; acoustic space

; now place the Player where you want
PlayerRef.MoveTo(...)

; enter Chargen Mode
Game.SetInChargen(true, true, false)

; and open Racemenu
Game.ShowRaceMenu()

; now you are finished with chargen
Game.SetInChargen(false, false, false)

; add race spells
kmyQuest.AddRaceSpells()

; pop message box to choose sides
if TempChooseSidesMessage.Show() == 0
	; move Hadvar
; 	debug.trace(self + " moving Hadvar to " + HelgenFriendMarker)
	;Alias_Hadvar.GetActorRef().SetOutfit(HadvarOutfit)
	Alias_Hadvar.TryTomoveto(HelgenFriendMarker)
	; start player on Imperial side
	MQ102A.setstage(1)
else
	; move Ralof
	;Alias_Ralof.GetActorRef().SetOutfit(RalofOutfit)
; 	debug.trace(self + " moving Ralof to " + HelgenFriendMarker)
	Alias_Ralof.TryTomoveto(HelgenFriendMarker)
	; start player on Sons side
	MQ102B.setstage(1)
endif

; Update main quest to a proper state
Setstage(1000)

; done! Now start your own quest...

Link to comment

You need not change the global - the main thing happens in stage 0 of MQ101. But it is a clean way for Autostart as it is designed by Bethesda especially for this purpose.

 

You simply have to avoid that MQ101 enters stage 10.

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...