Jump to content

Start a script when game starts?


Recommended Posts

Posted

So I wasn't able to find much on this. the only mod I found also that was an edit of the main menu, is a plugin.dll for skse.

Is there a way to script in papyrus that will results when you are in the main menu.

I know OnInit loads once in game.

Is there something like that that will load once the game starts?

 

PS: Sorry for asking soo many questions recently.

I am new to modding and trying to figure stuff out :)

Posted

Hello.

 

Use "RegisterForMenu("Journal Menu")" or "RegisterForMenu("Main Menu")" (not sure of what kind of menu you wanna track)

And then do what you want on the event Event OnMenuOpen(string menuName)

 
Check UI.psc file from SKSE:
 
; "InventoryMenu"
; "Console"
; "Dialogue Menu"
; "HUD Menu"
; "Main Menu"
; "MessageBoxMenu"
; "Cursor Menu"
; "Fader Menu"
; "MagicMenu"
; "Top Menu"
; "Overlay Menu"
; "Overlay Interaction Menu"
; "Loading Menu"
; "TweenMenu"
; "BarterMenu"
; "GiftMenu"
; "Debug Text Menu"
; "MapMenu"
; "Lockpicking Menu"
; "Quantity Menu"
; "StatsMenu"
; "ContainerMenu"
; "Sleep/Wait Menu"
; "LevelUp Menu"
; "Journal Menu"
; "Book Menu"
; "FavoritesMenu"
; "RaceSex Menu"
; "Crafting Menu"
; "Training Menu"
; "Mist Menu"
; "Tutorial Menu"
; "Credits Menu"
; "TitleSequence Menu"
; "Console Native UI Menu"
; "Kinect Menu"
 
 
 
Posted

you're awesome thanx bro

 

So something like this should work?

 

Event OnMenuOpen("Main Menu")
    OpenCustomMenu("Sky/Example")
EndEvent

Posted

Post the results of the script compile, so I can see what the error is.

 

Posted

Starting 1 compile threads for 1 files...
Compiling "SkyLogin"...
C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\SkyLogin.psc(6,17): extraneous input '"Main Menu"' expecting RPAREN
No output generated for SkyLogin.psc, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on SkyLogin.psc
[Finished in 0.6s with exit code -1]


also how would I attach the script? would I put it on an object or something in game?

Posted

NVM Figured it out haha

Just need to know how to attach it

Also Main Menu doesnt trigger at the main menu apparently. do you know if a different menu works on the start menu?

Or should I be initializing it with something besides OnInit?

Posted

Register for ALL menus I listed, and use a simple event like:

Event OnMenuOpen(String theMenu)

  debug.trace("Menu open is: " + theMenu)

EndEvent

 

Then try to open the menu you want, and check your papyrus log to see its actual name.

Posted

I checked all the logs in the logs/script folder and none have any messages related to the script

 

Yeah I don't think you can script the main menu with papyrus.

I ran the script in game and it ran on every menu but the main  menu

Posted

Did you registered for menus?

At OnInit() time?

Posted

yes I did but I don't think you can edit the main menu because I ran the script and it ran on every menu but the start menu

Posted

YES Figured out how to do it!.

Also here is a video of what Ive done :)

 

 

That is looking fucking AWESOME!

I don't think it can be useful if you just play alone (user/password) but the list of saves like that is way better.

 

I think you are really skilled in doing SWF files and integrate them in Skyrim.

 

Congrats.

Posted

thanx man.

I do know as3 and as2 isnt far off. so it comes easily with the flash side :)

also Im trying to make an online mod. thats why the user and pass is there

Posted

Ok so new question... sorry I'm full of them

 

I was looking at the UI Invoke values.

I was wondering if you knew how to invoke data to be passed to actionscript.

There is no documentation on the website from what I can see.

Posted

I have zero experience with actionscrirpt.

Posted

Then I did not get what you were meaning with your question.

  • 1 month later...
Posted

so I have been doing a lot of research on creating skse extensions.

It really empowers your abilities with modding... like good god.

anyways been making a server for the login system I made in c++ gonna redo the whole thing as a skse extension with a server to communicate with.

Archived

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

  • Recently Browsing   0 members

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