Jump to content
  • 0

Geodata, NPCPOS logics


iPlay.GG - KromBacher

Question

Happy Christmas MxC community, wish you best of the best - about 4 weeks ago I've begun my journey into L2OFF (never tried L2J), and it's e-FFing interesting. Especially want to thank Eressea who has been really helpful in lots of ways.


I'm interested to understand how Geodata and npcpos is working hand in hand. As I understand  (correct me if I'm wrong), but geodata is based on colormaps from Unreal engine? - The lighter the area the shallower it is and the darker area is height of something.

- Now after that, there are Zones aka territories which is splitted into Neutral, Gludio, Giran, Goddard, Etc.
- Zones are using XYZ coordinates, which can be made in any formation, but not less than 2 points (else its line), so you can create minimum a TRIANGLE, HEXAGON zone and infinitely above
- Inside zones you got grouped areas, which follow the same logic as Zones, but they are miniature
- and finally inside a zones you got NPC's standing in

I would assume that certain action does not tell NPC to do something, but actually tells to a zone ? - I went through a siege territory coordinates and noticed that for some reason there are multiple territories in 1 territory, why is that? Could it be something to do with Loading data for zones? Bigger zone = more resources to load ? So rather than loading large zone it works faster with many smaller ones ?

Example, correct me if I'm wrong:
(This is Territory Data, basically if user enters into that zone, it will flash up saying "Gludio Territory", teleporting SOE inside that zone, will return user to town)


domain_end
domain_begin	[gludio_1624_001]	domain_id=1	{{-131056;196736;-5212;788};{-98380;196648;-5212;788};{-98428;229188;-5212;788};{-130988;229224;-5212;788}}	domain_end
domain_begin	[gludio_1625_001]	domain_id=1	{{-131020;229516;-4820;1180};{-98484;229588;-4820;1180};{-98396;262080;-4820;1180};{-131064;261872;-4820;1180}}	domain_end
domain_begin	[gludio_1720_001]	domain_id=1	{{-97868;65836;-4904;1096};{-76324;65972;-4904;1096};{-77528;77712;-4904;1096};{-98100;87216;-4904;1096}}	domain_end
domain_begin	[gludio_1720_002]	domain_id=1	{{-98172;87344;-4832;1168};{-80156;79000;-4832;1168};{-78324;86876;-4832;1168};{-80152;98052;-4832;1168};{-98256;98092;-4832;1168}}	domain_end
domain_begin	[gludio_1720_003]	domain_id=1	{{-78308;87376;-3848;2152};{-70516;89252;-3848;2152};{-65788;93912;-3848;2152};{-65736;98076;-3848;2152};{-80084;98040;-3848;2152}}	domain_end
domain_begin	[gludio_1720_004]	domain_id=1	{{-86388;79308;-3468;-2468};{-82064;78388;-3468;-2468};{-80872;84576;-3468;-2468};{-88852;84796;-3468;-2468};{-88992;82552;-3468;-2468}}	domain_end
domain_begin	[gludio_1721_001]	domain_id=1	{{-98388;98168;-3808;2192};{-65688;98296;-3808;2192};{-65600;131076;-3808;2192};{-98300;131356;-3808;2192}}	domain_end
domain_begin	[gludio_1722_001]	domain_id=1	{{-98272;131164;-5024;2976};{-65828;131248;-5024;2976};{-65764;163676;-5024;2976};{-98732;165048;-5024;2976}}	domain_end
domain_begin	[gludio_1723_001]	domain_id=1	{{-98236;163948;-5004;996};{-65724;163856;-5004;996};{-65880;195756;-5004;996};{-98388;196880;-5004;996}}	domain_end
domain_begin	[gludio_1725_001]	domain_id=1	{{-98320;229472;-5036;964};{-65752;229436;-5036;964};{-65468;261984;-5036;964};{-98200;261776;-5036;964}}	domain_end
domain_begin	[gludio_1820_001]	domain_id=1	{{-65488;93628;-4148;1852};{-33092;89240;-4148;1852};{-32964;98112;-4148;1852};{-65476;98100;-4148;1852}}	domain_end
domain_begin	[gludio_1821_001]	domain_id=1	{{-65484;98340;-3780;2220};{-33068;98676;-3780;2220};{-33020;130852;-3780;2220};{-65528;131016;-3780;2220}}	domain_end
domain_begin	[gludio_1822_001]	domain_id=1	{{-65484;131176;-4172;1828};{-32972;131168;-4172;1828};{-33024;163632;-4172;1828};{-65388;163568;-4172;1828}}	domain_end
domain_begin	[gludio_1823_001]	domain_id=1	{{-65440;163896;-5616;384};{-32844;163852;-5616;384};{-32996;196452;-5616;384};{-65532;196488;-5616;384}}	domain_end
domain_begin	[gludio_1824_001]	domain_id=1	{{-65368;196732;-4880;1120};{-33032;196776;-4880;1120};{-33076;229244;-4880;1120};{-65012;229212;-4880;1120}}	domain_end
domain_begin	[gludio_1920_001]	domain_id=1	{{-5032;72868;-4088;-2088};{-24;79252;-4088;-2088};{108;98528;-4088;-2088};{-21568;98404;-4088;-2088};{-22548;90904;-4088;-2088};{-20236;76952;-4088;-2088};{-12260;70068;-4088;-2088}}	domain_end
domain_begin	[gludio_1920_002]	domain_id=1	{{-22232;77188;-5408;-4408};{-10864;77036;-5408;-4408};{-11192;88548;-5408;-4408};{-21852;88044;-5408;-4408}}	domain_end
domain_begin	[gludio_1921_001]	domain_id=1	{{-32480;98448;-4044;1956};{-192;98440;-4044;1956};{388;131392;-4044;1956};{-32692;130880;-4044;1956}}	domain_end
domain_begin	[gludio_1922_001]	domain_id=1	{{-32744;131188;-3904;2096};{-252;131164;-3904;2096};{-124;163732;-3904;2096};{-32696;163648;-3904;2096}}	domain_end
domain_begin	[gludio_1923_001]	domain_id=1	{{-32644;163916;-4464;1536};{-148;163948;-4464;1536};{132;196496;-4464;1536};{-32716;196364;-4464;1536}}	domain_end
domain_begin	[gludio_1924_001]	domain_id=1	{{-32720;196704;-6988;-988};{-64;196664;-6988;-988};{-216;229148;-6988;-988};{-33140;229576;-6988;-988}}	domain_end
domain_begin	[gludio_2125_001]	domain_id=1	{{33600;229712;-5196;804};{65364;230072;-5196;804};{65324;262096;-5196;804};{31612;262128;-5196;804}}	domain_end


This here is a castle positions: Basically it's quite clear, territory begins and all npc's are inside territory, also says whats the maximum amount of npc's etc.

territory_begin	[gludio_siege03]	{{-18652;112279;-2646;63090};{-17728;112276;-2646;63090};{-17705;112698;-2646;63090};{-18657;112699;-2646;63090}}	territory_end				
npcmaker_begin	[gludio_siege03]	initial_spawn=all	spawn_time=siege_warfare_start(1)	maximum_npc=30			
npc_begin	[gludio_bow_guard_s_e]	pos={-18410;112356;-2498;15900}	total=1	respawn=3hour	dbname=[gludio_siege_068]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_bow_guard_s_e]	pos={-18380;112355;-2499;15900}	total=1	respawn=3hour	dbname=[gludio_siege_069]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_wizard_s]	pos={-18350;112358;-2498;15900}	total=1	respawn=3hour	dbname=[gludio_siege_070]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_bow_guard_s_e]	pos={-18320;112359;-2498;15900}	total=1	respawn=3hour	dbname=[gludio_siege_071]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_bow_guard_s_e]	pos={-18291;112360;-2497;15900}	total=1	respawn=3hour	dbname=[gludio_siege_072]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_bow_guard_s_e]	pos={-18640;112422;-2496;15900}	total=1	respawn=3hour	dbname=[gludio_siege_073]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_bow_guard_s_e]	pos={-18610;112421;-2497;15900}	total=1	respawn=3hour	dbname=[gludio_siege_074]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_wizard_s]	pos={-18581;112424;-2496;15900}	total=1	respawn=3hour	dbname=[gludio_siege_075]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_bow_guard_s_e]	pos={-18551;112425;-2496;15900}	total=1	respawn=3hour	dbname=[gludio_siege_076]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_bow_guard_s_e]	pos={-18521;112426;-2495;15900}	total=1	respawn=3hour	dbname=[gludio_siege_077]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_bow_guard_s_e]	pos={-18107;112560;-2497;31664}	total=1	respawn=3hour	dbname=[gludio_siege_078]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_bow_guard_s_e]	pos={-18104;112590;-2498;31664}	total=1	respawn=3hour	dbname=[gludio_siege_079]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_wizard_s]	pos={-18106;112619;-2497;31664}	total=1	respawn=3hour	dbname=[gludio_siege_080]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_bow_guard_s_e]	pos={-18105;112649;-2497;31664}	total=1	respawn=3hour	dbname=[gludio_siege_081]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_bow_guard_s_e]	pos={-18104;112679;-2496;31664}	total=1	respawn=3hour	dbname=[gludio_siege_082]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_sword_guard_s_e]	pos={-17840;112354;-2600;65480}	total=1	respawn=3hour	dbname=[gludio_siege_083]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_knight_s]	pos={-17839;112320;-2600;65480}	total=1	respawn=3hour	dbname=[gludio_siege_084]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_sword_guard_s_e]	pos={-17835;112279;-2599;65480}	total=1	respawn=3hour	dbname=[gludio_siege_085]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_spear_guard_s_e]	pos={-17861;112354;-2589;65480}	total=1	respawn=3hour	dbname=[gludio_siege_086]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_spear_guard_s_e]	pos={-17860;112320;-2590;65480}	total=1	respawn=3hour	dbname=[gludio_siege_087]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_spear_guard_s_e]	pos={-17856;112279;-2589;65480}	total=1	respawn=3hour	dbname=[gludio_siege_088]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_court_guard_s]	pos={-17879;112354;-2575;65480}	total=1	respawn=3hour	dbname=[gludio_siege_089]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_court_guard_s]	pos={-17878;112320;-2576;65480}	total=1	respawn=3hour	dbname=[gludio_siege_090]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_court_guard_s]	pos={-17874;112279;-2575;65480}	total=1	respawn=3hour	dbname=[gludio_siege_091]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_cleric_s]	pos={-18207;112313;-2498;22676}	total=1	respawn=3hour	dbname=[gludio_siege_092]	dbsaving={death_time;parameters;pos}	npc_end




But what does not make sense for me is, WHY territory coordinates are using FACE Direction ?
        Example: {{-18652;112279;-2646;63090} - First number is X, Y then Height Z, But why "63090" Face direction ? What role does that play?

how to determine "Z" for positioning NPC'S?

        Example: {{-18652;112279;-2646;63090} - height is -2646, but NPC is located in -2498 example, Question is: NPC must be ALWAYS lower or Equal of that zone, but never higher, else it will give errors like NPC is outsider ?
MINUS and NEUTRAL numbers?
        Probably stupid question, but "-" befor enumber means negative, which is DOWN and neutral is UP? - if that's the case, why X and Y are negative? Could it be something to do with territory positions ?
Face direction?

       What is the logic behind face directions? How does that value is being calculated?
       Could it be that MALLOC >32 is based on loading npc's ? - Which means too many data to handle, to solve that , reduce area into smaller zones ? - or it has nothing to do with that?
       Again, Can I use More points (example around the castle) instea traditional 4 points ill give 10 points?

       Any tools out there that will help creating territories and editing NPC position + face direction ? For Gracia Final
 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 1

1. these heading are for npc spawns, so given npc always spawn looking in same direction. Don't really get what do you miss here :D 65536 stands for full 360 degrees.

2. i guess difference comes from different models collision, also some might be floating etc

3. because that's how l2 world always been :D 0,0 coords are somewhere near rune.

 

Link to comment
Share on other sites

  • 1

The fourth number in territory definition isn't direction but maxZ - it's x, y, minZ, maxZ for each point.

If you need to spawn NPC on specific location, go there, get your /loc and use it. Z coordinate should be within minZ and maxZ from territory (and X and Y coordinates should be inside territory).

Direction is 16384 per 90° so 0 ~ 0°, 16384 ~ 90°, 32768 ~ 180°, 49152 ~ 270°.

Ignore that malloc, it's just for developers (NCsoft) to see how many memory they allocate - they just log all allocations larger than 32 KB.

You can use as many points as you need (of course at least 3) but I'm not sure if it requires them to be clock-wise or whether it doesn't matter (in some systems when you make polygon counter-clock-wise, it's area is outside, when you make it clock-wise, it's area is inside) - not sure how this works, I haven't tried to reverse engineer any of these (it always just worked for me)

 

  • Upvote 1
Link to comment
Share on other sites

  • 0
3 hours ago, eressea said:

The fourth number in territory definition isn't direction but maxZ - it's x, y, minZ, maxZ for each point.

If you need to spawn NPC on specific location, go there, get your /loc and use it. Z coordinate should be within minZ and maxZ from territory (and X and Y coordinates should be inside territory).

Direction is 16384 per 90° so 0 ~ 0°, 16384 ~ 90°, 32768 ~ 180°, 49152 ~ 270°.

Ignore that malloc, it's just for developers (NCsoft) to see how many memory they allocate - they just log all allocations larger than 32 KB.

You can use as many points as you need (of course at least 3) but I'm not sure if it requires them to be clock-wise or whether it doesn't matter (in some systems when you make polygon counter-clock-wise, it's area is outside, when you make it clock-wise, it's area is inside) - not sure how this works, I haven't tried to reverse engineer any of these (it always just worked for me)

 


I'm close to solve all positioning errors, what about :

[252] Cannot generate random position sky in territory[rune16_npc2017_sp04]



 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Whatever @Tryskell said...   Unfortunately it is not 2005-2010 anymore... Most of the community from those days is "grown up" and probably does not play games anymore (or at least no MMOs). I think anything related to MMOs will be a nail in the coffin.   I understand that it is hard to let the thing you've built for years to "just die". I assume most people got into programming, so maybe you can try something in that direction. But then again, this is a very niche community.   We need to think of something to bring the people together. I think events may be really fun, but then you would probably need to add prizes n order for the people to participate.   So yea, just my 2 cents. Hopefully somebody can come up with some great idea so we can revive this place. I've already forgotten it for the last couple (5-6) years...
    • Thats an interface future. You can reach me out about this in discord: xbaus
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/hoodservices https://campsite.bio/utchihaamkt
    • Both "MMO genre" AND "forums" are greatly deprecated those days. MMO genre, except very few games (TESO, WOW, BDO, FF14), is mostly "eaten" by fast paced games (aka games with 15-30min game parties, they are numerous). See Twitch best games, I doubt the top 10 are MMOs. Adding more MMOs categories, while MMOs themselves got less population, isn't a bright idea. Also, in the past, there was multiple games categories - none actually worked out, so far. Forums type were replaced by Discord, mostly. You communicate faster, you got voice, you can group up and it's already thematized (by server, by guild, by game,...)... Unfortunately, there is nothing you can do about. You already did it multiple times without success (3 or 4 times at least ?). It's not due to staff. MMO forum is just "niche" nowadays, while 20 years ago it was "dope" and the thing to do. Your main problem is MxC is a community based on "nothing". It was first cheater dedicated, then mostly L2 development dedicated,... With a mix of random things here and there. The formula is lightly-themed as "community" (that's actually why you still have some ppl posting), and in same time community never was expanded to retain ppl (notably through MxC servers - no matter the game : L2, GTA, Conan Exiles, Lost Ark, whatever else). In the end, you end with "nothing", since people comes and goes (and mostly goes, since MMO isn't a thing anymore), but both MMO genre is greatly endangered by other types of games AND forums isn't the proper way to communicate in 2024. Actually, the only use of a forums compared to Discord is to search through archives, and the main point is it's a better "showcase" than Discord (a static website would end with the same output). The proposed formula will never work, or at best will attract greedy ppl.
    • Welcome to my store :https://ultrasstore11.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10.50 $ 2017 Discord Account :4.99 $ 2018 Discord Account : 3.99 $ 2019 Discord Account : 2.99 $ 2020 Discord Account :1.99$ 2021 Discord Account :1.50$ 2022 Discord Account :0.99$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord :@ultrasstore11 Telegram : https://t.me/ultrastore11  
  • Topics

×
×
  • Create New...