Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Team2 (hostile) NPC AI completely break if the location has a team/faction #13892

Open
2 tasks done
itchyOwl opened this issue Apr 29, 2024 Discussed in #13818 · 0 comments
Open
2 tasks done

Team2 (hostile) NPC AI completely break if the location has a team/faction #13892

itchyOwl opened this issue Apr 29, 2024 Discussed in #13818 · 0 comments
Assignees
Labels
Bug Something isn't working Code Programming task

Comments

@itchyOwl
Copy link
Collaborator

Discussed in #13818

Originally posted by ubertpendragon April 24, 2024

Disclaimers

  • I have searched the issue tracker to check if the issue has already been reported.
  • My issue happened while using mods.

What happened?

If the location doesn't have outpostteam="None" and is owned by I assume FriendlyNPC team or a faction, the AI of NPCs in team2 breaks: Enemies flee you without attacking.

I assume this is to prevent Team2 from shooting at the outpost? But humans don't actually shoot handheld weapons at walls

image

IF YOU SPAWN THE ENEMIES WITH FRIENDLY TEAM ID and THEN CHANGE THEIR TEAM, THE AI IS FINE FOR SOME REASON

      <Character identifier="soldierseparatists" from="de_separatistscombat" teamid="FriendlyNpc" requirekill="true" />
      
    <ScriptedEvent identifier="takeoverteamtest" >
      <TagAction criteria="humanprefabidentifier:soldierseparatists" tag="defenders" ContinueIfNoTargetsFound="true" />
      <NPCChangeTeamAction npctag="defenders" teamtag="Team2" />
    </ScriptedEvent> 

IF YOU SPAWN THE ENEMIES WITH teamid="Team2" OR LEAVE IT BLANK, THE AI BREAKS

This is a problem for any event/mission that uses Team2 to turn NPCs hostile. Otherwise you have to loop a combataction event to circumvent the problem

Example of modded mission that is basically using the abandonedoutpostassassinate mission, but in a city

Desktop.2023.09.10.-.17.38.09.06_42.mp4
  <OutpostDestroyMission name="Coalition Station-Takeover" identifier="cotakeover_separatistoutpost" tags="outposttakeovermission" type="OutpostDestroy" requireCorrectLocationType="true" locations="city" reward="5500" difficulty="4" commonness="0" allowretry="true" BlockLocationTypeChanges="true">
    <Reputation identifier="separatists" amount="-20" />
    <Reputation identifier="coalition" amount="10" />
    <Icon texture="Content/UI/MissionIcons.png" sourcerect="0,512,256,256" color="214,50,48" />
    <Characters>
      <Character identifier="soldierseparatists" from="de_separatistscombat" requirekill="true" />
      <Character identifier="soldierseparatists" from="de_separatistscombat" requirekill="true" />
      <Character identifier="soldierseparatists" from="de_separatistscombat" requirekill="true" />
      <Character identifier="soldierseparatists" from="de_separatistscombat" requirekill="true" />
      <Character identifier="soldierseparatists" from="de_separatistscombat" requirekill="true" />
      <Character identifier="soldierseparatists" from="de_separatistscombat" requirekill="true" />
      <Character identifier="soldierseparatists" from="de_separatistscombat" requirekill="true" />
      <Character identifier="soldierseparatists" from="de_separatistscombat" requirekill="true" />
      <Character identifier="soldierseparatists" from="de_separatistscombat" requirekill="true" />
      <Character identifier="soldierseparatists" from="de_separatistscombat" requirekill="true" multiplayeronly="true" />
      <Character identifier="soldierseparatists" from="de_separatistscombat" requirekill="true" multiplayeronly="true" />
      <Character identifier="soldierseparatists" from="de_separatistscombat" requirekill="true" multiplayeronly="true" />
    </Characters>
    <TriggerEvent state="0" delay="1" eventidentifier="cooutposttakeoverevent" campaignonly="true" />
    <LocationType identifier="city" />
    <message header="missionheader0.coalitiontakeover" text="missionmessage0.coalitiontakeover" />
  </OutpostDestroyMission>

Reproduction steps

  1. Delete outpostteam="None" from abandonedoutpost locationtype.xml
  2. Start an abandoned outpost mission with human enemies
  3. AI breaks

Bug prevalence

Happens every time I play

No response

Version

v1.4.4.1 (Blood in the Water Update)

@itchyOwl itchyOwl added Bug Something isn't working Code Programming task labels Apr 29, 2024
@itchyOwl itchyOwl self-assigned this Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Code Programming task
Projects
None yet
Development

No branches or pull requests

1 participant