Author Topic: [GUIDE] How to check, remove and add zone  (Read 2827 times)

Offline SweeTs

  • ╭∩╮(︶︿︶)╭∩╮
  • Fanatic Fan
  • Core
  • *
  • Posts: 3.586
  • You're never too old to learn something stupid.
  • Awards Do what you want 'cause a pirate is free, you are a pirate ! Searched by gold diggers, loved by Mama Tryskell. Bring good advices or reports. Crazy Banana.
[GUIDE] How to check, remove and add zone
« on: February 06, 2015, 10:02:34 PM »
In this guide I will explain step by step how you can check, remove and create your zone. Happy reading ;)



Chapter I - Checking the type of zone

The easiest way to find out the type of zone is to use admin command //zone_check, accessible also from admin panel, //admin -> server -> zone check.

The output





Chapter II -Removing the type of zone

Now, when you know the type(s) of the zone (look above) and you want to remove it, go to the corresponding file (all zones are stored inside /data/xml/zones/). For instance, if you want to remove the peace zone, let's say from Primeval Island, you open the PeaceZone.xml and you search for the record. They are mostly commented <!-- xxx -->, so it's not gonna be hard as you think.

Code: [Select]
	<zone type="PeaceZone" shape="NPoly" minZ="-4792" maxZ="208"><!-- primeval_peace2 -->
<node X="4850" Y="-4736" />
<node X="7294" Y="-4712" />
<node X="8529" Y="-820" />
<node X="3615" Y="-737" />
</zone>

Simply remove that part of the code, save and voila. The beach is no longer a peaceful zone. Slap some asses :foreveralone:



Chapter III - Types of zones

First of all, in order to create new zone, you must know possible shapes. From l2jwiki

Code: [Select]
Cuboid Zones:
-------------

Require 2 nodes (vertices), in order to make a Square, for example:

O . . . .
.       .
.       .
.       .
. . . . O

O = Node (vertice)


NPoly Zones:
------------

Require 3 or more nodes (vertices), in order to make a Polygon or another geometrical model, for example:

    O
   / \
  /   \
 /     \
O - - - O

O = Node (vertice)


Cylinder Zones:
---------------

Require 1 node (vertice) and radius, in order to make a Cylinder.

          *  *  *
      *             *
    *                 *
  *                     *
 *                       *
*                         *
*                         *
*            O            *
*                         *
*                         *
 *                       *
  *                     *
    *                 *
      *             *
          *  *  *

O = Node (vertice)
* = Radius



Chapter IV - Creating the new zone

  • Cuboid

Cuboid requires only 2 nodes as it's said on the image above. You must get only 2 nodes/vertices (by typing /loc ingame) and another two will be generated automatically. How? It's simple, when the two lines cross each other, the node is generated.



Good example of the cuboid shape are Arenas. You get two opposite corners and done.

Code: [Select]
	<zone type="ArenaZone" shape="Cuboid" minZ="-3596" maxZ="0"><!-- dion_monster_pvp -->
<node X="11947" Y="183019" />
<node X="12943" Y="184010" />
<spawn X="12312" Y="182752" Z="-3558" />
</zone>

  • NPoly

With help of NPoly, you can create any shape you imagine, there are no restrictions, but ofc.. You must create it with your "head", no crossing lines and similar crap :)



Most of the zones uses NPoly, here is an example

Code: [Select]
	<zone type="JailZone" shape="NPoly" minZ="-2992" maxZ="-2792"> <!-- gm_prison -->
<node X="-116390" Y="-251581" />
<node X="-112756" Y="-251617" />
<node X="-112720" Y="-248199" />
<node X="-116354" Y="-248217" />
</zone>

  • Cylinder

Cylinder requires only one, central point. You declare it's radius with rad="XX". Take the middle point, and simply rush forward, stop in place you want and compare the Y value, that would be your radius. - Image.



Code: [Select]
    <zone type="ArenaZone" shape="Cylinder" minZ="-2320" maxZ="-2120" rad="700"> <!-- hot springs circle -->

        <node X="151555" Y="-127082" />

    </zone>



Those are the available shapes. X and Y is obvious, now you wonder what should be the Z value. Well, basically Z value depends of the territory shape, if it's plat or bumpy, are there mountains or not. If it's plat, more or less, you should be fine with +-100 from the basic value generated from /loc. You can add bigger to be 100% sure that when someone ride the strider, fly with wyvern, will not leave your zone.



When you are done with creating the zone, now it's time to see if it's working. Launch the server, go to the new zone and type //zone_check, else go to admin panel -> server -> zone check (chapter 1 screen). In case it's your custom zone, you can press Visualize All to see the shape. The result will be dropped adena on the ground, as you could notice on the screenshot above.


Basically, that's it. If I forgot about any case, let me know, so I will update the guide.

Your, SweeTy :dw1_4:

Offline l2unnamed

  • Blade Bat
  • *
  • Posts: 108
Re: [GUIDE] How to check, remove and add zone
« Reply #1 on: April 13, 2017, 05:52:54 PM »
Aboud dino island ... i removed the code from peacezone.xml and its still peacezone then i removen the dino island from townzones also and become nothing (you can flag ... ) but when you die and press to village it doesnt do anything ...
What should i do to make it pvp/pk zone

Offline ArhsGr

  • Goblin
  • *
  • Posts: 54
  • Awards Customer crew on duty !
Re: [GUIDE] How to check, remove and add zone
« Reply #2 on: April 20, 2017, 04:40:47 PM »
change the type zone to peace

Offline l2unnamed

  • Blade Bat
  • *
  • Posts: 108
Re: [GUIDE] How to check, remove and add zone
« Reply #3 on: April 20, 2017, 04:46:56 PM »
No nothing worked ... but i find how to change it so the fix is (for the members of acis) You should go to townzone.java and change ispeace = True to false then you should go to peacezone.xml and delete primeval from there ...
But again i dont know how you can change it to your type zone like i said above it becomes pvp/pk zone