HowToAddMapsServerStendhal: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Chad3f |
imported>Chad3f |
||
| Line 47: | Line 47: | ||
Most zones can be configured just using this xml file. However, there are currently some things, such as NPC's that need special handling. If you need to do custom zone configuration, create one or more new java source file(s) at '''src/games/stendhal/server/maps/<area>/<location>/<level>_<entity>.java'''. The '''<area>/<location>''' path would be the same as your '''.tmx''' file uses. Ideally this would be one file per independant entity created (so they can be enabled/disabled separately). The level is used as '''[I/U/O][L/SL]#''' where I=Inside, U=Underground, O=Outside, L=Level, SL=Sub-Level, and # for the level (or sub-level without the minus) number. |
Most zones can be configured just using this xml file. However, there are currently some things, such as NPC's that need special handling. If you need to do custom zone configuration, create one or more new java source file(s) at '''src/games/stendhal/server/maps/<area>/<location>/<level>_<entity>.java'''. The '''<area>/<location>''' path would be the same as your '''.tmx''' file uses. Ideally this would be one file per independant entity created (so they can be enabled/disabled separately). The level is used as '''[I/U/O][L/SL]#''' where I=Inside, U=Underground, O=Outside, L=Level, SL=Sub-Level, and # for the level (or sub-level without the minus) number. |
||
'''There is a proposed new naming convention:''' |
|||
This replaces the <location> package with a <Location>_ prefix on the java filename, where tmx file underscores are converted to ''camel case'' (upper case each first letter instead) for the prefix. The remaining rules still apply. |
|||
Some tmx path to java file examples are: |
|||
Level 0/desert/oasis.tmx -> .../maps/desert/Oasis_OL0_NomadNPC.java |
|||
interiors/forest/old_cabin.tmx -> .../maps/forest/OldCabin_IL0_HermitNPC.java |
|||
Level -1/mountains/abandoned_cave.tmx -> .../maps/mountains/AbandonedCave_USL1_CaveinTrigger.java |
|||
Level 0/forest/river_se.tmx -> .../maps/forest/RiverSE_OL0_FishermanNPC.java |
|||
Level 0/forest/river_sw.tmx -> .../maps/forest/RiverSW_OL0_CamperNPC.java |
|||
Open the file and make sure that it looks like this: |
Open the file and make sure that it looks like this: |
||