1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Make red zone a no-build zone (& fix edge tiles)

Discussion in 'Suggestions & Ideas' started by Vermilicious, Jul 21, 2017.

Tags:
Mods: Rainbows
  1. Vermilicious

    Vermilicious Ballista Bolt Thrower

    Messages:
    232
    This is really not a new issue, but I've never gotten around to mentioning it. It doesn't seem anyone else has mentioned it either.

    In fact I take advantage of it now and then. The thing is that you can dig and build in the red zone before the match starts. That doesn't seem right. It should be a no-build zone. That's what seems intuitive to me, at least.

    Edit: Well, actually it was mentioned in a reply somewhere, but anyway.. not really suggesting any other changes to how the barrier behaves.

    Edit 2: I'd like to add the issue of near-edge tiles not being interactive (can't be dug/harvested, or be built on), since it's sort of related.
     
    Last edited: Jul 27, 2017
    Fuzzle and Biurza like this.
  2. Lava

    Lava Former Lag King Staff Alumni Donator Tester

    Messages:
    230
    on some maps the flag is right next to the redzone so this wouldnt work unless we move the flags away from the redzone
     
    SirDangalang and PUNK123 like this.
  3. bunnie

    bunnie Haxor Tester

    Messages:
    1,319
    +1, but in favour of making the red zone a bit smaller + make it solid (not bouncy)

    @edit: chill with the likes holy fuk
     
    Last edited: Jul 27, 2017
  4. Biurza

    Biurza E X T R A T H I C C Staff Alumni Donator
    1. MIST
    2. Active Forum Users

    Messages:
    245
  5. Fuzzle

    Fuzzle Grand Grumbler

    Messages:
    297
    Rather than smaller I'd prefer making it customizable with a pixel for left and right (possibly tl, br).
    Making it solid would make arrows and stuff look rather boring. A reduction of knockback could work.
    Making it no-build is a good idea but it'd be difficult to implement (correctly) with the current methods.
    I'd also like to make it look better visually.
     
    Last edited: Jul 22, 2017
  6. asger75

    asger75 Haxor

    Messages:
    232
    I agree, I have gotten stuck many times between red zone and wall.
     
  7. Vermilicious

    Vermilicious Ballista Bolt Thrower

    Messages:
    232
    When I was working on one of my mods, I'm pretty sure I managed to make a no-build zone. It looks like I was using map.server_AddSector with "no build" as the last parameter. It certainly wasn't a very hard thing to do. I'm unsure if you can remove it too though (I can't be bothered to check right now, sorry).

    I also wrote my own map loader that would look for a separate map image file that could hold sector information (start and end points). In my particular case, I wanted a no-build zone on each end of the map. In other words, multiple map-specific zones. It's not something vanilla KAG has ever had any particular use for, but it's a simple thing to do. Writing your own loader, or extending the existing one, could've certainly been easier though, but that's another topic.

    The bounciness is important though, I think, because it provides easy-to-understand feedback about what the red zone is. Another one would be that your character dies, suffocates or bleeds horribly. The red color also is a good hint. The force applied is a bit excessive however.

    I think what would make most sense was if the map maker could specify where the zone should be. That's what I was thinking writing my own mod. In vanilla KAG I think it's hard coded in the rules or map loader somewhere.

    I'm not sure exactly what you mean, but I'm guessing you're thinking of the maps where there's a flag inside the red zone. I'm not sure what the intended effect by that map designer was. Perhaps that person wanted the players to rush ahead to secure their last flag, or perhaps it was just a limitation of how this zone is handled in vanilla KAG. Either way, I'd argue that map designers should be able to choose.
     
    epsilon and Fuzzle like this.
  8. Fuzzle

    Fuzzle Grand Grumbler

    Messages:
    297
    Sector removal is difficult. You could end up removing a different no-build zone than the barrier. A sector can only be removed by name or blob id. If @Geti could implement a Sector.remove() method it'd be possible.
    If you want to implement some of these ideas feel free to commit a pull request and I'll happily review it.
     
    Last edited: Jul 22, 2017
  9. Monkey_Feats

    Monkey_Feats Bison Rider Tester

    Messages:
    214
    The barrier is already a sector, so all that needs to be done is to add '|| map.getSectorAtPosition(middle, "barrier") !is null' to line 135 in PlacementCommon.as.
    nobuildbarrier.gif
     
  10. Fuzzle

    Fuzzle Grand Grumbler

    Messages:
    297
    No, that would be a bad hack. The no-build sector is used in multiple scripts.
     
  11. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,730
    Fuzzle is right here; the no build stuff could be refactored out of all those scripts and then a check for the start barrier sector added but it's not a one-line change by any means. However, the one-line hack might be ok in the context of this change as you dont mind if something _can_ be destroyed out there (it already can), you just want to prevent building.

    Holding references to stuff like sectors across frames and function calls is dangerous (can segfault or worse); Sector::remove() would encourage that. It really needs some sort of ID system :/

    It'd probably be reasonably safe to remove a no build sector from the middle of the sky - only conflict I can imagine in a vanilla context is a hall up there, but it doesn't make much sense to have it right against the top of the map.
     
    Fuzzle likes this.
  12. Monkey_Feats

    Monkey_Feats Bison Rider Tester

    Messages:
    214
    Fair enough, I live dangerously I guess. :rollseyes:
     
  13. bru-jaz

    bru-jaz Haxor

    Messages:
    264
    What's the problem with building in the red space?
    As lavaguy said, there're many maps where the flag is within the red area. What do you suggest? That the team should rush the moment the match starts to protect that flag like those maps? If one team rushes before the other defends its flag its very likely that many players ragequit at the very begining of the match, witch is bullshit.
     
  14. Fuzzle

    Fuzzle Grand Grumbler

    Messages:
    297
    That's the reason I also want to make it customizable (so the map creator can fix such issues).
     
    bunnie likes this.
  15. Vermilicious

    Vermilicious Ballista Bolt Thrower

    Messages:
    232
    The "problem" is that it's not intuitive. It's not what a player expects, and not really what a map designer expects either. It's really akin to the "problem" of tiles at the edge of the map where you sometimes see resources and expect to be able to interact, but cannot. In fact, I'd like to add that to the suggestion.
     
Mods: Rainbows