Shaitan051 Posted February 14, 2012 Share Posted February 14, 2012 (edited) Could you help me make what I would assume is a simple script? The creation kit wiki is not even slightly helpful. Just a bunch of parts with no indication of how to put them together.What I'm looking for is the ability to add and remove perks/spells with a lever. (in this particular case racials)For example if I wanted a lever that would remove all existing racials and add the Khajiit ones when you flip it how would I do it? Thank you in advance. Edited February 14, 2012 by Shaitan051 Link to comment Share on other sites More sharing options...
Shaitan051 Posted February 15, 2012 Author Share Posted February 15, 2012 ba-dump Link to comment Share on other sites More sharing options...
Cipscis Posted February 15, 2012 Share Posted February 15, 2012 Take a look at these:OnActivateAddPerkRemovePerkAddSpellRemoveSpellCipscis Link to comment Share on other sites More sharing options...
Shaitan051 Posted February 17, 2012 Author Share Posted February 17, 2012 (edited) Take a look at these:OnActivateAddPerkRemovePerkAddSpellRemoveSpellCipscis Thank you for the reply but I've seen them already. Like I said: Just a bunch of parts with no indication of how to put them together.Left to my own devices this is what I come up with:To replace your racials with Khajiit ones (and yes I know I'm not using the actual perk id's in my example, can't be bothered looking up the names) Event OnActivate(Perkswitch)player.AddPerk(Night eye)player.AddPerk(Claws)player.removeperk(Histskin)player.removeperk(Resist Disease)player.removeperk(Dragonskin)player.removeperk(Magic Resistance)player.removeperk(Ancestor's Wrath)player.removeperk(Resist Fire)player.removeperk(Highborn)player.removeperk(Voice of the Emperor)player.removeperk(Imperial Luck)player.removeperk(Battle Cry)player.removeperk(Resist Frost)player.removeperk(Berserker Rage)player.removeperk(Adrenaline Rush)player.removeperk(Resist Poison)player.removeperk(Command Animal)player.removeperk(Resist Disease and Poison)EndEvent Pretty sure this is gibberish. Edited February 17, 2012 by Shaitan051 Link to comment Share on other sites More sharing options...
LoginToDownload Posted February 17, 2012 Share Posted February 17, 2012 (edited) From what I can see:-Event blocks should always be copied directly from the wiki. In other words, OnActivate should always have ObjectReference akActionRef in the brackets. If you want to check who's using it, you would later ask who akActionRef is.-"Player" isn't used any more. Use Game.GetPlayer() instead.-The abilities you're adding/removing aren't perks, but spells (Powers or Abilities, technically, but both under the umbrella of Spells). Perks are never visible in your Active Effects section, and can never be cast.-Unlike Oblivion, scripts are completely unaware of any objects you don't explicitly pass in. You need to declare them just like (well, not just like) script-only variables. I'm not quite sure how to tutorialize this (and I kind of want to go to sleep), so I'll make it a freebie.Some basic checks: You are, of course, attaching this script to a specific Lever reference or a new Lever form? And you're accessing the script by right-clicking on it and selecting Edit Source (If you open it with Notepad, as I tried at first, it won't compile)?Step 1: Replace your script with the following. SPELL Property PowerKhajiitNightEye Auto SPELL Property RaceKhajiitClaws Auto SPELL Property PowerArgonianHistskin Auto SPELL Property RaceArgonianResistDisease Auto SPELL Property RaceArgonianWaterBreathing Auto SPELL Property PowerBretonAbsorbSpell Auto SPELL Property RaceBreton Auto SPELL Property PowerDarkElfFlameCloak Auto SPELL Property RaceDarkElf Auto SPELL Property AbHighElfMagicka Auto SPELL Property PowerHighElfMagickaRegen Auto SPELL Property PowerImperialPacify Auto SPELL Property RaceImperial Auto SPELL Property PowerNordBattleCry Auto SPELL Property RaceNord Auto SPELL Property RaceOrkBerserk Auto SPELL Property PowerRedguardStaminaRegen Auto SPELL Property RaceRedguard Auto SPELL Property PowerWoodElfCommandAnimal Auto SPELL Property RaceWoodElf Auto Event OnActivate(ObjectReference akActionRef) Game.GetPlayer().RemoveSpell(PowerKhajiitNightEye) Game.GetPlayer().RemoveSpell(RaceKhajiitClaws) Game.GetPlayer().RemoveSpell(PowerArgonianHistskin) Game.GetPlayer().RemoveSpell(RaceArgonianResistDisease) Game.GetPlayer().RemoveSpell(RaceArgonianWaterBreathing) Game.GetPlayer().RemoveSpell(PowerBretonAbsorbSpell) Game.GetPlayer().RemoveSpell(RaceBreton) Game.GetPlayer().RemoveSpell(PowerDarkElfFlameCloak) Game.GetPlayer().RemoveSpell(RaceDarkElf) Game.GetPlayer().RemoveSpell(AbHighElfMagicka) Game.GetPlayer().RemoveSpell(PowerHighElfMagickaRegen) Game.GetPlayer().RemoveSpell(PowerImperialPacify) Game.GetPlayer().RemoveSpell(RaceImperial) Game.GetPlayer().RemoveSpell(PowerNordBattleCry) Game.GetPlayer().RemoveSpell(RaceNord) Game.GetPlayer().RemoveSpell(RaceOrcBerserk) Game.GetPlayer().RemoveSpell(PowerRedguardStaminaRegen) Game.GetPlayer().RemoveSpell(RaceRedguard) Game.GetPlayer().RemoveSpell(PowerWoodElfCommandAnimal) Game.GetPlayer().RemoveSpell(RaceWoodElf) EndEvent Step 2: Right-click on your script (attached to your lever) and select 'Edit Properties'. You should have a gigantic list of properties, since we declared a bunch of them in-script. We could set them all manually, but because we named them after actual in-game stuff we can just click Auto-Fill All. The script should now work. If you still run into any confusions about the syntax (which is totally understandable; it's practically a programming language), you might want to run through the wiki's scripting tutorials (I certainly wouldn't suggest learning from the reference). They were quite useful getting me up to speed, coming from Oblivion, and they're comparatively simple and well-explained. NOTE: The extent of my testing was making sure everything compiled and auto-filled properly. Sorry if there's a problem I missed. Edited February 20, 2012 by LoginToDownload Link to comment Share on other sites More sharing options...
Shaitan051 Posted February 19, 2012 Author Share Posted February 19, 2012 Thank you for attempting to help me but after numerous attempts and equally numerous variations to get the Creation Kit to even accept entry of the script without crashing like a granite hanglider I've decided Skyrim's needlessly complex and superflous scripting can suck a troll feces coated codpiece. I'm sticking to modeling; my CBBE/CHSBHC armor replacer set should be ready for release by week's end (I love Keo's but too skimpy dude.) Link to comment Share on other sites More sharing options...
Recommended Posts