Jump to content

(noob) Topic info Papyrus Fragments, Need help


Ryunnz0331

Recommended Posts

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

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 by Ryunnz0331
Link to comment
Share on other sites

You cannot use an Editor ID number directly.

 

Topic Info Fragments have the following variables for use natively: akSpeaker and akSpeakerRef

akSpeaker is the Actor doing the talking

akSpeakerRef 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 window

Topic Info Fragments

Scripts - Information on various CK Editor windows related to scripts

 

 

Link to comment
Share on other sites

If there is any code in the fragment box, comment it out. i.e. place a semi-colon ( ; ) in front of each line

Example:

;This line is commented out

Compile 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

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 by Ryunnz0331
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...