Jump to content

Recommended Posts

Posted (edited)

In this guide I will explain step by step how you can check, remove and create your zone. Happy reading delf2_7.gif

 


 

Chapter I - Checking the type of zone (aCis case)

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

adjdqr.jpg

 

 

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.

    <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 alone.gif

 


 

Chapter III - Types of zones

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

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.

 

4uuir4.jpg

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

    <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 ork2_16.gif

ok3pqd.jpg

Most of the zones uses NPoly, here is an example

    <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.

 

20iixt.jpg

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

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

    </zone>


 

When you decided which shape to use and you have the coords, don't forget the set/change it's type (in case you simply c/p another zone structure). If your new custom zone is called FlagZone, then you must declate it under type=" "

<zone type="FlagZone"

Basically, you can put the zone code to any file you wish, but the best way to keep things organized it to create a new file, in that case, FlagZone.xml - you can copy any existing file, rename it, remove all <zone> records and paste there yours. That way you know where to search if you want to add more zones or remove, extend or whatever.

 


 

These 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.gif

Edited by SweeTs
  • Like 2
  • Upvote 3
Posted

I can create new zone but where to put it ? I want to reate 1 no private store zone overall giran and one private store zone in the squad. I create the zone, but i dont know where to put the lines. Look:

 

mskcut.png

Posted (edited)

Basically to any file. But to keep it organised you can create new xml file for that type, so later you know where it is.

I will add the adnotation tomorrow.

Yes, for all projects.

Edited by SweeTs
  • 1 month later...
Posted (edited)

This one will be helpfull also for L2JReunion project?

In older chronicles (at least not reworked IL, up to maybe GF), vertices (now called nodes) are stored in vertices.sql. The geometry and forms of zones never changed. I'm also not sure how they handled chaotic spawns in the past.

 

Except that, the system is basically more or less the same since IL, with few additions depending of L2J revision or fork, such as new L2ZoneType(s).

Edited by Tryskell
  • 5 weeks later...
Posted

Read above....

 

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.

Posted (edited)

i cant understand what minZ and maxZ are and how i must change them depend on every area ...

 

" 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. "

 

6IFRxBE.jpg

 

Take a look on the middle position. If you set the min/max too low, when you do a step you will leave the zone (for example, mount the wivern or ride the strider - the Z is higher, boom you are not inside the zone anymore).

Edited by SweeTs
Posted

minZ and maxZ basically "shapes" your volume, otherwise it's only a 2D form with X/Y. Thanks to that you can define 2 specific volumes (let's say, a catacomb and the ground just above) as 2 different zone types.

 

If the min/max Z is wrong, you can eventually merge both zones, or even if the volume isn't reachable never see your area.....

 

If it wasn't existing, you couldn't see you're either on a catacomb or on ground.

 

That gives you the opportunity to make also original zones, such as wyvern reachable zones, etc.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



  • Posts

    • Thank you everyone — we're doing our best to deliver the highest quality experience!   ⏳ Less than 2 days left until the L2Elixir Launch! Our team is working nonstop, polishing every little detail to ensure a smooth and exciting opening. A huge thank you to everyone who participated in the Open Beta — your support and feedback have been invaluable. Get ready… the adventure begins soon! ⚔️✨   Launch: November 28 & 21:00 UTC +2   Website: https://l2elixir.org/ Discord: https://discord.gg/5ydPHvhbxs  
    • Do you sell interlude interfaces?
    • in conclusion when somebody who has a project for 10+ years still on development writes an e-say to try until you succeed and then advertises his project, one of the reasons is he needs money, so l2j has once more become pure expensive hobby, you wont make money out of it.   You can still use L2jFrozen and get better results for this, i know some people that done it    keep in mind that C in aCis stands for Crappy, and after all these years its not a cool wordplay anymore, its a fact, prove me wrong.
    • First, don't really follow the "main voice", moreover if you consider it an hobby. Simply do what you want, you got only one life so use it as you want. If you make it an hobby, it's exactly like piano, or velo - only practice makes you better.   Secondly, how do you learn things ? It's actually a really important question, since some can simply be scholar, read books (theory) then practice ; and some simply can't read books. I'm the second type, I hated school, I find it boring - my knowledge in Java comes from try-and-fail. You improve your coding style every year or so, I can myself rewrite my own code (which I already considered top-notched) after a while. You always learn something new - even if Java barely evolves. L2J is a fun way to learn programming, it's a giant sandbox where you can edit anything, and I believe it should be taken as it.   My own way of learning was as follow : Add existing customs, no matter what they are : the point is to know main classes used by L2J / customs. L2J is barely Java knowledge ; the true knowledge is to know WHAT to search in WHICH location (what I call, organization). You have to understand than EVERYTHING you think already exists, in a form on another, in the source code. A custom is only the association of the different mechanisms you found "here and there", glued together in a proper goal. Once you know main classes to edit, and the customs you added are compiling fine, the main point is to know WHAT exactly you DID. Try to understand WHY and WHERE you actually copied the code. Third point would be to MANIPULATE the customs you added in order to fit your wish. First edit little values, then logic conditions ; eventually add a new Config, or a new functionality to the custom. Fourth point would be to begin to craft your own ideas. Once again, EVERYTHING already exists, in a form or another. You want a cycled event ? You got Seven Signs main task as exemple. Npc ? Search any type of Npc and figure out what it does. Fifth point would be to understand Java - mostly containers (WHAT and WHERE to use them), variables types and main Java mechanisms (inheritance, static modifier, etc). You should also begin to cut your code into maintainable classes or methods. Java can actually run without optimization, but bigger your ideas, more optimized and well-thought it should be. It's direct saved time in the future, and you would thank yourself doing so. Main tips : ALWAYS use any type of versioning system - GIT or SVN. It allows to save your work, step by step and eventually revert back anytime you want if you terribly messed up. L2J is 80% organization knowledge, and 20% Java knowledge. Basically, if you know WHAT and WHERE to search, if you aren't dumb, it's easy to replicate and re-use things. Cherry on top is to use a already good coded pack to avoid copy-paste crap and get bad habits. Avoid any type of russian or brazilian packs, for exemple - their best ability is to leak someone's else code. Obviously you need some default sense of logic, but Java and programming in general help you to improve it.   Finally, most of your questions could be solved joining related Discord (at least for aCis, I can't speak for others) - from the moment your question was correctly asked (and you seemed to search for the answer). My community (and myself) welcomes newbies, but got some issues with noobies.   The simpliest is to try, fail and repeat until you succeed - it sounds stupid, but that's basically how life works.   PS : about Java ressources, before ChatGPT, it was mostly about stackoverflow website, and site like Baeldung's one. With ChatGPT and alike, you generally double-cross AI output to avoid fucked up answers. Also, care about AI, they are often hallucinating really hard, even today. They can give you complete wrong answer, you tell them they are wrong, and they say "indeed, I suck, sorry - here's a new fucked up answer". You shouldn't 100% rely over AI answer, even if that can give sometimes legit answers, full code or just skeletons of ideas.   PPS : I don't think there are reliable ressources regarding L2J itself, also most of the proposed code decays pretty fast if the source code is actually maintained (at least for aCis). Still, old coded customs for old aCis sources are actually a good beginner challenge to apply on latest source.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock