foamyesque Posted September 25, 2018 Share Posted September 25, 2018 (edited) Okay, so: I have a situation where I want to change the activation text of stuff. Ideally I would also like to preserve their names in the activation prompt. However I have not found any way to do so via SAL (which is what I'm using, to, for example, replace 'Pickpocket' with 'Steal from'). Does anyone know if such is possible, either through this method or some other? Edited September 25, 2018 by foamyesque Link to comment Share on other sites More sharing options...
cdcooley Posted September 25, 2018 Share Posted September 25, 2018 If it's possible I never found it and I was looking for that too. I even tried inserting text replacement code but it seems the field is just literal text and overrides everything. (I was going to use it to have the prompt show Steal instead of Read if the book was owned by someone else. But then I couldn't see the name of the book I was about to steal. If you always want the 'Pickpocket' prompt to be 'Steal from' then you could change the sPickpocket game setting. But I don't know of any way to make it dynamic. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted September 25, 2018 Share Posted September 25, 2018 The mod iActivate changes the 'Pickpocket' text to various other options along with removing the keybind and other things. You may wish to see how they did that. It may or may not be of help in figuring out what you are wanting to do. Link to comment Share on other sites More sharing options...
foamyesque Posted September 25, 2018 Author Share Posted September 25, 2018 (edited) If it's possible I never found it and I was looking for that too. I even tried inserting text replacement code but it seems the field is just literal text and overrides everything. (I was going to use it to have the prompt show Steal instead of Read if the book was owned by someone else. But then I couldn't see the name of the book I was about to steal. This is more or less my problem, yeah. I want to override the default activation text in a couple of specific situations, but in ones where I can't simply create an activator. I'd like to be able to have that respect the name of the thing being activated. I'll poke around with the mod Ishara suggested but I have a nasty suspicion it just overrides the game-setting strings for all activations, and I don't want to do that. :sad: EDIT: Yeah, it's an MCM front end for SetGameSetting function calls that adjust the default strings. Edited September 25, 2018 by foamyesque Link to comment Share on other sites More sharing options...
IsharaMeradin Posted September 25, 2018 Share Posted September 25, 2018 Can you not change the string as desired and change it back afterwards? Some extra work but probably the only potential solution. Link to comment Share on other sites More sharing options...
foamyesque Posted September 25, 2018 Author Share Posted September 25, 2018 Can you not change the string as desired and change it back afterwards? Some extra work but probably the only potential solution. I'd have to change it every time the player put their crosshairs over the object in question -- and there's no guarantee that changing it back will work correctly, either. Link to comment Share on other sites More sharing options...
cdcooley Posted September 26, 2018 Share Posted September 26, 2018 Now that I think about it there is one other option. I play with the on-screen strings dynamically in Sometimes Pick Up Books using SKSE's UI functions. It generally works except for Russian language translation issue and the fact that the setting isn't as dynamic as I would have really liked. Give the mod a try and see what you think. The source for the scripts should be packed in the BSA somewhere. Link to comment Share on other sites More sharing options...
foamyesque Posted September 26, 2018 Author Share Posted September 26, 2018 The documentation for SKSE's UI stuff on the CK wiki is either really sparse or non-existent. I'll take a look but I might be back with a lot of questions :v Link to comment Share on other sites More sharing options...
cdcooley Posted September 27, 2018 Share Posted September 27, 2018 Yes, the UI stuff is fairly undocumented because the folks that understand it best don't really deal with Papyrus and more than they absolutely need to. And unfortunately for you I just remembered that I decided against that direct UI change for Sometimes Pick Up Books and went with a method that changed the sRead game setting for performance reasons. But just in case it helps here is the old dynamic version of the code: Event OnCrosshairRefChange(ObjectReference ref) {Dynamically changes the prompt to reflect what will happen when activating the targetted book.} Book base if ref base = ref.GetBaseObject() as Book endif if base string prompt if (keyPressed == AlwaysTake && !base.GetSpell()) || !base.IsTakeable() || ref.IsActivationBlocked() prompt = actionName[0] ; Read (might not be technically accurate for activation-blocked books) elseif ref.IsOffLimits() prompt = actionName[1] ; Steal else prompt = actionName[2] ; Take endif if base.IsRead() ; indicate previously read books with a grey prompt (for read/take but not steal) prompt = "<font color='#808080'>" + prompt + "</font>" endif string label = UI.GetString("HUD Menu", "_root.HUDMovieBaseInstance.RolloverText.text") label = StringUtil.Substring(label, StringUtil.Find(label,StringUtil.AsChar(13))) if !label label = "" endif if ref == Game.GetCurrentCrosshairRef() ; a last check to make sure the crosshair is still on the book UI.SetString("HUD Menu", "_root.HUDMovieBaseInstance.RolloverText.htmlText", prompt + label) endif endif EndEvent Link to comment Share on other sites More sharing options...
foamyesque Posted September 27, 2018 Author Share Posted September 27, 2018 Hrm. How was the performance on the GetCrosshairRefChange event? It seems like one that would throw an awful lot of events to the script engine. Did it slow things noticeably? How fast was the override of the activation text? Was it noticeable to the user? Link to comment Share on other sites More sharing options...
Recommended Posts