Jump to content

caleb68

Members
  • Posts

    150
  • Joined

  • Last visited

Everything posted by caleb68

  1. yep they all work in my game without a glitch. Did you coc from the main menu to the cell (not loading a game first) ? Sometimes currupt saves can cause scripts to stop functioning properly, coc'ing from the main menu eliminates this as a possible problem. Did you try it without any other mods installed? Its possible you have a mod installed that is causing issues for you to get the lights to work. I tested with vanilla fallout 4 + dlc and it worked fine for me without any problems before zipping it up and uploading it. The little test esp doesn't require any of the official dlc just fallout. make sure everything is in its proper place: 0Samplelighttest.esp should be in the fallout 4\Data directory calEnableDisableScript.pex Should be in the fallout 4\Data\Scripts directory calEnableDisableScript.psc Should be in the fallout 4\Data\Scripts\Source\User directory to be able to see the source code in the creation kit.
  2. okay here ya go: http://www.caleb68.com/Fo4/Samplelights.7z that little zip has a sample esp, along with the second script (and source). after you've added the files to your fallout 4 data folder, you can load the mod up and coc to 000TestLights from the main menu, in this cell you'll be able to trigger several different lights using different activators to make them trigger, including the switch your using in your example, all the lights toggled on and off for me without any problems. Open the mod in Creation kit, and go into the cell 000TestLights and you can take a look at how each object is setup along with the linkage. The lights themselves have the enablemarker set as their enable parent. Hope that helps :)
  3. it looks like you have something setup wrong just looking at the picture but I'll build a mini esp anyhow. The lights - they select both of them, with the render window in focus, press insert (this will bring up the batch window), on the right hand side click the option for 'Set Enable Parent', down on the bottom click 'select reference in render window, and click on the enable marker. Then click do, wait a second, and close that window. That will link both lights to the enable marker with it as parent (quicker then doing one at a time), from everything else in the picture you showed all looks correct. From your picture it looks like you have the linkage between the enable marker and the lights wrong. I'll go build that mini esp and upload it then add it here so you can grab it and take a look just in case that doesn't fix it for you.
  4. you could use the unload event in papyrus and make a single fire script that will move the npc after they are unloaded (player moved far enough away for the actor / cell to unload) https://www.creationkit.com/fallout4/index.php?title=OnUnload_-_ObjectReference alternatively you could probably use a AI Package that checks to see how far away from sanctuary the player is and then activates to make the npc move to their new location, you'd probably need to set some conditions to the ai package as well, I'd set one so that once the npc has reached their destination, they package disables, this would keep it from firing off again unless they leave the location. You can alway have the package remove itself as well after they have reached the destination, or set a control package above that one that controls the npc once they have reached the destination. Either way you will probably need at least one AI package to keep the npc in their new location so they don't wander back to their editor location (default sandbox does that I believe)
  5. this is how i did it. Make a terminal, add two options to it: option 1: Add Menu option 2: remove Menu (for uninstalling the mod) down in papyrus, edit the properties, add two items FormList named BuildMenu set to Auto Const Formlist named AdditionMenu set to Auto Const Set the BuildMenu to WorkshopMenuMain or whichever submenu your adding it to set the AdditionalMenu to your new menu's formlist after those are added, edit the papyrus box for option 1 'Add menu ' enter: BuildMenu.AddForm(AdditionMenu) switch to the 'remove menu' option and enter: BuildMenu.RemoveAddedForm(AdditionalMenu) after that you can place that terminal anywhere in the world, or turn it into a constructable object, likewise you can turn it into a holotape and place it anywhere in the world or make the holotape craftable, this removes the need for the players to have it quest driven.
  6. if your using the second script you need to edit the properties of the script and set a keyword to it, i usually use linkcustom01 Then go to the 'linked reference' tab of the switch and add a link to the enabler or to a light (if only one light is working) and set the keyword on that to linkcustom01 as well. Also if you leave the keyword blank on the script, and link the switch to the enabler or light, it will grab the first linkref on the switch that doesn't have a keyword. Don't link the enabler / light to the switch, thats backwards and won't work. must be switch to the enabler / light. If you need I can take some screenshots and post them to show what to do if your still lost after the above.
  7. Derp... see... I think I did need a slap on the head, I don't think the problem now is with the scripting, I believe its a problem with the quest, on the first page (which I totally missed) there is a slot on the right hand side labeled "Text Display Globals" .... derp ... I have nothing in there, and is most likely whats causing the stack overflow I think, I'll go add my vars in and give it a go and see if that fixes the problem n' let you all know :smile: Still open to any advice on this, the reason I'm using global text is I need to be able to update it on the fly on the active terminal, from my understanding reading the wiki AddTextReplacementData won't update the text when actively using the terminal, only at terminal init. Edit in: Yep, that was my derpy mistake, I forgot to add the global to the text display globals on the main tab and thats what was causing the stack dump. Script is working fine, and the terminals text is now updating on the fly like it should be :)
  8. I'll have to look at AddTextReplacementData, thought that was persistant, i.e. you add vcTotalItemCount and you can not update the replacement text. This is why I was using a global, so it could be updated on the fly and change the text on the active terminal screen.
  9. Not only cut content, but nifs that aren't even in the game itself but are packed in the esp's for the game and dlc, found a few of those. Getting the cut content to work, you have to make changes, so your really not using defaults anyhow (i.e. like cut dialog and scenes) without your changes those objects wouldn't function, so technically, your not distributing default assets. Even taking and making a non-craftable item into a craftable item isn't a vanilla asset. I'm sure its more to the point of "you can not take a vanilla object from DLC 2 and include it in a mod for DLC 1 without requiring DLC 2", I've seen mods get pulled because of that, but never because of any of the other stuff.
  10. The testers are usually people who asked me to make something specific for them, But I do have a couple people who like testing different stuff I'm working on, show what they had problems with, toss in suggestions to improve them, etc. which is nice, Its more like they recruited me then me recruiting them heh. But having a couple people who are willing to help you test stuff and not leak it to the world before your anywhere near done is nice to have :) i.e. like this one I'm working on, 3 months of work, and its still no where near done, its still in alpha state and needs alot of construct/scrap recipes made, as well as more testing on functionality. Sometimes finding a bug can be difficult, and asking for help is about all you can do because you overlook / can't see your mistake (Just made a post before this asking for help with a terminal issue).
  11. As it was working before, I have no idea how I managed to break this, but somehow I did, when the quest function is executed a stack overflow happens, and we all know thats just not good for the game, it causes loss of workshop / character / quest data as the pending stacks get dumped. The script on the terminal: Scriptname calTerminalReturnScript extends ObjectReference Hidden Conditional ReferenceAlias Property AliasToForceRefTo Auto Mandatory Const {Alias to stick this terminal into on quest} CalReturnObjectsQuest Property ReturnObjectsVar Auto Const {Return Objects Script attached to quest} GlobalVariable Property cnPlayerTokenCount Auto Mandatory {Return Token Count} MiscObject Property cnReturnToken Auto Const Mandatory {Token Object} MiscObject Property cnReturnObject Auto Const Mandatory {Return Object} Event OnActivate(ObjectReference akActionRef) if (akActionRef == Game.GetPlayer()) AliasToForceRefTo.ForceRefTo(Self) endif EndEvent Function TryToReturnObjects() ObjectReference PlayerRef = Game.GetPlayer() int ObjPlayerHas = PlayerRef.GetItemCount(DN011OverdueBook) if (ObjPlayerHas > 0) PlayerRef.AddItem(cnReturnToken, ObjPlayerHas * 5) PlayerRef.RemoveItem(cnReturnObject, ObjPlayerHas) endif UpdateTokens() EndFunction Function UpdateTokens() ObjectReference PlayerRef = Game.GetPlayer() cnPlayerTokenCount.SetValueInt(PlayerRef.GetItemCount(cnReturnToken)) OverdueBooksVar.UpdateTokenCount() EndFunction When the terminal is activated it hooks itself to the quest, this works fine. When the player turns in the objects defined in the variable, they get the proper token given back to them, this works fine too. the problem happens when UpdateTokens is called. Now I've Set the value of it here, then called the script on the book return script to update it, and this is where the stack overflow happens. I've tried both setting the value of the cnPlayerTokenCount global both in the terminal script as well as in the quest script, thinking perhaps that was what was causing the issue, doesn't matter which it is executed in, the problem still persists (SetValueInt) The script on the Quest: Scriptname CalReturnObjectsQuest extends Quest Hidden GlobalVariable Property cnPlayerTokenCount Auto Const Mandatory MiscObject Property cnReturnToken Auto Const Mandatory Function UpdateTokenCount() ;ObjectReference PlayerRef = Game.GetPlayer() ;cnPlayerTokenCount.SetValueInt(PlayerRef.GetItemCount(cnReturnToken)) UpdateCurrentInstanceGlobal(cnPlayerTokenCount) EndFunction I left in the remmed out statements in the quest script, (playerref, setvalueint) just so you could see that i've attempted to set it there as well with no luck. The quest fires off fine, the alias gets setup fine, and if I don't call the updatetokencount on the quest, the stack overflow never happens. Just to see if it was a issue with my global var, I swapped it with the book return token var ( DN011OverdueBooksPlayerTokenCount ) as the global to update, and the stack overflow still happened. I've looked at both the nukaworld prize machine and the bookreturn machine to see how they were handling doing this, and I seem to be doing it the same way as those. There is no alias for the global (this is the same in the two machines mentioned above) and prior to updating it does show whatever value is initially assigned to the global var, after executing UpdateTokenCount() and the stack dump, the value displays on the terminal as [...] As you can see, neither script is really that complicated, and I have no clue how I managed to break this, and I know it has to be something totally simple that I am overlooking, but for the life of me I can't see it, thought maybe someone on here would be kind enough to give me a slap along side the head and say "here's what you did silly boy" The quest has its stages setup with a run on start stage, The main tab is also set the same as the bookreturn quest (DN011OverdueBooks) The alias of the terminal is a empty forced ref which is filled when the terminal (see script above) is activated. Any help would be greatly appreciated.
  12. compiled user scripts get moved into the Scripts/ folder as pex files, the source/user folder is just that, the source files, you wouldn't need to remove those in order to test the mod. When building your Archives, the main archive must be yourmodname - Main.ba2 and the textures archive must be yourmodname - Textures.ba2, Make sure to match CaSe with the mod for the ba2 names. if your trying to test your archives, and have no other mods installed: remove the Materials, Meshes, Textures folders from the Data folder. Move any scripts you created from the Scripts folder, but you can leave the 'source' folder. Move any sounds you created from the Sound folder Move any Videos you created from the Video folder load up fallout, make sure your mod is checked in the mod list, and try it out. If you've done everything right, it should work just fine for you. I make a folder called DataTemp in my data folder, and move everything into that folder to test the archives. If your mod includes NPC's and they are just using default resources for their looks / hair bits, you don't need to include the character head & texture exports in your archive, this will help cut down on your mod size a little as well, you only need to include those if they are using non-default resources (i.e. user created hair/makeup/morphs) Alternatively, if you have a second machine, toss a copy of fallout on it, and use it for testing :) ( I would but im being lazy lol ) that would make sure your only testing the mod and its archive files. After I know that works fine, I send the file off to the tester(s) for the mod and let them hammer away at it and see if they can find anything broken.
  13. Well I can understand it when working with normal vars, but globals... needing a quest to access globals kinda kills them being globals.
  14. For one thing, not all mods can be easily tested with a brand new character. And for another, when trying to figure out something new (i.e. something you are figuring out how to do, and if you are very ambitious figuring out something no one knows how to do), you often end up having to launch, test, close, tweak, and relaunch dozens of times, so any time saved, even if it is just a little bit of time, is great. If you are worried about breaking your play save, just make a mod-testing save and set the ini to load that particular one. Ah, like i said, no offense meant. Was just curious. i'm often opening and closing fo4 to test things, so much has just become habit (including a mod free save). like i said previously does seem like a nice idea :)
  15. no offense on this, seems like a nice idea for testing, but... why not just coc to vault111ext from the menu? you'll have a base character at level 1 with no worries of messing up a save, and you can trigger the initial exit script just running across the platform?
  16. okay problem solved - even for global vars you will need a quest attached to the terminal it seems, fiddled with it some more and its working properly, seems kinda backwards to need a quest in order to pull the value of a global but... bethesda.
  17. I say go for it, if one never tries, they never find out if they can, or are willing to spend the time, to learn how to do something. npc vendors are pretty basic, they use a simple faction to setup the vendor, and they need the merchant vendor dialog faction, then a ai package to tell them to head off to their workspot during work hours, oh and their voice type needs to be set properly as well (generic vendors use the voices starting with male/female). There are alot of youtube videos out there, but many with errors within the videos themselves as well, so expect alot of trial and error even following one of those from start to finish, some of them have even clipped out / left out, some key things "assuming" the person already knows to do that, which should never be done when making a tutorial. looking at other generic vendors in game will get you so you can set them up pretty quickly. Most things in ck are pretty simple until you start messing with things that require quests and quest aliases, then you can end up having hair pulling experiences, 1 broken alias (i.e. someone dies in a alias) and the quest fails to execute. Still haven't messed with doing dialogs myself, watched several walk throughs on doing them, but i've held off on doing that still. But I say go for it, even if your just starting from scratch, and have no idea what to do, you may make something truly amazing :)
  18. the number of times a debug notification is called quickly can cancel out others i've noticed, if im using it to try to trace a issue in the script while in game, i'll stick a utility.wait(1.0) after the debug notification just to make sure that they will show up for me.
  19. I usually don't include the Psc, its just extra bloat for the file for the players. If needed I usually provide the scripts to the modders who ask for them. Alternately you could stick the PEX files in a second zip and upload them to optional files with a label "Script source for modders" or something to the like so they know what it is. Personally I believe that if it isn't needed in the main file for players to play the mod - leave it out.
  20. just for giggles i double checked to make sure I didn't make a typo in the global name, so, I copied my global name from the global var, went back into my script, pasted it in, reset the property values, same issue, so it wasn't a minor typo.
  21. I usually use the scale gizmo (2 key), but I hopped in looking to see if there was anything I couldn't scale with the S key, didn't seem to have any issues with any of them, thought maybe it was like some other stuff in there where some objects you just can't use the shortcut on, but nope, and obviously the S key still works on your keyboard ;) well short of reinstalling ck, the only other thing that comes off the top of my head would be moving all the ck ini files from the fall out dir, and launching it, just open fallout4 esm and see if the key still malfunctions. that should force ck to regenerate all of its ini's so you'd be able to tell if its some setting thats screwing with it. if not that, only other things i can think of is ck is messed itself and needs reinstalled, or you have some application that's interfering running in the background that has hotkeys to do things its hook for the hotkey is canceling out ck's hook. (i.e. like a video capture program). Sorry I can't be more help :( Hopefully if someone else has had this same problem they will post to you and let you know how to fix it.
  22. if your modifying light radius, i suggest you press the L key so you can see the light radius markers as well, really helps in some instances, especially while debugging lights.
  23. you'll find the stimpak under potions, open it then open restore health, add a condition to it that checks to see if the player is the one using the stimpak, this will make it so it won't heal anyone except the player, or if you want the changes to only effect the companions, do a faction check to see if they aren't in the companion faction. Next you'd want to add in a second health restoration, this time add a condition to it that checks to see if its not the player (== 0.00 instead of == 1.00), If you only want it to effect companions, add a check to make sure they are in the companion faction as well, else it will effect all npcs. change the duration and magnitude so that it has a lesser effect on companions and npc's. Not sure if that would actually stop the companions from getting fully healed, that may be something thats been done within the script itself (oh player used a stimpack on me, so I'll fully heal!), but I know it will work on general npc's when they use stimpaks.
  24. https://www.creationkit.com/index.php?title=Creation_Kit_Keyboard_Mapping according to the keyboard mapping 2 is scale gizmo, s is scale ref while holding, and E is the translate gizmo but far as changing them, you can go into Edit-> Render Window Hotkeys and change the keyboard mappings in there.
  25. I have several power toggle scripts, my complex one is based off of a default script that isn't used in the game (CircuitBreakerScript) But you can find it attached to CircuitBreaker01OLD in the activators. some slight modifications were made to it for my purposes. This one is a simpler version that I setup for reuse for toggling power switches, its pretty basic, Keyword[] is filled with the keywords on the linkrefs you've linked to the switch, and it will cycle through each keyword, grab the reference and activate the switch itself, its the same script I used in the hawthorne mod I did: Scriptname ActivatorToggleScript extends ObjectReference Hidden Const Keyword[] Property Activators Auto Const Mandatory Event OnLoad() Self.SetNoFavorAllowed() EndEvent Event OnActivate(ObjectReference akActionRef) int curCount = 0 while(curCount < Activators.length) keyword objecttoget = Activators[curCount] if (GetLinkedRef(objecttoget)) GetLinkedRef(objecttoget).Activate(akActionRef) endif curCount += 1 endwhile EndEvent Far as what switches that I use, it just depends on what im using them for, i.e. like my hawthorne estate mod here at nexus, i just took and used a Panel_Lock activator and toss the script on it, if your just using the onactivate event you can pretty much use any model as long as you make it a activator. Far as the basic enable / disable script: Scriptname calEnableDisableScript extends ObjectReference Hidden Const Keyword Property EnablerRef Auto Const Mandatory Event OnActivate(ObjectReference akActionRef) if (Game.GetPlayer() == akActionRef) ObjectReference TmpRef = GetLinkedRef(EnablerRef) if (TmpRef.IsDisabled() == true) TmpRef.Enable() else TmpRef.Disable() EndIf endif EndEvent the above script only allows the player to activate the switch - period, no exceptions. if you want companions to be able to activate it, remove the line with game.getplayer, and the last endif If none of these scripts for the basic enabler everyones posted aren't working for you, make sure you have your lights linked properly to the EnableMarker, they can't be linked refs they need to have it set as their enable parent. You'd edit each light and go to the enable parent tab and select the EnableMArker as their parent. The EnableMarker wouldn't have a enable parent, if it did, then you would not be able to toggle it to a on/off state either. As a shortcut, you can select all the lights that will be connected to the Enable Marker, then move your render window so the enable marker is visible, and with the render window still in focus, press insert and wait a moment, a reference batch action window will pop up, on the right side select the option 'set enable parent', then down at the bottom left, click select reference in render window, click on the enablemarker, set a keyword if any is needed (usually not), and click do. It takes it a momement or two, depending on how many lights you have selected, but once you can select something else in the render window, you can close the reference batch window. That saves some time in setting up links for enablers.
×
×
  • Create New...