×
Меню
Индекс

MSFD Modifying faction standing and reaction

 
 
[no fix] PCJoinFaction ["FactionID"]
 
Makes the PC a member of the specified faction. FactionID is optional if it is not added it will use the faction of the NPC who called the function
 
 
LowerRank, ["FactionID"]              
RaiseRank, ["FactionID"]
 
Raises or lowers the object’s rank in its current faction. This function doesn’t work in global scripts, but works in targeted and local scripts. It also works in dialogue. You can use the fix to raise a different NPC's rank (NPC_ID->RaiseRank) in dialogue results only - in scripts this function will only work on the actor the script is attached to.
 
The faction ID argument is totally ignored by the game engine, so is not required, and even if you have the faction ID as something totally irrelevant (for example “eel pie”), the script still compiles and runs fine.
 
You cannot use RaiseRank to have an NPC join a faction (unlike the PC version) - if the NPC doesn't already belong to a faction RaiseRank has no effect.
 
[no fix] PCLowerRank, ["FactionID"]
[no fix] PCRaiseRank, ["FactionID"]    
 
Raises or lowers the PC 1 rank in the NPCs faction. If PC is not part of the faction, it will set the rank to 1.
Example Script:
 
Begin treboniusScript
;if you're both in the Arena
;and if the guildmaster quest is active...
;sets a journal and raises the player's rank
;when trebonius dies.
short doOnce
short nolore
 
if ( doOnce == 1 )
     Return
endif
if ( GetJournalIndex MG_Guildmaster < 50 )
     Return
endif
if ( GetPCCell "Vivec, Arena" == 0 )
     Return
endif
if ( duelActive == 0 )
     Return
endif
if ( OnDeath == 1 )
     Set DuelActive to 0
     Set doOnce to 1
     PCRaiseRank "Mages Guild"
     PCRaiseRank "Mages Guild"
     Journal MG_Guildmaster 100
endif
End
 
[no fix] PCExpell ["FactionID"]              
 
Expels PC from NPCs faction.
 
[no fix] PCClearExpelled ["FactionID"]         
 
Clears "currently expelled" flag on the player.
 
Example script:
A script by Bethesda, which clears the Players expelled status after some time:
Begin expelledMG
 
;this is just a model
;it is supposed to be on an item in each of the Mages Guilds.
 
short myDay
short temp
 
if ( PCExpelled "Mages Guild" == 0 )
     return
endif
 
if ( ExpMagesGuild == 0 )
     Set ExpMagesGuild to 1
endif
 
if ( myDay == 0 )
     Set myDay to Day
endif
 
if ( myDay == Day )
     return
endif
 
if ( Day > myDay )
     Set temp to ( Day - myDay )
else
     Set temp to ( myDay - Day )
endif
 
Set myDay to Day
 
Set temp to ( temp + 2 )
 
Set ExpMagesGuild to ( ExpMagesGuild + temp )
 
if ( ExpMagesGuild > 30 )
     Set ExpMagesGuild to 0
     PCClearExpelled "Mages Guild"
     return
endif
 
End
 
 
[no fix] ModPCFacRep, var_enum, ["FactionID"]
[no fix] SetPCFacRep, var_enum, ["FactionID"]
 
          ModPCFacRep, 5, "Imperial Legion"
          ModPCFacRep, 5, "Temple"
 
Modifies or defines the reaction modifier for members of the specified faction (towards the PC).
 
ModFactionReaction, "factionID1", "factionID2", var_enum
SetFactionReaction, "factionID1", "factionID2", var_enum
 
Modifies or defines the reaction of one faction towards members of another faction.
 
Example: This is part of the MoonAndStar script. This part first makes the PC part of the faction "Nerevarine" and then sets two factions to react particularly to this change:
          ;faction reaction and journal stuff
          Journal "A2_6_Incarnate" 50
          player->modReputation 5
          PCJoinFaction, Nerevarine
    
          if ( GetPCRank, Redoran >= 0 )
               modFactionReaction, "Redoran", "Nerevarine", 4
          endif
    
          if ( GetPCRank, Temple >= 0 )
               modFactionReaction, "Temple", "Nerevarine", 4
 
 
[no fix] PCJoinFaction ["FactionID"]
 
Makes the PC a member of the specified faction. FactionID is optional if it is not added it will use the faction of the NPC who called the function
 
 
LowerRank, ["FactionID"]              
RaiseRank, ["FactionID"]
 
Raises or lowers the object’s rank in its current faction. This function doesn’t work in global scripts, but works in targeted and local scripts. It also works in dialogue. You can use the fix to raise a different NPC's rank (NPC_ID->RaiseRank) in dialogue results only - in scripts this function will only work on the actor the script is attached to.
 
The faction ID argument is totally ignored by the game engine, so is not required, and even if you have the faction ID as something totally irrelevant (for example “eel pie”), the script still compiles and runs fine.
 
You cannot use RaiseRank to have an NPC join a faction (unlike the PC version) - if the NPC doesn't already belong to a faction RaiseRank has no effect.
 
[no fix] PCLowerRank, ["FactionID"]
[no fix] PCRaiseRank, ["FactionID"]    
 
Raises or lowers the PC 1 rank in the NPCs faction. If PC is not part of the faction, it will set the rank to 1.
Example Script:
 
Begin treboniusScript
;if you're both in the Arena
;and if the guildmaster quest is active...
;sets a journal and raises the player's rank
;when trebonius dies.
short doOnce
short nolore
 
if ( doOnce == 1 )
     Return
endif
if ( GetJournalIndex MG_Guildmaster < 50 )
     Return
endif
if ( GetPCCell "Vivec, Arena" == 0 )
     Return
endif
if ( duelActive == 0 )
     Return
endif
if ( OnDeath == 1 )
     Set DuelActive to 0
     Set doOnce to 1
     PCRaiseRank "Mages Guild"
     PCRaiseRank "Mages Guild"
     Journal MG_Guildmaster 100
endif
End
 
[no fix] PCExpell ["FactionID"]              
 
Expels PC from NPCs faction.
 
[no fix] PCClearExpelled ["FactionID"]         
 
Clears "currently expelled" flag on the player.
 
Example script:
A script by Bethesda, which clears the Players expelled status after some time:
Begin expelledMG
 
;this is just a model
;it is supposed to be on an item in each of the Mages Guilds.
 
short myDay
short temp
 
if ( PCExpelled "Mages Guild" == 0 )
     return
endif
 
if ( ExpMagesGuild == 0 )
     Set ExpMagesGuild to 1
endif
 
if ( myDay == 0 )
     Set myDay to Day
endif
 
if ( myDay == Day )
     return
endif
 
if ( Day > myDay )
     Set temp to ( Day - myDay )
else
     Set temp to ( myDay - Day )
endif
 
Set myDay to Day
 
Set temp to ( temp + 2 )
 
Set ExpMagesGuild to ( ExpMagesGuild + temp )
 
if ( ExpMagesGuild > 30 )
     Set ExpMagesGuild to 0
     PCClearExpelled "Mages Guild"
     return
endif
 
End
 
 
[no fix] ModPCFacRep, var_enum, ["FactionID"]
[no fix] SetPCFacRep, var_enum, ["FactionID"]
 
          ModPCFacRep, 5, "Imperial Legion"
          ModPCFacRep, 5, "Temple"
 
Modifies or defines the reaction modifier for members of the specified faction (towards the PC).
 
ModFactionReaction, "factionID1", "factionID2", var_enum
SetFactionReaction, "factionID1", "factionID2", var_enum
 
Modifies or defines the reaction of one faction towards members of another faction.
 
Example: This is part of the MoonAndStar script. This part first makes the PC part of the faction "Nerevarine" and then sets two factions to react particularly to this change:
          ;faction reaction and journal stuff
          Journal "A2_6_Incarnate" 50
          player->modReputation 5
          PCJoinFaction, Nerevarine
    
          if ( GetPCRank, Redoran >= 0 )
               modFactionReaction, "Redoran", "Nerevarine", 4
          endif
    
          if ( GetPCRank, Temple >= 0 )
               modFactionReaction, "Temple", "Nerevarine", 4