Jump to content

  •  
- - - - -

Def making guide

how to make .def line for map

  • Please log in to reply
4 replies to this topic

#1 Fire

Fire

    Advanced Member

  • Full Member
  • PipPipPip
  • 758 posts
  • LocationPoland,Europe

Posted 24 November 2014 - 01:27 PM

I decided to do it as I know some everything what I have to, to make full .def line for maps.Makiltur asked me, also butler is working and needs some info..

General facts:

1.ALMOST everything can be found under this link:http://www.eternal-lands.com/forum/index.php?showtopic=16835
2.Learner has big knowledge about .def files.
3.It is not hard and does not go slowly.
4.Every each map needs .def line, does not matter if its cave or outside map, size does not matter too.However if you decide to make such "insides" where you will put many small caves, house insides etc, they all will have same .def file, because everything will be located on one map, just separated areas.
5.Feel free to ask me if each thing is correct or how stuff should look like if you not sure, L's head is busy enough.







How do I do it?

Every .def file you write as normal .txt file.Best way is to copy each functions from El forums link I have put above, then delete their values and put yours.As you probably knew before, 1 = is/exist/yes, 0 = isnt/does not work/there is no etc..
Also important thing, if you write each function name, for example:

//Second ladder to down2
[teleport_point]
teleport_src_x: 347
teleport_src_y: 303
teleport_dst_x: 347
teleport_dst_y: 301
type: 0
teleport_map: ./maps/c0/westernlands.def
[/teleport_point]


Remember to use "//" before name, Learner asked for so.







What I have to write in this file?

Every map requires section [general] , size or outside/inside style does not matter here.In general, as you expect, you write all main map settings such:

allow_rain: <If it's going to rain on the map or not - default: 1>
allow_combat: <Is it a PK map? Default: 0>
allow_multicombat: <Allow multi-combat? Default: 0>
allow_beam: <Max level allowed to beam from this map Default: 0 (means every player can beam)>
allow_tport: <Is teleporting allowed on this map? Default: 1>
allow_harvesting: <Is harvesting allowed? Default: 1>
allow_manufacturing: <Is manufacturing allowed? Default: 1>
allow_summoning: <Is summoning allowed? Default: 1>
allow_spellcasting: <Can you use magic on this map? Default: 1>
allow_potions: <Can you do potions on this map? Default: 1>
timed_heat: <Heat damage per minute - between 0 and 100 - Default: 0>
timed_cold: <Cold damage per minute - between 0 and 100 - Default: 0>
timed_poison: <Poison damage per minute - between 0 and 100 - Default: 0>
timed_corrosion: <Corrosion damage per minute - between 0 and 100 - Default: 0>
timed_damage: <Damage per minute - between 0 and 100 - Default: 0>
timed_radiation: <Damage per minute - between 0 and 100 - Default: 0>
walk_heat: <Per step heat damage - between 0 and 100 - Default: 0>
walk_cold: <Per step cold damage - between 0 and 100 - Default: 0>
walk_poison: <Per step poison damage - between 0 and 100 - Default: 0>
walk_corrosion: <Per step corrosion damage - between 0 and 100 - Default: 0>
[/general]






Remember, you dont have to write all these things if their values are obvious, if there is something that will make this map special comparing to other ones, you have to point it, example of [general] for some map I work on:

[general]
map_name: `Western Lands`    ----------- map name
map_abbr: WL --------------   very short name like SKF/PL/TD/GP
map_short: western ------------  another short name...
filename: ./maps/c0/westernlands.elm    -------   file name, usually its ./maps/c0/mapname.elm because this is where test maps are
allow_rain: 1   
allow_combat: 0    ----------------   PK off/on
allow_multicombat: 1    ------------------  multiway combat off/on
allow_harvesting: 0
is_test: 11    -----------------  map number in #test_list, if map is not loaded on test serv yet, leave it blank
[/general]






Other important functions you have to know:


Not need/required


[text_area]
min_x: <The smallest x coordinate (X1)>
min_y: <The smallest y coordinate (Y1)>
max_x: <The largest x coordinate (X2)>
max_y: <The largest y coordinate (Y2)>
text: <The text that's going to appear on the players screen - max 250 characters>
[/text_area]


Just text that will appear once you step on square defined by this 4 points coords.


Not needed/required

[location_info]
min_x: <The smallest x coordinate (X1)>
min_y: <The smallest y coordinate (Y1)>
max_x: <The largest x coordinate (X2)>
max_y: <The largest y coordinate (Y2)>
text: <The name of the location>
[/location_info]

This is what is going to be showed as an addition to map name, when you click shift+compass, thats how it looks on my map:

Posted Image





Important!

[use_area]
min_x: <The smallest x coordinate (X1)>
min_y: <The smallest y coordinate (Y1)>
max_x: <The largest x coordinate (X2)>
max_y: <The largest y coordinate (Y2)>
teleport_x: <The x location the player is going to be teleported to on click - if he isn'
t going to be teleported, just leave this out>
teleport_y: <The y location the player is going to be teleported to on click - if he isn't going to be teleported, just leave this out>
teleport_map: <The map the player is going to be teleported to on click - if he isn'
t going to be teleported, just leave this out.>
map_object_id: <The ID of the object the player has to click>
inv_object_id: <The ID of an object the player clicks on the map object with>
send_sparks: <Specifies if the teleport is going to send sparks when it's activated>
too_far_text: <The text that'
s shown when you're too far away>
wrong_object_text: <The text that'
s going to be shown when the use_area is activated, but the player uses the wrong object>
use_text: <The text that's going to be shown when the item is used>
[/use_area]

This is what is needed to bring you on map or make you able to leave map, often its ship/boat.
Question you probably have is how to get coords in map editor, its easy.For first, click on "stairs icon", then the black arrow with white starr above it, you will open heights.Choose any of them and move your mouse on area that coords you want to know, they are visible at bottom left corner.
How to get item's ID? Well, every single object you put on map, does not matter if 3d/2d, has its own ID number, that is also visible at bottom left corner. you just have to pick this item up (cick on it)


teleport_map:

That is map where you are going to be teleported, if nowhere, leave it blank.As I said, usually it will be some c0 folder map so path looks like this: ./maps/c0/mapname.def, YES! its .def NO .elm ! Important to know is if you make [use_area] there always has to be .def, no .elm.


inv_object_id:

Used to define what item you have to use, to use-with on map object, to enter, if none, type "-1"

send_sparks:

Send sparks after teleport? 0 or 1, always wonder what option sounds reasonable, for cave enters you know there are no sparks, but with ships I would put.


Not needed/required

[attributes]
[<tag name>]
min_x: <The smallest x coordinate (X1)>
min_y: <The smallest y coordinate (Y1)>
max_x: <The largest x coordinate (X2)>
max_y: <The largest y coordinate (Y2)>
value: The value of the attribute
text: The text that'
s going to be shown when the attribute is activated
[/<tag name>]
[/attributes]

Not need that, but its nice option if you want make some special things like summ or pk arena.



Also not needed, but good to know..

[teleport_point]
teleport_src_x: 177
teleport_src_y: 141
teleport_dst_x: 78
teleport_dst_y: 57
type: 0
teleport_map: 0
[/teleport_point]

This is used for boats/ladders etc.Src's are tile coords where you have to step to be teleported, dst's are tile coords where to you will be teleported, type: 0/1 defines if teleport sends sparks or not.Teleport map you do same as with [use_area]




Think this is all of most important stuff, I will put link of example how it should look like, so anyone can download and see.
Obviously feel free to post your questions and doubts, or pm me ingame theFire.
Hope I helped :)






Def line correct example:
https://www.sendspace.com/file/xlibzx















Fire

#2 butler

butler

    Advanced Member

  • Full Member
  • PipPipPip
  • 1415 posts
  • LocationScotland

Posted 24 November 2014 - 02:05 PM

noice

except uninstall IE

#3 CoduX

CoduX

    Advanced Member

  • Full Member
  • PipPipPip
  • 1089 posts
  • LocationLand Down Under

Posted 24 November 2014 - 09:24 PM

This post should be stickied

#4 Fire

Fire

    Advanced Member

  • Full Member
  • PipPipPip
  • 758 posts
  • LocationPoland,Europe

Posted 25 November 2014 - 02:49 AM

Yes, L please do it.

#5 themuntdregger

themuntdregger

    Official Troll

  • Full Member
  • PipPipPip
  • 1001 posts
  • LocationBehind you

Posted 25 November 2014 - 05:25 AM

Brilliant post. Yes, should be stickied.

Well done Fire




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users