Jump to content

shatsnazzle

Members
  • Posts

    67
  • Joined

  • Last visited

Everything posted by shatsnazzle

  1. Haha I think you're right about the grenade. Check Pickpocket02 in the perk list, it uses it :)
  2. Hello all! When I make a static collection in the Creation Kit, the object has an entry shown for the .nif file. I can't seem to find this in my meshes folder. Am I just not looking hard enough or is this intentional since it just needs the location/rotation of the objects relative to each other and their scale? The CK archive creation tool doesn't seem to notice any necessary .nifs. I'm 80% convinced that I'm in the clear but I just don't want to post a mod and have any missing nifs. Thank you guys and girls!
  3. Hi, it looks like you have 2 posts. I wrote in here: https://forums.nexusmods.com/index.php?/topic/6538951-what-is-the-script-code-of-players-health/ you could find out the player's base health with .GetBaseValue() and then divide by 100 to get a value that is 1%. Then set the player's health with that value using .SetValue()
  4. Hello haohao68869, 1 to you too sir or mam. To get the player's health the script needs to know which actor to look at and which "actor value" you want from it. To tell the script this you use "properties." This happens at the way top of the script below the script name. Cipscis guide that touches on what exactly is a property and how do I use it? Cipscis scripting beginner guide Papyrus primer from creation kit wiki ActorValue property Health auto ;You can choose any name you want instead of "Health" as long as you use it consistently in your script actor property PlayerREF auto ;You can choose any name you want instead of "PlayerREF" as long as you use it consistently in your script ;These properties are written at the top of the script below the script name. float function MyFunctionThatGetsPlayerHealth() ;This function will "return" a float float VariableWithYourHealth ; making a new variable to store the information VariableWithYourHealth = PlayerREF.GetValue(Health) ;getting the player's CURRENT health and setting your variable to equal it. If you want the BASE health use .GetBaseValue() instead return VariableWithYourHealth ;This will be the "output" of the Function endFunctionThis can be done in a more compact way too but the above was for illustrative purposes. More compact: ActorValue property Health auto actor property PlayerREF auto float function MyFunctionThatGetsPlayerHealth() return PlayerREF.GetValue(Health) endFunctionIt is very important that after you compile the script, you open the "Properties" screen on the script and choose which property you want to fill the "Health" and "PlayerREF" slot declared on the first 2 lines of this code. The Creation Kit will not do this automatically for you. You can name these anything you want instead of "Health" or "PlayerREF" but if you name your properties exactly the same as the item you are looking for, you will be able to use the "AutoFill" buttons on the property screen. When you press this button the properties will fill for you and you won't have to search or type in the drop down box. Edit: You could also put this in an event instead of a "function" if you aren't familiar or comfortable yet with functions. ActorValue property Health auto actor property PlayerREF auto Event OnInit() ;or whichever Event you are using float VariableWithYourHealth = PlayerREF.GetValue(Health) ;you've put the value in a variable endFunction
  5. Thank you very much kitkat81! :) And thank you again SKK50 for the messages you sent and your answers here!
  6. SKK50 thank you again as always! I just watched your vids, that poor dead NPC stuck in limbo with a quest marker on him. Instead of an OnDeath() event would it be more thorough if I throw something like this on the quest? Event OnInit() StartTimerGameTime(24, someIndex) EndEvent Event OnTimerGameTime(int Index) StartTimerGameTime(24, someIndex) int counter = RefCollectionB.GetCount() - 1 while counter >= 0 if RefCollectionB.GetAt(counter).IsDead() actor DeleteMe = RefCollectionB.GetAt(counter) RefCollectionB.GetAt(counter).RemoveRef DeleteMe.delete() DeleteMe = none endif counter = counter - 1 endwhile EndEventShould I disable() before I delete() and should I set it = none afterwards? Or is this overkill? And something I've always been a little unclear on: How do I clear something from being a script property? If on scriptA above I added a line: LvlRaider = nonewould that clear the property in the manner that I am looking for? Or should I just set the actor "TheRaider" = none? Or is it unnecessary since ActorBase is not an ObjectReference property? Edit: nevermind on the last part I think I found the answer right under my nose in the wiki: and the ActorBase is a Form so I think I'm in the clear there. Or am I mistaken? Thank you again!! :smile:
  7. Hello all! I've seen a lot of stuff around about things remaining persistent if they're a script property or a reference alias. My question is, for an actor that I spawn in the following way (with a property and thrown into an alias), will they remain persistent after they die, or have I obliterated them from memory completely after death? ScriptA is on an activator button for testing ScriptB is on QuestB to allow access to a RefCollectionAlias property called RefCollectionB ScriptC is on a RefCollectionAlias called RefCollectionB on QuestB Scriptname ScriptA extends ObjectReference ScriptB property QuestB auto Actorbase property LvlRaider auto Event OnActivate(ObjectReference akRef) actor TheRaider = self.PlaceActorAtMe(LvlRaider) QuestB.RefCollectionB.AddRef(TheRaider) EndEvent Scriptname ScriptB extends Quest RefCollectionAlias Property RefCollectionB Auto Scriptname ScriptC extends RefCollectionAlias Event OnDeath(ObjectReference akSenderRef, Actor akKiller) RemoveRef(akSenderRef) akSenderRef.delete() akSenderRef = none endEventWhen I tested this with a RefCollectionB.GetCount() it returned 0 as I hoped and when I tested with FindRandomActorFromRef it returned 0 as well. Thank you for your help guys and girls!
  8. Hello all! Does the size of a navmesh triangle matter? If I have a big empty square room and just make 2 massive triangles as my entire navmesh is there any reason to not do this? Thank you guys and girls!
  9. Hello all! Sorry if this is somewhere obvious in the terms of service but I couldn't find it. Is it against the rules for me to edit a vanilla .nif, and then upload that edited vanilla .nif? Just wondering since it seems like I would be uploading Bethesda's copyrighted files if I did that. Thank you guys and girls!
  10. Hey ursusaugere, For a grenade just open the weapon screen and change the Ammo Capacity from 0 to 1. Since grenade's "ammo" is "NONE," you will never run out of your "1" ammo capacity. To make it cost action points might take a little more work though.
  11. Yes change the object modification (OMOD)'s "Loose Mod" to NONE at the way top of the drop down box and it should stop it from puting a loose Misc item in your inventory.
  12. Lol I believe it! Thank you again and again SKK50, and happy modding! :)
  13. I don't know too much about it either but if I was trying to look into it I'd check out the parts here on the wiki about "Attach Parent Slots" and "Collect From 3D" as potential leads for more stuff to google. https://www.creationkit.com/fallout4/index.php?title=Object_Mod Also I didn't watch a lot of this but it looks promising: https://www.youtube.com/watch?v=JClgqQl32Fo
  14. wow Thank you so much SKK50! Again! That's the second time you've answered my scripting question!! :) https://forums.nexusmods.com/index.php?/topic/6452476-quick-question-on-properties-and-dependency/ I attached it to an activator button and it works perfectly! Is the index on the workshops the same for all savegames/players or is everyone's different? I used a while loop to find the index on sanctuary Scriptname ButtonTest03 extends ObjectReference Import WorkshopScript WorkshopParentScript Property pWorkshopParentScript Auto Const Mandatory ; WorkshopParent Quest Event OnActivate(ObjectReference akActionRef) int indexiwant = 0 while indexiwant<28 WorkshopScript WorkshopREF = pWorkshopParentScript.Workshops[indexiwant] Int ValueIWant = WorkshopREF.GetValue(pWorkshopParentScript.WorkshopRatings[pWorkshopParentScript.WorkshopRatingSafety].resourceValue) as Int debug.messagebox(ValueIWant + " " +indexiwant) indexiwant = indexiwant + 1 endwhile EndEventand then distilled it down to: Scriptname ButtonTest03 extends ObjectReference Import WorkshopScript WorkshopParentScript Property pWorkshopParentScript Auto Const Mandatory ; WorkshopParent Quest Event OnActivate(ObjectReference akActionRef) WorkshopScript WorkshopREF = pWorkshopParentScript.Workshops[21] Int ValueIWant = WorkshopREF.GetValue(pWorkshopParentScript.WorkshopRatings[pWorkshopParentScript.WorkshopRatingSafety].resourceValue) as Int debug.messagebox(ValueIWant) EndEventLol I am so excited thanks again!!
  15. Hello all! I've been trying to find a way to get the defense value in Sanctuary without altering WorkshopScript.pex. If I add in a function at the end of WorkshopScript and call the function with an activator button it works just fine but I want to get the value in a non-invasive way and not change any vanilla script source. Here is what worked: Working function at end of WorkshopScript.pex: int Function SafetyCheckup() WorkshopDataScript:WorkshopRatingKeyword[] rating_checkup = WorkshopParent.WorkshopRatings int current_safety = GetValue(rating_checkup[WorkshopParent.WorkshopRatingSafety].resourceValue) as int return current_safety EndFunctionWorking script on an activator button: Scriptname ButtonTest04 extends ObjectReference WorkshopScript property SanctuaryWorkshopREF auto const Event OnActivate(ObjectReference akActionRef) int TheCheckup = SanctuaryWorkshopREF.SafetyCheckup() debug.messagebox(TheCheckup) EndEventAnd here is my attempt at a non-invasive approach on an activator button which always shows a 0 in the messagebox: Scriptname ButtonTest03 extends ObjectReference WorkshopScript property SanctuaryWorkshopREF auto const Event OnActivate(ObjectReference akActionRef) WorkshopDataScript:WorkshopRatingKeyword[] rating_checkup = SanctuaryWorkshopREF.WorkshopParent.WorkshopRatings int current_safety = GetValue(rating_checkup[SanctuaryWorkshopREF.WorkshopParent.WorkshopRatingSafety].resourceValue) as int debug.messagebox(current_safety) EndEventI've tried a bunch of variations of the above and always double check to make sure my properties are initiated. I even made this "crazy-person-attaching-red-yarn-to-newspapers-on-the-wall" level drawing to try to understand wtf is going on in the vanilla code but I don't know how useful or accurate it is: I came up pretty dry on Google and the wiki. Any help would be greatly appreciated, thank you guys and girls! how I feel: https://youtu.be/_nTpsv9PNqo?t=18
  16. I don't have any CC items that aren't free so unfortunately I can't make this for you, but if you feel like making it yourself in the Creation Kit let me know and I can try to upload a Youtube vid with instructions. You'll have to change 2 things for each shirt. I know this is the Mod Request forum but this is the best I can do for you lol
  17. Thank you for taking the time to answer B1gBadDaddy. I'm going to keep reading more on papyrus and the CK.
  18. Hey, this isn't quite the subtle glowing lights, but your request made me think of this fun little mod: https://www.nexusmods.com/fallout4/mods/30592 so thank you :)
  19. Someone made a mod like this recently actually although it looks like you might need to know Japanese: https://www.nexusmods.com/fallout4/mods/30537 And another one where they aren't just decorative: https://www.nexusmods.com/fallout4/mods/5768/
  20. Not totally on topic here but if you want a super quick way to edit weapon damage and bring your modded guns into alignment with what you think is balanced check out this amazing 3 minute vid that was literally the spark for modding for me:
  21. https://www.nexusmods.com/fallout4/mods/30588/ IT IS COMPLETE
  22. Hey everyone, I'm fairly new to modding so forgive my noobness and I can't find the answer to this particular question on the wiki although it's probably right under my nose. Let's say I have a script with a bunch of events: Event OnEventA() Do stuff EndEvent Event OnEventB() Do stuff EndEvent Event OnEventC() Do stuff EndEvent etc When I trigger the script to run in game, does the game read once through the script top to bottom checking for each event and if none of the events occur then that's it, the script is over, the script has gotten to the bottom and those events missed their window of opportunity since they did not occur when the script ran? Or does the script sit waiting for each event to occur? If they sit waiting for the event to occur can they occur in any order? Or does it all depend on what the script is attached to? Or does it depend on the particular event? I hope the explanation of my question was clear enough. Please let me know if I need to elaborate further on what is confusing me. Thank you so much for your help guys and girls!
×
×
  • Create New...