Jump to content
eggbeast

how are maps sorted in the editor menu?

Recommended Posts

Does anyone know how maps are organised / sorted in the editor menu?

We have a range of maps and want to list them all together

below you can see our maps, clearly not alphabetised, and not in order of worldID value (indicated in red)

 

maps2_zps52jxv0hx.jpg

Share this post


Link to post
Share on other sites

hey ice do you mean this entry in the config?

		startTime = "8:30";
		startDate = "01/06/1967";

here is some data from our map configs which seems to indicate that these values have no bearing on the sort order of the maps in the list

 

maps4_zps4fj7r8la.jpg

 

any other ideas?

 

was wondering if it was anything to do with any of this alphabetically, but looks like no

class CfgWorldList
{
	class uns_dong_ha{};
};

OR 

class CfgPatches
{
    class uns_dong_ha

OR 
class CfgWorlds
{
    initWorld = "uns_dong_ha";
    class DefaultWorld
    {
        class Weather
        {
            class Overcast;
        };
        class WaterExPars;
    };
    class CAWorld: DefaultWorld
    {
//etc
    class uns_dong_ha: CAWorld

Share this post


Link to post
Share on other sites

I don't have Arma installed at the moment so I can't check but have you looked at the Date Created / Modified of the map pbos in Windows Explorer? Looking at the way the vanilla maps are laid out (Stratis first, then Altis, VR and Tanoa at the bottom), I'd say it's using one of those to sort.

  • Like 1

Share this post


Link to post
Share on other sites

re the pbo files, it is not NAME, SIZE or DATE MODIFIED. i just checked them and they do not remotely correspond. but thx for the idea

Share this post


Link to post
Share on other sites

damn, we're close to release, and i need to sort the maps out in the list. can anyone hazard a guess at the BI logic behind map list sorting?

Share this post


Link to post
Share on other sites

I was about to say worldID because that makes sense (yeah I read your main post but I'm skeptical):

Stratis = 1

Alltis = 5

VR = 19

Tanoa = ?

All maps worldIDs can be obtained by typing this in debug console:

hint str getNumber(configFile >> "CfgWorlds" >> "insertWorldNameHere" >> "worldId")
Other than that, I dont know...

EDIT:

Maybe they just come up as they're being read:

{            
    diag_log format["World %1 - ID %2 - Position %3",(configName _x),getNumber(_x >> "worldId"),_forEachIndex];  
} forEach ("isClass(_x >> 'worldId')" configClasses (configFile >> "CfgWorlds"));
Check RPT.
  • Like 1

Share this post


Link to post
Share on other sites

i have worldId = 1 and it lists australia after altis but b4 tanoa

Share this post


Link to post
Share on other sites

well i always thought it was wordID, hence numbering the maps in the 20's back in arma 2 edit of the mod.

maybe if it has dupes it pushes them to the end of the list?

 

here is latest detail of our map list and worldID value

maps101_zpsb2nfbvnv.jpg

 

I just changed khe_sanh to 31 and Song Cu to 32, and they remain in that position in the menu

 

i wonder if BI could answer this as nobody seems to know.

 

this looks useful thanks - how do i activate it?

 

{
diag_log format["World %1 - ID %2 - Position %3",(configName _x),getNumber(_x >> "worldId"),_forEachIndex];
} forEach ("isClass(_x >> 'worldId')" configClasses (configFile >> "CfgWorlds"));

Share this post


Link to post
Share on other sites

Load map in editor, place a playable unit, hit preview button, push escape, copy/paste code in debug console box, exec local, check RPT logs.

Share this post


Link to post
Share on other sites

Ah yeah sorry:

{            
    diag_log format["World %1 - ID %2 - Position %3",(configName _x),getNumber(_x >> "worldId"),_forEachIndex];  
} forEach ("!((configName _x) in ['GroupSquad','GroupPlatoon','GroupCompany','GroupNames','GroupColors','GenericNames','DefaultLighting','DefaultWorld','CAWorld'])" configClasses (configFile >> "CfgWorlds"));
Vanilla returns this:

"World Stratis - ID 1 - Position 0"
"World Altis - ID 5 - Position 1"
"World VR - ID 19 - Position 2"
"World Tanoa - ID 79 - Position 3"

Share this post


Link to post
Share on other sites
13:28:16 "World uns_ks - ID 25 - Position 0"
13:28:16 "World Stratis - ID 1 - Position 1"
13:28:16 "World khe_sanh - ID 32 - Position 2"
13:28:16 "World RockWall - ID 31 - Position 3"
13:28:16 "World Altis - ID 5 - Position 4"
13:28:16 "World uns_idv - ID 23 - Position 5"
13:28:16 "World VR - ID 19 - Position 6"
13:28:16 "World uns_dong_ha - ID 22 - Position 7"
13:28:16 "World uns_ptv - ID 24 - Position 8"
13:28:16 "World us101_Cao_Bang - ID 27 - Position 9"
13:28:16 "World csj_lowlands - ID 20 - Position 10"
13:28:16 "World CSJ_SEA - ID 21 - Position 11"
13:28:16 "World phu_bai - ID 22 - Position 12"
13:28:16 "World uns_ashau937 - ID 26 - Position 13"
13:28:16 "World Tanoa - ID 79 - Position 14"
13:28:16 "World DaKrong - ID 5 - Position 15"
13:28:16 "World RungSat - ID 5 - Position 16"

that's a great trick to save me pasting stuff manually into my screenshot

 

so what does it tell us? are we getting anywhere lol?

Share this post


Link to post
Share on other sites

Hehe yeah defos, it tells us that, to me, worlds are listed as they're being read by the engine in the config. Can be wrong but makes more sense now. What you think?

Share this post


Link to post
Share on other sites

well what would govern that? is there ever likely to be a way to manage their position in the editor menu?

Share this post


Link to post
Share on other sites

well what would govern that? is there ever likely to be a way to manage their position in the editor menu?

The engine itself. There is a way to patch the island selection listbox using the onLoad evh attached to the island selection display (RscDisplaySelectIsland).

Look at this:

 

WorldList.png?raw=1

It is now sorted alphabetically (ascending).

I made a little patch addon that uses the worldId value to sort worlds, if you want it just ask me.

  • Like 1

Share this post


Link to post
Share on other sites

yes please! you have talent! do you work in a mod team already? if not do you like being in a chain gang?

Share this post


Link to post
Share on other sites

SUCCESS!

 

proper OCD i am lol,

 

but THANKS for helping out - we will be sure to credit you for this

 

maps21_zpschlimk0k.jpg

  • Like 3

Share this post


Link to post
Share on other sites

Lol I can't disagree even if I would rather call that perfectionism. Glad I was able to help & thanks for the credit.

  • Like 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×