RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Adding another facet?

Acronis

Sorceror
In mapdefinitions.cs you can make a new entry (copy an existing and just change the name, keep same map id). I did this on my shard and it works flawless. Will be using it for special events and such. You will need to add all the teleports, doors etc though.
 

Acronis

Sorceror
Actually my bad, did not have the code in front of me. Basically this is what you want to do:

Code:
            //main world maps:
            RegisterMap( 0, 0, 0, 7168, 4096, 4, "Felucca",        MapRules.FeluccaRules );
            RegisterMap( 1, 1, 1, 7168, 4096, 0, "Trammel",        MapRules.TrammelRules );
            RegisterMap( 2, 2, 2, 2304, 1600, 1, "Ilshenar",    MapRules.TrammelRules );
            RegisterMap( 3, 3, 3, 2560, 2048, 1, "Malas",        MapRules.TrammelRules );
            RegisterMap( 4, 4, 4, 1448, 1448, 1, "Tokuno",        MapRules.TrammelRules );
            RegisterMap( 5, 5, 5, 1280, 4096, 1, "Termur",        MapRules.TrammelRules );

            //custom replicas:
            RegisterMap( 64, 3, 3, 2560, 2048, 1, "Malasspec",        MapRules.FeluccaRules );
            RegisterMap( 65, 1, 1, 7168, 4096, 0, "Trammelspec",        MapRules.FeluccaRules );
            RegisterMap( 66, 2, 2, 2304, 1600, 1, "Ilshenarspec",    MapRules.FeluccaRules );
            RegisterMap( 67, 4, 4, 1448, 1448, 1, "Tokunospec",        MapRules.FeluccaRules );
            RegisterMap( 68, 5, 5, 1280, 4096, 1, "TerMurspec",        MapRules.FeluccaRules );

            //internal:
            RegisterMap( 0x7F, 0x7F, 0x7F, Map.SectorSize, Map.SectorSize, 1, "Internal", MapRules.Internal );

I chose to start at 64 but you don't have to. Just keep room for expansion for when EA decides to add more maps over time.

The first argument needs to be unique but the second and 3rd are the actual map file to use, in simple terms. You can also change the season, rules and stuff.
 

jayates

Sorceror
Actually my bad, did not have the code in front of me. Basically this is what you want to do:

Code:
            //main world maps:
            RegisterMap( 0, 0, 0, 7168, 4096, 4, "Felucca",        MapRules.FeluccaRules );
            RegisterMap( 1, 1, 1, 7168, 4096, 0, "Trammel",        MapRules.TrammelRules );
            RegisterMap( 2, 2, 2, 2304, 1600, 1, "Ilshenar",    MapRules.TrammelRules );
            RegisterMap( 3, 3, 3, 2560, 2048, 1, "Malas",        MapRules.TrammelRules );
            RegisterMap( 4, 4, 4, 1448, 1448, 1, "Tokuno",        MapRules.TrammelRules );
            RegisterMap( 5, 5, 5, 1280, 4096, 1, "Termur",        MapRules.TrammelRules );

            //custom replicas:
            RegisterMap( 64, 3, 3, 2560, 2048, 1, "Malasspec",        MapRules.FeluccaRules );
            RegisterMap( 65, 1, 1, 7168, 4096, 0, "Trammelspec",        MapRules.FeluccaRules );
            RegisterMap( 66, 2, 2, 2304, 1600, 1, "Ilshenarspec",    MapRules.FeluccaRules );
            RegisterMap( 67, 4, 4, 1448, 1448, 1, "Tokunospec",        MapRules.FeluccaRules );
            RegisterMap( 68, 5, 5, 1280, 4096, 1, "TerMurspec",        MapRules.FeluccaRules );

            //internal:
            RegisterMap( 0x7F, 0x7F, 0x7F, Map.SectorSize, Map.SectorSize, 1, "Internal", MapRules.Internal );

I chose to start at 64 but you don't have to. Just keep room for expansion for when EA decides to add more maps over time.

The first argument needs to be unique but the second and 3rd are the actual map file to use, in simple terms. You can also change the season, rules and stuff.

I edited this file just as you showed but when I loaed up the server and added a world teleporter they don't show up. Is there another file that i have to edit? Stuck and confussed:(
 

Jeff

Lord
ya, you have to add them manually man. Any script that deals with going to new facets (like the moongate) you have to code your new maps into.
 

dragonfyre

Traveler
I hope this thread is still somewhat active. Hoping for a little bit of help.

I have added my custom map to the client folder, map40, map41, statics40, static41, statix40, statix41 (not at home so exact names are incorrect) But none the less, the .mul files were added to the client.

I edited my Mapdefinitions.cs to reflect the mul files.

RegisterMap( 40, 2, 2, 2304, 1600, 1, "IlshenarDupe", MapRules.TrammelRules );
RegisterMap( 41, 1, 1, 7168, 4096, 0, "Char", MapRules.TrammelRules );

Everything compiles file. I realize I now need to add code to my teleporters, portals, however I wish to give access to the new maps. However when I do so, I get compiling errors that no map "Char" exsits.

Am I missing a file to edit? Have I done something wrong? Any help would be excellent. Plenty of threads saying that this is impossible. However I have played shards with all normal maps up to SA, plus 3 more custom maps. Thanks in advance.
 

Felladrin

Sorceror
Everything compiles file. I realize I now need to add code to my teleporters, portals, however I wish to give access to the new maps. However when I do so, I get compiling errors that no map "Char" exsits.

Not sure if I understood correctly, but if you are trying to reference your custom map as "Map.Char", I think you'd first need to make an core edition (on the Map.cs) and recompile the server. Like this:

C#:
public static Map Felucca { get { return m_Maps[0]; } }
public static Map Trammel { get { return m_Maps[1]; } }
public static Map Ilshenar { get { return m_Maps[2]; } }
public static Map Malas { get { return m_Maps[3]; } }
public static Map Tokuno { get { return m_Maps[4]; } }
public static Map TerMur { get { return m_Maps[5]; } }
public static Map Internal { get { return m_Maps[0x7F]; } }
 
// Lines bellow added for custom maps:
public static Map IlshenarDupe { get { return m_Maps[40]; } }   
public static Map Char { get { return m_Maps[41]; } }

But I think you can reference it as Map.Maps[41] (Considering "41" as the map id). So you don't need to make the core edit above.
 
Top