PGM icon indicating copy to clipboard operation
PGM copied to clipboard

Region and filter attributes in flag & scorebox module referencing issue

Open CrazyisCreeps opened this issue 5 years ago • 7 comments

Honestly not sure how to best sum this up. Regions and filters defined in the flags & scoreboxes module can't be listed as this form, and must be listed as the second.

<score>
    <time result="objectives">5m</time>
    <box value="10" filter="only-blue" cooldown="5">
        <region name="blue-score-zone"/>
    </box>
    <box value="10" filter="only-red" cooldown="5">
        <region name="red-score-zone"/>
    </box>
</score>
<score>
    <time result="objectives">5m</time>
    <box value="10" cooldown="5">
        <cuboid name="blue-score-zone" min="-7,1,-44" max="-2,2,-41.5"/>
        <filter>
            <team>blue</team>
        </filter>
    </box>
    <box value="10" cooldown="5">
        <cuboid name="red-score-zone" min="2,1,42.5" max="8,2,45"/>
        <filter>
            <team>red</team>
        </filter>
    </box>
</score>

So whatever it's called, inline referencing or whatever, doesn't seem to work. Filters and regions (it appears the region needs to be in the module itself, not as a reference) need to be in the module in order for the map to properly load.

Here's the deal with flags, once edited to get the map to load. The method of defining the pickup-filter was what I ended up changing from the original xml

<flags>
    <flag id="red-flag" name="Red Flag" owner="red" color="red">
        <post>156, 38, 5</post>
        <pickup-filter>
            <team>blue</team>
        </pickup-filter>
    </flag>

    <net points="1" flag="red-flag" return="blue-flag">
        <region>
            <cylinder base="-24, 38, -4" radius="3" height="2"/>
        </region>
    </net>

    <flag id="blue-flag" name="Blue Flag" owner="blue" color="blue">
        <post>-25, 38, -5</post>
        <pickup-filter>
            <team>red</team>
        </pickup-filter>
    </flag>

    <net points="1" flag="blue-flag" return="red-flag">
        <region>
            <cylinder base="156, 38, 5" radius="3" height="2"/>
        </region>
    </net>
</flags>

CrazyisCreeps avatar Nov 08 '19 07:11 CrazyisCreeps

@Pablete1234 I'm not too familiar with how PGM likes to do XML. In Tusk we tried to make everything take inline references where possible but should PGM support the syntax Crazy is talking about here?

rafibaum avatar May 07 '20 20:05 rafibaum

It's proto dependant, in 1.3.6 proto you're required to encase your regions inside , and that is intended behaviour, as otherwise just having a random "cylinder" is kind of a guess-game. http://docs.oc.tc/modules/proto

I'm not sure we have the full context needed in this issue

Pablete1234 avatar May 07 '20 21:05 Pablete1234

What sort of context would that be?

rafibaum avatar May 07 '20 21:05 rafibaum

What proto this xml is in

Pablete1234 avatar May 07 '20 21:05 Pablete1234

It's been too long since I submitted the issue, I have no idea what map this was and as such have no way of finding out the proto.

If you had asked sooner and not 6 months later I could have helped.

If someone wants to take the time to search the repo for the specific line of xml, be my guest

CrazyisCreeps avatar May 08 '20 04:05 CrazyisCreeps

Ladies and gentlemen, (12 months later) we got him: BlockRAGE proto 1.3.5. https://github.com/MCResourcePile/overcast-maps/blob/master/maps/blockrage/map.xml#L114-L122

So unless you've gotten your wires crossed in the explanation the references (to both region and filter) do work.

Pugzy avatar Jul 06 '21 20:07 Pugzy

I forgot I made this issue tbh. So all is well?

CrazyisCreeps avatar Jul 08 '21 00:07 CrazyisCreeps