Map settings

Post here if you need help setting up your server, etc.
Post Reply
Tobe
Round Winner
Posts: 215
Joined: Wed Jan 14, 2009 12:31 am
Location: Miami, FL

Map settings

Post by Tobe »

So, since a map is loaded with the settings in it, are all the settings in it loaded after or prior to the map itself loading?

My real question, however, is if a different MAP_FILE (map 2) is included in the settings of the map currrently being loaded (map 1), which map is loaded? :|
<-- Proud co-leader of Rogue Tronners
User avatar
sinewav
Graphic Artist
Posts: 6424
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Re: Map settings

Post by sinewav »

Like this?

Code: Select all

<Settings>
		<Setting name="MAP_FILE" value="dir/somename-1.aamap.xml"/>
</Settings>
That's an interesting question. Have you tried it locally? I'm sure you could answer your own question rather quickly. I'm guessing the 2nd map since <Settings> settings override all previous settings.

MAP_FILE map1 (get's loaded)
then reads <Settings>
then loads MAP_FILE map2

That's my guess anyway.
User avatar
Z-Man
God & Project Admin
Posts: 11624
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Map settings

Post by Z-Man »

Tobe wrote:My real question, however, is if a different MAP_FILE (map 2) is included in the settings of the map currrently being loaded (map 1), which map is loaded? :|
That behavior is not specified and will likely end in disaster, like clients loading different maps than the server.
Tobe
Round Winner
Posts: 215
Joined: Wed Jan 14, 2009 12:31 am
Location: Miami, FL

Re: Map settings

Post by Tobe »

sinewav wrote:Like this?

Code: Select all

<Settings>
<Setting name="MAP_FILE" value="dir/somename-1.aamap.xml"/>
</Settings>
That's an interesting question. Have you tried it locally? I'm sure you could answer your own question rather quickly. I'm guessing the 2nd map since <Settings> settings override all previous settings.

MAP_FILE map1 (get's loaded)
then reads <Settings>
then loads MAP_FILE map2

That's my guess anyway.
I just realized map2 will have its own settings and tell it to load map 3, which will then load up map 3 and its settings to load map 4 a, all while still trying to run the first round. An intresting loop. I'll try this locally anyway and see what happens.
Z-Man wrote:
Tobe wrote:My real question, however, is if a different MAP_FILE (map 2) is included in the settings of the map currrently being loaded (map 1), which map is loaded? :|
That behavior is not specified and will likely end in disaster, like clients loading different maps than the server.
Epsy told me on irc today of hoop trying this before and running into problems. I guess this was it.
<-- Proud co-leader of Rogue Tronners
Tobe
Round Winner
Posts: 215
Joined: Wed Jan 14, 2009 12:31 am
Location: Miami, FL

Re: Map settings

Post by Tobe »

Update:

ok so basically i loaded a .cfg file that loads a map that loads the same .cfg file and saw what happened. Armagetron ended the loop on its own somewhat...

So what I think I picked up from this (hope its easy to understand)
/admin INCLUDE 1.cfg
Deleting objects/grid....
MAP_FILE changed to map1
*map1 includes 1.cfg's settings*
Creating Grid....
*1.cfg loads map1*
MAP_FILE changed to map1
(Round 2 of 10)
*tronners play*
Deleting objects/grid....
*map finishes loading its own settings then loads 1.cfg*
*process repeats*
I think, if done well enough, I beleive I can change maps from the map_file itself using many .cfg files and maps.
<-- Proud co-leader of Rogue Tronners
User avatar
kyle
Reverse Outside Corner Grinder
Posts: 1897
Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:

Re: Map settings

Post by kyle »

Well Not entirely sure of your idea but let me say this, If a map is loaded and MAP_FILE gets changed after that round has started. any new client will be seeing the next map with players all over the place, going through walls and whatnot. The only way to get it to switch would be to somehow make it change at end of Round. At one time i though of adding DELAY_COMMAND -99 <setting would go here> to load settings at end of round in sty+ct. This still may get added, but again it is not in the official branch.

the best way to rotate maps is to use a simple script.
Image
Tobe
Round Winner
Posts: 215
Joined: Wed Jan 14, 2009 12:31 am
Location: Miami, FL

Re: Map settings

Post by Tobe »

That would be problematic but the whole compiling/scripting thing is basically gibberish to me though
<-- Proud co-leader of Rogue Tronners
User avatar
Jip
Round Winner
Posts: 397
Joined: Sat Sep 26, 2009 5:32 pm

Re: Map settings

Post by Jip »

I am too tired now. But remember me in IRC and I can help you with it :)
Tobe
Round Winner
Posts: 215
Joined: Wed Jan 14, 2009 12:31 am
Location: Miami, FL

Re: Map settings

Post by Tobe »

Thanks for offering :) but I am going to give up on this for now.
<-- Proud co-leader of Rogue Tronners
Post Reply