-
Posts
43 -
Joined
-
Last visited
Everything posted by HappySlapp
-
Had the same problem, there should be a folder with your worldspace's name inside the folder with your mod's name when the window to save opens, gotta save it to that folder. EDIT: You have to save the .btd somewhere else, then you close the CK and copy paste the .btd into the Terrain folder, it's the only way it seems.
-
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
-
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.
-
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.
-
[Devlog] You Are SPECIAL | Perks | Skills | Traits
HappySlapp replied to HappySlapp's topic in Fallout 4's Discussion
Got the script done for mutations, time to start making the mutations themselves! -
[Devlog] You Are SPECIAL | Perks | Skills | Traits
HappySlapp replied to HappySlapp's topic in Fallout 4's Discussion
A sneak peek of the options I've added so far to the MCM, working on the Mutation system now! -
[Devlog] You Are SPECIAL | Perks | Skills | Traits
HappySlapp replied to HappySlapp's topic in Fallout 4's Discussion
Got another bunch of perks outlined: -
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:
-
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?
-
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.
-
Need information/help on my script
HappySlapp replied to HappySlapp's topic in Fallout 4's Creation Kit and Modders
Thanks for the info, both of you :D- 5 replies
-
- information
- help
- (and 6 more)
-
Need information/help on my script
HappySlapp replied to HappySlapp's topic in Fallout 4's Creation Kit and Modders
Another quick question, do you think this script could cause "script bloat"?- 5 replies
-
- information
- help
- (and 6 more)
-
Need information/help on my script
HappySlapp posted a topic in Fallout 4's Creation Kit and Modders
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.- 5 replies
-
- information
- help
- (and 6 more)
-
Nevermind, I actually got it to work, I accidentally called the "InitializeChallengeDescriptions" function in my YASMain script as well, it got confused and did it two times in one go.
- 8 replies
-
- description
- compiler
-
(and 2 more)
Tagged with:
-
Okay, this is really weird, I changed the iIndex == akChallenge.Reward.GetSize() to iIndex == akChallenge.Reward.GetSize() - 1 and yet it's now duplicating both items in the formlist. I really don't get how that's happening.
- 8 replies
-
- description
- compiler
-
(and 2 more)
Tagged with:
-
Like say I have 6 stimpaks in the first reward sublist, and I have 1 military duct tape in the second sublist, it ALWAYS duplicates the second one.
- 8 replies
-
- description
- compiler
-
(and 2 more)
Tagged with:
-
The last Formlist within the Rewards Formlist. It contains a GlobalVariable which determines the amount of the reward, and a form in the second index which is the object given. It always seems to duplicate the information from the last index of the Rewards Formlist.
- 8 replies
-
- description
- compiler
-
(and 2 more)
Tagged with:
-
I made fully working runtime description compiler for challenges I'm adding to my mod, but one thing is a bit off, it compiles it just fine with the number of items and the name of the object, but it always one more of the last object in the list, despite it seeming like it shouldn't be doing that, here's the script: Scriptname YAS_Script_ChallengesManager extends Quest YAS_Script_Main Property YASMain Auto Struct ChallengeStruct String ChallengeID Message Description Int TokenReward Formlist Reward String RewardDescription Int CurrentRank GlobalVariable MaxRank EndStruct ChallengeStruct[] Property ChallengeArray Auto Event OnQuestInit() InitializeChallengeDescriptions(ChallengeArray) EndEvent Message Function GetChallengeDescription(String akID) Int iStructIndex = ChallengeArray.FindStruct("ChallengeID", akID, 0) Message _description = ChallengeArray[iStructIndex].Description Return _description EndFunction String Function GetChallengeRewardDescription(String akID) Int iStructIndex = ChallengeArray.FindStruct("ChallengeID", akID, 0) String _rewardDescription = ChallengeArray[iStructIndex].RewardDescription Return _rewardDescription EndFunction Function InitializeChallengeDescriptions(ChallengeStruct[] akChallenges) Int iArrayIndex = 0 While (iArrayIndex < akChallenges.Length) ChallengeStruct akChallenge = akChallenges[iArrayIndex] akChallenge.RewardDescription = "Rewards:<br><br>" Int iIndex = 0 While (iIndex < akChallenge.Reward.GetSize()) If (iIndex != akChallenge.Reward.GetSize()) If (((akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(0) as GlobalVariable).GetValueInt() > 1) akChallenge.RewardDescription += (((akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(0) as GlobalVariable).GetValueInt() + " " + (akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(1).GetName() + "s, ") ElseIf (((akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(0) as GlobalVariable).GetValueInt() == 1) akChallenge.RewardDescription += (((akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(0) as GlobalVariable).GetValueInt() + " " + (akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(1).GetName() + ", ") EndIf ElseIf (iIndex == akChallenge.Reward.GetSize()) If (((akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(0) as GlobalVariable).GetValueInt() > 1) akChallenge.RewardDescription += (((akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(0) as GlobalVariable).GetValueInt() + " " + (akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(1).GetName() + "s") ElseIf (((akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(0) as GlobalVariable).GetValueInt() == 1) akChallenge.RewardDescription += (((akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(0) as GlobalVariable).GetValueInt() + " " + (akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(1).GetName()) EndIf EndIf iIndex += 1 EndWhile iArrayIndex += 1 EndWhile EndFunction The part of the script where it compiles the descriptions of all challenges is here: Function InitializeChallengeDescriptions(ChallengeStruct[] akChallenges) Int iArrayIndex = 0 While (iArrayIndex < akChallenges.Length) ChallengeStruct akChallenge = akChallenges[iArrayIndex] akChallenge.RewardDescription = "Rewards:<br><br>" Int iIndex = 0 While (iIndex < akChallenge.Reward.GetSize()) If (iIndex != akChallenge.Reward.GetSize()) If (((akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(0) as GlobalVariable).GetValueInt() > 1) akChallenge.RewardDescription += (((akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(0) as GlobalVariable).GetValueInt() + " " + (akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(1).GetName() + "s, ") ElseIf (((akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(0) as GlobalVariable).GetValueInt() == 1) akChallenge.RewardDescription += (((akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(0) as GlobalVariable).GetValueInt() + " " + (akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(1).GetName() + ", ") EndIf ElseIf (iIndex == akChallenge.Reward.GetSize()) If (((akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(0) as GlobalVariable).GetValueInt() > 1) akChallenge.RewardDescription += (((akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(0) as GlobalVariable).GetValueInt() + " " + (akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(1).GetName() + "s") ElseIf (((akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(0) as GlobalVariable).GetValueInt() == 1) akChallenge.RewardDescription += (((akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(0) as GlobalVariable).GetValueInt() + " " + (akChallenge.Reward.GetAt(iIndex) as Formlist).GetAt(1).GetName()) EndIf EndIf iIndex += 1 EndWhile iArrayIndex += 1 EndWhile EndFunction Anyone have any advice on what I might've done wrong? I feel like it should be working.
- 8 replies
-
- description
- compiler
-
(and 2 more)
Tagged with: