Jump to content

How to turn NPC against player if player attacks


Recommended Posts

I'm certain it has to do with crime factions but i can't figure it out. basically, I want to create an experience close to the actual game where the npc's in this area are friendly but if the player commits a crime, they turn against him/her. so how do I manage that? So far, I've created a faction where the player is a friend (so they don't attack) and then i created a crime faction that does not include the player, but it does track crime. What am I doing wrong or missing?

Link to comment
Share on other sites

What do you mean by "commit a crime?" Stealing is the only one I can think of in Fallout. All you have to do for that is double click on an object and go to the ownership tab, and make it owned by someone. If everyone else in the area is an ally to the NPC that owns and all their AI is set to "Help Allies" they will help in attacking the player. I could probably come up with a few other ideas depending on what your definition of "crime" is.

Link to comment
Share on other sites

Crime faction just means that npc "defends" it. Like, if you go to Diamond city and shoot the place up, Piper will be pissed but Strong doesn't care, because it's not in his crime faction. Same reason why Preston attacks you if you attack your own settlement but Hancock doesn't give a damn unless you attack him too. Also you can just sleep day or two and everyone is friends again.

 

If you want more "realistic" crime factions, you propably want to track those "crimes", like track alias deaths and then use https://www.creationkit.com/fallout4/index.php?title=SetEnemy_-_Faction in a script.

 

 

Link to comment
Share on other sites

What do you mean by "commit a crime?" Stealing is the only one I can think of in Fallout. All you have to do for that is double click on an object and go to the ownership tab, and make it owned by someone. If everyone else in the area is an ally to the NPC that owns and all their AI is set to "Help Allies" they will help in attacking the player. I could probably come up with a few other ideas depending on what your definition of "crime" is.

 

I mean any sort of crime. So if I attack one person, I want everybody in the area to attack the player. But ONLY if the player commits a crime. whether its stealing, hacking, attacking, etc

 

Crime faction just means that npc "defends" it. Like, if you go to Diamond city and shoot the place up, Piper will be pissed but Strong doesn't care, because it's not in his crime faction. Same reason why Preston attacks you if you attack your own settlement but Hancock doesn't give a damn unless you attack him too. Also you can just sleep day or two and everyone is friends again.

 

If you want more "realistic" crime factions, you propably want to track those "crimes", like track alias deaths and then use https://www.creationkit.com/fallout4/index.php?title=SetEnemy_-_Faction in a script.

 

 

Do you mean to check the "track crime" box and add that scripting while in the faction menu?

Link to comment
Share on other sites

I mean, if you want to make them hostile to you more than couple days, you have to make them "enemy", just like when you get kicked out of the Institute, the whole Institute faction turns permanently hostile to you.

 

What crime faction does is, when you steal potato from Diamond City, whole city goes crazy BUT only for couple of days.

 

So, if you are okay with that, you simply make Crime faction, lets call it CrimeFaction. Then you have NPC1, NPC2, etc.. then those npcs have their own faction.. lets call it PotatoFaction. Do not fill any crime tab info in this normal faction, only in CrimeFaction.

 

Then, you make new form list, lets call it PotatoFactionCrimeList and pull PotatoFaction in there and go to your CrimeFaction, crime tab, select track crime and select Shared Crime Faction List and select PotatoFactionCrimeList there.

 

Now, when you steal PotatoFactions item and they notice it, they will all attack you. You can also put any factions you want in the PotatoFactionCrimeList form list, and they will react when you do crimes vs any of those factions. See how Piper is done. She has crime faction named CompanionCrimeFaction_Piper that uses form list CompanionCrime_Piper, that has all workshop factions and some towns, caravans etc on the list.

 

Then as last thing, you need to open Actor tab, pull the crime faction to his/her faction list, and then select the Crime faction in "Assigned Crime Faction".

 

 

One thing I noticed that does not work is: if you pickpocket someone and he/she doesn't notice it, but you were detected by his friend, nobody gives a damn. But for stealing items from ground/table, using owned terminal, locked door etc should work fine.

 

So TLDR;

 

You make two factions, one normal and don't touch the crime tab, then another and fill the crime tab, then make form list with all factions you want them to react, select this formlist in Crime tab in your crime faction and finally pull the crime faction to NPC's actor tab and select Shared Crime Faction List.

 

edit: Also tick "Attack on sight" on the crime faction.

Edited by vkz89q
Link to comment
Share on other sites

So TLDR;

 

You make two factions, one normal and don't touch the crime tab, then another and fill the crime tab, then make form list with all factions you want them to react, select this formlist in Crime tab in your crime faction and finally pull the crime faction to NPC's actor tab and select Shared Crime Faction List.

 

edit: Also tick "Attack on sight" on the crime faction.

 

Wow. Thank you very much for that. This is what i was looking for.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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