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

TagAction improvements #13974

Closed

Conversation

dakkhuza
Copy link

The first in a series of PR's based on requests from some XML modders.

Improves the TagAction to allow for better tagging, mainly:

  • Allows tagging by species name
  • Adds EnemySubmarine and Ruin to required submarine type
  • Adds CharacterTeamType as a possible requirement to the following criteria jobidentifier, humanidentifier, players, speciesname

Example XML for testing

<ScriptedEvent identifier="tag_test">
    <SpawnAction speciesname="Crawler"/>
    <SpawnAction npcsetidentifier="outpostnpcs1" npcidentifier="commoner" spawnlocation="Outpost" teamid="None" />
    <SpawnAction npcsetidentifier="outpostnpcs1" npcidentifier="commoner" spawnlocation="Outpost" teamid="Team1" />
    <SpawnAction npcsetidentifier="outpostnpcs1" npcidentifier="commoner" spawnlocation="Outpost" teamid="Team2" />
    <SpawnAction npcsetidentifier="outpostnpcs1" npcidentifier="commoner" spawnlocation="Outpost" teamid="FriendlyNPC" />
    <TagAction criteria="speciesname:Crawler" tag="allcrawlers" />
    <TagAction criteria="speciesname:Human" tag="allhumans" />
    <TagAction criteria="players" tag="players" />
    <TagAction criteria="humanprefabidentifier:commoner" tag="team_none_commner" team="None" />
    <TagAction criteria="jobidentifier:mechanic" tag="team1_mechanic" team="Team1" />
    <TagAction criteria="humanprefabidentifier:commoner" tag="team2_commoner" team="Team2" />
    <TagAction criteria="humanprefabidentifier:commoner" tag="friendlynpc_commoner" team="FriendlyNPC"/>
</ScriptedEvent>

@Regalis11
Copy link
Collaborator

Read through the changes and gave the new features a test, and everything seems to work as expected. Merged this to our private repo now https://github.com/FakeFishGames/Barotrauma-development/commit/748b63d834bfd0ad68543169d8973d3b8906e43d. Thank you for your contribution! :)

@Regalis11 Regalis11 closed this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants