Creating maps - NEW!

Here you will find any important info about the game and the forum!
Post Reply
User avatar
Yfars
Posts: 210
Joined: Tue Aug 15, 2017 1:55 am

Creating maps - NEW!

Post by Yfars » Sat Dec 21, 2019 5:12 pm

New maps can be created only on test server. To do it open settings in main menu and choose test server.
Test server have all accounts from the main server. The synchronization is made at least once a week.
Main server -> test server.
There is no synchronization in opposite direction.
Creation of a map is allowed from character level 20 and only in the city of Silosia (6.3)

There are 3 levels of map creating privileges:
  1. LEVEL 1: You can edit only visual look of your own map. To create your own map you need to be at level at least 20. You can create max 3 maps per account.I added this condition to prevent abuses.
  2. LEVEL 2: You can edit logic of your map. This means adding/editing portals, quests, chests, spawns, etc Special access need to be granted by me to your account. If you created nice looking map and tell me about it and I like it then you will get this privilege.
  3. LEVEL 3: You have access to your own copy of server and access to special version of PC client which can generate new textures. You can create new enemies, NPC, tiles, items. If you created great content in previous privilege level and you want to add new things to the game then I will grant you access to all stuff you need.
LEVEL 1

Enter in chat window this command to create your own map:

Code: Select all

/map create
This will create map with standard size 10x10 .
To create with custom size use:

Code: Select all

/map create 3.3
Map can't be bigger than 10x10.
Now you can go to your map using command:

Code: Select all

/map go
To go back to map 6.3 use the same command.
To start editing map use this:

Code: Select all

/e
You can have up to 3 own maps.
To go to particular map use:

Code: Select all

/map go 1
/map go 2
/map go 3
To delete map you need be on that map and then type:

Code: Select all

/map delete
You can give access to your map to other players. To do this go to your map and type:

Code: Select all

/map grant player_name
To remove access type:

Code: Select all

/map revoke player_name
Other player can enter your map by typing (on start map):

Code: Select all

/map go player_name
or

Code: Select all

/map go player_name map_number(1,2 or3)
After opening map editor with chat command "/e" you will see something like this:
1.png
1.png (1.11 MiB) Viewed 296 times
  1. The main menu.
      • After clicking the first button you exit edit mode.
      • Next button is for switching to tiles editor (this is opened by default).
      • Next button switches to map logic editor (you edit during this mode behavior not how the map looks) and the last button enters walking mode (without exiting editor). You need special access granted by me to see this button.
      • At the end you can see current clicked position.
    • Here you can see tiles main categories (and also backgrounds). Click on one of them and you will see:
    • tiles from current category. If you click on chosen one then the tile will be added to the game map in current position: position clicked on map not position where your characters is standing.
    • Buttons for editing tiles.
      • First button is for erasing tile at specified position. If you are using PC version instead of using this button you can click right mouse button at specified point to remove tile.
      • Grid button for displaying size of all tiles added to the map.
      • Next button clears all tiles in current grid point. Grid is displayed in pink color.
      • Next button is for rotating current tile - not implemented yet.
      • Undo button removes last added tile. You can click it multiple times to remove last changes.
    LEVEL 2
    If you have access for editing map logic then after entering this mode you will see this window:
    2.png
    2.png (1.1 MiB) Viewed 296 times
    In first row you can choose object type and then in second will appear the list of all objects of chosen type.
    In the screenshot you can see that I chose enemies. Click chosen object to add it at current position.
    Some objects like enemies, NPC are spawned when player enters 10x10 area between pink corners you can see on screenshot. These objects are displayed in yellow circle. The spawn position is random.
    Other objects like portals, signs, switches markers have constant position and are placed exactly in the selected point.
    You can click on added object and you will see context buttons. You can move the object, delete it or edit its parameters.
    On the screen below you can see parameters for selected portal object which is teleport destination.
    3.png
    3.png (1.06 MiB) Viewed 296 times
    Object you can add/edit:

    Chest
    Chest can be opened by player only once and one item is added to that player. Chest change texture after opening to indicate it was already opened.
    The parameter for chest is just item ID. You can find all items IDs here: https://dmgamestudio.com/omega/items.list

    Portal
    Portal teleports player to different location which can on other map or on the same map. Example parameters:
    80.80
    teleports to the position 80.80 at the same map
    0.0.80.80
    teleports to the map 0.0 at position 80.80

    Shop
    Example content:
    0.9
    0.7
    2 6 60 61 8 9 10 11 12 23 24 25 50 51 52 53 54 55 56 57 58 59
    First line is sell ratio, then buy ratio and then items which you can buy in this shop.
    Each item has PRICE parameter which define base price. The first item in above shop is:

    Code: Select all

    2	2	WEAPON	Rusty crowbar	OUTFIT:attack/punch/rustycrowbar/ SUBTYPE:PUNCH DAMAGE:24 ARMOR_PENETRATION:2 SPEED:10 CRITIC_DAMAGE:50 PRICE:18	He did not live to the successor.
    As you can see base price is 18. So this shops buy from player Rusty crowbar for 12 (0.7 *25) and sell it to him for 16 (0.9*25)

    Switch
    Example content:
    del 74.140 120 1
    add 74.140 120_0
    del 7.106 75_12
    add 7.106 75_13
    closed
    del 74.140 120_0
    add 74.140 120_1
    del 7.106 75_13
    add 7.106 75_12
    The lines before "closed" are used in first state, the lines after "closed" in second state.
    In the first line in our example word "del" means that tile 120_1 will be removed from position 74.120.
    You can check tiles number by downloading http://dmgamestudio.com/files/omega_dev.zip
    Go to directory atlas_source/tiles_back/ to find tiles identifiers.

    Smart NPC
    Example content:
    70.70 3 1 435
    Smart NPC is NPC that walks to certain position, do some work and then go back. For example it fisherman who walks to X point, start fishing for Y time and then go back to
    starting point. Another example is lumberjack which is defined in above example.
    This lumberjack goes to position 70.70 and finds tree around at some random position. Then start chopping a tree for around 3 seconds and then change his skin to 435 and goes back
    to starting position.
    You can check skins IDs in entities.list file: http://dmgamestudio.com/omega/entities.list
    Available work types:
    MINING 0
    FELLING 1
    FISHING 2
    BUILDING 3
    So the parameters are:
    destination_position work_time work_type walking_back_skin_id

    Sign
    This one is easy. It just contains text displayed as notification when you click on it.
    Example:
    Kedington village - West. Forester - North.
    Quest NPC
    Each NPC has it own file. The name of the file is the NPC id.
    Example file:

    Code: Select all

    id 13
    
    chat_npc Help! Help!
    chat_me Calm down lad, tell me what happened.
    chat_npc Those bandits assulted and robbed me, I hardly survived...
    chat_me Where did they go?
    chat_npc They went south. They stole my emerald jewel, a gift for my fiancée. I will pay you, if you retrieve it. It is a price less heirloom to me, it has been in my family for generations... 
    quest_log Retrieve an emerald jewel from the bandits and bring it to the owner near the road sign
    
    
    id 14
    
    finish 13
    needed_item 72
    
    xp 50
    gold 40
    chat_npc Blessed be the spirits, you made it. I knew you would manage! Please take this.
    First is unique quest id.
    Then quest dialog and quest log.
    Then next quest id and requirements for the that quest.
    To start quest 14 you need first finish quest 13 and you must have item with id 72.
    The prize for completing this quest is 50 experience points and 40 pieces of gold.
    When server executes such quest file then it looks for first not yet finished quest where all conditions are fulfilled.
    Look also at other quests to learn how to create your own.

    Quests objects
    Quests can be also attached to certain position on map not NPC which spawns in random position.
    Available quest commands:
    xp - xp added after finishing quest
    gold - gold added after finishing quest
    item - item added after finishing quest
    class_item - the same as above but only for certain hero class. Example: "class_item 694 WAND" . Classes are: SWORD, BOW, AXE, CLUB, WAND
    needed_gold - minimum gold needed to start quest ( it will be taken by NPC)
    needed_item - item needed to start quest ( it will be taken by NPC)
    needed_item_return - item needed to start quest ( you don't loose it)
    quest_log - specify message added to quest log
    teleport - teleport player to specified destination
    notification - display notification message
    needed_level - specify minimum required level to start quest
    needed_quest - specify quest needed to be finished before starting this quest
    finish - the same as above but also close the quest log from that quest
    not_finished_quest - the specified quest cannot be finished to start this quest
    finish_any - only one of specified quests me be finished to continue. Example: "finish_any 121:413"
    follow - create pet with specified id
    needed_follower - you need to have pet with specified id to start quest
    kill - kill all units with the specified id on this map ( with death animation)
    remove - remove all units with specified id (disappear immediately)
    create - create unit with specified id
    jointeam - the NPC will join you as pet
    leaveteam - detach pet with specified id
    repeatable - after finishing quest don't add this quest id to the list of finished quest so you can trigger it again
    needed_follower - here need to have pet with certain ID
    start_kills - quest starts killing counter. Example: "start_kills 18 25" Hero need to kill 25 enemies with ID 18.
    end_kills - quest is executed when we accomplished task from previously defined start_kills
    for_testers - quest can be executed only by player who has tester status
    daily - quest will be removed from finished quests list after day so player will be able to execute it once a day.
    play_sound - play sound from client gamesounds directory
    run_command - execute server command.

    If you want to achieve something more complicated then you need to use scipts. Game scripts are written using groovy language.
    Script should be inside special blocks: check, execute, end.
    Here is example:

    Code: Select all

    id 9903
    repeatable
    check
      if ( hasFactor("outlaw") == true) {
          return true;
      }
      else {
          return false;
      }
    execute
        teleport("0.3.52.40");
    end
    notification You are not allowed to enter the Spawn Event Map while in outlaw status.
    The block between check and execute label is run first. If result is positive then the block
    between "execute" and "end" is executed.
    You can omit "check" or "execute" block if you don't need them.
    In above example if player is outlawed then he is teleported to other map.
    The methods you can use in script engine:
    long getGold();

    void addGold(long gold);

    int getLevel();

    boolean hasItem(int itemId);

    boolean hasItem(ItemType itemType, ItemParam itemParam, int minimumValue);

    void removeItem(ItemType itemType, ItemParam itemParam, int minimumValue);

    int countItem(int itemId);

    void removeItem(int itemId);

    void addItem(int itemId);

    void addXp(long xp);

    WeaponType getWeaponType();

    boolean isQuestFinished(int questId);

    void finishQuest(int questId);

    void resetQuest(int questId);

    void markQuestFinished(int questId);

    ArrayList<Integer> getFollowers();

    void createEntity(int entityId);

    void follow(int entityId);

    void unfollow(int entityId);

    void teleport(String destination);

    void setFactor(String name, int value);

    boolean hasFactor(String name);

    int getFactor(String name);

    ArrayList<QuestInterface> getNearPlayers(int range);

    void changeFactor(String name, int value);

    void playSound(String soundName);

    void runCommand(String cmd);

    void showNotification(String msg);

    void showNotification(String msg, String param);

    boolean hasTile(byte terrainId, byte tileId, V2d position);
    LEVEL 3

    To start your local version of server run in command line:

    Code: Select all

    java -jar Server.jar
    If you want to stop it press "ctrl+c"

    Download development version of client from here:
    http://dmgamestudio.com/files/omega_dev.zip

    In game settings choose server: local.

    If you wan to add new graphics add it to appropriate folder in atlas_sources in your unzipped omega_dev.
    Next run from command line program:
    prepare_textures.bat
    It can take even few minutes to finish.

    Objects/units

    To add new object definition to the game you will need to add it to file entities.list in game client and units.json in server assets.
    Entities.list defines only visual aspects of unit.
    units.json defines parameters of unit
    Here is example for Zombie. The line in entities.list for that units look like this:

    Code: Select all

    52 Unit zombie *matrix:0.5,0.5,0.5,0,0,0.5,0.5,0.5,0,0,0.5,0.5,0.5,0,0,0,0,0,1,0*
    First is unit unique ID, then name of texture. Optional parameter matrix is used to change texture colors.

    The definition of this unit is units.json file look like this:

    Code: Select all

    "20": {
        "type": "EnemyUnit",
        "name": "Drifter",
        "size": "1.1",
        "factors": {
          "critic_damage": 150,
          "damage": 25,
          "range": 8,
          "critic_chance": 3,
          "find_range": 30,
          "armor_penetration": 9,
          "clip_size": 1,
          "frequency": 2000,
          "reload_time": 2000,
          "attack_per_instance": 1,
          "max_life": 120,
          "level": 7,
          "range_type": 2,
          "armor": 12,
          "xp_points": 300,
          "speed": 7,
          "dodge": 5,
          "aiming": 40
        },
        "drops": [
          {
            "chance": 75,
            "itemId": 713,
            "group": "v"
          },
          {
            "chance": 50,
            "itemId": 714,
            "group": "v"
          },
          {
            "chance": 150,
            "itemId": 9996,
            "finishedQuest": 13,
            "notFinishedQuest": 14
          },
          {
            "chance": 350,
            "itemId": 307,
            "group": "a"
          },
          {
            "chance": 170,
            "itemId": 323,
            "group": "a"
          },
          {
            "chance": 20,
            "itemId": 339,
            "group": "a"
          },
          {
            "chance": 350,
            "itemId": 304,
            "group": "b"
          },
          {
            "chance": 170,
            "itemId": 320,
            "group": "b"
          },
          {
            "chance": 20,
            "itemId": 336,
            "group": "b"
          },
          {
            "chance": 50,
            "itemId": 270,
            "group": "d"
          },
          {
            "chance": 20,
            "itemId": 286,
            "group": "d"
          },
          {
            "chance": 5,
            "itemId": 302,
            "group": "d"
          },
          {
            "chance": 350,
            "itemId": 400
          },
          {
            "chance": 300,
            "itemId": 528
          },
          {
            "chance": 100,
            "itemId": 154
          },
          {
            "chance": 100,
            "itemId": 154
          },
          {
            "chance": 100,
            "itemId": 154
          },
          {
            "chance": 100,
            "itemId": -25
          },
          {
            "chance": 50,
            "itemId": -26
          },
          {
            "chance": 1,
            "itemId": -1
          },
          {
            "chance": 10,
            "itemId": -20
          },
          {
            "chance": 10,
            "itemId": -18
          },
          {
            "chance": 6,
            "itemId": -4
          },
          {
            "chance": 6,
            "itemId": -6
          },
          {
            "chance": 6,
            "itemId": -22
          },
          {
            "chance": 6,
            "itemId": -21
          },
          {
            "chance": 5,
            "itemId": -23
          },
          {
            "chance": 40,
            "itemId": -14
          },
          {
            "chance": 80,
            "itemId": -30
          },
          {
            "chance": 150,
            "itemId": -29
          },
          {
            "chance": 50,
            "itemId": -9
          },
          {
            "chance": 100,
            "itemId": -25
          }
        ]
      }
    First is ID which need to match the ID from entities.list
    Then is unit type. Here is enemy. Size is 1.1
    Then we have unit parameters called factors. It should be self explanatory.
    Next we can see definition of items dropped if we kill that enemy.
    Chance 1000 means 100%. For example 5 would be 0.5%
    Optional parameter "finishedQuest" is used if enemy should drop only
    if we finished certain quest and opposite parameter notFinishedQuest is used
    if we didn't finish certain quest.

    Tiles
    The game map is built from tiles. Each tile contains graphic element like tree, rock, etc.
    Tiles are defined in terrain.json file.
    Tiles of similar type and the same size are stored in tile category called terrain.
    You can find them in atlas_source/tiles_back directory
    For example terrain id 70 stores two similar towers.
    Definition for them look like this:

    Code: Select all

    "70": {
          "size": "2.6",
          "type": 0,
          "walkingCost": 127      
          "tiles": {
            "0": {
              "obstacleMask": "111133330000"
            },
            "1": {
              "obstacleMask": "111133330000"
            }
          }
        }
    First is size which is 2x6. The smallest tile which is 1x1 equals 32x32 pixels. So here is 64 width and 192 pixels height.
    Type can be 0 - obstacle, 1 - ground, 2 - water.
    Obstacle is default so you don't need to explicit put this parameter in obstacle terrain definition.
    For grounds you can define walkingCost. Smaller number causes units to prefer walking on this tile instead of others. This is useful for tiles containing paths, roads, etc.
    Next are definition for certain tiles from current terrain category.
    obstacleMask defines which part of tile is displayed behind player, which one in front of player. which part is obstacle and which not (you can walk).
    I will explain it later. TO BE CONTINUED.

    Items
    Items are defined in items.list file in both client and server assets. These files should be the same.
    Example line from that file:

    Code: Select all

    10 10 WEAPON Axe DAMAGE:7 SPEED:7 SUBTYPE:AXE LEVEL:2 PRICE:100
    First field is item id which must be unique. Next is item icon number. Item icons you can find in atlas_source/gui/
    Next field is item type, item name, item parameters. All fields are separated by tabulators except
    for item parameters which are separated by space.
    You can also add item description as the last not mandatory field.

    Crafting
    Crafting is defined in craft.list in server assets.
    Example line:

    Code: Select all

    aid,skill_craft_aid 17 1000 100:1 18:2
    First is category.
    Next line defines building needed to craft that item or quest you had to finish before you can craft this item.
    Next parameter in every craft.list line is crafting item ID. Here is 17 which is First aid. Next crafting chance. 1000 = 100%
    After this there are ingredients. Here are 2 x item 18 which is Clean bandages. Items IDs you will find in items.list file.
    Yfars :: Game Administrator (GM)
    Languages: English, Russian

    FAQ:
    http://ov.dmgamestudio.com/viewtopic.php?f=7&t=229
    Game Rules:
    http://ov.dmgamestudio.com/viewtopic.php?f=7&t=151
    Telegram:
    @Yfars

    User avatar
    Nada
    Posts: 167
    Joined: Fri Oct 05, 2018 3:36 am
    Location: Indonesia

    Re: Creating maps - NEW!

    Post by Nada » Sun Dec 22, 2019 9:47 am

    I excited about this

    But look like my mobile browser can't handle this so lenght thread
    A peaceful lone wandered in the Wasteland ;)
    Om telolet om
    Hello there
    Paramedic

    User avatar
    Yfars
    Posts: 210
    Joined: Tue Aug 15, 2017 1:55 am

    Re: Creating maps - NEW!

    Post by Yfars » Sun Dec 22, 2019 6:45 pm

    Nada wrote:
    Sun Dec 22, 2019 9:47 am
    I excited about this

    But look like my mobile browser can't handle this so lenght thread
    Google translator can sometimes show such an error. Try copying the text and translating it through a separate translator program
    Yfars :: Game Administrator (GM)
    Languages: English, Russian

    FAQ:
    http://ov.dmgamestudio.com/viewtopic.php?f=7&t=229
    Game Rules:
    http://ov.dmgamestudio.com/viewtopic.php?f=7&t=151
    Telegram:
    @Yfars

    Post Reply

    Who is online

    Users browsing this forum: No registered users and 1 guest