Jump to content

How to detect characters and faction whitout using esp ?


Recommended Posts

Hi

 

I meet a complex problem.

 

As you know, I begin some little mods. Thye will be DLC of other mods (Madness Mountain for FTD, Witch and Beast for AFS).

For madness moutain for example, I need to detect a NPC and some factions... for example, if FTD esp is detected, shul tar become the quest giver, and player receive the insmouth slave faction. If not, somebody else become the quest giver, and player will not receive that faction.

 

Like tis :

If "From the Deeps" is detected, questgiver.forcerefto("Shul Tar")

 

Like Simple slavery act for detecting incomes.

 

Thanks in advance.

 

Link to comment

You can do that by using some lines of code, and by knowing the IDs of the actors you want.

 

Something like

 

Actor questGiver
Actor Property alternateQeustGiver Auto ; "Fill that with an actor that is available"
 
Function ...()
 
  if Game.GetModByName("From the Deeps.esp")!=-1
    questGiver = Game.getFormFromFile(0xABCDEF, "From the Deeps.esp") as Actor ; "Be sure to have the exact ID (6 Hexa chars) for the actor"
  else
    questGiver = alternateQuestGiver
  endIf
 
EndFunction
 
Link to comment

 

You can do that by using some lines of code, and by knowing the IDs of the actors you want.

 

Something like

Actor questGiver
Actor Property alternateQeustGiver Auto ; "Fill that with an actor that is available"
 
Function ...()
 
  if Game.GetModByName("From the Deeps.esp")!=-1
    questGiver = Game.getFormFromFile(0xABCDEF, "From the Deeps.esp") as Actor ; "Be sure to have the exact ID (6 Hexa chars) for the actor"
  else
    questGiver = alternateQuestGiver
  endIf
 
EndFunction
 

 

So, I could use the same way for factions ?

For example, if I wish to detect AFSForswornFriendFaction or aFTDDagonSlaveFaction ?

Link to comment

 

 

So, I could use the same way for factions ?

For example, if I wish to detect AFSForswornFriendFaction or aFTDDagonSlaveFaction ?

 

 

Yes, you can extract literally any kind of form with Game.getFormFromFile(), you just have to cast it with as Faction instead of as Actor, and have the questGiver variable be of type Faction. Once you have the faction loaded into a variable, its just a matter of using IsInFaction() on the actor you want to check.

 

You can even extract entire quests with this method, allowing you to get data from or manipulate other mods without any master dependency.

 

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use