Exact locations for certain flags.

Questions and answers about the how and why of making maps.
Post Reply
PsYch0
Private First Class
Private First Class
Posts: 37
Joined: Sun Nov 27, 2005 2:23 am
Location: Chicago, IL USA

Exact locations for certain flags.

Post by PsYch0 »

Hi - I've read through the bzw man pages, looked through the forums, and have created a sample map. However, one thing is lacking...

I not only want zones for flags (i.e. an area that is restricted to certain flags), but for those certain flags to ALWAYS be there.

For instance, consider LouMan's LaserMania: no matter how many STs are on a team, there is ALWAYS ONE ST flag behind EACH tower.

From my testing with zones, I can simply make it such that there are always a certain number of flags and that these are "randomly" placed in corresponding zones:

Code: Select all

options
   +f ST{4}     # always 4 ST flags
end

zone      # ST flag zone 1
    name st_zone_1
    postion -10 -10 0    #southwest
    flag ST
end
zone       # ST flag zone 2
    name st_zone_2
    position -10 10 0    #northwest
    flag ST
end
zone        # ST flag zone 3
    name st_zone_3
    position 10 10 0     #northeast
    flag ST
end
zone        # ST flag zone 4
    name st_zone_4
    position 10 -10 0    #southeast
    flag ST
end
So, zone 1 could have all 4 ST flags, or zone 1 and 2, or so on. The point is, that a zone can have 0 ST flags while I want every zone to have atleast 1... a sort of "non-random" placement, if you will.

Any clues?
Thanks.
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post by trepan »

get a recent bzfs (2.0.4+?), and use something like:

Code: Select all

zone
  zoneflag GM 5
end
PsYch0
Private First Class
Private First Class
Posts: 37
Joined: Sun Nov 27, 2005 2:23 am
Location: Chicago, IL USA

Post by PsYch0 »

Two things:

1) I just noticed I'm using 2.0.2. I've been using 2.0.4 on a Mac and Windows platforms for sooo long, I didn't think twice about checking the version I grabbed from gentoo. I'll have to update or build my own...

2) I read the online man pages and there was no mention of zoneflag. Perhaps those are out of date.

At any rate, I'll post success or failure once I update. For what it's worth, I did try it with 2.0.2 and it certainly failed: zoneflag is, as expected, unrecognized.

Thanks for the quick response.
PsYch0
Private First Class
Private First Class
Posts: 37
Joined: Sun Nov 27, 2005 2:23 am
Location: Chicago, IL USA

Post by PsYch0 »

trepan wrote:get a recent bzfs (2.0.4+?), and use something like:

Code: Select all

zone
  zoneflag GM 5
end
I've updated to 2.0.4 and it isn't working. The server doesn't gripe that "zoneflag" is not recognized; however, neither does it place a flag in that zone... in effect, the option is completely ignored.

For instance, the following would still give flags randomly placed throughout the world, instead of having 5 all in one place:

Code: Select all

options
  +f L{5}
end
zone
  position 0 0 0
  zoneflag L 5
end
Any ideas?
Thanks.
User avatar
Scorch
Private First Class
Private First Class
Posts: 747
Joined: Thu Sep 30, 2004 12:16 am

Post by Scorch »

no 5 and zoneflag is incorrect

Code: Select all

zone 
name example_zone 
position 0.0 0.0 0.0 
size 1.0 1.0 1.0 
rotation 0.0 
# where flag may spawn 
flag GM SW good bad 
# where players may spawn 
team 0 1 2 3 4 
# dropped team flags will fly to the closest safety zone 
safety 1 2 3 4 
end 
do

Code: Select all

zone
position x x x
size x x x
rotation x
flag L
end
[/code]
dango
Private First Class
Private First Class
Posts: 1400
Joined: Sun Feb 06, 2005 5:40 pm
Location: Somewhere over there.

Post by dango »

Scorch
read trepans post... :roll:
Image
User avatar
Scorch
Private First Class
Private First Class
Posts: 747
Joined: Thu Sep 30, 2004 12:16 am

Post by Scorch »

me1 wrote:Scorch
read trepans post... :roll:
trepan wrote:get a recent bzfs (2.0.4+?), and use something like:

Code: Select all

zone
  zoneflag GM 5
end
huh? what do you mean? i read it?
PsYch0
Private First Class
Private First Class
Posts: 37
Joined: Sun Nov 27, 2005 2:23 am
Location: Chicago, IL USA

Post by PsYch0 »

Scorch:
the "flag" command is not what I want.

Think about building a map. All the flag option signifies for a zone is that those types of flags, and only those types, may exist there.
Three zones for laser flags, GMs, and both, respectively:

Code: Select all

zone
   position 10 0 0
   flag L
end
zone
    position 0 10 0
    flag GM
end
zone
    position -10 0 0
    flag L
    flag GM
end
I want to specify that a certain number of a certain type of flag MUST exist in the zone AT ALL TIMES.

The zoneflag option appears to be recognized, for the server doesn't gripe, yet the behavior is as if the "zoneflag" line was skipped.

Perhaps there is some other option or command that "zoneflag" depends on... ??

Thanks.
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post by trepan »

Zoneflag probably requires a 2.0.5 bzfs server,
I can't remember when I added it. If you build
your own server from recent CVS v2_0branch,
you'll definitely have it.

P.S. That's what 2.0.4+? means to me ;)
PsYch0
Private First Class
Private First Class
Posts: 37
Joined: Sun Nov 27, 2005 2:23 am
Location: Chicago, IL USA

Post by PsYch0 »

never built from CVS before ... may try.

However, I'm quite sure LouMan has had this functionality a looooong time, although I can't speak for him :oops:

Plus, I "saved world" when I was on LaserMania last and noticed that in his bzw file, he doesn't seem to use the "zoneflag" or the "flag" option... ??

I've PMed him and asked him to take a look at this forum; but does anyone else know of a way to play with flags and zones as described above without options in the bzw file ??

I ask (and have invited LouMan) for I want the functionality he definitely has: placing certain flags in certain areas at all times.

I'll give the CVS a shot, though...
dango
Private First Class
Private First Class
Posts: 1400
Joined: Sun Feb 06, 2005 5:40 pm
Location: Somewhere over there.

Post by dango »

Scorch wrote:
me1 wrote:Scorch
read trepans post... :roll:
trepan wrote:get a recent bzfs (2.0.4+?), and use something like:

Code: Select all

zone
  zoneflag GM 5
end
huh? what do you mean? i read it?
Scorch wrote:no 5 and zoneflag is incorrect

Code: Select all

zone 
name example_zone 
position 0.0 0.0 0.0 
size 1.0 1.0 1.0 
rotation 0.0 
# where flag may spawn 
flag GM SW good bad 
# where players may spawn 
team 0 1 2 3 4 
# dropped team flags will fly to the closest safety zone 
safety 1 2 3 4 
end 
do

Code: Select all

zone
position x x x
size x x x
rotation x
flag L
end
[/code]
:roll:
The 5 and zoneflag ARE correct, i cna't believe you didn't notice...
Image
User avatar
LouMan
Chief Sgt. of Cartography
Chief Sgt. of Cartography
Posts: 338
Joined: Mon Jan 31, 2005 3:05 am
Location: Michigan, USA

Zone Flags

Post by LouMan »

Trepan is correct in that you must try to update your server program to the newest version to obtain this functionality. The zone flags in Laser Mania are fairly recent (November 2005?) - before that I just 'piled' the desired flags (GM, SW and ST) one on top of the other like this:

options
+f GM{20}
end
zone
size 0 0 0
position 0 34 0
flag GM
end
zone
size 0 0 0
position 0 -34 0
flag GM
end

The problem with this is that someone can repeatedly grab and drop the flags, eventually displacing all of them to another zone.

With the new zoneflag option, Laser Mania's flag set up now looks like this (e.g. ST's):

zone
size 0 0 0
position 1440 -1440 0
zoneflag ST 10
end

Note that a +f option is not required in the options portion for this to work.

Try to update your server program to the latest version and use the above format. I know that 2.0.5b5 will work - I use it to debug my maps now.
PsYch0
Private First Class
Private First Class
Posts: 37
Joined: Sun Nov 27, 2005 2:23 am
Location: Chicago, IL USA

Post by PsYch0 »

Thank you all so much.

LouMan - I had no idea you had relied an the previous strategy; I hadn't actually seen that in action so I though you literally had the same functionality that they zoneflag option presents. Thanks for clarifying.

Again, thanks to all of you for the help; it's been much appreciated :D

-PsYch0
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Post by joevano »

Another thing that helps when looking at this stuff is to look at examples that you know work. Many of Louman's maps are available for download at http://bzflag.norang.ca (but not LaserMania), or off of these forums (you can get LaserMania, Metropolis, Alpine Assault, Gamma Quadrent, and Mystic Valley here). You might as well learn from the master... there is no one better. :D
PsYch0
Private First Class
Private First Class
Posts: 37
Joined: Sun Nov 27, 2005 2:23 am
Location: Chicago, IL USA

Post by PsYch0 »

I figured as much, which is why I saved his LaserMania from the in-game option to save the current world.

Question: does that option, by chance, not save exactly what someone has written? I guess I could just test this out myself on some dummy maps I've created; but those aren't very complex...
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1054
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

-set maxFlagGrabs 0

Post by optic delusion »

Depending on your setup, you may also want to.
-set maxFlagGrabs 0
this makes it so players cannot drop flags in locations away from the desired location.

Saving a map from your client loses any comments the writer may have added, and puts all the objects in an order the server likes. Any objects the writer may have grouped together, will be spread out in your saved file. (in his map file, not a "group insantiation" which will stay grouped) Like if theres ten identical boxes, that the original mapper had placed together in his file, they may be distributed around your client-saved file.
I believe it's by quadrant. Not sure though.
Last edited by optic delusion on Tue Mar 07, 2006 4:21 pm, edited 1 time in total.
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Post by joevano »

I just tested it with Lasermania saved from my client and compared it to the one on the forums here. They appear to be similar... with no major pieces missing, but they are not exactly the same. That could be due to tweaking once they were loaded on the LaserMania server. Not real sure. Lots of the changes have to do with verticies and I an guessing that is an interpritation issue from the client vs what is in the actual map file. There are a few keywords missing here and there too.... but not many.
Post Reply