Ryunnz0331 Posted February 1, 2018 Share Posted February 1, 2018 I'm working on a mod where I can Utilize manually distributed Ai Packages for a simple Follower system, that doesn't count towards vanilla follower count. I the follow action works perfectly, and the AI follow package is activated when it meets a specific condition, I'm using a custom faction, and changing the faction rank determines whether or not the AI follow package is active. Technically speaking the mod works, when I go into the console (in game) and use Actor.SetFactionRank blah blah 0 or 1, it does what it's supposed to. But I cannot figure out how to utilize dialog, to set the faction rank via Topic Info- papyrus fragments, I get an error whenever I try to compile the script. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted February 2, 2018 Share Posted February 2, 2018 Post the fragment you are trying to compile along with the error you are getting. It will help us understand what you are trying to accomplish and where it is failing. Link to comment Share on other sites More sharing options...
Ryunnz0331 Posted February 2, 2018 Author Share Posted February 2, 2018 (edited) This is the code I put in "end" in papyrus fragment- 06005E78.SetFactionRank(ImmersiveTienaavaFollowFaction, 0) And this is the Compile error Starting 1 compile threads for 1 files... Compiling "TIF__06092479"... C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__06092479.psc(9,5): required (...)+ loop did not match anything at input 'E78' No output generated for TIF__06092479, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on TIF__06092479 When I try to change the BaseID for the actor, to the actual name of the Actor, with this Fragment- ImmersiveTienaava.SetFactionRank(ImmersiveTienaavaFollowFaction, 0) Then I get this Error Starting 1 compile threads for 1 files... Compiling "TIF__06092479"... C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__06092479.psc(9,0): variable ImmersiveTienaava is undefined C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__06092479.psc(9,33): variable ImmersiveTienaavaFollowFaction is undefined C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__06092479.psc(9,18): none is not a known user-defined type No output generated for TIF__06092479, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on TIF__06092479 Edited February 2, 2018 by Ryunnz0331 Link to comment Share on other sites More sharing options...
IsharaMeradin Posted February 2, 2018 Share Posted February 2, 2018 You cannot use an Editor ID number directly.  Topic Info Fragments have the following variables for use natively: akSpeaker and akSpeakerRefakSpeaker is the Actor doing the talkingakSpeakerRef is the ObjectReference doing the talking In your case, you may be able to use akSpeaker. If akSpeaker does not work (targets the wrong actor) then you can create a property that points to the appropriate actor. akSpeaker.SetFactionRank(ImmersiveTienaavaFollowFaction, 0)However, ImmersiveTienaavaFollowFaction needs to have a property created for it and the actual faction (which can have the same name as the property) assigned to it. Additional information:Topic Info - walkthrough of the CK Editor windowTopic Info FragmentsScripts - Information on various CK Editor windows related to scripts  Link to comment Share on other sites More sharing options...
Ryunnz0331 Posted February 2, 2018 Author Share Posted February 2, 2018 Thank you for your quick response, How do I go about creating a property for the faction? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted February 3, 2018 Share Posted February 3, 2018 If there is any code in the fragment box, comment it out. i.e. place a semi-colon ( ; ) in front of each lineExample: ;This line is commented outCompile the fragment to ensure that the script has been created. Fragments are actually functions that reside on a larger script attached to the base record where the fragment stems from. This larger script must exist prior to adding properties. Therefore we comment out the code and compile a basically empty fragment but it cannot actually be empty, a single semi-colon is sufficient for future scenarios. After it has been compiled, there should be a properties button on the 'Advanced' tab of the fragment box. If not, you can highlight the newly created script in the scripts list and select the property button there. Within the new window that appears there is an 'Add Property' button, press that.  You will need Faction for the 'Type'. The variable you want to use for 'Name'. 'Initial Value' should be empty. 'Ok' out of that window to save the property then select it in the property window, the grey space on the right will change to a variety of input boxes depending upon the type of property. At this point, if the variable name is identical to the Editor ID Name of the desired object you can use 'Auto-fill' to automatically assign the correct data. If not, use the input fields to locate the correct data. After you've done that, remove the semi-colons and modify your code, if necessary, to make use of the newly added property. Refer to the linked 'Scripts' page in the previous post for a brief explanation of some of these windows that you'll be seeing. Link to comment Share on other sites More sharing options...
Ryunnz0331 Posted February 4, 2018 Author Share Posted February 4, 2018 IT WORKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I just need to add a dialoge option to open their inventory, a wait option, then a follow option :) Thanks for your help! Link to comment Share on other sites More sharing options...
Ryunnz0331 Posted February 4, 2018 Author Share Posted February 4, 2018 (edited) One more question, the follow, Dismiss, and Wait Dialogue works like a charm, but I cant get the "can I trade some things with you option" to work. Basically I just replicated the original follower dialogue Papyrus fragment, which was akspeaker.OpenInventory() and it doesnt work. It compiles just fine, it just doesnt open his inventory... any Ideas? Edited February 4, 2018 by Ryunnz0331 Link to comment Share on other sites More sharing options...
IsharaMeradin Posted February 4, 2018 Share Posted February 4, 2018 I see no reason why it wouldn't work unless akSpeaker for some reason does not have any data associated with it. At this time, I am clueless... Link to comment Share on other sites More sharing options...
Ryunnz0331 Posted February 4, 2018 Author Share Posted February 4, 2018 Figured it out! I need to put Akspeaker.OpenInventory(true) because their disposition was flagging them as a non friend. Link to comment Share on other sites More sharing options...
Recommended Posts