Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

thefinn

Allies
  • Posts

    33
  • Joined

  • Last visited

Recent Profile Visitors

671 profile views

thefinn's Achievements

Apprentice

Apprentice (3/11)

0

Reputation

  1. http://www.creationkit.com/Complete_Example_Scripts#Maintenance.2Fupdate_code_which_runs_once_per_save_load_and_shows_a_message_when_a_mod_is_updated_or_first_loaded Ok, this is originally where I got the code for the script that runs each time a player loads the game - as opposed to each time the player starts a NEW game. (check where they put a comment with a bunch of stars *****, the 2nd script starts there). The script as you can see extends referencealias. So this being the main difference - I figured that it would be the reason you seperate this script from the code you are actually running (in what I would call the main script - as this script is really nothing but a way to use the reference). So, now that I am using a quest script oninit... as in the example on that page in their "main script". Can I just do away with that small script with only a few lines in it (which extends referencealias) and just call the quest script from the referencealias quest ? In fact I'm totally confused as to where they would even attach that referencealias script. I am kind of aware that page is getting old now too, I wonder if that's part of the problem ?
  2. (Would it be ok if you guys started a new thread about some other issue instead of hijacking this one?) I got that working thanks a lot. For some reason I had read somewhere that OnPlayerLoad was what you used, but found a good example at Cipscis But on that, why can I not just call the main script ? It is also referencing Quest and using the OnInit event to start... I was under the impression the reason you used a seperate script was because those function calls were different.
  3. It seems the quest to run on reload isn't working... [10/16/2013 - 02:02:46AM] Error: Unable to bind script THEFINNMagarResetPerLoad to THEFINNPlayerRefQuest (9505A48C) because their base types do not match Not sure what it's talking about here. :\
  4. Perk Property SpringheelJakPerk auto Is there a way of setting up the equivalent to a Perk Property without the CK ? Or at least setting a variable to be read by HasPerk ? isAlterationNovice = Game.GetPlayer().HasPerk(f2ca6) Obviously the wrong type there. I'm not sure what it's expecting, the CK website is of little help. I'm sure I could make it with GetFormFromFile but that doesn't seem very elegant Actually those were integers, I might try that. I'd really rather not declare it at all and just throw it in, can it not handle that ?!
  5. Yeah run once only. I am very aware of what I am actually asking of the processor and even more scared of the papyrus runtime engine - let's face it - anything could happen lol Just on this - I actually would've been WAY more scared of that, but then I saw frostfall, and it dispelled any notion that *I* would be the one to reach the limits
  6. Doesn't this require the robes mod be a master file ? The whole point of the original script was to only have Skyrim.esm and Update.esm as masters, and detect all the mods I want to make compatible. Edit: Nevermind, I see the part where you are still calling the filename. Hrm I will experiment and see how it goes - I really DO want to tidy that part up.. idk, it's nice to have it documented so you can see if say a pair of boots or something small goes missing - I intend on putting in quite a lot of compatibility too, so it might be better to keep it documented. That's so much easier on the eyes though. *shrug*
  7. To be honest, I have seen a bunch of bugs regard casts and types not matching (or whatever it said) but really have very little clue regarding what it's referring to - I know they are generally referring to variables being set to int when they don't contain an integer but in terms of the array as a whole... I don't get your meaning I'm not very used to skyrim coding yet. I also have a papyrus error here that perhaps someone can shed some light on: [10/15/2013 - 05:13:01AM] Error: Unable to bind script THEFINNMagarResetPerLoad to THEFINNPlayerRefQuest (8D05A48C) because their base types do not match It doesn't seem to be interferring at all however (I don't think anyhow).
  8. Finished, the script above is 100% working. Thanks for all the help WillieSea.
  9. I'd still like a way to decare the array elements on a single line if possible, however, this all works perfectly now. This script detects mods installed, and adds items defined by their object ID into the leveled list of this shopkeeper. Sorry the editor keeps ripping all the tabs out :\ ; This script will put certain items in Magar's inventory depending upon mods loaded. Scriptname THEFINNMagarActivator extends Quest LeveledItem Property MagarList Auto ; Point this at Magar's Leveled List in CK ;Supported Mods bool isSkyrimThere ;I wonder if skyrim is there ? bool isOpOutfitsLoaded ;Opulent Outfits - Mages of Winterhold - Replacer Version. int i int[] Robes ;Integer Array holding the item id's. event OnInit() ;Run once On New Game Start debug.Trace("========== Magar Initializing.") StartShop() endEvent Function StartShop() ; This is also run once by player reference alias script on savegame LOAD. isSkyrimThere = Game.GetFormFromFile(0x06B46C, "Skyrim.esm") ; check for skyrim. isOPOutfitsLoaded = Game.GetFormFromFile(0x008A2F, "OmageReplacerPack.esp") ; check for opulent outfits. if isOpOutfitsLoaded OpulentOutfits() endIf if isSkyrimThere VanillaMageRobes() endif endFunction Function OpulentOutfits() debug.Trace("========== Adding Opulent Robes, Hoods and Boots to Inventory.") Robes = new int[10] ; Reset Array for new Items. Robes[0] = 0x0028A6 ; Novice Hood of Alteration Robes[1] = 0x002E35 ; Novice Hood of Conjuration Robes[2] = 0x002E39 ; Novice Hood of Destruction Robes[3] = 0x002E3D ; Novice Hood of Illusion Robes[4] = 0x002E41 ; Novice Hood of Restoration Robes[5] = 0x0028A7 ; Apprentice Boots of Alteration Robes[6] = 0x002E33 ; Apprentice Boots of Conjuration Robes[7] = 0x002E37 ; Apprentice Boots of Destruction Robes[8] = 0x002E3B ; Apprentice Boots of Illusion Robes[9] = 0x002E3F ; Apprentice Boots of Restoration i = 0 ; set i back to zero to begin. while i < Robes.Length AddSomeItems("OmageReplacerPack.esp", Robes[i]) ; Step through the Array. i += 1 endwhile endFunction Function VanillaMageRobes() debug.Trace("========== Adding Vanilla Skyrim Mage Robes to Inventory.") Robes = new int[8] ; Reset Array for new items. Robes[0] = 0x06B46C ; Novice Boots Robes[1] = 0x10DD3A ; Novice Hood Robes[2] = 0x10D667 ; Novice Robes Robes[3] = 0x10D669 ; Novice Robes of Alteration Robes[4] = 0x10D66A ; Novice Robes of Conjuration Robes[5] = 0x10D668 ; Novice Robes of Destruction Robes[6] = 0x10D671 ; Novice Robes of Illusion Robes[7] = 0x10D66B ; Novice Robes of Restoration i = 0 ; set i back to zero to begin. while i < Robes.Length AddSomeItems("Skyrim.esm", Robes[i]) ; Step through the array adding each item. i += 1 endWhile endFunction Function AddSomeItems(string Filetocall, int arg) MagarList.AddForm(Game.GetFormFromFile(arg, Filetocall),1,1) ; Get the read item ID from the parent esm/esp and add it to the leveled list. endFunction
  10. It didn't but after much reading on Player Reference Alias Quests (rolls eyes), I got it all working. One final question if I can however, when declaring the Array, is it possible to define ALL of the array elements on a single line? Or even multi-line.. ? Like Array[] = 1, 2, 3, 10, ; etc 15, ; comment 22 ; comment or is that somehow not allowed? I'll put the final scripts up in a minute - something to note - I had dragonborn, hf and DG all as masters because of the earlier way I was doing things. When trying to add the player reference it was crashing over and over when I tried to click "ok" - perhaps the CK ran out of memory ? I dunno. I took the masters out with TESVEdit and had no issues after that, was incredibly annoying for a while though.
  11. I just got this compiled, am about to test it. I haven't QUITE worked out how to do the same thing via save game load, but I will get there. ; This script will put certain items in Magar's inventory depending upon mods loaded. Scriptname MagarActivator extends Quest LeveledItem Property MagarList Auto ;Supported Mods bool isOpOutfitsLoaded ;Opulent Outfits - Mages of Winterhold - Replacer Version. Int[] Robes event OnInit() debug.Trace("Magar Initializing.") isOPOutfitsLoaded = Game.GetFormFromFile(0x008A2F, "OmageReplacerPack.esp") if isOPOutfitsLoaded debug.Trace("Opulent Outfits Detected.") OpulentOutfits() endif endEvent Function OpulentOutfits() Robes = new int[15] ; Array with Robe ID's Robes[0] = 0x0028A6 debug.Trace("Adding Opulent Robes, Hoods and Boots to Inventory.") MagarList.AddForm(Game.GetFormFromFile(Robes[0], "OmageReplacerPack.esp"), 1, 1) ; Novice Hood of Alteration ; MagarsChestRef.AddForm(Game.GetFormFromFile(0x0028A6, "OmageReplacerPack.esp")) ; Novice Hood of Alteration ; MagarsChestRef.AddItem(Game.GetFormFromFile(0x002E35, "OmageReplacerPack.esp")) ; Novice Hood of Conjuration ; MagarsChestRef.AddItem(Game.GetFormFromFile(0x002E39, "OmageReplacerPack.esp")) ; Novice Hood of Destruction ; MagarsChestRef.AddItem(Game.GetFormFromFile(0x002E3D, "OmageReplacerPack.esp")) ; Novice Hood of Illusion ; MagarsChestRef.AddItem(Game.GetFormFromFile(0x002E41, "OmageReplacerPack.esp")) ; Novice Hood of Restoration ; MagarsChestRef.AddItem(Game.GetFormFromFile(0x0028A7, "OmageReplacerPack.esp")) ; Apprentice Boots of Alteration ; MagarsChestRef.AddItem(Game.GetFormFromFile(0x002E33, "OmageReplacerPack.esp")) ; Apprentice Boots of Conjuration ; MagarsChestRef.AddItem(Game.GetFormFromFile(0x002E37, "OmageReplacerPack.esp")) ; Apprentice Boots of Destruction ; MagarsChestRef.AddItem(Game.GetFormFromFile(0x002E3B, "OmageReplacerPack.esp")) ; Apprentice Boots of Illusion ; MagarsChestRef.AddItem(Game.GetFormFromFile(0x002E3F, "OmageReplacerPack.esp")) ; Apprentice Boots of Restoration ; MagarsChestRef.AddItem(Game.GetFormFromFile(0x10D669, "Skyrim.esm")) ; Novice Robes of Alteration ; MagarsChestRef.AddItem(Game.GetFormFromFile(0x10D66A, "Skyrim.esm")) ; Novice Robes of Conjuration ; MagarsChestRef.AddItem(Game.GetFormFromFile(0x10D668, "Skyrim.esm")) ; Novice Robes of Destruction ; MagarsChestRef.AddItem(Game.GetFormFromFile(0x10D671, "Skyrim.esm")) ; Novice Robes of Illusion ; MagarsChestRef.AddItem(Game.GetFormFromFile(0x10D66B, "Skyrim.esm")) ; Novice Robes of Restoration endFunction
  12. Surprisingly, i've never created a quest yet, but I will give it a go. I had a feeling it was something quest specific (that CK page should mention that).
  13. yeah that didn't really explain it (I do read this kinda thing before asking ) Event called when the script has been created and all its properties have been initialized.<- this doesn't explain anything. It's as good as saying "Oh this stuff will run when the game engine tells it to, and when that is... we'll leave you to guess." Actually, what I've been after before I went to bed last night was a good example mod where someone adds their items into leveled lists via script - that will give me what I need as they have to do all of that at the same time I need to do my stuff. So it should have the quest stuff for running things at the start of game and when the game loads from a save. (I work better with examples ). Can you think of a mod doing that ? I thought Jaysus swords did it but I forgot how it was needed for bashed patches when I used to use it.
  14. If I could ask another question here. When exactly does the OnInit event run? When I leave and enter the cell ? when he is totally unloaded and reloaded ? I'm trying to work out when the stuff will appear (I have a working script for OnActivator but there are several things wrong with that method).
  15. No worries, I will likely try and look the event up I'm actually after and that is just when he loads into the game the first time - set the variables for which mods are loaded then. Noone is going to be able to change the mods mid-game... That's the only thing that will go there. The Activation will deal with what is in the chest at any given time, that script above is merely for testing the whole thing, then I will continue
×
×
  • Create New...