Jump to content

shatsnazzle

Members
  • Posts

    67
  • Joined

  • Last visited

Everything posted by shatsnazzle

  1. ben446 I'm bout to change your life! Ctrl C to copy things Ctrl V to paste!
  2. Does the script name EXACTLY match the file name? Manuellightswitch vs manualLightSwitch
  3. ScriptName manualLightSwitch ectends ObjectRefference ;I know you said you had to rewrite it from scratch but did you spell "extends" correctly and does the script name EXACTLY match the file name? Manuellightswitch vs manualLightSwitch ObjectReference Property EnableMarker auto ;Did you remember to put "auto" in your actual script? Sometimes I get a similar error if i forget the "auto" Event OnInit() If (Enabled.IsDisabled()) ;Again I know this is not a true copy paste of your actual script so this complicates the diagnosing but did you mean to write EnableMarker here vs "Enabled"? GoToState ("LightsOff") Else GoToState ("LightsOn") EndIf EndEvent State LightsOff Event OnBeginState() EnableMarker.Disable() End Event ; You have "End Event" vs EndEvent Event OnActivate (ObjectReference akActionRef) GoToState ("LightsOn") EndEvent EndState State LightsOn Event OnBeginState() EnableMarker.Enable() EndEvent Event OnActivate(ObjectReference akActionRef) GoToState("LightsOff") EndEvent EndState
  4. In FO4Edit or Creation Kit there are entries on each weapon for "On Hit" with options: Normal formula behaviour - body parts may explode or get severed Dismember only - body parts can only be severed No dismember/explode - self explanatory Explode Only - body parts can only explode into the gore pieces Creation Kit uses a drop down menu. FO4Edit you can either type out the words or type in numbers 0 through 3 corresponding to each choice With that you could change all the pistols and weapons to display whatever behavior you think is appropriate for each of them. This mod looks like it's trying to do what you want or you can make your own custom one with the above information. https://www.nexusmods.com/fallout4/mods/22505/
  5. Thanks kitcat81, that's what I suspected. Thank you Reneer, Kitcat81, and Reginald 001 for the good ideas and the good info :)
  6. Thanks for the idea Reneer, I'll look into that see if it fits in. :)
  7. Hello all! I'm trying to figure out if it's possible to get and set properties on a specific actor's ActiveMagicEffect ScriptA from some other ScriptB. Getting and setting the properties on the base object Magic Effect ScriptA is simple enough but is this possible to do for an individual instance of the effect? For example I have ActorA and ActorB. I have Spell01 ability with Effect01 magic effect. Effect01 magic effect has ScriptA on it. ScriptA has property01 on it. I add Spell01 ability on ActorA and ActorB. But what if I want Effect01.property01 on ActorA to be different than Effect01.property01 on ActorB? Is there some way to access this property from another script? Thank you guys and girls!
  8. I saw this in the SKSE section, maybe F4SE has a similar function. https://www.creationkit.com/index.php?title=GetFactions_-_Actor
  9. The DLC Black Face Fix download you linked to and Rusty Face Fix are the only ones I know of that offer actual permanent/preventative solutions like you're looking for. If they don't do the trick there are a few workarounds: You can try quicksave/quickloading, that fixes it sometimes although not reliably and waiting for load times gets old fast in my opinion. You can download LooksMenu, save your face as a preset, and then just switch to that preset to reset your face. Never tried this but a lot of people do it. Or you can check out an upload from me that does something similar to the LooksMenu approach but automates it. Brown Face Glitch Workaround There's a couple other workarounds but none of them really impress me. I prefer to either automate a workaround or just fix it outright.
  10. First line of defense: High Res DLC Black Face Fix If that doesn't work you can save/reload like strawburry12 said or install LooksMenu like thrax7545 said. If save/reload is not working reliably or you are just sick of loading, or you don't feel like installing LooksMenu you can try this workaround: (shameless plug to my own upload) Brown Face Glitch Workaround Edit: just found this looks way cooler than the Brown Face Glitch Workaround which was the first thing I ever uploaded: Rusty Face Fix
  11. AddInventoryEventFilter is a little confusing to use at first. Check out the parameters section on the wiki link that RedRocketTV posted to see how to use it. KitchenShelf1FoodClutter is a static you said. So with "AddInventoryEventFilter(KitchenShelf1FoodClutter)" you told the script "hey script whenever a KitchenShelf1FoodClutter static is added/removed into this container, I want you to take notice and receive an OnItemAdded event or OnItemRemoved event." Of course we can't add statics into containers so your container will never receive an event. I actually didn't even know you could put a specific ObjectReference into AddInventoryEventFilter's parameters since it's not in the wiki so that's pretty neat. The usable parameters in AddInventoryEventFilter from the wiki: Fun fact: it' not on the wiki but if you call GetItemCount() and pass in "none" as its parameter, it will count anything and everything in a container/inventory. I haven't tested this but give it a shot: Scriptname KitchenCounter1Script extends ObjectReference ObjectReference Property KitchenShelf1FoodClutter Auto Event OnInit() AddInventoryEventFilter(none) ;We passed in none here since we want to be aware when anything at all is being put in or out. ;You could filter for certain items in a formlist and then kick out any item that doesn't match but I'll leave that up to you. endEvent Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) debug.messagebox("Item added event received!") KitchenShelf1FoodClutter.Enable() EndEvent Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer) debug.messagebox("Item removed event received!") int ItemCounter ItemCounter = self.GetItemCount(none) ;from the fun fact trick if ItemCounter == 0 KitchenShelf1FoodClutter.disable() endif EndEventEdit: Make sure you remember to initialize your KitchenShelf1FoodClutter property in the properties window!! I almost wish Creation Kit had a plugin that would interface with a cattle prod on my chair to stop me from forgetting to do this allllll the time. Edit2: RedRocketTV's post right below this will get you the behavior you're looking for. My post is just for informative purposes and will have some weird things if you copy paste it. Like adding a gun to the container will make your kitchen clutter appear etc.
  12. check out the AddInventoryEventFilter page on the wiki, gotta call that first
  13. check out this for a cool unit size comparison https://www.creationkit.com/index.php?title=Unit
  14. Thank you for the fast response Reneer! Needlessly complex is my favorite though:) For questions 1 and 2 the reason I asked is just out of curiosity and because I don't think I would mind having a slower function do a time insensitive, rare, or one-time task if it means freeing up memory. For question 3 I'm having a hard time putting my brain around what I'm trying to do in a way that can justify the complexity Lol. I think your question might have reminded me to reevaluate my approach so thank you for that :smile: Essentially what I was trying to do with the arrays in question 3 was just not alter any vanilla data or scripts. I figured I'd make my own array with the extra item I need and use that whenever I needed the array. But I think I'll reexamine the big picture tomorrow with a clearer head and very possibly just scrap the array. Time for bed thank you again for the response :smile:
  15. Hello all! If I have a property such as actor property PlayerREF autoand another script with this property, and another... and another.. and another.. my question is: 1.) does this take up a non-negligible amount of memory? And if so, 2.) would it ever be preferable to use Game.GetPlayer() to save on this memory, especially on something that runs only once OnInit()? I know the speed performance of using PlayerREF is better than GetPlayer() and has been discussed to death but I'm just using it as an example. Edit: Follow up related question: 3.) would the answer to that question be the same for multiple arrays with many of the same references? Assuming they were each made independently of one another and not passed by reference to each other. For example, ArrayA has 37 references that I am interested in but I am also interested in a 38th item so I make a brand new ArrayB and make a function to fill it with those 38 items, passing each one in by variable (without passing ArrayA into it by reference). If I'm being unclear please let me know. Thank you guys and girls! :smile:
  16. I haven't looked too much into the workshop container system but it looks like a lot of the WorkshopWorkBench references (I didn't check all of them) are linked to a dummy chest underground or behind a wall. Maybe give that container a shot? keyword property WorkshopLinkContainer auto ObjectReference DummyContainerREF = YourWorkshopWorkbench.GetLinkedRef(WorkshopLinkContainer)Also if you want a reference to each of the workshops all at once you could check the RefCollectionAlias in WorkshopParent quest. The WorkshopParentScript has a pointer to it called WorkshopsCollection. WorkshopParentScript property WorkshopParent auto int counter while counter < WorkshopParent.WorkshopsCollection.GetCount() objectreference YourWorkshopWorkbench = WorkshopParent.WorkshopsCollection.GetAt(counter) ;do stuff counter = counter + 1 endwhileHowever in the RefCollectionAlias, Home Plate does not meet the conditions to be included because its location seems to be lacking the necessary keyword so you'll have to add an extra few lines to get that reference too.
  17. I'm sorry but I don't think I understand :( Can you explain more about what is happening please?
  18. Making a leveled item with a damaged fusion core! That is a damn good idea :)
  19. Thanks deadbeeftffn, I found em now :) I swear I was looking for that but I must have had some sort of dum dum moment
  20. This really seems like quite a bit to take on for a first mod. I feel like you might want to start with making smaller mods and tweaks and learning everything you can about the Creation Kit and scripting. What is a Base Object? What is an Object Reference? Papyrus primer from creation kit wiki Cipscis scripting beginner guide A demonstration of "attaching" a script to a Base Object Explore the Creation Kit and google/youtube things you see in the CK that don't seem obvious based on their name alone. You will be reading and rereading the wiki constantly.The advice and ideas in the thread you linked were as good as I think anyone can do short of making the whole mod for you which probably isn't going to happen. But if I were in your shoes and had THE HUNGER I probably wouldn't listen to me either so these would probably be things I would try (and possibly fail): Check out DLC02WorkshopGeneratorFusion in the Creation Kit, this is the the item that is actually made when you make a fusion generator. There are "actor values" on it, one of which is "100 power generated". Actor values can be manipulated with scripts. I don't know if this is true for workshop items but it would be the approach I would try: Try to get comfortable using the asterisk to find things; in the Creation Kit filter on the Object window I just typed gener*fusion which looked for anything with "gener" in it as well as "fusion." I had no idea if that would work but it did. You can edit the vanilla generator directly since you probably won't be downloading any other mods that use it but it's generally considered bad form to edit vanilla items when an alternative is possible, to keep mods as conflict free as possible. Instead of editing the vanilla I would make a copy of DLC02WorkshopGeneratorFusion and rename it whatever you like. Set it's Power Generated actor value to 0. Or 1. I don't know if the game will let you use 0, modding is a lot of trial and error but give it a shot Make a copy of the constructible object workshop_co_GeneratorFusion (I just found it using the same filter) that is used to create DLC02WorkshopGeneratorFusion and rename it whatever you like and have it create your copied generator instead of the old generator. Constructible objects are pretty much just recipes and are used to make weapon attachments, armor attachments, chems, workshop items, pretty much anything the player can make. Constructible objects Now this is where it unfortunately goes from instructions to general guidance. My approach at this point would be a lot like what others said. I would add a new script onto the new Fusion generator with an OnActivate event. The OnActivate event would look at the player's inventory and see if they have at least 1 fusion core. If player has at least 1 fusion core, script will then remove one fusion core and set the power generated actor value on the generator to 100 and start a timer. When the timer runs out the script will set the power generated actor value on the generator to 0 or 1 or whatever. Actor value script functions Count the items someone has Remove item from someone Starting a real time timer Starting a game time timer (Which timer to use? Advantages to each. Real timer is not messed up when people use custom timescales. Game timers are affected by sleeping and fast travel.) That would be a basic basic basic basic prototype. With a lot of problems. There are lots of ways to approach the problems but this would be my initial rough draft: 1. I'm pretty sure the generator is going to start with the lit up "on" animation when you make it and so will be appear off when it's on etc 2. If we activate it again it will just take another fusion core rather than giving one back. For personal use obviously you can skip a lot of the problem fixing and just not exploit the oversights. 1. You can try to use "states" and an Activate() function to switch it off real quick with an On Initiation event (OnInit) when it's first made. Or you could change the actor value in the creation kit back to 100 instead of starting at 0 or 1, and then in the constructible item make it cost an extra bunch of nuclear material or whatever amount of components you think balances this 100 power head-start. I don't remember if you can use a non component item like a fusion core in a recipe but give it a shot if you want. Cipscis guide that explains what states are 2. You can use different "states" when the generator is activated/not activated or set a "property" 0 or 1 to tell us if it's activated or not and link these to some sort of logic or "if statements." You can check if it's already activated and if so, give the player back their fusion core, set the actor value to 0, and cancel the timer. Cipscis guide that touches on what exactly is a property and how do I use it? If statements in the wiki Add item to someone Activate function Canceling timers 3. Now we have another problem made by fixing problem 1, the timer has not started when you placed the generator. Maybe just use OnInit() event to call the timer when it's first created. 4.) We have another problem made by fixing 2. The player could just activate the generator near the end of the timer and get a free fresh fusion core. I don't know how you could set the health of the core that the player gets but it doesn't seem like something that can be done with scripting. 4.) Awesome idea from you in the other thread was to use a new ammo type. Instead of fusion cores the generator could require 100 of your new ammo type (or whatever number). And whenever you turn off the generator it could return an amount proportional to the remaining timer. Your new ammo type could have a constructible object recipe in the chem bench where 100 new ammo requires 1 fusion core (again I can't remember if you can use non-components like fusion cores as recipe ingredients) and a reverse recipe with 100 new ammo to a new fusion core. As far as making the time configurable like you said, you could add a menu that asks for how many of the new ammo to take in. Making an options menu in the wiki 5.) More problems what if I store the item and put it back down, it might start with a fresh timer from the OnInit() event (I'm actually not sure) and I can get 100 ammo from it. Maybe try storing the value of the timer or ammo on another script property like an array attached to a quest every so often so if the information is lost when a generator is put in workshop storage, it'll be stored safely on a quest instead. Testing if events or functions occur can be checked with different debug messages and functions and "papyrus logs." I'm a fan of debug.messagebox("your message here") for a lot of testing to see when an event or function has occured Arrays Looking at or changing things on one script from another script (fusion generator script communicating with quest script holding an array property) Debug functions Debug logging 6.) I'm sure there are more problems but I think that's plenty for a start Just keep learning stuff and most importantly keep having fun and I'm sure you'll be able to pull off this mod eventually!
  21. Make a copy of your .psc and make sure it is in Data/Scripts/Source/User
  22. Method 1.) In the Creation Kit you can go to Gameplay -> Script Manager and search for the script name. You can double click to edit it in notepad or some other text editor like Notepad ++ You can then go to Gameplay -> Compile Papyrus Scripts and search for the script to compile again. Method 2.) Or alternatively you can right click on a script that is "attached" to a Base Object or Object Reference and click Edit Source to edit it right in the Creation Kit's editor. I would probably just start here with this method since the Creation Kit will give helpful information in the compiling errors when you mess something up. When you're done editing you can click Compile in the top of the text editor and then save it. (Or just save it, saving attempts to compile). Most scripts have to be "attached" to a Base Object or to an Object Reference. I'm willing to bet that whatever script you are trying to edit or whatever you are trying to create will need to be "attached" to something. This is what a Base Object is This is what an Object Reference is A demonstration of "attaching" a script to a Base Object
×
×
  • Create New...