Jump to content

Magicockerel

Premium Member
  • Posts

    188
  • Joined

  • Last visited

Everything posted by Magicockerel

  1. The DefaultObject ShowWornItemsKeyword_DO uses the ShowWornItemsKeyword keyword with the following description: "This keyword will allow the teammate container menu to show worn items."
  2. The Fallout 4 Creation Kit was updated along with the release of version 1.10.162 of Fallout 4. Plugins saved in the most recent version of the CK will only be recognised by Fallout 4 version 1.10.162+, so I suggest that you either update your game, obtain an older version of the CK, or use FO4Edit to edit the plugin.
  3. This is covered in the following tutorial that I previously linked you to: Bethesda Mod School: 3ds Max 102 - Simple Collision Method
  4. This is not possible with 3DS Max 2015, you require 3DS Max 2013. I recommend that you check out these tutorials: Bethesda Mod School: 3ds Max 101 - Setup & Basic CollisionBethesda Mod School: 3ds Max 102 - Simple Collision Method
  5. GetDisplayName() is what you're looking for, given that it works with ObjectReferences rather than Forms. I can't remember off the top of my head whether it works with levelled actors, but it might.
  6. I don't know why I didn't try this, but you're right this works, thanks. I'll pass it off as being tired, haha. Reneer's second suggestion works for me, so you may want to try that. I appreciate your input all the same, the custom event approach is a pretty good workaround. If you're having troubles you can PM me and I'll send you my mod files so that you can see what we've done differently. I've found the custom event approach to be preferable if you're either remotely communicating with a large number of scripts or you want to do so indirectly for whatever reason (I suppose it saves you some properties, etc.). Bethesda even choose to sometimes send out custom events when there are actual events that do the same thing (e.g. OnWorkshopObjectPlaced() and other workshop based events), which is odd.
  7. Thanks for taking the time to respond. I forgot to include this in the OP, but I did also try this and received the following compilation error: "cannot cast a ObjectReference to a OtherScriptName, types are incompatible". If it's of any assistance, both scripts extend ReferenceAliases, given that's what they're attached to.
  8. I'm having trouble remotely running a function in a script that is attached to an alias from a script that is attached to another alias (in the same quest). The scripts can be simplified to the following: Actor Property PlayerRef Auto Const Mandatory ReferenceAlias Property OtherAlias Auto Const Mandatory Event OnAliasInit() Self.RegisterForDetectionLOSGain(akViewer = PlayerRef, akTarget = Self.GetReference()) EndEvent Event OnGainLOS(ObjectReference akViewer, ObjectReference akTarget) If (akViewer == PlayerRef && akTarget == Self.GetReference()) OtherAlias.GetReference().TheFunctionIWantToRun() EndIf EndEvent Function TheFunctionThatIWantToRun() ; Do things EndFunction The error that it is giving me is "TheFunctionIWantToRun is not a function or does not exist" when I try to compile the top script, the bottom script of course compiles without any issues. For reference, I do get the same error when I get rid of GetReference() and change the line to "OtherAlias.TheFunctionIWantToRun()". This would suggest that the script isn't actually attached to the object in a way that Papyrus can detect, given that it is only attached while it has that alias. Hopefully I'm overlooking something simple and there's a quick fix. I can work around this issue, but I'd rather not. If I'm forgetting any information that could be helpful, please do let me know. Thanks in advance for any assistance you're able to provide.
  9. I haven't done this sort of thing before, but a friend of mine has. You might want to look into using AddOnNodes. This thread has some information on the matter, and links to this tutorial.
  10. Thanks, I've only started working with WorldObjects recently, so there's a lot that I don't know about them. That actually cleared a lot up, as I had made a number of poor assumptions that left me confused. I did a few tests and made the wrong conclusions, but going back over things now I think I have it mostly worked out.
  11. For some reason Self on a script attached to an Activator returns the script itself and not the form. Not that it really matters where I use it, but I've given an example below. For reference, the activator is a constructable object that you can build at settlements. In this context, the akReference parameter returns the workshop at which the object was placed, and not the object reference unfortunately. I am not wanting to instead attach the script to the workshop itself in order for akReference to return any object built at that settlement. Event OnWorkshopObjectPlaced(ObjectReference akReference) Debug.Notification(asNotificationText = "Self = " + Self As Activator) EndEvent When I go to compile the script I get the following error message, "cannot cast a NameOfTheScript to a activator, types are incompatible". If you write Self to the script log, you will indeed see that Self returns the script rather than form. The only thread that I was able to find that could potentially help me out did not find the solution. You can find said thread here. If anyone knows of a simple way to return the reference that the script is attached to, rather than the script itself, please let me know.
  12. I have an opaque non-actor ObjectReference that I want to have fade away over time during a certain event. Everything I've found suggests that you're only able to make actors transparent. For example, both the SetAlpha() function and the Chameleon Magic Effect are both limited to actors. I thought Effect Shaders may be able to help me out, but they're apparently limited to applying a membrane to an ObjectReference. Some features of Effect Shaders are even limited to actors as well, which isn't promising. The abFadeOut parameter of the Disable() function has the ObjectReference fade out over a fixed duration of approximately 1 to 2 seconds. The issue is, I want it to fade away over approximately 10 seconds. An equivalent of the SetAlpha() function for non-actor ObjectReferences would be perfect. However, pretty much any avenue of approach would be viable for this project, it just needs to be reasonable simple. The only limitations are that I cannot rely on DLC or 3rd party tools like F4SE. The only possible solution that I am aware of is to create a series of animations that change the transparency of the ObjectReference, and to play those animations via a script in regular intervals. I'm not sure how difficult that would be to implement, and how good that would look, so I'm after other solutions.
  13. All I'm saying is set the abDefaultProcessingOnly parameter to true when you activate the workshop workbench. Doing this will mean that workshop mode will not start, but you will still be able to open the workshop workbench container. Going by your script, change the following line: MasterContainer.activate(Game.getPlayer()) To this: MasterContainer.Activate(akActivator = Game.GetPlayer(), abDefaultProcessingOnly = True) You don't need to include the parameter names if you don't want to.
  14. I do something very similar to what you're wanting to do in the Transfer Items feature of my Workshop Control Panel mod. This feature allows you to remotely access the workshop workbench of any settlement that you have connected via supply line. It looks like you're activating the workbench, in which case you need to set the abDefaultProcessingOnly parameter value of the Activate() function to true. You currently have it set to false because you have not included it in your script. So, for example, I do this: AbernathyFarm.Activate(akActivator = PlayerRef, abDefaultProcessingOnly = True)Edit: This happens because a script is attached to the workshop workbench that starts workshop mode when you activate it. The abDefaultProcessingOnly parameter allows you to avoid triggering the activate event that the script detects.
  15. You can substitute the No More Twigs mod for the No Ugly Plants And More mods Twigs Only file to save an ESP slot.
  16. If you're using the Dynamic Performance Tuner and Load Accelerator mod, remove dxgi.dll from your Fallout 4 folder.
  17. There is already something of a corner peak system in Fallout 4, as you can see in this video. Unfortunately, what you're suggesting is in no way possible with papyrus, sorry to say.
  18. You can give the player a cloak via an ability that applies a script to all actors that meet certain conditions. There are several different mods and vanilla features that use this method. An example of a vanilla feature would be the power armor targeting HUD modification. Instead of an ability, this uses an enchantment, but you can easily substitute it for an ability that you give to the player via a perk. The forms go: EnchPA_TargetingHUD (an enchantment on the object mod) PA_TargetingHUD_Cloak (a cloak that the enchantment grants) DetectLifeCloakSpell (a spell that the cloak applies) DetectLifeCloakEffect (a script that the spell applies to the actors that meet the specified conditions)Keep in mind that DetectLifeCloakEffect uses a script effect archetype so that it can apply the effect shader without doing anything else. You could either add a script on top of the effect shader, or remove the effect shader and add the script. A better example would be the locational damage mod. I say better because it works in the way that you want it to work, without having to make those changes I mentioned. The forms work in a similar way: BLD_Cloak (an ability on the player instead of an enchantment on an object mod) BLD_CloakApplyEffect (a cloak that the ability applies to the player) BLD_ApplyScript (a spell that the cloak applies) DetectLifeCloakEffect (a script that the spell applies to the actors that meet the specified conditions)So if you set up something like this, all you would need is a set of conditions that allow the spell to identify just the vendors (e.g. a keyword, a conditional property, a faction, etc.) - I would check the WorkshopParent aliases, which would likely apply something that you can check for to just the vendors. Make sure to create a new perk that has the first spell as an ability, and to add that perk to the player via a quest or something.
  19. Have you tried something like this?: If (ThisREF Is WorkshopNPCScript) ; ThisREF has the WorkshopNPCScript attached If (ThisREF.GetWorkshopID() >= 0) ; ThisREF is assigned to a workshop If (ThisREF.bIsWorker) ; This should tell you whether the settler is assigned or unassigned ; However, it is possible for this to be out of sync ; Either through the use of console commands or buggy mods that don't properly maintain this property EndIf EndIf EndIfEither way, the WorkshopNPCScript should have what you're looking for. I'm not sure whether the GetWorkshopID() function will be faster than what you've got, but that's the only other way that I can think to do it. The script does describe the value of this function as a mirror of the actor value that you're already calling, so there shouldn't be any disadvantage to using it. Maybe you could substitute it for the bWorkshopStatusOn property? I don't imagine that the bIsWorker property would have any false positives, but it will have false negatives. The only false negative that I know of is that bIsWorker doesn't account for provisioners. So, you'll also have to check whether the actor's in the CaravanActorAliases, which is a WorkshopParent alias/script property.
  20. It looks like this was covered in your other thread, I'd work through that step-by-step. If you don't want to use the CallFunction() function, etc. you can also more directly access the function. This is an excerpt from my Workshop Control Panel mod: WCP_QUST_WorkshopControlPanel Property WorkshopControlPanelScript Auto Hidden Event OnInit() GetWorkshopControlPanelScript() Self.RegisterForRemoteEvent(akEventSource = PlayerRef, asEventName = "OnPlayerLoadGame") EndEvent Event Actor.OnPlayerLoadGame(Actor akSender) GetWorkshopControlPanelScript() EndEvent Function GetWorkshopControlPanelScript() If (Game.IsPluginInstalled(asName = "WCP.esp")) WorkshopControlPanelScript = Game.GetFormFromFile(aiFormID = 0x00000F9A, asFilename = "WCP.esp") As WCP_QUST_WorkshopControlPanel EndIf EndFunction Function QuickScrap() Workbench = WorkshopControlPanelScript.Workshop.GetContainer() EndFunction For context, Workshop is a property of the WCP_QUST_WorkshopControlPanel quest script. You can extract the source files to my mods from the BA2 file using a tool like BAE if you want to look into it more. I'll be looking at implementing the method that SKK50 covers tomorrow, as my method requires these referenced scripts to be in the data folder. That gets to be a bit of a pain when you have 5 scripts that are interconnected. Given that you come across as fairly new to scripting, you might want to check out some YouTube tutorials, like Arron Dominion. You can also read some of the pages linked on the CK wiki.
  21. All I'm saying is that it sounds like you're using the name of your companion (e.g. Piper, Nick, etc.) to determine which companion you want to command. There are a number of drawbacks to this implementation. I'm not sure in what context you're obtaining info from other mods. If you have a hotkey that is specific to a given companion, then assign that companion to a property as such: Actor Property CompanionPiper Auto Const Mandatory Then if this property can be found in your list of current followers, issue the command.
  22. I'm not saying that it's impossible to achieve what you're looking to do here, but the follower/companion commands feature could very well be hard-coded into the game (like a lot of other things). I was looking into ranged activate choices at one point, and so I had a look at how the Intimidation/Wasteland Whisperer/Animal Friend perks worked. Turns out applying the GetInIronSights condition to perks extends the range of activate choices. But, it's inconvenient that you have to be in iron sights. So, I looked into how the companion commands feature worked, and I was never able to find anything in the CK. If you have any luck, I'd be interested in what you find, but I never found anything myself.
  23. I advise against using the GetName() F4SE function to determine who you're referencing. What happens if the user has changed Piper's name via mods? What happens if the user isn't using an English version of the game? I'd instead assign Piper to a property. That would be quicker in-game as well, as that's one less function you have to call.
  24. When asking for help with getting a script to compile, people typically need to know the error you're getting, and the full script. Still, it's likely that there error is that you've separated "ElseIf" into two lines, such as: If () ElseIf() EndIfYou'll also want to assign the properties at least an "Auto" flag, you can read about them here. I'm not sure why you're defining event and function parameters as properties, akActionRef and akOtherContainer, so I'd remove them. You've also defined the parameter type when calling the function, which you can't do. At most write out the parameter names. This should help you out some: ; I use the Auto Hidden flags if I'm altering the property via script ; You won't be able to edit the property if it has the Const flag, as that holds the property constant ; If you're setting the value of the property via the property window, I'd use the Auto Const Mandatory flags ; How have you set the akItem property? MiscObject Property akItem Auto Hidden Event OnActivate(ObjectReference akActionRef) ; akItem is a parameter of the GetItemCount() function ; If you haven't assigned the property anywhere outside of this script then it's holding a NONE value ; If you've just defined the akItem parameter as a property like the others, then remove it ; You'll have to set the item somewhere though, whether it's from this script or another If (Game.GetPlayer().GetItemCount(akItem = akItem) == 0) ; This text will only show in logs if you have tracing enabled Debug.Trace(asTextToPrint = "Player doesn't have ...") ElseIf (Game.GetPlayer().GetItemCount(akItem = akItem) >= 1) ; You don't define parameter type in the function itself, just the parameter name, and even then only if you feel like it Game.GetPlayer().RemoveItem(akItemToRemove = akItem, aiCount = 1, abSilent = false, akOtherContainer = None) EndIf EndEvent
  25. There's a list of functions at the CK wiki, you can find an AddPerkPoints() function there.
×
×
  • Create New...