Jump to content

Magicockerel

Premium Member
  • Posts

    188
  • Joined

  • Last visited

Everything posted by Magicockerel

  1. All that function does is attempt to find the workshop from the player's current location (using the WorkshopParent WorkshopLocations array). That's what I was talking about above. Bethesda use that approach themselves, but surprise surprise, it doesn't work in some areas of some settlements. I don't recommend using this method, as it's not always reliable. Edit: Specifically, this is the function you're referencing, for those interested.
  2. I just started a thread the other day about the best way to disable/delete workshop objects, so I'm in the same boat :P I haven't heard great things about deleting objects that are a part of the vanilla cell. Could you settle for disabling the skeletons? That's a much safer approach from what I know.
  3. It's just the workshop reference, which is that of the settlements workbench. Just off the top of my head, the Sanctuary workshop reference is 250FE for example. There are a number of ways in which you can get the reference, such as through certain workshop related events. For example, opening and closing workshop mode gives you the workshop reference of the current settlement (in the form of akSender). You can also check whether the location has a WorkshopRef type, but there are a couple odd scenarios when it's considered to be false. For example, when you have an outstanding quest for settlement NPCs (gotta kill those super mutants), or when the settlement's under attack. Getting the workshop from the player's location is generally a bad idea. It works fine most of the time, but there's at least one settlement where there's a significant area within the workshop bounds that doesn't return a workshop. Could you give me some more context? You can also get the workshop reference through linked references. For example, any workshop object is linked to the workshop reference through the WorkshopItemKeyword. Note, some pre-existing workshop objects such as Tatos on Abernathy farm don't have this keyword, but the UFO4P fixes this. You just need to use GetLinkedRef on that object with that keyword to get the workshop reference. Basically, it can be unreliable to get the workshop reference if you're just hustling ass around your settlement, but it's easy if you have something to play with. I've read that you can use the OnTriggerEnter() and OnTriggerLeave() Events to notify you when you enter/leave a workshops bounds. I didn't know enough back when I looked into it, so I didn't get too far, but that's something that you can look into as well if that interests you. I'll probably get around to it one of these days.
  4. Are you able to get the workshop reference when you want to determine whether the player's currently within a player owned settlement? If not, I'd check if the current location has the PlayerOwnedWorkshop ActorValue. If you are, you're able to call WorkshopRef.OwnedByPlayer. The former won't work in non-settlements such as Home Plate. The latter is the only way I've found to achieve that, but requires the workshop reference. I wouldn't rely upon getting the workshop reference from the player's location, as that doesn't work in all areas of all workshops. If you're looking for match conditions, you can also try LocationHasPlayerOwnedWorkshop.
  5. Those scripts are from F4SE. I get them popping up when I want to create an archive as well. I just highlight and remove them (the button to the top right of the window when creating an archive). Try removing them and only packing your mods files and let me know if you have any further issues.
  6. Are you saying that you're unable to download your mod? Looking at your files, it appears that the mod in question is unpublished. If that's the case, I've never been able to download my unpublished files either. Once I hit publish I'm able to download it fine, though. If it's that your mod file name's white, though, you just need to wait for it to upload and be verified by the Nexus server. There's typically a delay even for small files (I've had to wait a couple hours in the past for a file to go from white to green). Or are you saying that you're having issues packing your files using "Create Archive"? Keep in mind that you have to use the naming convention that Bethesda laid out if you want your .BA2 archive to be recognised by your .ESP. For example, if you're packing some scripts you'd use "ESPFileName - Main", or if you were packing Textures you'd use the suffix " - Textures" instead, etc. Really, more details would be appreciated to clarify the issue.
  7. Oh okay, that makes sense, thanks :) I had other more fruitful ideas, so I didn't think to check myself. Sadly, they would have received much more backlash from updating Papyrus from the users that couldn't immediately use their favourite mods (or port them over themselves), and from mod makers that would have had to invest time to update their mods. I doubt that and the time required to actually update Papyrus and their own assets sounded too appealing. They could release Skyrim on like 10 more platforms in that amount of time :P
  8. Have you had a look at how plasma weapons turn enemies into goop? I'd imagine that it's set up in a script somewhere, and that however they've implemented that functionality would be safe to carry over. Hopefully it's not hardcoded and applied through Keywords, or something along those lines. That may not be applicable to pre-placed bodies and skeletons, though.
  9. You could alias the location, and make use of the OnLocationLoaded() Event. When that event runs, you can change a global variable and then set it as a condition for the menu option to appear (as I described in my first post). You'd have to set up a Message form, though, and use the Show() Function to have it appear, rather than the Debug.MessageBox() Function.
  10. I'd first look at how existing implementations are achieved, and then attempt to carry that over to (for example) Brahmin. Brahmin can already be purchased from NPCs in random encounters, so you've got that sorted. You'd only need to change the animals in those random encounters to use the template of your (soon to be) assignable Brahmin that generates food. I'd initially look at what allows guard posts or plants to be assignable. I'd look at another workshop object with the same form type (Furniture in the case of guard posts and Flora in the case of plants), and carry things over until you've nailed down what makes it tick. That is, what you need to do to make a new Furniture form an assignable resource. I'd primarily look at Keywords, ActorValues and scripts (specifically the workshopobjectscript). Carry those over until you get closer to what you want. Once you've got something working, I'd first back up the .ESP file and then remove as much as you can (from what you added) until you've just got the essential changes left. Not knowing how scripts work is likely going to be a problem, as I'd wager that the mentioned script plays an integral role in this system. This will be less of a problem when you're carrying this over to the same form type, and more of a problem when you're throwing animals into the mix (that is, adapting this to another form type, as you may need to make alterations to the script). I just quickly threw all of the Keywords, ActorValues and the workshopobjectscript (with the same properties as the WorkshopGuardPostFurniture form) onto the Brahmin form to see what would happen. Now it's assignable, but I apparently don't have permission to assign people to the Brahmin. I also assigned it both Food and Safety ActorValues (of 2), which didn't show up. That's a better result than it not being assignable at all. To make testing easier I made the EncBrahminClarabell form use the WorkshopBrahmin form as a template for everything (which would be the form that the Brahmin use that you can purchase from random encounters). I didn't have a save with a Brahmin that I had purchased from a random encounter on-hand, so that saved me some time. If you do, you can skip that step. As I said, though, I'd first look at making some Furniture or Flora form that's already in the workshop assignable with resources first. Knowing what makes the system work in the first place will allow you to tell whether it's just not working. That could definitely be the case. You could learn everything you needed and only have it tell you that it isn't possible. I'd say that what you're looking to do definitely could be possible, though, as plants are both assignable and produce food, which is what you want. The issue is the difference in form type (NPC_ versus Flora). You'd have to dig in the workshopobjectscript to see how much that controls. While this is a neat idea that would appeal to a number of people, it doesn't particularly appeal to me from a modders perspective. So, this is about as much as I'll be playing around with things. If you have more general questions, shoot, though. Honestly, if you're starting out, I'd recommend something simpler. This could just require basic knowledge and a bit of playing around with things, but it could very well require a decent amount of scripting knowledge, and knowledge of what you could play around with in the first place. I started out playing with .ESP files in FO4Edit, and eventually learned how to script (though, I did have some basic knowledge is other programming languages going into that). There's no way that I would have attempted this when I was just starting. However, I usually learn a new thing by implementing it into a new project where I can lean on my existing knowledge for most of it. So, maybe I'm too results orientated to immediately jump in the deep end. If you're jumping in with no pre-existing knowledge, it could take weeks or months to see results.
  11. You're able to set conditions on the ConstructableObject form. For example, check out the workshop_co_TurretTripodHeavy form, where it has the GunNut01 perk as a condition. In the case of perks, the object will still appear when the conditions aren't met, but you're unable to build it. You could potentially change a global value when you pick up the item. If the global value doesn't have the correct value, then the object won't appear in the workshop menu.
  12. You'll need another variable to detect the button pressed when opening the sub-menu. So, you'll change the sub-menu component of the script along these lines... int ibutton2 = aaafastbellm1.show() If ibutton2 == 0 ;what is supposed to be a sub menu aaafastbellm1s.show() ElseIf ibutton2 == 1 ; back aaafastbellm1.show() EndIf If you want to go back, your best bet is to make use of functions. Showing the same message again won't achieve the same functionality as it did when you first open it, as you've removed any instructions you gave it the first time. I'd put the functionality of the primary menu into a function, call that function OnActivate and when you want to go back. If you want a more concise example, you can have a look at the source code to one of my mods. I deal with a great number of menus in that mod in particular, so I'm sure that you'll be able to find an example if you look. Your best bet is to open the source code and search for ">Back", ">Previous", or ">Next".
  13. I'm guessing that you want to keep those properties constant? That is, you don't want to change them via script at any point. Add the Const flag after each of the properties. You're unable to omit the Const flag if the script itself is flagged as Const. I also add the Mandatory flag to Auto Const properties, so that it will notify me if they're undefined. You'll want to define the properties as such: Message Property aaafastbellm Auto Const Mandatory Message Property aaafastbellm2 Auto Const Mandatory Message Property aaafastbellm3 Auto Const Mandatory If that either isn't the case or doesn't solve it, then you'll also notice that you've got a typo in the word "Poperty". Fix that up and that might solve things if your script doesn't have the Const flag.
  14. If you're looking to have your Papyrus syntax highlighted in Notepad++ you can follow this tutorial. It takes all of 2 minutes to set up. I would have spent hundreds of hours staring at Notepad++ without any syntax highlighting, and it's definitely a noticeable quality of life improvement. Keep in mind that this is specific to Fallout 4 Papyrus syntax, which is slightly different to previous titles such as Skyrim.
  15. If you're looking for scripting tutorials that cover the basics, you can check out Arron Dominion's YouTube channel.
  16. The same issue occurs when I attempt to add two or more activate entry points to an object that previously had none. If I make one or more of them replace the default option, then both will appear, but only one will work (the option assigned to the R key). Knowing this doesn't really help anything. This is peculiar and disappointing. The only solutions that I can think of have already been suggested.
  17. Thanks for the insight guys. I was in the process of playing around with the KillEssential() function, but there were various reasons as to why that wasn't working as I'd like. By the sounds of it, the second combination that you've suggested is the go. I'd prefer to err on the side of caution, and there will be a number of loops completed if they choose to upgrade all turrets. Could I ask where you found that the scrapping function actually deletes the object reference? Just for future reference, as I have released a number of mods related to the workshop system. I've found that the workshop resources are re-calibrated in the event of an actors death, or when an actor's repaired (in the case of the turret), but not much else. I am still in the process of combing through scripts, so there's obviously things that I would have missed. Thank you everyone for your help :)
  18. I'm unaware whether a workshop object gets disabled and/or deleted when it is scrapped. I just tested it by selecting a reference, scrapping it and attempting to enable it without any luck. Would it be safe to assume that scrapped workshop objects are at the very least not just disabled then? Disabling alone of course removes the turrets respective defense rating from the workshop, though. This thread would indicate that they're placed by scripts, but doesn't reveal much else. I did first look for a Scrap() function or something along those lines, but no luck. The only functions that I'm aware of that allow you to scrap objects are limited to items, and not NPCs (which turrets are). Are you aware of a function that allows you to scrap workshop objects? I may have come across such a function at one point, but I've spent so much time going over the CK wiki that I've forgotten. I'd imagine that disabling turret references would have a very insignificant performance impact (and potentially some save bloat?). I'm concerned with the cumulative impact after however many turrets have been disabled, though. Where it be 1,000, 10,000 or 1,000,000. If there's an impact, I'd almost prefer not to release the mod if it couldn't be avoided. The only turrets that I can think of that would have been in the vanilla game would be those at Covenant before you arrive. I could even find a way to filter those out if they're the only turrets that would cause issues when deleted.
  19. Context I've sorted out the logistics of a mod, where you're able to upgrade or downgrade your workshop machinegun turrets through an activate entry point perk. It's reasonably simple, I pull the orientation of the existing turret, check for the players level, perks, and the current encounter zone. I can then place the new turret at the location of the old turret, correcting the orientation and setting a linked reference to the same workshop (so that the defense value will be recognised by the workshop). Optionally, this process can be repeated for each of the same type of turret using GetWorkshopResourceObject(), assuming that they're loaded (which should be the case). The Problem The issue is how I go about 'scrapping' the turret that's being replaced. From what I can see there's four alternatives: Disable() DisableNoWait() Delete() DeleteWhenAble()I'm aware that you're going to have a bad time if you're deleting things when you're in the CK itself. Is it safe to delete these workshop turrets in-game using scripts, or should I instead settle for disabling them, or go about things entirely differently? I'm hesitant to settle for disabling the turrets, as I assume that disabled references hang around in the memory somewhere, as they have the potential to be re-enabled. If you have a thousand disabled turrets around the place, I imagine that there could be a performance impact. I don't need them to be re-enabled, I just need them gone. Any guidance would be appreciated.
  20. Yeah... that's unfortunately becoming more apparent each time I go back and take a look at modding SSE/Oldrim. Still, thanks for letting me know the unfortunate truth. As someone that focuses on and will sacrifice for efficient solutions, Fallout 4's becoming much more appealing. You're apparently unable to check for the script attached to a target in SSE, and even replacing the default activator results in a MessageBox popup (even if there's only the one choice). Everything that could have gone wrong has gone wrong. I guess it's just not meant for SSE haha, it would have worked fine in FO4.
  21. Just to preface this, I'm pulling from my knowledge in modding Fallout 4. I've noticed that Fallout 4 has several conveniences that SSE doesn't appear to have, so it could very well be the case that an equivalent feature doesn't exist. Basically, I'm looking to alias all objects with the mineorescript. The issue is that there doesn't appear to be any equivalent to Fallout 4's Reference Collection Alias. That is, you're unable to alias every instance that matches the set conditions. Are the only workarounds that you create as many aliases as there are instances, or that you frequently restart the alias quest and alias the closest matching instances to the player? The first options impractical, and the second option's inefficient. I'd appreciate it if anyone could either point me to a more optimal solution, or let me know that these are my only options. I'm intentionally trying to avoid directly editing the vanilla mineorescript, as that can bring with it compatibility issues. I'm also aware that I could replace the default activate option with a perk, which I'll probably end up doing. I'm thinking ahead, though, as this can only substitute so much of the functionality that a RefCol Alias provides.
  22. Interior workshop locations (I limited my testing to Home Plate, but I'm assuming that it's the same for other interior workshops) do not appear on the WorkshopLocations array in the WorkshopParent quest script (WorkshopParentScript). I'm stating the obvious, but I'd look at where the feature is pulling the list of workshops from. Considering interior workshops rely upon a different workbench (an interior equivalent with less options), this suggests that they're set up quite differently. This is coming from someone that has never created a new workshop, but has read at least some of the scripts behind them.
×
×
  • Create New...