Request -- Dynamic Map ID?

02/16/2009 01:57 TasteofChaos#1
Personally, I don't have any knowledge of if these exist or not. I know it's like two of the same maps, but seperate.

for example: If you had two TC's, but they weren't the same ID? (Such as in real CO, Desert City, and PK tournament Map?)

I'm just wanting to see if it's possible, where if you could create like 2 different worlds or something. -Demonic World or -Angelic World?

And I got this idea from Zane (xD), I just want to see if it's possible.

If anyone has any knowledge of this, please respond.
02/16/2009 02:03 InfamousNoone#2
The trick is to be able to store the dynamic mapid, and the standard mapid in the same variable (I use a uint). On checks such as wether it should be seen or not, etc etc, you check the dynamic mapid. When sending location and such to the client, you send the standard mapid, and so on.

I'm not about to release a fully working structure for this, as it'll probably wind up getting used wrong like most codes do

Code:
    [StructLayout(LayoutKind.Sequential, Size=4)]
    public struct MAP_ID
    {
        // ...
        public override int GetHashCode()
        {
            return (int)Value;
        }
        public override bool Equals(object obj)
        {
            if (obj is MAP_ID)
                return ((MAP_ID)obj) == this;
            else if (obj is uint)
                return ((uint)obj) == this;

            return obj.Equals(this);
        }
        public override string ToString()
        {
            return Value.ToString();
        }
    }
02/16/2009 02:10 TasteofChaos#3
kk thanks man.

one more question, would i have to fully create another map ID for this? i mean just copy the map and switch ID?
02/16/2009 02:46 InfamousNoone#4
Tao suggested how you could have two ushort's, one being the *real* mapid, and the other one being a sub-identifier also. And no

Serverside the dynamicmapid would be checked, but anytime it's required to be sent to the client, you send the normal mapid.
02/16/2009 09:40 andyd123#5
The TQ servers, if you examine the memory of the client, while in an un-instanced map you have two numbers being the same(such as TC = 1002). If you were in a map such as Basi/AS/Serps etc, you'd have the static map ip and then the instanced map ID.
02/16/2009 12:50 unknownone#6
I'm not sure why anyone would code their server to not support dynamic maps. After all, they're required on official servers for mines, houses, jail etc.
You should simply have a database, linking a map_id (dynamic), to the static game_map_id (from gamemap.dat), along with any extra information, such as music, weather, minimap, flags and time etc. You work with the dynamic ID for everything on the server, but always send the static ID to the client.
02/16/2009 12:52 PeTe Ninja#7
this is probably wrong... but

there is two map ids

1002 & _____

both are twin city but one is used and the other is blank
02/16/2009 22:31 Korvacs#8
Atually pete your correct, the only use for dynamic maps in conquer to-date has been houses.

Jail, mines and the pk tourny maps are all duplicated and fully mapped maps.
02/17/2009 02:39 unknownone#9
Quote:
Originally Posted by Korvacs View Post
Atually pete your correct, the only use for dynamic maps in conquer to-date has been houses.

Jail, mines and the pk tourny maps are all duplicated and fully mapped maps.
Check again on those mines. The server does actually send the map_id, aswell as the game_map_id. The same mine isn't duplicated for PC, Ape, Desert all over.
02/17/2009 03:02 PeTe Ninja#10
just to add to what i saidearlier

the tc map ( 1002 ) has the outside area too

but the non 1002 ( tc still ) doesn't it just had the twin city
02/17/2009 12:46 Beta Limit#11
Quote:
Originally Posted by PeTe Ninja View Post
just to add to what i saidearlier

the tc map ( 1002 ) has the outside area too

but the non 1002 ( tc still ) doesn't it just had the twin city
the other one is for weekly and monthly PK event in real CO, there is this for DC and AC; unsure about PC though.

The Dynamic maps thing is something i need to get to grips with, i wanna take the house kind of thing and turn it into some kind of team dungeon (like WoW)