kLAcK107 Posted November 27, 2011 Share Posted November 27, 2011 (edited) Does anyone have any info on how to use the built in Papryus Scripts? I have already extracted all the pexfiles included scripts from Skyrim - Misc.bsa My goal is to create a new follower through the console only, and not by just assigning it the follower faction (doesn't work on chickens :) For example if you target Lydia and type sv, you will see that she has dialogfollowerscript which is:signature: FA57C0DE version: 03.01 game id: 0001 build time: 000000004E962A90 (Wed Oct 12 17:02:24 2011) source = DialogueFollowerScript.psc user = builds machine = BUILDFARM05 user flag table: 00: hidden 01: conditional object table: DialogueFollowerScript: parent class: Quest user flags: 00000002 variables: name: ::pAnimalAlias_var type: referencealias user flags: 00000000 none name: ::pPlayerFollowerCount_var type: globalvariable user flags: 00000000 none name: ::iFollowerDismiss_var type: int user flags: 00000002 none name: ::pDismissedFollower_var type: faction user flags: 00000000 none name: ::HirelingRehireScript_var type: sethirelingrehire user flags: 00000000 none name: ::FollowerDismissMessageCompanionsFemale_var type: message user flags: 00000000 none name: ::pCurrentHireling_var type: faction user flags: 00000000 none name: ::FollowerDismissMessageCompanions_var type: message user flags: 00000000 none name: ::FollowerDismissMessageWait_var type: message user flags: 00000000 none name: ::pFollowerAlias_var type: referencealias user flags: 00000000 none name: ::FollowerDismissMessageCompanionsMale_var type: message user flags: 00000000 none name: ::AnimalDismissMessage_var type: message user flags: 00000000 none name: ::FollowerDismissMessage_var type: message user flags: 00000000 none name: ::pPlayerAnimalCount_var type: globalvariable user flags: 00000000 none name: ::FollowerDismissMessageWedding_var type: message user flags: 00000000 none properties: name: pDismissedFollower type: Faction user flags: 00000000 flags: 07 auto var name: ::pDismissedFollower_var name: iFollowerDismiss type: Int user flags: 00000000 flags: 07 auto var name: ::iFollowerDismiss_var name: pAnimalAlias type: ReferenceAlias user flags: 00000000 flags: 07 auto var name: ::pAnimalAlias_var name: FollowerDismissMessageCompanionsMale type: Message user flags: 00000000 flags: 07 auto var name: ::FollowerDismissMessageCompanionsMale_var name: FollowerDismissMessage type: Message user flags: 00000000 flags: 07 auto var name: ::FollowerDismissMessage_var name: FollowerDismissMessageCompanionsFemale type: Message user flags: 00000000 flags: 07 auto var name: ::FollowerDismissMessageCompanionsFemale_var name: FollowerDismissMessageCompanions type: Message user flags: 00000000 flags: 07 auto var name: ::FollowerDismissMessageCompanions_var name: pCurrentHireling type: Faction user flags: 00000000 flags: 07 auto var name: ::pCurrentHireling_var name: pPlayerAnimalCount type: GlobalVariable user flags: 00000000 flags: 07 auto var name: ::pPlayerAnimalCount_var name: FollowerDismissMessageWedding type: Message user flags: 00000000 flags: 07 auto var name: ::FollowerDismissMessageWedding_var name: FollowerDismissMessageWait type: Message user flags: 00000000 flags: 07 auto var name: ::FollowerDismissMessageWait_var name: HirelingRehireScript type: SetHirelingRehire user flags: 00000000 flags: 07 auto var name: ::HirelingRehireScript_var name: AnimalDismissMessage type: Message user flags: 00000000 flags: 07 auto var name: ::AnimalDismissMessage_var name: pFollowerAlias type: ReferenceAlias user flags: 00000000 flags: 07 auto var name: ::pFollowerAlias_var name: pPlayerFollowerCount type: GlobalVariable user flags: 00000000 flags: 07 auto var name: ::pPlayerFollowerCount_var states: functions: FollowerFollow return type: NONE user flags: 00000000 flags: 00 locals: actor: ::temp13 float: ::temp14 NONE: ::nonevar actor: FollowerActor code 0000: callmethod id: GetActorRef id: ::pFollowerAlias_var id: ::temp13 int: 0 0001: cast id: ::temp13 id: ::temp13 0002: assign id: FollowerActor id: ::temp13 0003: cast id: ::temp14 int: 0 0004: callmethod id: SetAv id: FollowerActor id: ::nonevar int: 2 string: "WaitingForPlayer" id: ::temp14 0005: callmethod id: SetObjectiveDisplayed id: self id: ::nonevar int: 3 int: 10 bool: 0 bool: 0 SetAnimal return type: NONE user flags: 00000000 flags: 00 params: ObjectReference: AnimalRef locals: actor: ::temp6 float: ::temp7 NONE: ::nonevar ObjectReference: ::temp8 actor: AnimalActor code 0000: cast id: ::temp6 id: AnimalRef 0001: assign id: AnimalActor id: ::temp6 0002: cast id: ::temp7 int: 0 0003: callmethod id: SetAv id: AnimalActor id: ::nonevar int: 2 string: "Lockpicking" id: ::temp7 0004: callstatic id: game id: GetPlayer id: ::temp6 int: 0 0005: callmethod id: SetRelationshipRank id: AnimalActor id: ::nonevar int: 2 id: ::temp6 int: 3 0006: callmethod id: SetPlayerTeammate id: AnimalActor id: ::nonevar int: 2 bool: 1 bool: 0 0007: cast id: ::temp8 id: AnimalActor 0008: callmethod id: ForceRefTo id: ::pAnimalAlias_var id: ::nonevar int: 1 id: ::temp8 0009: cast id: ::temp7 int: 1 000A: callmethod id: SetValue id: ::pPlayerAnimalCount_var id: ::nonevar int: 1 id: ::temp7 FollowerWait return type: NONE user flags: 00000000 flags: 00 locals: actor: ::temp9 float: ::temp10 NONE: ::nonevar actor: FollowerActor code 0000: callmethod id: GetActorRef id: ::pFollowerAlias_var id: ::temp9 int: 0 0001: cast id: ::temp9 id: ::temp9 0002: assign id: FollowerActor id: ::temp9 0003: cast id: ::temp10 int: 1 0004: callmethod id: SetAv id: FollowerActor id: ::nonevar int: 2 string: "WaitingForPlayer" id: ::temp10 0005: cast id: ::temp10 int: 72 0006: callmethod id: RegisterForUpdateGameTime id: ::pFollowerAlias_var id: ::nonevar int: 1 id: ::temp10 AnimalFollow return type: NONE user flags: 00000000 flags: 00 locals: actor: ::temp15 float: ::temp16 NONE: ::nonevar actor: AnimalActor code 0000: callmethod id: GetActorRef id: ::pAnimalAlias_var id: ::temp15 int: 0 0001: cast id: ::temp15 id: ::temp15 0002: assign id: AnimalActor id: ::temp15 0003: cast id: ::temp16 int: 0 0004: callmethod id: SetAv id: AnimalActor id: ::nonevar int: 2 string: "WaitingForPlayer" id: ::temp16 0005: callmethod id: SetObjectiveDisplayed id: self id: ::nonevar int: 3 int: 20 bool: 0 bool: 0 SetFollower return type: NONE user flags: 00000000 flags: 00 params: ObjectReference: FollowerRef locals: actor: ::temp0 NONE: ::nonevar int: ::temp1 bool: ::temp2 bool: ::temp3 ObjectReference: ::temp4 float: ::temp5 actor: FollowerActor code 0000: cast id: ::temp0 id: FollowerRef 0001: assign id: FollowerActor id: ::temp0 0002: callmethod id: RemoveFromFaction id: FollowerActor id: ::nonevar int: 1 id: ::pDismissedFollower_var 0003: callstatic id: game id: GetPlayer id: ::temp0 int: 0 0004: callmethod id: GetRelationshipRank id: FollowerActor id: ::temp1 int: 1 id: ::temp0 0005: cmp_lt id: ::temp2 id: ::temp1 int: 3 0006: cast id: ::temp2 id: ::temp2 0007: jmpf id: ::temp2 int: 5 0008: callstatic id: game id: GetPlayer id: ::temp0 int: 0 0009: callmethod id: GetRelationshipRank id: FollowerActor id: ::temp1 int: 1 id: ::temp0 000A: cmp_ge id: ::temp3 id: ::temp1 int: 0 000B: cast id: ::temp2 id: ::temp3 000C: jmpf id: ::temp2 int: 4 000D: callstatic id: game id: GetPlayer id: ::temp0 int: 0 000E: callmethod id: SetRelationshipRank id: FollowerActor id: ::nonevar int: 2 id: ::temp0 int: 3 000F: jmp int: 1 0010: callmethod id: SetPlayerTeammate id: FollowerActor id: ::nonevar int: 2 bool: 1 bool: 1 0011: cast id: ::temp4 id: FollowerActor 0012: callmethod id: ForceRefTo id: ::pFollowerAlias_var id: ::nonevar int: 1 id: ::temp4 0013: cast id: ::temp5 int: 1 0014: callmethod id: SetValue id: ::pPlayerFollowerCount_var id: ::nonevar int: 1 id: ::temp5 DismissAnimal return type: NONE user flags: 00000000 flags: 00 locals: actor: ::temp24 bool: ::temp25 float: ::temp26 NONE: ::nonevar int: ::temp27 actor: DismissedAnimalActor code 0000: cast id: ::temp25 id: ::pAnimalAlias_var 0001: jmpf id: ::temp25 int: 5 0002: callmethod id: GetActorRef id: ::pAnimalAlias_var id: ::temp24 int: 0 0003: callmethod id: IsDead id: ::temp24 id: ::temp25 int: 0 0004: cmp_eq id: ::temp25 id: ::temp25 bool: 0 0005: cast id: ::temp25 id: ::temp25 0006: jmpf id: ::temp25 int: 11 0007: callmethod id: GetActorRef id: ::pAnimalAlias_var id: ::temp24 int: 0 0008: cast id: ::temp24 id: ::temp24 0009: assign id: DismissedAnimalActor id: ::temp24 000A: cast id: ::temp26 int: 0 000B: callmethod id: SetActorValue id: DismissedAnimalActor id: ::nonevar int: 2 string: "Variable04" id: ::temp26 000C: cast id: ::temp26 int: 0 000D: callmethod id: SetValue id: ::pPlayerAnimalCount_var id: ::nonevar int: 1 id: ::temp26 000E: callmethod id: Clear id: ::pAnimalAlias_var id: ::nonevar int: 0 000F: callmethod id: Show id: ::AnimalDismissMessage_var id: ::temp27 int: 9 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 0010: jmp int: 1 AnimalWait return type: NONE user flags: 00000000 flags: 00 locals: actor: ::temp11 float: ::temp12 NONE: ::nonevar actor: AnimalActor code 0000: callmethod id: GetActorRef id: ::pAnimalAlias_var id: ::temp11 int: 0 0001: cast id: ::temp11 id: ::temp11 0002: assign id: AnimalActor id: ::temp11 0003: cast id: ::temp12 int: 1 0004: callmethod id: SetAv id: AnimalActor id: ::nonevar int: 2 string: "WaitingForPlayer" id: ::temp12 0005: cast id: ::temp12 int: 72 0006: callmethod id: RegisterForUpdateGameTime id: ::pAnimalAlias_var id: ::nonevar int: 1 id: ::temp12 GetState return type: String docstring: Function that returns the current state user flags: 00000000 flags: 00 code 0000: return id: ::state GotoState return type: NONE docstring: Function that switches this object to the specified state user flags: 00000000 flags: 00 params: String: newState locals: NONE: ::nonevar code 0000: callmethod id: onEndState id: self id: ::nonevar int: 0 0001: assign id: ::state id: newState 0002: callmethod id: onBeginState id: self id: ::nonevar int: 0 DismissFollower return type: NONE user flags: 00000000 flags: 00 params: int: iMessage int: iSayLine locals: actor: ::temp17 bool: ::temp18 bool: ::temp19 bool: ::temp21 NONE: ::nonevar float: ::temp22 actorbase: ::temp23 int: ::temp20 actor: DismissedFollowerActor code 0000: cast id: ::temp18 id: ::pFollowerAlias_var 0001: jmpf id: ::temp18 int: 5 0002: callmethod id: GetActorRef id: ::pFollowerAlias_var id: ::temp17 int: 0 0003: callmethod id: IsDead id: ::temp17 id: ::temp18 int: 0 0004: cmp_eq id: ::temp18 id: ::temp18 bool: 0 0005: cast id: ::temp18 id: ::temp18 0006: jmpf id: ::temp18 int: 52 0007: cmp_eq id: ::temp19 id: iMessage int: 0 0008: jmpf id: ::temp19 int: 3 0009: callmethod id: Show id: ::FollowerDismissMessage_var id: ::temp20 int: 9 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 000A: jmp int: 22 000B: cmp_eq id: ::temp21 id: iMessage int: 1 000C: jmpf id: ::temp21 int: 3 000D: callmethod id: Show id: ::FollowerDismissMessageWedding_var id: ::temp20 int: 9 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 000E: jmp int: 18 000F: cmp_eq id: ::temp21 id: iMessage int: 2 0010: jmpf id: ::temp21 int: 3 0011: callmethod id: Show id: ::FollowerDismissMessageCompanions_var id: ::temp20 int: 9 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 0012: jmp int: 14 0013: cmp_eq id: ::temp21 id: iMessage int: 3 0014: jmpf id: ::temp21 int: 3 0015: callmethod id: Show id: ::FollowerDismissMessageCompanionsMale_var id: ::temp20 int: 9 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 0016: jmp int: 10 0017: cmp_eq id: ::temp21 id: iMessage int: 4 0018: jmpf id: ::temp21 int: 3 0019: callmethod id: Show id: ::FollowerDismissMessageCompanionsFemale_var id: ::temp20 int: 9 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 001A: jmp int: 6 001B: cmp_eq id: ::temp21 id: iMessage int: 5 001C: jmpf id: ::temp21 int: 3 001D: callmethod id: Show id: ::FollowerDismissMessageWait_var id: ::temp20 int: 9 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 001E: jmp int: 2 001F: callmethod id: Show id: ::FollowerDismissMessage_var id: ::temp20 int: 9 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 float: 0.000000 0020: callmethod id: GetActorRef id: ::pFollowerAlias_var id: ::temp17 int: 0 0021: cast id: ::temp17 id: ::temp17 0022: assign id: DismissedFollowerActor id: ::temp17 0023: callmethod id: StopCombatAlarm id: DismissedFollowerActor id: ::nonevar int: 0 0024: callmethod id: AddToFaction id: DismissedFollowerActor id: ::nonevar int: 1 id: ::pDismissedFollower_var 0025: callmethod id: SetPlayerTeammate id: DismissedFollowerActor id: ::nonevar int: 2 bool: 0 bool: 1 0026: callmethod id: RemoveFromFaction id: DismissedFollowerActor id: ::nonevar int: 1 id: ::pCurrentHireling_var 0027: cast id: ::temp22 int: 0 0028: callmethod id: SetAv id: DismissedFollowerActor id: ::nonevar int: 2 string: "WaitingForPlayer" id: ::temp22 0029: callmethod id: GetActorBase id: DismissedFollowerActor id: ::temp23 int: 0 002A: callmethod id: DismissHireling id: ::HirelingRehireScript_var id: ::nonevar int: 1 id: ::temp23 002B: cmp_eq id: ::temp21 id: iSayLine int: 1 002C: jmpf id: ::temp21 int: 6 002D: assign id: ::iFollowerDismiss_var int: 1 002E: callmethod id: EvaluatePackage id: DismissedFollowerActor id: ::nonevar int: 0 002F: cast id: ::temp22 int: 2 0030: callstatic id: utility id: Wait id: ::nonevar int: 1 id: ::temp22 0031: jmp int: 1 0032: callmethod id: Clear id: ::pFollowerAlias_var id: ::nonevar int: 0 0033: assign id: ::iFollowerDismiss_var int: 0 0034: cmp_eq id: ::temp19 id: iMessage int: 2 0035: jmpf id: ::temp19 int: 2 0036: jmp int: 3 0037: cast id: ::temp22 int: 0 0038: callmethod id: SetValue id: ::pPlayerFollowerCount_var id: ::nonevar int: 1 id: ::temp22 0039: jmp int: 1 remain: 0000000000000000 In theory, shouldn't we be able to attach this papyrus script to a new npc and make it a follower? Using the aps command.I have attached this script to a chicken, but I cannot set the required vars for the script. I'm trying the SetPapyrusVar command but do not know the sytax Edited November 27, 2011 by kLAcK107 Link to comment Share on other sites More sharing options...
sirxazor Posted November 27, 2011 Share Posted November 27, 2011 I was able to see at the script of objects ingame using a command which I forgot... but I was to see something similar to this. On my Mannequin tho Link to comment Share on other sites More sharing options...
Grothos Posted November 27, 2011 Share Posted November 27, 2011 No, from what i can understand from the layout of the script, the object that it is attached to must already have these variables declared when the script is run. So a chicken would not work as it is not set up by defualt to handle dialog interactions. A humanoid npc may beable to do this as it would more likely areasy have the necessary variables already attached to it. The code looks to be a very very very minor improvement ovr the previous scripting system. It reminds me of a very watered down form of COBOL, lol... it uses all in game counsle comands so if you really want to have some one follow you, just use the commands listed in the script. Which should work on any npc... Link to comment Share on other sites More sharing options...
kLAcK107 Posted November 27, 2011 Author Share Posted November 27, 2011 there is an actual follow command in this script but it is not accessible from the console Link to comment Share on other sites More sharing options...
kLAcK107 Posted November 27, 2011 Author Share Posted November 27, 2011 got it somewhat working by ssq 750baforcereferenceintoalias Animal You can use this to make anyone follow you Link to comment Share on other sites More sharing options...
Recommended Posts