Jump to content
⚠ Known Issue: Media on User Profiles ×

the0champion

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by the0champion

  1. Sweet, that worked like a champ, and made for a much neater script. Thanks again for the help! Here's how much shorter the script is, for anyone who's working with similar issues: Scriptname MSGSpellCastUnarmoredLeveling extends activemagiceffect Actor Property Player AutoMagicEffect Property MSGSpellCastUnarmored AutoMessage Property MSGSpellCastUnarmoredMessage Auto Event OnEffectStart(Actor akTarget, Actor akCaster)ObjectReference Caster = akCasterMSGSpellCastUnarmoredLevelingLoop()EndEvent Function MSGSpellCastUnarmoredLevelingLoop()If Player.HasMagicEffect(MSGSpellCastUnarmored)Game.AdvanceSkill("Lockpicking",20.0)MSGSpellCastUnarmoredMessage.Show()RegisterForSingleUpdate(1)ElseUnRegisterForUpdate()EndIfEndFunction Event OnUpdate()MSGSpellCastUnarmoredLevelingLoop()EndEventScript is attached to a magic effect which is applied to an ability which triggers that magic effect any time you are not wearing armor and casting.
  2. OK thanks. I'll try that out. Right now it does work (I even managed to get a convoluted perk to help with the whole leveling while casting), but like you said, I'm worried about the memory drain, so I'll try rewriting it that way.
  3. So I didn't attach it to the player, I've attached it to a perk I've created called "MSGLevelingAid" I've rewritten the code as follows: Scriptname MSGUnarmoredLevelup extends Perk ;;;;;;;;;;;;;;;;;;;;;;;;;;Input:None so far;;Progresses the Unarmored skill by leveling lockpicking whenever;you cast a spell while unarmored;;;;;;;;;;;;;;;;;;;;;;;;;;Actor Property Player AutoPerk Property MSGUnarmoredLeveling AutoPerk Property MSGMixedArmorLeveling AutoPerk Property MSGLightArmorLevelingPure AutoPerk Property MSGHeavyArmorLevelingPure AutoPerk Property MSGLevelingAid AutoMessage Property MSGUnarmoredLevelingMessage AutoMessage Property MSGLightArmorLevelingMessage AutoMessage Property MSGHeavyArmorLevelingMessage AutoMessage Property MSGMixedArmorLevelingMessage Auto Event OnInit();Display WIP Message Box;Debug.MessageBox("The Unarmored skill line is currently a work in progress.");Gives the player the perk that will apply leveling aid perks based on worn statusGame.GetPlayer().AddPerk(MSGLevelingAid);Call the static functionMSGStaticLevelUp()EndEvent;This is a test script to level up your unarmored while casting spells and not wearing armor Event OnSpellCast()If Player.HasPerk(MSGUnarmoredLeveling)Game.AdvanceSkill("Lockpicking", 10.0)Debug.MessageBox("Skill Advancement is being triggered!")ElseDebug.MessageBox("OnSpellCast Event is being triggered, but seeing if the player has the perk is not being triggerd")EndIfEndEvent Function MSGStaticLevelUp();check to see if player is unarmoredif Player.HasPerk(MSGUnarmoredLeveling)Game.AdvanceSkill("Lockpicking",10.0);MSGUnarmoredLevelingMessage.Show()ElseIf Player.HasPerk(MSGMixedArmorLeveling)Game.AdvanceSkill("HeavyArmor",1.0)Game.AdvanceSkill("LightArmor",1.0);MSGMixedArmorLevelingMessage.Show()ElseIf Player.HasPerk(MSGHeavyArmorLevelingPure)Game.AdvanceSkill("HeavyArmor",2.0);MSGHeavyArmorLevelingMessage.Show()ElseIf Player.HasPerk(MSGLightArmorLevelingPure)Game.AdvanceSkill("LightArmor",2.0);MSGLightArmorLevelingMessage.Show()Else;Debug.MessageBox("None of your leveling aid perks have been applied")EndIfUtility.Wait(10.0)MSGStaticLevelUp()EndFunction This has successfully applied the "MSGLevelingAid" perk to the player, and then that perk applies an Ability which gives you any of the other 4 sub perks (MSGUnarmoredLeveling, etc.) based on your current armored status. I've successfully tested the recursion function I added to the script and it'll slowly level over time your Unarmored, Light Armor, or Heavy Armor based on what you're wearing, so I know the perks are working correctly. Perhaps the Event OnSpellCast() is not the best trigger for this script? I'll try adding an extra level to the recursion which will check to see if the player has the appropriate perk and is casting a spell, but I was trying to avoid having the script rerunning every second to see if you're casting.
  4. So, very new to scripting, made a basic script which *should* level up your lockpicking skill (which I've repurposed to an unarmored skill tree). Some background, I created a perk labeled "MSGUnarmoredLeveling" as a perk that does nothing, but is added to your perks any time you're not wearing armor. I've tested that this perk works correctly, and it is listed in my active effects while I am unarmored. Anyway, here is the script: Scriptname MSGUnarmoredLevelup extends Perk ;;;;;;;;;;;;;;;;;;;;;;;;;;Input:None so far;;Progresses the Unarmored skill by leveling lockpicking whenever;you cast a spell while unarmored;;;;;;;;;;;;;;;;;;;;;;;;;;Actor Property Player AutoPerk Property MSGUnarmoredLeveling Auto Event OnInit();Display WIP Message BoxDebug.MessageBox("The Unarmored skill line is currently a work in progress.")EndEvent;This is a test script to level up your unarmored while casting spells and not wearing armor Event OnSpellCast()If Player.HasPerk(MSGUnarmoredLeveling)Game.AdvanceSkill("Lockpicking", 10.0)Debug.MessageBox("Skill Advancement is being triggered!")ElseDebug.MessageBox("OnSpellCast Event is being triggered, but seeing if the player has the perk is not being triggerd")EndIfEndEvent I've assigned player property to PlayerRef and the perk to MSGUnarmoredLeveling in the creation kit, but when I cast a spell with MSGUnarmoredLeveling listed under my active effects, nothing happens. The OnInit messagebox appears when I start up the game, so I know the script is active somewhere, it just doesn't seem to be doing anything.Thanks a bunch for any help, and sorry if this is painfully obvious to everyone else!
  5. Howdy, I'm new to modding, and am working on a skill/perk overhaul (I know, big job for one of your first mods), and was wondering if there is a way to modify how a particular skill is leveled? I've figured out how to mod how quickly skills level via Actor Values, and I tried manually creating perks/spells/abilities that utilize the Value Modifier on XX advanceskill (which I found out after some research does nothing after patch 1.9 ><). Basically, I've repurposed lockpicking into an unarmored skill tree and am trying to create static effects that will advance lockpicking (or, rather, what I've made into unarmored) when I have no armor and am moving/attacking/casting/etc. Does anyone have any suggestions on the best way of going about doing that? My scripting skill is basically at the neophyte level, so if anyone knows any good tutorials that would help answer how to do that via scripts, I'll gladly read those as well. I couldn't find any online. Thanks!
×
×
  • Create New...