coldloc Posted March 5, 2019 Posted March 5, 2019 Sometimes papyrus Api document may contain lot of functions look similar. or can achieve certain game effect via many approaches , and different methods used may have pros and cons. ( usability and reliability etc. ) I would like to start a thread on brain storming ideas on achieving certain basic effects in game. Example Topic 1: Don't let an Actor move ( Actor movement toggle ) below are some available methods and ideas: setDontmove Flags this actor as "don't move" or not. setRestrained Flags this actor as restrained or not. Restrained actors will not move from their current position, but will continue to "think" (pick packages, run detection so they could yell alarms) and go into dialogue. setVechcle Attaches the actor to a horse, cart, or other vehicle -- or detaches it from its current vehicle workaround method: toggleAI() Toggles AI on and off in the game. add AI package to an actor to disable actor move swap player control on Ai controllable actor ... welcome to share your ideas or attach existing discussion web links related with similar type of topic in this thread ...
Psalam Posted March 5, 2019 Posted March 5, 2019 Quote 2 hours ago, coldloc said: Sometimes papyrus Api document may contain lot of functions look similar. or can achieve certain game effect via many approaches , and different methods used may have pros and cons. ( usability and reliability etc. ) I would like to start a thread on brain storming ideas on achieving certain basic effects in game. Example Topic 1: Don't let an Actor move ( Actor movement toggle ) below are some available methods and ideas: setDontmove Flags this actor as "don't move" or not. setRestrained Flags this actor as restrained or not. Restrained actors will not move from their current position, but will continue to "think" (pick packages, run detection so they could yell alarms) and go into dialogue. setVechcle Attaches the actor to a horse, cart, or other vehicle -- or detaches it from its current vehicle workaround method: toggleAI() Toggles AI on and off in the game. add AI package to an actor to disable actor move swap player control on Ai controllable actor ... welcome to share your ideas or attach existing discussion web links related with similar type of topic in this thread ... Excellent point and wonderful topic. However, your title does no justice to what you purport to do in your thread. I would encourage you to consider to changing it to something declarative like "Let's compare different ways to do things in scripting" rather than leaving it as a questions (which implies that you are requiring assistance).
Ruffled Pigeon Posted March 5, 2019 Posted March 5, 2019 SetDontMove doesn't really seem to work, by what I can tell from the CK Wiki the function doesn't actually disable actor movement, but prevents them from being pushed arround by other NPCs, except it doesn't seem to work as our very own darkconsole points out in the Discussions. Not that I ever tried the function, so don't take my word for it lol It's a nice Thread idea anyways, but there are few situations where you really have multiple choices when it comes to Papyrus honestly. I am often happy if I find a single way to do something which actually works properly and as expected. Just the other day I wanted to implement dynamic dialogue (as in the User inputs something in a MCM Textfield and it changes the Topic of my dialogue) and was actually baffled that there exists no such vanilla or SKSE function. I asked arround a bit and was told it's impossible, google yielded the same answer too. It actually isn't though, I found a way to do it but it's super hacky and basically fuck Papyrus.
Seijin8 Posted March 6, 2019 Posted March 6, 2019 9 hours ago, Ruffled Pigeon said: there are few situations where you really have multiple choices when it comes to Papyrus honestly. I am often happy if I find a single way to do something which actually works properly and as expected. Just the other day I wanted to implement dynamic dialogue (as in the User inputs something in a MCM Textfield and it changes the Topic of my dialogue) and was actually baffled that there exists no such vanilla or SKSE function. I asked arround a bit and was told it's impossible, google yielded the same answer too. It actually isn't though, I found a way to do it but it's super hacky and basically fuck Papyrus. I'd love to see what your hack was. Knowing a clunky way to do the impossible is still valuable. And I'm in agreement with you: plenty of things don't have any good ways to do them. Since this wasn't set up as a help thread, I will instead leave this link here.
Ruffled Pigeon Posted March 6, 2019 Posted March 6, 2019 16 hours ago, Seijin8 said: I'd love to see what your hack was. Knowing a clunky way to do the impossible is still valuable. And I'm in agreement with you: plenty of things don't have any good ways to do them. Since this wasn't set up as a help thread, I will instead leave this link here. I don't know enough about non-unique actors to help with that one, sorry. How the dynamic dialogue works is basically using (abusing) Text Replacements, the <Alias=AliasName> Tag to be exact. First we need to create a Keyword we'll use later, name doesn't matter, I just called it Dynamic_Dialogue_Dummy. What I did next was create a new Weapon for the Topic I want to be dynamically changeable (I just duplicated the Iron Dagger), remove all Keywords it had before and attach the Keyword we just created. Next I create a new Cell (again, I just copied unownedcell, F2 to rename) and place my Dummy Weapon in there. Now we need to create a new Quest which is going to hold all our Dynamic Dialogue. Remove the Start Game Enabled and Run Once flags. Now, we create a new Alias. On the Alias, we want to make sure we have the Stores Text Checkbox ticked. On the Fill Type we choose Find Matching Reference, and on the Conditions we put HasKeyword - The Keyword we created earlier - == 1. Now we can create the dialogue, but it has to be in that Quest! In the Topic Prompt simply put <Alias=TheRespectiveAliasName>. Now we also need a second Quest, this can be your Controller Quest or anything really. In the Script first create a Quest Property which holds the Quest from earlier, maybe do a Quest.Start() in the OnInit. On that script we also need a ObjectReference Property for our Weapon. When filling it just choose the Cell from earlier and then pick the right Weapon. Now, when you want to change the Text of a Topic, first thing you need to do is to change the Name of the Weapons Base Object. So for example: My_Dummy_Weapon_01.GetBaseObject().SetName("Our String") Next, after we change any Names, you need to call Dynamic_Dialogue_Quest.Stop() Dynamic_Dialogue_Quest.Start() And that should've done the trick, the dialogue is now changed. The reason I went with Find Matching Reference instead of Specific Reference is because I think that Specific Reference will always hold onto that Reference, even if the Quest is disabled, and I'm not sure how that'd behave with the Name change. Using Find Matching Reference the Quest always has to pick the Weapon up again after every restart. This is okay for a single Topic, but if you want multiple of them you either need to create a new Keyword for each and every one of them, so they always go into the right Alias, or maybe see what happens when you choose Specific Reference instead. Another thing to keep in mind is that Topics are limited to 82 Characters iirc. I don't know what happens when you go over that, so maybe try limiting it to 82 Characters.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.