Jump to content

HappySlapp

Premium Member
  • Posts

    40
  • Joined

  • Last visited

Nexus Mods Profile

About HappySlapp

Profile Fields

  • Discord ID
    HappySlapp#6272
  • Country
    United States
  • Currently Playing
    Nothing in particular
  • Favourite Game
    Fallout: New Vegas

Recent Profile Visitors

7144 profile views

HappySlapp's Achievements

Enthusiast

Enthusiast (6/14)

  • First Post
  • Collaborator Rare
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Figured it out already, I forgot to initialize the structs: Function InitializeStructs() AmmoTypes = new AmmoType[128] AmmoTypes[0] = new AmmoType AmmoTypes[1] = new AmmoType AmmoTypes[2] = new AmmoType AmmoTypes[3] = new AmmoType AmmoTypes[4] = new AmmoType AmmoTypes[5] = new AmmoType AmmoTypes[6] = new AmmoType AmmoTypes[7] = new AmmoType AmmoTypes[8] = new AmmoType AmmoTypes[9] = new AmmoType AmmoTypes[10] = new AmmoType AmmoTypes[11] = new AmmoType AmmoTypes[12] = new AmmoType AmmoTypes[13] = new AmmoType AmmoTypes[14] = new AmmoType AmmoTypes[15] = new AmmoType AmmoTypes[16] = new AmmoType AmmoTypes[17] = new AmmoType AmmoTypes[18] = new AmmoType AmmoTypes[19] = new AmmoType AmmoTypes[20] = new AmmoType AmmoTypes[21] = new AmmoType AmmoTypes[22] = new AmmoType AmmoTypes[23] = new AmmoType AmmoTypes[24] = new AmmoType AmmoTypes[25] = new AmmoType AmmoTypes[26] = new AmmoType AmmoTypes[27] = new AmmoType AmmoTypes[28] = new AmmoType AmmoTypes[29] = new AmmoType AmmoTypes[30] = new AmmoType AmmoTypes[31] = new AmmoType AmmoTypes[32] = new AmmoType AmmoTypes[33] = new AmmoType AmmoTypes[34] = new AmmoType AmmoTypes[35] = new AmmoType AmmoTypes[36] = new AmmoType AmmoTypes[37] = new AmmoType AmmoTypes[38] = new AmmoType AmmoTypes[39] = new AmmoType AmmoTypes[40] = new AmmoType AmmoTypes[41] = new AmmoType AmmoTypes[42] = new AmmoType AmmoTypes[43] = new AmmoType AmmoTypes[44] = new AmmoType AmmoTypes[45] = new AmmoType AmmoTypes[46] = new AmmoType AmmoTypes[47] = new AmmoType AmmoTypes[48] = new AmmoType AmmoTypes[49] = new AmmoType AmmoTypes[50] = new AmmoType AmmoTypes[51] = new AmmoType AmmoTypes[52] = new AmmoType AmmoTypes[53] = new AmmoType EndFunction
  2. OOPS, ignore this one, the other one was my first post, kept getting errors trying to post it, but guess it did :confused:
  3. Hello, I need help with this particular function, I'm a fairly seasoned modder, but have never used this one before, I figured it wouldn't be too hard, but it's throwing all kinds of errors my way, is it my implementation? The Code: My Papyrus Log: It keeps returning 151211165 whenever I try and get the FormID of any formlist attached to a AmmoList in the AmmoType structs, I'm confused, but maybe it's something really simple I'm just not seeing, or maybe I'm just doing it wrong, I'm not sure, but any and all help would be greatly appreciated.
  4. Hello, I need help with this particular function, I'm a fairly seasoned modder, but have never used this one before, I figured it wouldn't be too hard, but it's throwing all kinds of errors my way, is it my implementation? The Code: My Papyrus Log: This particular line: [09/29/2023 - 01:18:18PM] [Requiem:Main <RequiemMain (09034C65)>]: 151211165Happens every time I try and print the FormID of any formlist attached to AmmoType.AmmoList, I'm out of ideas honestly, but maybe it's something simple I'm just not seeing.
  5. I use World Machine to make the map, and I lowered the brightness levels of the exported 16-bit .png in gimp and then exported to .raw (using 16-bit depth) and I ran it through TESAnnwyn, but everytime it's either flat, or like the Far Lands from Minecraft... I'm completely stumped.
  6. Got the script done for mutations, time to start making the mutations themselves!
  7. A sneak peek of the options I've added so far to the MCM, working on the Mutation system now!
  8. I'm currently working on an update to my premiere mod You Are SPECIAL which adds a slew of new perks, adds skills, and adds traits to enhance anyone's experience, made to be compatible with most mods, you can use it with almost any mod setup you want (Specific incompatibilities will be added as development continues) I've made this post to use as a sort of devlog so that anyone who may want to track the progress I'm making can go here. So far, I've outlined 7 potential perks to add/improve:
  9. And before anyone tells me. Yes, I'm aware of how much more difficult making a F4SE plugin is compared to regular scripting, but I really wanna try and learn it regardless... Only problem is that I can't find any sort of basic guide on how to even get started making a plugin, so can anyone help me get on the path to creating some plugins?
  10. Nevermind, figured it out. Turns out I accidentally set my manager quest to NOT start game enabled, hence why it wasn't firing off the events.
  11. I was working on a new update to my mod, and used the events like so: Event Actor.OnSit(Actor akSender, ObjectReference akFurniture) Debug.Trace(Self + ": Player used furniture '" + akFurniture.GetName() + "'") EndEvent Event Actor.OnGetUp(Actor akSender, ObjectReference akFurniture) Debug.Trace(Self + ": Player stopped using furniture '" + akFurniture.GetName() + "'") EndEvent I even registered them correctly: Function RegisterForNeeded() RegisterForMenuOpenCloseEvent("BarterMenu") RegisterForRemoteEvent(KillActorEvent, "OnStoryKillActor") RegisterForRemoteEvent(LockpickEvent, "OnStoryPickLock") RegisterForRemoteEvent(HackComputerEvent, "OnStoryHackTerminal") RegisterForRemoteEvent(PlayerRef, "OnSit") RegisterForRemoteEvent(PlayerRef, "OnGetUp") EndFunction Event OnQuestInit() InitializeAllSkills(SkillsArray) RegisterForNeeded() EndEvent I really need help here, because this will make or break a certain feature of my mod.
  12. Another quick question, do you think this script could cause "script bloat"?
  13. I need some help on what I think may be a potential memory leak waiting to happen, the problem is I don't know if it would or wouldn't actually cause a memory leak, here's the script that I'm concerned about: Scriptname zYAS_Manager_Skills Extends Quest Float Property TimerEventInterval = 1.0 Auto Int Property TimerEventID = 1 Auto {MCM EDITABLE VARIABLES} Float Property fSkillAttributeMult = 2.0 Auto Float Property fSkillsTagMult = 15.0 Auto ActorValue[] Property Attributes Auto Float[] Property AttributeValues Auto Struct SkillStruct String _id ActorValue _skill ActorValue _attribute Float _skillBase Float _attributeBase Float _attributeValue ActorValue _skillEffect EndStruct SkillStruct[] Property SkillsArray Auto Function RegisterNewSkill(String asID, ActorValue avSkill, ActorValue avAttribute) SkillStruct _newSkill = new SkillStruct _newSkill._id = asID _newSkill._skill = avSkill _newSkill._attribute = avAttribute SkillsArray.Add(_newSkill) EndFunction SkillStruct Function GetSkillStruct(String asID) Int _index = SkillsArray.FindStruct("_id", asID, 0) Return SkillsArray[_index] EndFunction SkillStruct[] Function GetSkillStructsByAttribute(ActorValue avAttribute) Int _index = 0 SkillStruct[] _returnStruct = new SkillStruct[0] While (_index < SkillsArray.Length) If (SkillsArray[_index]._attribute == avAttribute) _returnStruct.Add(SkillsArray[_index]) EndIf _index += 1 EndWhile Return _returnStruct EndFunction Function ReevaluateSkill(String asID) Int _index = SkillsArray.FindStruct("_id", asID, 0) SkillStruct _thisSkill = SkillsArray[_index] Float _difference = 0 If (_thisSkill._attributeBase != Game.GetPlayer().GetBaseValue(_thisSkill._attribute) * fSkillAttributeMult) _difference = -(_thisSkill._attributeBase - Game.GetPlayer().GetBaseValue(_thisSkill._attribute) * fSkillAttributeMult) _thisSkill._attributeBase = Game.GetPlayer().GetBaseValue(_thisSkill._attribute) * fSkillAttributeMult EndIf If (_thisSkill._skillBase != Game.GetPlayer().GetBaseValue(_thisSkill._skill) + _difference) _thisSkill._skillBase = Game.GetPlayer().GetBaseValue(_thisSkill._skill) + _difference EndIf If (_difference != 0) Debug.Trace(_difference) _difference = 0 EndIf Game.GetPlayer().SetValue(_thisSkill._skill, _thisSkill._skillBase) If (_thisSkill._attributeValue != (Game.GetPlayer().GetBaseValue(_thisSkill._attribute) - Game.GetPlayer().GetValue(_thisSkill._attribute)) * fSkillAttributeMult) _difference = (_thisSkill._attributeValue - (Game.GetPlayer().GetBaseValue(_thisSkill._attribute) - Game.GetPlayer().GetValue(_thisSkill._attribute)) * fSkillAttributeMult) _thisSkill._attributeValue = (Game.GetPlayer().GetBaseValue(_thisSkill._attribute) - Game.GetPlayer().GetValue(_thisSkill._attribute)) * fSkillAttributeMult EndIf If (_difference != 0) Debug.Trace(_difference) Game.GetPlayer().ModValue(_thisSkill._skill, _difference) EndIf If (Game.GetPlayer().GetValue(_thisSkill._skillEffect) != (Game.GetPlayer().GetValue(_thisSkill._skill))) Game.GetPlayer().SetValue(_thisSkill._skillEffect, Game.GetPlayer().GetValue(_thisSkill._skill) * 0.01) EndIf EndFunction Function ReevaluateSkillsByAttribute(ActorValue avAttribute) SkillStruct[] _theseStructs = GetSkillStructsByAttribute(avAttribute) Int _index = 0 While (_index < _theseStructs.Length) ReevaluateSkill(_theseStructs[_index]._id) _index += 1 EndWhile EndFunction Function CheckAttributesForChange() Int _index = 0 While (_index < Attributes.Length) If (AttributeValues[_index] != Game.GetPlayer().GetValue(Attributes[_index])) ReevaluateSkillsByAttribute(Attributes[_index]) EndIf _index += 1 EndWhile EndFunction Event OnQuestInit() StartTimer(TimerEventInterval, TimerEventID) EndEvent Event OnQuestShutdown() CancelTimer(TimerEventID) EndEvent Event OnTimer(Int iTimerID) If (iTimerID == TimerEventID) CheckAttributesForChange() EndIf StartTimer(TimerEventInterval, TimerEventID) EndEvent I'm more specifically concerned about one section in particular: SkillStruct[] Function GetSkillStructsByAttribute(ActorValue avAttribute) Int _index = 0 SkillStruct[] _returnStruct = new SkillStruct[0] While (_index < SkillsArray.Length) If (SkillsArray[_index]._attribute == avAttribute) _returnStruct.Add(SkillsArray[_index]) EndIf _index += 1 EndWhile Return _returnStruct EndFunction And even more specifically, this line in particular: SkillStruct[] _returnStruct = new SkillStruct[0] I'm afraid it's actually legitimately creating a new copy of "SkillStruct" every single time that line is ran, would this be the case, or would the function automatically discard it from memory in some way? Any help would be GREATLY appreciated.
×
×
  • Create New...