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

Compasses for Infection gamemode #17

Closed
TBG1000 opened this issue Jul 6, 2022 · 0 comments · Fixed by Warzone/PublicMaps#147
Closed

Compasses for Infection gamemode #17

TBG1000 opened this issue Jul 6, 2022 · 0 comments · Fixed by Warzone/PublicMaps#147

Comments

@TBG1000
Copy link
Member

TBG1000 commented Jul 6, 2022

Issue:

Members of the "Infected" team during an Infection game or map can no longer be provided with a compass that will point towards remaining humans.

Background:

A TGM pull request converted a compass given to a member of the "Infected" team into a human tracker, increasing the chance of winning (necessary for cases where lots of players are online).

It was up to the mapmaker to include a compass in the kit, but compasses could also be given to players through the command /give @a[tag=infected] compass.

Proposed / potential solution:

Note: ince Infection was previously hardcoded for Warzone, compasses were rather "exclusive" of TGM, so it may be undesirable to introduce the feature to upstream PGM.

  1. Mars could read through the loaded map's XML and find if it has been labeled as Infection through the game="" attribute of the root <map> tag, or also through the <game> sub-element.
  2. If true, then check if a compass is provided through a <kit>
  3. Convert such compass into a human tracker

With the power and versatility of PGM, mapmakers could then be able to decide when to give Infected the compass through the use of time filters, making it unecessary to provide it from the beginning or to manually give it through commands.

Example XML snippet:

# Initial Infected kit
    <kit id="infected-kit-start">
        <helmet locked="true" unbreakable="true" color="00FF00" material="leather helmet"/>
        <chestplate locked="true" unbreakable="true" color="00FF00" material="leather chestplate"/>
        <leggings locked="true" unbreakable="true" color="00FF00" material="leather leggings"/>
        <boots locked="true" unbreakable="true" color="00FF00" material="leather boots"/>
        <item slot="0" unbreakable="true" material="iron sword" name="`2`lInfection Sword"/>
    </kit>
    
# Infected kit with a compass (human tracker)
    <kit id="infected-kit-compass">
        <helmet locked="true" unbreakable="true" color="00FF00" material="leather helmet"/>
        <chestplate locked="true" unbreakable="true" color="00FF00" material="leather chestplate"/>
        <leggings locked="true" unbreakable="true" color="00FF00" material="leather leggings"/>
        <boots locked="true" unbreakable="true" color="00FF00" material="leather boots"/>
        <item slot="0" unbreakable="true" material="iron sword" name="`2`lInfection Sword"/>
        # Include human tracker
        <item slot="1" material="compass" name="`1`lHuman Tracker"/>
    </kit>

# Infected team first spawns with initial kit, no compass
    <spawn filter="before-10s" team="infected-team" kit="infected-kit-start">
        <regions yaw="90">
            <point>-1080.5,40,-1015.5</point>
        </regions>
    </spawn>
    
# After 6 minutes, infected are given the kit with a compass (human tracker)
    <spawn filter="after-6m" team="infected-team" kit="infected-kit-compass">
        <regions yaw="90">
            <point>-1080.5,40,-1015.5</point>
        </regions>
    </spawn>
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 a pull request may close this issue.

1 participant