Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 29.05.2007, 11:25   #1
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default l2joff npcpos converter again :)

that's l2joff converting tool.

0.1a - first release.
0.1b - respawn time fixed.
0.2a - a bit optimized code, integrated castle guards converter (if there is a bug - post bugreport, i'll fix it), name="" mistake fixed.
0.2b - castle guards pos generating fix, $row["reuse_delay"] mistake fixed
0.2b2 - castle guards now isn't _ex_ npcs, but regular npcs is _ex_.
0.5a - now all territories looks like a square (8 points); warriors, raid bosses,mimic,treasures have pos=anywhere, but citizen's, guards, traders, etc have static coordinates; script from now will get npcnames from npclist (which has c4 npcs and some of c5), if some id not found in npclist, then script will take it from l2jdb and give them static coordinates and display a warning in browser;some optimizes (converting now take less than 5 seconds).
0.5a2 - minor bug fixed (with territory and npcmaker names on regular npcs).

i think that latest l2j database is here:
http://www.l2jdp.com/svn/

i've rewrite my old one from null, and it looks more better. :P
i was written this script to up exp in php, but i don't have time to check script or result for errors and mistakes.
this script not for sell, but you can freely modify and share it.
hints, reports and help will help me fix scripts and better understand php.
small piece of generated npcpos :
Quote:
territory_begin [gludio_t16_21_003] {{-103742;103344;-3555;-3535};{-101914;103344;-3555;-3535};{-101914;105251;-3555;-3535};{-103742;105251;-3555;-3535}} territory_end
npcmaker_ex_begin [gludio_t16_21_003] name="gludio_t16_21_003" ai=[default_maker] maximum_npc=5
npc_ex_begin [whispering_wind] pos={-101924;104293;-3545;-3220} total=1 respawn=35 npc_ex_end
npc_ex_begin [whispering_wind] pos={-102596;105241;-3545;-3220} total=1 respawn=35 npc_ex_end
npc_ex_begin [ol_mahum_legionnaire] pos={-103236;103354;-3545;-3220} total=1 respawn=35 npc_ex_end
npc_ex_begin [selu_lizardman_warrior] pos={-102946;103785;-3545;-3220} total=1 respawn=35 npc_ex_end
npc_ex_begin [selu_lizardman_scout] pos={-103732;103488;-3545;-3220} total=1 respawn=35 npc_ex_end
npcmaker_ex_end
Вложения из исходного сообщения (сами файлы в копии отсутствуют):
l2joff_npcpos_rebirth_0.5a2.rar — 40454 байт
hel is offline  
Old 29.05.2007, 11:55   #2
madar
Архивный участник
 
Join Date: Dec 2005
Posts: 156
Default

nice

btw. you dont have to write sec/min/hour after respawn= ?
madar is offline  
Old 29.05.2007, 14:00   #3
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

fixed....... maybe (not tested well).
hel is offline  
Old 29.05.2007, 17:46   #4
madar
Архивный участник
 
Join Date: Dec 2005
Posts: 156
Default

ill try to redo the castle thing like you did with the npcpos if you will not be faster than me
madar is offline  
Old 29.05.2007, 22:01   #5
madar
Архивный участник
 
Join Date: Dec 2005
Posts: 156
Default

Code:
npcmaker_ex_begin	[schuttgart_broadcast_2213_001]	name="schuttgart_broadcast"	ai=[default_maker]	maximum_npc=1

the name should/must be in [ ]
madar is offline  
Old 29.05.2007, 22:21   #6
m4rk
Архивный участник
 
Join Date: Jan 2006
Posts: 607
Default

line 114 from npcpos_class.php

Incorrect one:
Code:
$res[0]."]\tname=\"".$res[0]."\"\tai=[default_maker]\tmaximum_npc=".$maximum_npc[0]."\r\n");
Fixed one:
Code:
res[0]."]\tname=[".$res[0]."]\tai=[default_maker]\tmaximum_npc=".$maximum_npc[0]."\r\n");
m4rk is offline  
Old 30.05.2007, 11:34   #7
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

check 1st post, new version posted.
hel is offline  
Old 30.05.2007, 11:38   #8
balapro
Архивный участник
 
Join Date: May 2007
Posts: 11
Default

wow hel nice, i tested very thx ^^


Big post
balapro is offline  
Old 30.05.2007, 14:29   #9
GmZenBrasil
Архивный участник
 
Join Date: Jan 2007
Posts: 30
Default

very good work man, thanks ^^
GmZenBrasil is offline  
Old 30.05.2007, 15:23   #10
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Good idea. It's my old wish

But, two questions:
- where can get l2j pos file?
- why need use 'npcmaker_ex_begin' but not simple 'npcmaker_begin' ?
HF is offline  
Old 31.05.2007, 00:50   #11
mcrabben7
Архивный участник
 
Join Date: Apr 2006
Posts: 461
Default

Good job hel It's a very nice base to work on NPC positions.
mcrabben7 is offline  
Old 31.05.2007, 06:06   #12
madar
Архивный участник
 
Join Date: Dec 2005
Posts: 156
Default

row 62
change:
Code:
."\t".$row["heading"]."\t".$this->respawn_time($row["respawn_delay"]);
to:
Code:
."\t".$row["heading"]."\t".$this->respawn_time($row["respawnDelay"]);

after some test i found out your castle guard spawn converter's output is a bit wrong.

it must look like this:
Code:
territory_begin	[gludio_siege01]	{{-18511;113052;-2791;62945};{-18170;113055;-2791;62945};{-18176;113273;-2791;62945};{-18511;113273;-2791;62945}}	territory_end				
npcmaker_begin	[gludio_siege01]	initial_spawn=all	spawn_time=siege_warfare_start(1)	maximum_npc=30			
npc_begin	[gludio_bow_guard_s_e]	pos={-18460;113107;-2759;15608}	total=1	respawn=3hour	dbname=[gludio_siege_001]	dbsaving={death_time;parameters;pos}	npc_end
npc_begin	[gludio_bow_guard_s_e]	pos={-18432;113107;-2759;15608}	total=1	respawn=3hour	dbname=[gludio_siege_002]	dbsaving={death_time;parameters;pos}	npc_end
npcmaker_end
madar is offline  
Old 31.05.2007, 06:12   #13
madar
Архивный участник
 
Join Date: Dec 2005
Posts: 156
Default

a snippet from Phantom2005's code that i modified:

Code:
$castle_list=array(1=>"gludio",2=>"dion",3=>"giran",4=>"oren",5=>"aden",6=>"innadril",7=>"goddard",8=>"rune",9=>"schuttgart");
         fputs($npcpos,"territory_begin	[{$castle_list[$row["castleId"]]}_siege".$row["id"]."]	{"
              .$points."}	territory_end	\r\nnpcmaker_begin	[".$row2["name"]."_siege"
              .$row["id"]."]	initial_spawn=all	spawn_time=siege_warfare_start(".$row["castleId"].")	maximum_npc=1	\r\nnpc_begin	["
              .$name_of_npc."]	pos={".$row["x"].";".$row["y"].";"
              .$row["z"].";".$loczmax."}	total=1	respawn=".$row["respawnDelay"]."sec	dbname=[{$castle_list[$row["castleId"]]}_siege_".$row["id"]."]	dbsaving={death_time;parameters;pos}	npc_end\r\nnpcmaker_end				\r\n");}
madar is offline  
Old 31.05.2007, 08:48   #14
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

Quote:
Originally Posted by HF
Good idea. It's my old wish

But, two questions:
- where can get l2j pos file?
- why need use 'npcmaker_ex_begin' but not simple 'npcmaker_begin' ?
1. all spawnlist converts from database (mysql), not from file.
http://www.l2jdp.com/svn/ - i think new versions of databases is here.
2. don't know, how to see difference in npcmaker_ and npcmaker_ex_ in l2j database, so i use _ex_ one. :/

Quote:
Originally Posted by madar
a snippet from Phantom2005's code that i modified:
thanks, now i see, where i do a mistake and know what need to modify.

Quote:
Originally Posted by madar
row 62
change:
i see... will fix all reported problems soon.
hel is offline  
Old 31.05.2007, 09:53   #15
madar
Архивный участник
 
Join Date: Dec 2005
Posts: 156
Default

as i see you have to use npcmaker_ex for all "regular npc / mob" and normal npc_maker for castle / agit siege stuff
madar is offline  
Old 31.05.2007, 11:15   #16
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

check first post, new version posted.
hel is offline  
Old 01.06.2007, 05:48   #17
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

if i don't recieve bugreports or ideas about npcpos converter this day, i'll end project and 0.2b2 will be "full unbuggy" and "full functional" end release. (in version 0.2b2 i was fixed all reported problems)
it will be more good, if i get txt file with only "npc_name;id" from npcdata (c5), then i will do getting right npcnames (for c4 (c5) off npcdata, npcpos) by id.
hel is offline  
Old 01.06.2007, 07:51   #18
tpuNIsher
Архивный участник
 
Join Date: Mar 2006
Posts: 685
Default

Ok, time to post here my 2 cents.

This is indeed a great base to work from. However, the thing i've understood from weeks of analyzing c4 retail npcpos, then now comparing them to your npcpos is that:

1. Your npcpos tells every mob to spawn pos based. As in each mob will spawn on pos={x,y,z,direction} based.
That's processor intensive, l2npc works more imo, and players when playing will be knowing exactly where the mob is spawning.
That's the problem with l2j i do not like as well

2. Retail npcpos for most npcmaker_ex poses, they uses pos = anywhere.
So within the terriotory defined for that npcmaker_ex the mobs asked to spawn ( maximum npc ) and the mobs specified will spawn ALWAYS randomly, meaning player doesn't know at what spot the mob might spawn next.
It might be exactly where the mob spawned a bit ago or it might be a place far from it's previous spawn point. Which is how L2OFF poses are.

3. About territory:
This problem exists in ALL npcpos makers i've seen, none are perfect. Analyzing retail npcpos i understood that territories are built by a pentagon / rectangle / square and so on base.
Every npcpos maker ive seen uses rectangle / square based system for territories.
( HF, this is a idea for you too! maybe you can make option to choose how to make npcpos in ur tool, pentagon based / square based / etc based ..to know what i mean by pentagon and etc.. read down)

If you don't understand what that means.. let me give u an example..from l2wh pospic.



ok u see that's a pic from simple stakato nest pos from l2wh. its a 5 sided thing pentagon or w/e. How that works? look at this code below:

Code:
territory_begin	[rune08_2215_58]	{{95339;-87076;-2894;-2394};{95800;-86680;-2894;-2394};{95849;-85825;-2894;-2394};{95570;-85670;-2894;-2394};{95138;-85662;-2894;-2394};{94783;-86082;-2894;-2394};{95061;-87010;-2894;-2394}}	territory_end															
npcmaker_ex_begin	[rune08_2215_58]	name=[rune08_2215_58m1]	ai=[default_maker]	maximum_npc=9														
npc_ex_begin	[brilliant_crown]	pos=anywhere	total=1	respawn=48sec	respawn_rand=15sec	npc_ex_end												
npc_ex_begin	[brilliant_fang]	pos=anywhere	total=1	respawn=48sec	respawn_rand=15sec	npc_ex_end												
npc_ex_begin	[brilliant_anguish]	pos=anywhere	total=1	respawn=48sec	respawn_rand=15sec	npc_ex_end												
npcmaker_ex_end
u see my analysis is right! they are pos = anywhere which means random!

AND! look at {{95339;-87076;-2894;-2394};{95800;-86680;-2894;-2394};{95849;-85825;-2894;-2394};{95570;-85670;-2894;-2394};{95138;-85662;-2894;-2394};{94783;-86082;-2894;-2394};{95061;-87010;-2894;-2394}}

7 SIDES!! so, what we have to do to achieve more 'retail like' pos is to get a base from ur files, and do them all as retail by going to the places and making squares / pentagons / rectangles as necessary seen from l2wh and put pos = anywhere!

Do you understand what i mean by this pos? im not criticizing ur work hel, but im sayign to all that, we DONOT need pos = {x,y,z;direction} for ALL npcs in L2.. what we need is the castles / towns / other citizen pos = {x,y,z;direction} only! so We should concentrate on fixing that only and put max npc = some number and pos = anywhere for all rest territories for npcpos. Saves time & more retail like & less load on l2npc server imo. Only there will be a few exceptions.. like raidbosses maybe or some special mobs..

I hope my post was helpfull to u, ur this work is truely nice ^^ And ignore my typos =p
tpuNIsher is offline  
Old 01.06.2007, 08:18   #19
tpuNIsher
Архивный участник
 
Join Date: Mar 2006
Posts: 685
Default

Another thing, a bug report.
Code:
territory_begin	[giran04_npc2421_0358427]	{{154745;121047;-3807;-3707};{154745;121147;-3807;-3707};{154645;121147;-3807;-3707};{154645;121047;-3807;-3707}}	territory_end	
npcmaker_ex_begin	[giran04_npc2421_0358427]	name=[giran04_npc2421_035842701]	ai=[default_maker]	maximum_npc=1	
npc_ex_begin	[heart_of_warding]	pos={154695;121097;-3757;-3717}	total=1	respawn=60sec	npc_ex_end
npcmaker_ex_end
Format for pos is pos={x,y,z,direction}

The format there is {x,y,z,z2} ?
tpuNIsher is offline  
Old 01.06.2007, 08:41   #20
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

allright...
now i think about how to see, where use static, and where use random spawns... (i don't have c5 npcdata :\)
square 6 or 8 points territory will be enough?


nope, zmax and zmin diff is maximum 20
that's heading
hel is offline  
Old 01.06.2007, 09:07   #21
madar
Архивный участник
 
Join Date: Dec 2005
Posts: 156
Default

the npc has to be spawn on a "static" pos and mobs can get the "anywhere" in pos imo
madar is offline  
Old 01.06.2007, 09:11   #22
tpuNIsher
Архивный участник
 
Join Date: Mar 2006
Posts: 685
Default

Oh ic, but in npcpos, i haven't seen any zmin / zmax in pos=. i think the 4th param is direction in npcpos
so it's like pos={x;y;z;direction}

like: pos={147984;8486;-212;16389} direction is east/west/north/south.
Code:
npc_begin	[aden_bow_guard_s_e]	pos={147984;8486;-212;16389}	total=1	respawn=3hour	dbname=[aden_siege_067]	dbsaving={death_time;parameters;pos}	npc_end
And ah.. i think highest i have seen is 7/8 sided territory and thats for hugely big territorries. yah i think 7/8 will be enough.
And yes, i agree, all mobs should be like dynamic as in anywhere pos and citizens / town npcs should be "static".
We can always fix the ones needed to be fixed by hand later if needed.

P.S. I saw u don't have a c5 npcname list done yet, if you want i can do one for you npcname;id quickly like in few hrs.
I have almost all npcs done with ai class / npcdata ..(almost) ..just remaining all bosses and some dwarf schuttgart and dungeons mobs.
Only thing remaining was proper pos / droplist.. ^^
( i have been working on C5 npcs for 2 and a half monthes :P )
tpuNIsher is offline  
Old 01.06.2007, 09:46   #23
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

tpuNIsher:
yeah, thats fine
write me text file which contains, id;npc;random for example:
1;gremlin;0 //0 means pos=anywhere,1 means pos={static_coords}

thats will be enough.

madar:
i'll wait tpuNIsher for c5 npclist and correct that bug.
hel is offline  
Old 01.06.2007, 09:50   #24
tpuNIsher
Архивный участник
 
Join Date: Mar 2006
Posts: 685
Default

K will be done in few hrs hopefully. btw see pm :P
tpuNIsher is offline  
Old 01.06.2007, 11:18   #25
tpuNIsher
Архивный участник
 
Join Date: Mar 2006
Posts: 685
Default

hum doing all citizen gonna take a long ass time
I can do them too maybe in few days

Code:
22001;grim_wolf;0
22002;grim_grizzly;0
22003;grave_robber_scout;0
22004;grave_robber_lookout;0
22005;grave_robber_ranger;0
22006;grave_robber_guard;0
22007;ghost_of_soldier;0
22008;grave_robber_fighter;0
22009;ghost_of_loyal_vassal;0
22010;ghost_of_general;0
22011;ghost_of_batur_chief;0
22012;ghost_of_batur_chief_a;0
22013;ghost_of_morek_chief;0
22014;ghost_of_morek_chief_a;0
22015;ghost_of_turka_chief;0
22016;ghost_of_turka_chief_a;0
22017;bandit_sweeper;0
22018;bandit_hound;0
22019;bandit_watchman;0
22020;snow_lynx;0
22021;bandit_undertaker;0
22022;bandit_assassin;0
22023;bandit_warrior;0
22024;bandit_inspector;0
22025;frozen_wasteland_werewolf;0
22026;bandit_captain;0
22027;forgotten_crewman;0
22028;vagabond_of_the_ruins;0
22029;ragna_orc;0
22030;ragna_orc_shaman;0
22031;ragna_orc_archer;0
22032;ragna_orc_warrior;0
22033;ragna_orc_mage;0
22034;ragna_orc_mage_a;0
22035;ragna_orc_mage_b;0
22036;ragna_orc_mage_c;0
22037;ragna_orc_healer;0
22038;ragna_orc_hero;0
22039;ragna_orc_commander;0
22040;ragna_orc_sniper;0
22041;ragna_orc_sorcerer;0
22042;ragna_orc_sorcerer_a;0
22043;ragna_orc_sorcerer_b;0
22044;ragna_orc_sorcerer_c;0
22045;dark_corpse;0
22046;varangka_dre_vanul;0
22047;guardian_ghost_town;0
22048;dark_spider;0
22049;varangka_succubus;0
22050;probe_golem_prodigy;0
22051;spelunking_spider;0
22052;jackhammer_golem_a;0
22053;cannon_golem_a;0
22054;cannon_golem_b;0
22055;cruel_vice_golem;0
22056;probe_golem_champion;0
22057;spelunking_ant;0
22058;excavator_golem;0
22059;ginzu_golem_a;0
22060;cannon_golem_c;0
22061;cannon_golem_d;0
22062;jackhammer_golem_b;0
22063;ginzu_golem_prodigy;0
22064;ginzu_golem_b;0
22065;ginzu_golem_c;0
22066;cannon_golem_e;0
22067;cannon_golem_f;0
22068;cannon_golem_g;0
22069;cannon_golem_h;0
22070;cannon_golem_i;0
22071;cannon_golem_j;0
22072;cannon_golem_k;0
22073;cannon_golem_l;0
22074;epic_cannon_golem_a;0
22075;epic_cannon_golem_adjunct;0
22076;ginzu_golem_d;0
22077;ginzu_golem_e;0
22078;ginzu_golem_f;0
22079;lost_bandersnatch;0
22080;big_maze_bandersnatch;0
22081;lost_watcher;0
22082;elder_lost_watcher;0
22083;baby_panthera;0
22084;panthera;0
22085;lost_gargoyle;0
22086;lost_gargoyle_youngling;0
22087;pronghorn_spirit;0
22088;pronghorn;0
22089;ice_tarantula;0
22090;frost_tarantula;0
22091;lost_iron_golem;0
22092;frost_iron_golem;0
22093;lost_buffalo;0
22094;frost_buffalo;0
22095;ursus_cub;0
22096;ursus;0
22097;lost_yeti;0
22098;frost_yeti;0
22099;freya_buffalo;0
22100;freya_gardener;0
22101;freya_servant;0
22102;freya_servant;0
22103;freya_white_bear;0
22104;freya_dog;0
22108;female_spiked_stakato;0
22109;male_spiked_stakato;0
22110;male_spiked_stakato;0
22111;spiked_stakato_sorcerer;0
22112;cannibal_stakato_follower;0
22113;cannibal_stakato_leader;0
22114;cannibal_stakato_leader;0
22117;spiked_stakato_captain;0
22118;spiked_stakato_nurse;0
22119;spiked_stakato_nurse;0
22120;spiked_stakato_baby;0
22121;spiked_stakato_shaman;0
22122;monastic_pilgrim;0
22123;monastic_crusader;0
22124;solina_brother;0
22125;solina_lay_brother;0
22126;silent_seeker;0
22127;silent_brother;0
22128;monastery_guardian;0
22129;warrior_monk;0
22130;divine_advocate;0
22131;pilgrim_of_light;0
22132;judge_of_light;0
22133;guardian_of_grail;0
22134;guardian_of_holy_land;0
22135;beholder_of_light;0
22136;gatekeeper_zombie;0
22137;penance_guard;0
22138;chapel_guard;0
22139;old_aristocrat_soldier;0
22140;zombie_worker;0
22141;forgotten_victim;0
22142;triol_layperson;0
22143;triol_believer_a;0
22144;resurrected_temple_knight;0
22145;ritual_sacrifice_a;0
22146;triol_priest_a;0
22147;ritual_offering_a;0
22148;triol_believer_b;0
22149;ritual_offering_b;0
22150;triol_believer_c;0
22151;triol_priest_b;0
22152;temple_guard;0
22153;temple_guard_capt;0
22154;ritual_sacrifice_b;0
22155;triol_high_priest_a;0
22156;triol_priest_c;0
22157;triol_priest_d;0
22158;triol_believer_d;0
22159;triol_high_priest_b;0
22160;triol_priest_e;0
22161;ritual_sacrifice_c;0
22162;triol_believer_e;0
22163;triol_high_priest_c;0
22164;triol_believer_f;0
22165;triol_priest_f;0
22166;triol_believer_g;0
22167;triol_high_priest_d;0
22168;triol_priest_g;0
22169;ritual_sacrifice_d;0
22170;triol_believer_h;0
22171;triol_high_priest_e;0
22172;ritual_sacrifice_e;0
22173;triol_priest_h;0
22174;triol_priest_i;0
22175;andreas_royal_guard_capt;0
22176;andreas_royal_guards;0
22177;hall_keeper_captain;0
22178;hall_keeper_wizard;0
22179;hall_keeper_guard;0
22180;hall_keeper_patrol;0
22181;hall_keeper_suicidal_soldier;0
22182;dark_choir_captain;0
22183;dark_choir_prima_donna;0
22184;dark_choir_lancer;0
22185;dark_choir_archer;0
22186;dark_choir_witch_doctor;0
22187;dark_choir_player;0
22188;andreas_royal_guard_capt_b;0
22189;andreas_royal_guards_b;0
22190;ritual_sacrifice_f;0
22191;andreas_royal_guard_capt_c;0
22192;andreas_royal_guards_c;0
22193;andreas_royal_guards_d;0
22194;penance_guard;0
tpuNIsher is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 20:02.