-
Posts
26 -
Joined
-
Last visited
Everything posted by Minuos
-
Hi all, I have some randomly generated NPCs who I want to draw weapons with the player. I'm currently using OnAnimationEvent() to detect when the player draws or sheathes their weapon and a duplicate package on the NPCs, with the Weapon drawn flag checked and a conditional for if the player's weapon is out. I'd like the change to be instant, but the NPCs only seem to realise they need to draw/sheathe when the player enters or exits sneak mode. I've tried EvaluatePackage(), but no luck. Any suggestions? Solved: OnAnimationEvent() wasn't firing. I just added the following line to both packages under On Begin, which means I could remove all the code pertaining to this from the core script. My NPCs now draw/sheathe when the player does. (akActor as Actor).EvaluatePackage(True)
-
SSE Fully capitalize text from an alias?
Minuos replied to Minuos's topic in Skyrim's Creation Kit and Modders
Thanks for the reply. I had a feeling that was the case, but it's still a shame. Unfortunately, I can't use a dummy in this instance, so I'll just have to settle for lowercase. -
Hi all, I'm struggling to find any info on this. Say I have an actor that fills an alias to display its name in a message... Anyone know of a way to make that text appear entirely in uppercase letters?
-
Clearing a settler's current workshop
Minuos replied to Minuos's topic in Fallout 4's Creation Kit and Modders
Thanks guys. I played around with this stuff for a while, but this was the key: Including a slight variation of these lines in my conversion script allows me to assign the actors without having to move them at all. Big thanks. All I need to do now is find a way to check if an actor is a provisioner or vendor and my mod's groundwork is pretty much done. -
Hi all, My mod has actors that are more like workshop objects than settlers, but they have the WorkshopNPCScript. I've made a function which converts them into settlers, which seems to work except for the fact that they can't be assigned to objects or caravans unless they are sent to another workshop and back, or the player leaves and returns. I'm thinking the best solution to this would be to remove them from whatever workshop they currently belong to before OpenWorkshopSettlementMenu() pops, so the player can reassign them to the workshop without having to move them to a different one first. Anyone know how I might do this?
-
Menu button condition issue
Minuos replied to Minuos's topic in Fallout 4's Creation Kit and Modders
As always, I appreciate the help. -
Menu button condition issue
Minuos replied to Minuos's topic in Fallout 4's Creation Kit and Modders
The message displays the actor's name, which is what the alias is for, so it must be filled in time. I removed the Alias.Clear() line from the script to be certain, but no luck. It just seems like it doesn't work. -
Menu button condition issue
Minuos replied to Minuos's topic in Fallout 4's Creation Kit and Modders
Thanks. I was hoping for a way around that but I think it's the only solution. -
Hi all, I'm trying to make some options in a messagebox menu only appear under certain conditions. I can get this to work if the player is the target of the condition, but not the actor whose script brings up the message. For example, I want one option to appear if the player OR the actor has > 0 Stimpaks in their inventory. I've tried running the condition on Subject, Target, QuestAlias (on an alias filled by the actor)... It just doesn't work. I can work around it by setting values on the player in the script like: If Self.GetItemCount(Stimpak) > 0 Game.GetPlayer().SetValue(ActorHasStimpak, 1) Else Game.GetPlayer().SetValue(ActorHasStimpak, 0) EndIf And then the conditions on the message button will be based on the player's Stimpak count and AV set by the script. There could potentially be a dozen of these, though, which could slow down how quickly the menu appears. I'd really prefer to keep it simple. Any ideas for getting message button conditions to run on the actor?
-
Understood. To my knowledge, there's no natural way of doing this via script. If I'm right in thinking that, then the only way I can really conceive of it is by using the reference's Z angle as a basis for some number work for TranslateTo(). Starting point would probably be the fact that a reference's Z angle isn't limited to between 0 and 360, so you'd want to bring it into that range to calculate XY translation based on that. Conditionally adding or subtracting 360 until it's true should work. You'd also need to approach X and Y differently based on whether or not the ref's Z angle was between 180 and 360(0) or 90 and 270, respectively, so the function knows whether to translate XY in positive or negative. Getting the process down might be tricky. How's your maths?
-
IIRC you can calculate within a function. So: self.TranslateTo(self.GetPositionX() + 10, self.GetPositionY() + 32, self.GetPositionZ(), self.GetAngleX() + 90, self.GetAngleY(), self.GetAngleZ(), 5, 10) That should move the reference like you described without affecting the Z axis or YZ angles, at a movement speed of 5 and rotation speed of 10.
-
Hi all, Just curious as to whether or not this is possible. For example, if I wanted the player's name to appear entirely in uppercase letters within a message. Anyone know? I know it's possible to capitalize the first letter, but that's not quite what I'm looking for. Edit: My current workaround is just to have a capitalized version of the actor's name as their short name, and call <Alias.ShortName=x> instead. Not as dynamic as I'd hoped, but it works for the actors in my mod.
-
Hi all, When using messages in sequence, there is a slight delay between one message closing and the next one opening. I've reduced it to ~0.2 seconds by optimising my script but it could be a problem for my mod that NPCs are still moving around during these brief moments, especially if the player goes back and forth between messages. Just wondering if anyone knows of a way to keep the game paused between messages while still having script processes continue to run, or to keep the current message open until the next one appears. Edit: I just made an ability spell with the slow time effect at a magnitude of 0.01. My script adds it to the player when the initial message pops and removes it at the end of the function. Time moves so slowly between messages that it's essentially frozen.
-
Texture on modded mesh not loading properly
Minuos replied to adb3nj's topic in Fallout 4's Creation Kit and Modders
Is this happening with any of the railings in the base game or just yours? Have you tried running the game with higher texture settings? -
I figured it out. The reference alias property couldn't be filled on the script attached to the actor. I removed the property from the script manually and added it through the CK and for some reason that allowed it to be filled when adding the script to the actor... I'm not sure exactly how, but the message now displays the actor's name using the settings you advised, so I'm happy. Thanks for all your help. It's very much appreciated.
-
There's really not much to that event, but sure: Event OnActivate(ObjectReference akActionRef) HiMyNameIs.ForceRefTo(Self) IdleMenu() EndEvent The reference alias is defined as: ReferenceAlias Property HiMyNameIs Auto Const IdleMenu() calls a custom function which handles the message box stuff. This works, so I know OnActivate() is firing.
-
The quest is enabled and running. The alias -> NONE even after activating the NPC with the ForceRefTo() line. I have script experience and I've used autorun quests to handle stuff before, but my knowledge level is pretty much 0 when it comes to aliases. I created the alias by hitting New Reference Alias and checking Stores Text and Optional. I didn't touch anything else. Are there other steps? That's useful, thanks. There are a couple of 'submenu' messages that loop back to this main message though, so I need to use the CK this time.
-
Thanks for your help. I wasn't aware of the dropdown. It now returns [...] which means the alias isn't being filled? Are there any settings other than Stores Text I should be using? What's the cleanest way to fill an alias from a script? Running AliasName.ForceRefTo(Self) on the actor's script (OnActivate()) doesn't seem to be working. The message still displays [...].
-
Hi all, I have workshop NPCs (FF) that bring up a message box when activated, displaying a few actor values (MessageName.Show()). I know you can't pass a text string to a float but I'd like to make the name of the activated NPC appear at the top of the message box for QoL reasons. Is this possible? I'm aware of F4SE's GetName() and GetDisplayName() functions but not sure if it's possible to pass the resulting string to a message in the CK. Anyone know? I'm not really sure how to work with aliases, so I'd very much appreciate a little added guidance if that's the only way to do this.
-
I sincerely hope my mod doesn't give anyone cancer. At any rate, I got what I wanted by using the following line in an activate perk entry fragment: (akTargetRef as Actor).Activate(akTargetRef) Standard activation is blocked, so no pickpocketing occurs. The NPC essentially activates itself, triggering the OnActivate event in its own script. As an added bonus, I can set the activate label to whatever I like.
-
For the record, my NPCs aren't initially persistent. I was toying with the idea of making them lite followers and they'd sometimes be unloaded when changing cells. I need to do some playtesting to gauge the potential impact of the mod if the NPCs are forced to persist. Honestly, the mod is a bit experimental. My own scripts are very conditional but there are a few events that will fire frequently in some situations, so it needs a good stability playtest in general.