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...

fortunequacker

Allies
  • Posts

    2
  • Joined

  • Last visited

About fortunequacker

  • Birthday 02/15/1967

Profile Information

  • Gender
    Male
  • Location
    Oklahoma

Contact Methods

  • Steam
    ViralGamer

fortunequacker's Achievements

Layman

Layman (1/11)

0

Reputation

  1. The line in the code that is larger font seems to be the offending piece. The code compiles and runs and does everything except this line. All I need is for this object to be removed from the player's inventory. I have already determined (Thanks WilleSea) that mySelf/Self referes to the script in this case and not the item to which the code is attached. Any ideas how to accomplish this goal. If I can get this to work, it will eliminate the problem where you buy too much from the vendor, causing their max gold limit to exceed. If you have ever seen this situation, you end up selling all your stuff and not getting any gold for it. It's not fun. What this code does is turn any gold over a set amount in the vendors inventory, into Skyrim "Septimus Notes" (Paper Money). You can then buy these from the vendor and resupply them with gold. When you drop the "Septimus Note" and then pick it back up, it converts it back to Gold Septims. It's a somewhat immersive way to eliminate one of the problems Bethesda made for us by putting limits on the amount of gold a vendor can have. More likely, they just used the wrong data type for the variable that tracks this value. Not sure. Anyway, any suggestions anyone could offer will help me get this mod out sooner. Scriptname FQSeptimusNoteExchangeScript extends ObjectReference import debug import utility miscobject Property GoldRef Auto Int Property maxVendorGold Auto miscobject Property FQ100KSeptimusNote Auto miscobject Property FQ50KSeptimusNoteSkyrim Auto miscobject Property FQ40KSeptimusNoteSKYRIM Auto miscobject Property FQ30KSeptimusNoteSKYRIM Auto miscobject Property FQ20KSeptimusNoteSKYRIM Auto miscobject Property FQ10KSeptimusNoteSKYRIM Auto miscobject Property FQ5KSeptimusNoteSkyrim Auto miscobject Property FQ4KSeptimusNoteSkyrim Auto miscobject Property FQ3KSeptimusNoteSkyrim Auto miscobject Property FQ2KSeptimusNoteSkyrim Auto miscobject Property FQ1KSeptimusNoteSkyrim Auto MiscObject Property FQSPENTSeptimusNoteSkyrim Auto MiscObject property coinObj auto Int property coinAmt auto MiscObject mySelf auto State Waiting Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) mySelf = self.getBaseObject() as MiscObject Debug.Notification("OnItemChangedContainer") Debug.Notification("akOldContainer = " + akOldContainer); None Debug.Notification("akNewContainer = " + akNewContainer); ObjectReference if akNewContainer == Game.GetPlayer() Debug.Notification("akNewContainer == Game.GetPlayer()") if !akOldContainer Debug.Notification("!akOldContainer") gotoState("done") int numOfCoins = coinAmt [size=6] game.getplayer().removeitem(mySelf, 1, abSilent = true)[/size] game.getPlayer().addItem(coinObj, numOfCoins) game.getPlayer().addItem(FQSPENTSeptimusNoteSkyrim,1, abSilent = false) elseif akOldContainer Debug.Notification("akOldContainer") SeptimusNoteExchange(akOldContainer) endif endif endEvent endState State done ;do nothing endState Function SeptimusNoteExchange(ObjectReference akTargetRef) Debug.Notification("Now we're debuggin the SeptimusNoteExchange function!") ObjectReference VendorRef = akTargetRef int currentVendorGold = VendorRef.GetItemCount(GoldRef) int amtOverMaxVendorGold = currentVendorGold - maxVendorGold Debug.Notification("The amtOverMaxVendorGold is " + amtOverMaxVendorGold) while amtOverMaxVendorGold >= 1000 if amtOverMaxVendorGold >= 100000 VendorRef.additem(FQ100KSeptimusNote, 1, false) VendorRef.removeitem(GoldRef, 100000, false) amtOverMaxVendorGold = amtOverMaxVendorGold - 100000 endif if amtOverMaxVendorGold >= 50000 VendorRef.additem(FQ50KSeptimusNoteSkyrim, 1, false) VendorRef.removeitem(GoldRef, 50000, false) amtOverMaxVendorGold = amtOverMaxVendorGold - 50000 endif if amtOverMaxVendorGold >= 40000 VendorRef.additem(FQ40KSeptimusNoteSKYRIM, 1, false) VendorRef.removeitem(GoldRef, 40000, false) amtOverMaxVendorGold = amtOverMaxVendorGold - 40000 endif if amtOverMaxVendorGold >= 30000 VendorRef.additem(FQ30KSeptimusNoteSKYRIM, 1, false) VendorRef.removeitem(GoldRef, 30000, false) amtOverMaxVendorGold = amtOverMaxVendorGold - 30000 endif if amtOverMaxVendorGold >= 20000 VendorRef.additem(FQ20KSeptimusNoteSKYRIM, 1, false) VendorRef.removeitem(GoldRef, 20000, false) amtOverMaxVendorGold = amtOverMaxVendorGold - 20000 endif if amtOverMaxVendorGold >= 10000 VendorRef.additem(FQ10KSeptimusNoteSKYRIM, 1, false) VendorRef.removeitem(GoldRef, 10000, false) amtOverMaxVendorGold = amtOverMaxVendorGold - 10000 endif if amtOverMaxVendorGold >= 5000 VendorRef.additem(FQ5KSeptimusNoteSkyrim, 1, false) VendorRef.removeitem(GoldRef, 5000, false) amtOverMaxVendorGold = amtOverMaxVendorGold - 5000 endif if amtOverMaxVendorGold >= 4000 VendorRef.additem(FQ4KSeptimusNoteSkyrim, 1, false) VendorRef.removeitem(GoldRef, 4000, false) amtOverMaxVendorGold = amtOverMaxVendorGold - 4000 endif if amtOverMaxVendorGold >= 3000 VendorRef.additem(FQ3KSeptimusNoteSkyrim, 1, false) VendorRef.removeitem(GoldRef, 3000, false) amtOverMaxVendorGold = amtOverMaxVendorGold - 3000 endif if amtOverMaxVendorGold >= 2000 VendorRef.additem(FQ2KSeptimusNoteSkyrim, 1, false) VendorRef.removeitem(GoldRef, 2000, false) amtOverMaxVendorGold = amtOverMaxVendorGold - 2000 endif if amtOverMaxVendorGold >= 1000 VendorRef.additem(FQ1KSeptimusNoteSkyrim, 1, false) VendorRef.removeitem(GoldRef, 1000, false) amtOverMaxVendorGold = amtOverMaxVendorGold - 1000 else Debug.Notification("The amtOverMaxVendorGold is less than 1000 at " + amtOverMaxVendorGold) endif endwhile EndFunction
  2. In my experience, forceav perma sets the av, while modav is temporary and shows up in the ui as red when the modded av is less than the base av and green when more than base. So, I am in agreement with WillieSea. IMHO you should try a function that uses modav to change your values. Pass the function a param that lets it know you are either equipping or unequipping and then just call the function from your onEquip and onUnEquip event. I'm at work, so can't compile/test, but maybe something like this. Scriptname WerewolfAmulet002 extends ObjectReference Race Property WerewolfBeastRace Auto GlobalVariable Property WasWerewolf Auto Armor Property Amulet Auto float BaseHealth float BaseDResist float BaseUnarmed float BaseMResist float BaseHealRate float Property HealthMod Auto ; 100 float Property DResistMod Auto ; 200 float Property UnarmedMod Auto ; 25 float Property MResistMod Auto ; 35 float Porperty HRateMod Auto ; ?? int isWerewolfBeastRace int isActorPlayer Event OnEquipped(Actor akActor) modAV(akActor) endEvent Event OnUnequipped(Actor akActor) modAV(akActor) EndEvent Function modAV(Actor akActor) {Augments Base Actor Values if Player is in WerewolfBeastRace Form.} if isActorPlayer(akActor) setBaseAV(akActor) akActor.ModAV("Health", BaseHealth + (isWerewolfBeastRace(akActor) * HealthMod)) akActor.ModAV("DamageResist", BaseDResist + (isWerewolfBeastRace(akActor) * DResistMod)) akActor.ModAv("UnarmedDamage", BaseUnarmed + (isWerewolfBeastRace(akActor) * UnarmedMod)) akActor.ModAV("MagicResist", BaseMResist + (isWerewolfBeastRace(akActor) * MResistMod)) akActor.ModAV("HealRate", BaseHealRate + (isWerewolfBeastRace(akActor) * HRateMod)) endif EndFunction Function isWerewolfBeastRace(Actor akActor) isWerewolfBeastRace = -1 If akActor.GetRace()==WerewolfBeastRace isWerewolfBeastRace = 1 End If EndFunction Function isActorPlayer(Actor akActor) isActorPlayer = 0 if akActor == Game.getPlayer() isActorPlayer = 1 endif End Function Function setBaseAV(Actor akActor) BaseHealth = akActor.GetBaseActorValue("Health") as Float BaseDResist = akActor.GetBaseActorValue("DamageResist") as Float BaseUnarmed = akActor.GetBaseActorValue("UnarmedDamage") as Float BaseMResist = akActor.GetBaseActorValue("MagicResist") as Float EndFunction
×
×
  • Create New...