1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to change map rules in custom maps

Discussion in 'General Discussion' started by Michele, Jan 11, 2018.

  1. Michele
    Offline

    Michele Member

    Joined:
    Aug 22, 2017
    Messages:
    79
    Likes Received:
    0
    Hi all guys, i have a problem with a custom map.

    It seems that my map has default trammel rules (bare trees, skulls everywhere). How can I set the rules of felucca? Opening up centred + I see the map correctly as it should be. Thank you all.
     
  2. Tasanar
    Offline

    Moderator ServUO Developer

    Joined:
    Oct 16, 2014
    Messages:
    4,390
    Likes Received:
    95
    Post your MapDefinitions.cs

    Click on the plus sign click code and past it in there.
     
  3. Michele
    Offline

    Michele Member

    Joined:
    Aug 22, 2017
    Messages:
    79
    Likes Received:
    0
    I try to set felucca in every line but nothing happened... so.. here te code.



    using System;

    namespace Server.Misc
    {
    public class MapDefinitions
    {
    public static void Configure()
    {
    /* Here we configure all maps. Some notes:
    *
    * 1) The first 32 maps are reserved for core use.
    * 2) Map 0x7F is reserved for core use.
    * 3) Map 0xFF is reserved for core use.
    * 4) Changing or removing any predefined maps may cause server instability.
    */
    if (Siege.SiegeShard)
    {
    RegisterMap(0, 0, 0, 7168, 4096, 4, "Felucca", MapRules.FeluccaRules);
    RegisterMap(1, 1, 1, 7168, 4096, 0, "Trammel", MapRules.FeluccaRules);
    RegisterMap(2, 2, 2, 2304, 1600, 1, "Ilshenar", MapRules.FeluccaRules);
    RegisterMap(3, 3, 3, 2560, 2048, 1, "Malas", MapRules.FeluccaRules);
    RegisterMap(4, 4, 4, 1448, 1448, 1, "Tokuno", MapRules.FeluccaRules);
    RegisterMap(5, 5, 5, 1280, 4096, 1, "TerMur", MapRules.FeluccaRules);
    }
    else
    {
    RegisterMap(0, 0, 0, 7168, 4096, 4, "Felucca", MapRules.FeluccaRules);
    RegisterMap(1, 1, 1, 7168, 4096, 0, "Trammel", MapRules.FeluccaRules);
    RegisterMap(2, 2, 2, 2304, 1600, 1, "Ilshenar", MapRules.FeluccaRules);
    RegisterMap(3, 3, 3, 2560, 2048, 1, "Malas", MapRules.FeluccaRules);
    RegisterMap(4, 4, 4, 1448, 1448, 1, "Tokuno", MapRules.FeluccaRules);
    RegisterMap(5, 5, 5, 1280, 4096, 1, "TerMur", MapRules.FeluccaRules);
    }

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

    /* Example of registering a custom map:
    * RegisterMap( 32, 0, 0, 6144, 4096, 3, "Iceland", MapRules.FeluccaRules );
    *
    * Defined:
    * RegisterMap( <index>, <mapID>, <fileIndex>, <width>, <height>, <season>, <name>, <rules> );
    * - <index> : An unreserved unique index for this map
    * - <mapID> : An identification number used in client communications. For any visible maps, this value must be from 0-5
    * - <fileIndex> : A file identification number. For any visible maps, this value must be from 0-5
    * - <width>, <height> : Size of the map (in tiles)
    * - <season> : Season of the map. 0 = Spring, 1 = Summer, 2 = Fall, 3 = Winter, 4 = Desolation
    * - <name> : Reference name for the map, used in props gump, get/set commands, region loading, etc
    * - <rules> : Rules and restrictions associated with the map. See documentation for details
    */

    TileMatrixPatch.Enabled = false; // OSI Client Patch 6.0.0.0

    MultiComponentList.PostHSFormat = true; // OSI Client Patch 7.0.9.0
    }

    public static void RegisterMap(int mapIndex, int mapID, int fileIndex, int width, int height, int season, string name, MapRules rules)
    {
    Map newMap = new Map(mapID, mapIndex, fileIndex, width, height, season, name, rules);

    Map.Maps[mapIndex] = newMap;
    Map.AllMaps.Add(newMap);
    }
    }
    }
     
  4. Tasanar
    Offline

    Moderator ServUO Developer

    Joined:
    Oct 16, 2014
    Messages:
    4,390
    Likes Received:
    95
    Did you register your map in here? You use a custom one right?
     
  5. Michele
    Offline

    Michele Member

    Joined:
    Aug 22, 2017
    Messages:
    79
    Likes Received:
    0
    Yes i use a custom but I do not know how to register it
     
  6. Tasanar
    Offline

    Moderator ServUO Developer

    Joined:
    Oct 16, 2014
    Messages:
    4,390
    Likes Received:
    95
    Code (C#):
    1. /* Example of registering a custom map:
    2. * RegisterMap( 32, 0, 0, 6144, 4096, 3, "Iceland", MapRules.FeluccaRules );
    3. *
    4. * Defined:
    5. * RegisterMap( <index>, <mapID>, <fileIndex>, <width>, <height>, <season>, <name>, <rules> );
    6. * - <index> : An unreserved unique index for this map
    7. * - <mapID> : An identification number used in client communications. For any visible maps, this value must be from 0-5
    8. * - <fileIndex> : A file identification number. For any visible maps, this value must be from 0-5
    9. * - <width>, <height> : Size of the map (in tiles)
    10. * - <season> : Season of the map. 0 = Spring, 1 = Summer, 2 = Fall, 3 = Winter, 4 = Desolation
    11. * - <name> : Reference name for the map, used in props gump, get/set commands, region loading, etc
    12. * - <rules> : Rules and restrictions associated with the map. See documentation for details
    13. */
     
  7. Michele
    Offline

    Michele Member

    Joined:
    Aug 22, 2017
    Messages:
    79
    Likes Received:
    0
    Yes i see but:

    <index> : An unreserved unique index for this map
    * - <mapID> : An identification number used in client communications. For any visible maps, this value must be from 0-5
    * - <fileIndex> : A file identification number. For any visible maps, this value must be fr

    what is this??
     
  8. Tasanar
    Offline

    Moderator ServUO Developer

    Joined:
    Oct 16, 2014
    Messages:
    4,390
    Likes Received:
    95
    What map does your custom map replace?

    Or do you still have access to all the stock maps, to include both Felucca and Trammel?
     
  9. Michele
    Offline

    Michele Member

    Joined:
    Aug 22, 2017
    Messages:
    79
    Likes Received:
    0
    I have replaced map0.mul (felucca) with our custom map called also map0.mul (felucca)

    In fact if use command [set map felucca i go on our map

    otherwise [set map trammel i go on osi trammel map

    In fact, i replaced felucca
     
  10. Tasanar
    Offline

    Moderator ServUO Developer

    Joined:
    Oct 16, 2014
    Messages:
    4,390
    Likes Received:
    95
    Make sure felucca is spelled Felucca

    RegisterMap(0, 0, 0, 7168, 4096, 4, "Felucca", MapRules.FeluccaRules);

    change the 4 to a 0, does it change the seasons?
     
  11. Michele
    Offline

    Michele Member

    Joined:
    Aug 22, 2017
    Messages:
    79
    Likes Received:
    0
    ok it seems that the trees now have the leaf but i have also a snow....... in centred+ i have no snow tile
     
    #11 Michele, Jan 11, 2018
    Last edited: Jan 11, 2018
  12. Michele
    Offline

    Michele Member

    Joined:
    Aug 22, 2017
    Messages:
    79
    Likes Received:
    0
    Up, sorry :(
     
  13. Syn
    Offline

    Syn Member

    Joined:
    May 15, 2017
    Messages:
    38
    Likes Received:
    1
    @Michele Did you ever figure this out? I have the same issue... I replaced map0.mul with my own map, here's my map definition, and I'm finding that forest is covered with snow....

    Thoughts?


    Code (C#):
    1.  if (Siege.SiegeShard)
    2.             {
    3.                 RegisterMap(0, 0, 0, 6144, 4096, 1, "Felucca", MapRules.FeluccaRules);
    4.                 RegisterMap(1, 1, 1, 7168, 4096, 1, "Trammel", MapRules.FeluccaRules);
    5.                 RegisterMap(2, 2, 2, 2304, 1600, 1, "Ilshenar", MapRules.FeluccaRules);
    6.                 RegisterMap(3, 3, 3, 2560, 2048, 1, "Malas", MapRules.FeluccaRules);
    7.                 RegisterMap(4, 4, 4, 1448, 1448, 1, "Tokuno", MapRules.FeluccaRules);
    8.                 RegisterMap(5, 5, 5, 1280, 4096, 1, "TerMur", MapRules.FeluccaRules);
    9.             }
    10.             else
    11.             {
    12.                 RegisterMap(0, 0, 0, 6144, 4096, 1, "Felucca", MapRules.FeluccaRules);
    13.                 RegisterMap(1, 1, 1, 7168, 4096, 1, "Trammel", MapRules.TrammelRules);
    14.                 RegisterMap(2, 2, 2, 2304, 1600, 1, "Ilshenar", MapRules.TrammelRules);
    15.                 RegisterMap(3, 3, 3, 2560, 2048, 1, "Malas", MapRules.TrammelRules);
    16.                 RegisterMap(4, 4, 4, 1448, 1448, 1, "Tokuno", MapRules.TrammelRules);
    17.                 RegisterMap(5, 5, 5, 1280, 4096, 1, "TerMur", MapRules.TrammelRules);
    18.             }
     
  14. gametec
    Offline

    gametec Active Member

    Joined:
    Feb 5, 2014
    Messages:
    325
    Likes Received:
    45
    Sometimes your client version will be hard-coded with snow. A good example of this is client version 7.0.21.1 and client version 7.0.21.2, check both of these clients out:

    These clients and their associated data files are identical except for the fact that one of those clients covers the forest with snow and the other does not. Another issue that should not be overlooked is your radarcol.mul... you can fix the snow in the forest by using a client that was patched in the spring, fall, and summer seasons, but the radar (or client mini-map) needs to be a seasonal fix as well or you will get snow in your radar and not on your map; if that makes sense. In layman's terms: What you do to your map to make the snow disappear, you also have to do to your client's mini-map. I hope this helps.
     
Similar Threads: change map
Forum Title Date
Archived Bug Reports Corgul Map Change Feb 10, 2018
General Discussion Custom Maps Change GUI Legal Question Apr 20, 2016
ServUO Discussion Change statcap command,server crash. Dec 5, 2018
Script Support When a player rides a mount, what code changes the player's moving speed? Nov 22, 2018
Script Support Individual skill limit change? Nov 17, 2018
Script Support Recent Distro changes in (See thread) Oct 26, 2018
General Discussion Is it possible to Change the Hue of Oct 13, 2018