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

Pacmasian

Allies
  • Posts

    13
  • Joined

  • Last visited

  • Days Won

    2

Pacmasian last won the day on August 17 2013

Pacmasian had the most liked content!

Pacmasian's Achievements

Novice

Novice (2/11)

4

Reputation

  1. Thanks, I was thinking that the Actor Values only covered Skills for some reason- I've actually used GetActorValuePercentage before! Thanks a lot, now all I need is an event, which I should be able to track down myself.
  2. Hey, I was just wondering if there was any way to get the amount of stamina an actor has (in percentage form). I'd like to have a script which increases magicka regeneration depending on how full the stamina bar is. I'm guessing that it'd include use of a few spells that change magicka regeneration depending on, for example, if the actor is above or below half stamina. My end goal is to have stamina regeneration dependent on health percentage, and magicka regeneration dependent on stamina percentage.
  3. The variables are defined underneath my Properties: Float PercentArmorSkillHeavy Float ArmorSkillHeavyBonus It returns no errors when compiling at all, it just gives me 19 in-game. I had Debug.MessageBox lines in there to check up on the values, and removed them after to keep it clean.
  4. I tried spacing, but it didn't help. Spacing in Papyrus doesn't matter except in special cases? Anyway, I tried cutting down my script to help me see where the error is (I have the full copy as a back-up), and for some reason it flat-out refuses to multiply my values. ArmorSkillHeavyBonus calculates correctly as 1.44444 when at 100 Heavy Armor, and GauntletsArmorRatingHeavy returns 18, so why does it only give 19 when I ask them to multiply? It should be at 26. EDIT: All variables are defined outside the Event to make it easier to read. BonusHeavy is a Float. Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference) If (akBaseObject as Armor).GetSlotMask()==8 Armor Gauntlets = Game.GetPlayer().GetWornForm(0x00000008) as Armor If Game.GetPlayer().HasPerk(FistsOfSteel) Int WeightClass = Gauntlets.GetWeightClass() If (WeightClass == 0) BonusClass = 0 ArmorSkillHeavy = (Game.GetPlayer().GetAV("HeavyArmor")) as Int PercentArmorSkillHeavy = (ArmorSkillHeavy * 0.00444444444) as Float ArmorSkillHeavyBonus = (PercentArmorSkillHeavy + 1) as Float GauntletsArmorRatingHeavy = Gauntlets.GetArmorRating() as Float BonusHeavy = (GauntletsArmorRatingHeavy * ArmorSkillHeavyBonus) NegativeHeavy = (0-BonusHeavy) Self.ModAV("UnarmedDamage", BonusHeavy) EndIf EndIf EndIf EndEvent Event OnObjectUnequipped(Form akBaseObject, ObjectReference akReference) If (akBaseObject as Armor).GetSlotMask()==8 If (BonusClass == 0) Self.ModAV("UnarmedDamage", NegativeHeavy) EndIf EndIf EndEvent
  5. Ah, I didn't know I had to space it out. What do you mean by displaying each variable? Thanks again WillieSea.
  6. So I tried it out, and finally got it to remove the bonus upon unequipping gauntlets. (The problem was that I was asking it to calculate what Bonus to take off based on the armor class of the equipped gauntlets, which were obviously just UNequipped). I got around this with a new Int, BonusClass, and it works fine. The only problem is that it doesn't like my maths. I got the formula from the UESP for Armor rating: Armor rating = (base armor rating + item quality) × (1 + 0.4 × (skill + skill effect)/100) × (1 + unison perk†+ Matching Set) × (1 + armor perk‡) But when I try it out in-game, it only ever returns the same value. My code is below, I really can't see what is going wrong. Scriptname PACFistsOfSteel extends Actor Perk Property FistsOfSteel Auto Perk Property WellFitted Auto Perk Property MatchingSetHeavy Auto Perk Property Juggernaut80 Auto Perk Property Juggernaut60 Auto Perk Property Juggernaut40 Auto Perk Property Juggernaut20 Auto Perk Property Juggernaut00 Auto Perk Property CustomFit Auto Perk Property MatchingSetLight Auto Perk Property AgileDefender80 Auto Perk Property AgileDefender60 Auto Perk Property AgileDefender40 Auto Perk Property AgileDefender20 Auto Perk Property AgileDefender00 Auto Int BonusHeavy Int NegativeHeavy Int BonusLight Int NegativeLight Int BonusClass Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference) If (akBaseObject as Armor).GetSlotMask()==8 Armor Gauntlets = Game.GetPlayer().GetWornForm(0x00000008) as Armor If Game.GetPlayer().HasPerk(FistsOfSteel) Int WeightClass = Gauntlets.GetWeightClass() If (WeightClass == 0) Int ArmorSkillHeavy = (Game.GetPlayer().GetAV("HeavyArmor")) as Int BonusClass = 0 Float UnisonHeavy Float MatchingHeavy Float ArmorPerkHeavy If Game.Getplayer().HasPerk(WellFitted) UnisonHeavy = 0.25 Else UnisonHeavy = 0 EndIf If Game.Getplayer().HasPerk(MatchingSetHeavy) MatchingHeavy = 0.25 Else MatchingHeavy = 0 EndIf If Game.Getplayer().HasPerk(Juggernaut80) ArmorPerkHeavy = 2 ElseIf (Game.Getplayer().HasPerk(Juggernaut60)) ArmorPerkHeavy = 1.8 ElseIf (Game.Getplayer().HasPerk(Juggernaut40)) ArmorPerkHeavy = 1.6 ElseIf (Game.Getplayer().HasPerk(Juggernaut20)) ArmorPerkHeavy = 1.4 ElseIf (Game.Getplayer().HasPerk(Juggernaut00)) ArmorPerkHeavy = 1.2 Else ArmorPerkHeavy = 1 EndIf BonusHeavy = (Gauntlets.GetArmorRating()*(1+0.004*ArmorSkillHeavy)*(1+UnisonHeavy+MatchingHeavy)*(ArmorPerkHeavy)) as Int NegativeHeavy = (0-BonusHeavy) Self.ModAV("UnarmedDamage", BonusHeavy) ElseIf (WeightClass == 1) Int ArmorSkillLight = (Game.GetPlayer().GetAV("LightArmor")) as Int BonusClass = 1 Float UnisonLight Float MatchingLight Float ArmorPerkLight If Game.Getplayer().HasPerk(CustomFit) UnisonLight = 0.25 Else UnisonLight = 0 EndIf If Game.Getplayer().HasPerk(MatchingSetLight) MatchingLight = 0.25 Else MatchingLight = 0 EndIf If Game.Getplayer().HasPerk(AgileDefender80) ArmorPerkLight = 2 ElseIf (Game.Getplayer().HasPerk(AgileDefender60)) ArmorPerkLight = 1.8 ElseIf (Game.Getplayer().HasPerk(AgileDefender40)) ArmorPerkLight = 1.6 ElseIf (Game.Getplayer().HasPerk(AgileDefender20)) ArmorPerkLight = 1.4 ElseIf (Game.Getplayer().HasPerk(AgileDefender00)) ArmorPerkLight = 1.2 Else ArmorPerkLight = 1 EndIf BonusLight = (Gauntlets.GetArmorRating()*(1+0.004*ArmorSkillLight)*(1+UnisonLight+MatchingLight)*(ArmorPerkLight)) as Int NegativeLight = (0-BonusLight) Self.ModAV("UnarmedDamage", BonusLight) EndIf EndIf EndIf EndEvent Event OnObjectUnequipped(Form akBaseObject, ObjectReference akReference) If (akBaseObject as Armor).GetSlotMask()==8 If (BonusClass == 0) Self.ModAV("UnarmedDamage", NegativeHeavy) ElseIf (BonusClass == 1) Self.ModAV("UnarmedDamage", NegativeLight) EndIf EndIf EndEvent
  7. Ah, so I should fully split Heavy and Light variables, and keep the single BonusHeavy instead of recalculating? I'll give that a go, thanks! Sorry, btw, this is my first script.
  8. This is my code, if anyone was wondering. Any help would be appreciated. Scriptname PACFistsOfSteel extends Actor Perk Property FistsOfSteel Auto Perk Property WellFitted Auto Perk Property MatchingSetHeavy Auto Perk Property Juggernaut80 Auto Perk Property Juggernaut60 Auto Perk Property Juggernaut40 Auto Perk Property Juggernaut20 Auto Perk Property Juggernaut00 Auto Perk Property CustomFit Auto Perk Property MatchingSetLight Auto Perk Property AgileDefender80 Auto Perk Property AgileDefender60 Auto Perk Property AgileDefender40 Auto Perk Property AgileDefender20 Auto Perk Property AgileDefender00 Auto Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference) If (akBaseObject as Armor).GetSlotMask()==8 Armor Gauntlets = Game.GetPlayer().GetWornForm(0x00000008) as Armor If Game.GetPlayer().HasPerk(FistsOfSteel) Int WeightClass = Gauntlets.GetWeightClass() If (WeightClass == 0) Int ArmorSkill = (Game.GetPlayer().GetAV("HeavyArmor")) as Int Float Unison Float Matching Float ArmorPerk If Game.Getplayer().HasPerk(WellFitted) Unison = 0.25 Else Unison = 0 EndIf If Game.Getplayer().HasPerk(MatchingSetHeavy) Matching = 0.25 Else Matching = 0 EndIf If Game.Getplayer().HasPerk(Juggernaut80) ArmorPerk = 1 ElseIf (Game.Getplayer().HasPerk(Juggernaut60)) ArmorPerk = 0.8 ElseIf (Game.Getplayer().HasPerk(Juggernaut40)) ArmorPerk = 0.6 ElseIf (Game.Getplayer().HasPerk(Juggernaut20)) ArmorPerk = 0.4 ElseIf (Game.Getplayer().HasPerk(Juggernaut00)) ArmorPerk = 0.2 Else ArmorPerk = 0 EndIf Int Bonus = (Gauntlets.GetArmorRating()*(1+0.004*ArmorSkill)*(1+Unison+Matching)*(1+ArmorPerk)) as Int Self.ModAV("UnarmedDamage", Bonus) ElseIf (WeightClass == 1) Int ArmorSkill = (Game.GetPlayer().GetAV("LightArmor")) as Int Float Unison Float Matching Float ArmorPerk If Game.Getplayer().HasPerk(CustomFit) Unison = 0.25 Else Unison = 0 EndIf If Game.Getplayer().HasPerk(MatchingSetLight) Matching = 0.25 Else Matching = 0 EndIf If Game.Getplayer().HasPerk(AgileDefender80) ArmorPerk = 1 ElseIf (Game.Getplayer().HasPerk(AgileDefender60)) ArmorPerk = 0.8 ElseIf (Game.Getplayer().HasPerk(AgileDefender40)) ArmorPerk = 0.6 ElseIf (Game.Getplayer().HasPerk(AgileDefender20)) ArmorPerk = 0.4 ElseIf (Game.Getplayer().HasPerk(AgileDefender00)) ArmorPerk = 0.2 Else ArmorPerk = 0 EndIf Int Bonus = (Gauntlets.GetArmorRating()*(1+0.004*ArmorSkill)*(1+Unison+Matching)*(1+ArmorPerk)) as Int Self.ModAV("UnarmedDamage", Bonus) EndIf EndIf EndIf EndEvent Event OnObjectUnequipped(Form akBaseObject, ObjectReference akReference) If (akBaseObject as Armor).GetSlotMask()==8 Armor Gauntlets = Game.GetPlayer().GetWornForm(0x00000008) as Armor If Game.GetPlayer().HasPerk(FistsOfSteel) Int WeightClass = Gauntlets.GetWeightClass() If (WeightClass == 0) Int ArmorSkill = (Game.GetPlayer().GetAV("HeavyArmor")) as Int Float Unison Float Matching Float ArmorPerk If Game.Getplayer().HasPerk(WellFitted) Unison = 0.25 Else Unison = 0 EndIf If Game.Getplayer().HasPerk(MatchingSetHeavy) Matching = 0.25 Else Matching = 0 EndIf If Game.Getplayer().HasPerk(Juggernaut80) ArmorPerk = 1 ElseIf (Game.Getplayer().HasPerk(Juggernaut60)) ArmorPerk = 0.8 ElseIf (Game.Getplayer().HasPerk(Juggernaut40)) ArmorPerk = 0.6 ElseIf (Game.Getplayer().HasPerk(Juggernaut20)) ArmorPerk = 0.4 ElseIf (Game.Getplayer().HasPerk(Juggernaut00)) ArmorPerk = 0.2 Else ArmorPerk = 0 EndIf Int Bonus = (Gauntlets.GetArmorRating()*(1+0.004*ArmorSkill)*(1+Unison+Matching)*(1+ArmorPerk)) as Int Self.ModAV("UnarmedDamage", 0 - Bonus) ElseIf (WeightClass == 1) Int ArmorSkill = (Game.GetPlayer().GetAV("LightArmor")) as Int Float Unison Float Matching Float ArmorPerk If Game.Getplayer().HasPerk(CustomFit) Unison = 0.25 Else Unison = 0 EndIf If Game.Getplayer().HasPerk(MatchingSetLight) Matching = 0.25 Else Matching = 0 EndIf If Game.Getplayer().HasPerk(AgileDefender80) ArmorPerk = 1 ElseIf (Game.Getplayer().HasPerk(AgileDefender60)) ArmorPerk = 0.8 ElseIf (Game.Getplayer().HasPerk(AgileDefender40)) ArmorPerk = 0.6 ElseIf (Game.Getplayer().HasPerk(AgileDefender20)) ArmorPerk = 0.4 ElseIf (Game.Getplayer().HasPerk(AgileDefender00)) ArmorPerk = 0.2 Else ArmorPerk = 0 EndIf Int Bonus = (Gauntlets.GetArmorRating()*(1+0.004*ArmorSkill)*(1+Unison+Matching)*(1+ArmorPerk)) as Int Self.ModAV("UnarmedDamage", 0 - Bonus) EndIf EndIf EndIf EndEvent
  9. Thanks WillieSea. Unfortunately, I tried that last night and it didn't work either... Actually, it worked once. I was Equipping and Unequipping in-game to test it out, and my unarmed damage was bumped up to ~120, then down to ~100 (one -Bonus worth) and then it didn't go down again. Is my script taking too long to run?
  10. I'm trying to fix the Fists Of Steel perks by editing the player's unarmed damage through Self.Modav("Unarmeddamage" Bonus) where Bonus is a complicated variable. I've set it to an OnObjectEquipped event, and it works fine. (Just to be clear, the script is on the Player Actor, not the Perk). The problem is that I also have a Self.Modav("Unarmeddamage" -Bonus) that's on a OnObjectUNequipped event, and it doesn't do anything at all. Now, I know that the minus sign DOES make a difference, cause if I leave the minus out it just adds the bonus again when I unequip. But it absolutely does not actually minus anything when I put the minus in, just stops it from adding twice. Player.getavinfo unarmeddamage returns the same amount before and after unequipping the gauntlets. Am I missing something about maths in papyrus?
  11. I am trying to implement a few different things. First of all, is it possibly to tie stamina regeneration onto health percentage, and mackiga regeneration onto stamina percentage? Second, I'm trying to make it so that attacking uses up stamina. Now, I've thought about just editing each weapon so that when swung it takes down stamina, but want to know if I can just add something to calculate weapon weight and reduce stamina automatically. Finally, I want to do this to blocking too... A stamina cost to start blocking, and an ongoing cost to hold a block. I have a load more things I want to do, mainly based around stamina, but these are the most important. How far can I go along these lines? I'm not looking for someone to write this for me, just someone to tell me how if it is possible. I'm still learning.
  12. Thanks, donnato. I hope so!
  13. So, I gathered I am supposed to come over here and say hi to everyone. I just found this site, looking for help with scripting, and am glad that a community like this exists. I got into modding because whenever I play a game I always think "You know what would be great? If you could...etc" I got started with a simple perk-replacer, but my end goal is to have a massive overhaul up, akin to Requiem and SkyRe and coloured by both. At the moment, I don't know much scripting (I've just read through the tutorials on CK and Cipscis) but I am a fast learner as long as I can keep up my motivation. I look forward to being a part of this community.
×
×
  • Create New...