Post Pacific  

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

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 30.10.2006, 11:57   #1
vex
Архивный участник
 
Join Date: Dec 2005
Posts: 83
Default [SHARE] NPC AI Checker

Reads ai.obj, does simple check of syntax and loads parameters of classes. Then reads npcdata.txt and takes from a npc_ai field ai-parameters Checks each one, on presence at a corresponding class in ai.obj
More functioanality will be added in future version.

Of course you need to save ai.obj and npcdata.txt in the same forder in ansi format!

Start chk_ai.bat, wait a time and results of checking see in result.txt

Tips:
ERROR(123456) 123456 - line number in ai.obj contain error
WARN(123456) - the same

------------
v2: Checks if npc_ai class exists. Print only errors (specially for HF)

pass: for_pp

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
npcaichk.rar — 78057 байт
npcaichk_v2.rar — 77993 байт
vex is offline  
Old 30.10.2006, 12:01   #2
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Can tell me more about work this tool? What checking? Have Class for Npc in Ai.obj?

And... what can i do for take password to archive? Pray?
HF is offline  
Old 30.10.2006, 12:07   #3
vex
Архивный участник
 
Join Date: Dec 2005
Posts: 83
Default

sorri )
see first post
vex is offline  
Old 30.10.2006, 12:11   #4
vex
Архивный участник
 
Join Date: Dec 2005
Posts: 83
Default

Quote:
Originally Posted by HF View Post
Can tell me more about work this tool? What checking? Have Class for Npc in Ai.obj?
Not so, just if class not exist in ai.obj all paramets in this class will be threat as ERR. I thinks it is not hard to add this check - 30 sec needed.
vex is offline  
Old 30.10.2006, 12:13   #5
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Quote:
Originally Posted by vex View Post
sorri )
see first post
Tell me, please, for examples - what do This Tool?

How understund this?

Checking NPC: [range_golem_ep_30], AI class: range_golem_ep_30 ...
DDMagic ERR
Checking NPC: [dark_panther_ep_01], AI class: dark_panther_ep_01 ...

DDMagic ERR
what is it? Not exist? Not exist in parent class or in main class?

Checking NPC: [dark_panther_ep_01], AI class: dark_panther_ep_01 ...
what is it? it good or not?
HF is offline  
Old 30.10.2006, 12:18   #6
vex
Архивный участник
 
Join Date: Dec 2005
Posts: 83
Default

Quote:
Originally Posted by HF View Post
DDMagic ERR
what is it? Not exist? Not exist in parent class or in main class?
It is checks all hierarchy, so if ERR then it is not found in any class in hierarchy

Quote:
Originally Posted by HF View Post
Checking NPC: [dark_panther_ep_01], AI class: dark_panther_ep_01 ...
what is it? it good or not?
This mean thats NPC not have any parametes in npc_ai just:
npc_ai={[dark_panther_ep_01 ]}
vex is offline  
Old 30.10.2006, 12:24   #7
vex
Архивный участник
 
Join Date: Dec 2005
Posts: 83
Default

Additional info: tool have commented code for handlers body checks on push_parameter XXXXX. It check if this parameter present in class of this handler or any of parents

If you have lot of CPU resources - uncomment this in chk_ai.awk:
# val=get_param_value(class_name, $2)
# if (val=="") val="ERR"
# if (/^[:space:]*push_parameter /) print class_name, $2, val
vex is offline  
Old 30.10.2006, 12:36   #8
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Quote:
Originally Posted by vex View Post
It is checks all hierarchy, so if ERR then it is not found in any class in hierarchy
...
class 1 range_golem_ep_30 : summon_siege_tank

class 1 summon_siege_tank : default_npc
parameter_define_begin
int DDMagic 1082881

What next? Your tool show 3Mb result for my good AI.obj.
It's only last npc what i checked.
HF is offline  
Old 30.10.2006, 12:46   #9
vex
Архивный участник
 
Join Date: Dec 2005
Posts: 83
Default

have no errors while loading ai.obj ?
another problem may be if parameter_define_begin not start from begining of line... may be spaces before. Regexp sounds like: /^parameter_define_begin/ try change to /^[:space:]*parameter_define_begin/
vex is offline  
Old 30.10.2006, 12:49   #10
vex
Архивный участник
 
Join Date: Dec 2005
Posts: 83
Default

also problem with loading classes may cause if no spaces before and/or after ":" in class header
vex is offline  
Old 30.10.2006, 12:58   #11
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

I found problem. AI must be in ANSI too. Baaddd.... uke:

Next...

Checking NPC: [range_golem_ep_30], AI class: range_golem_ep_30 ...
DDMagic OK
Checking NPC: [dark_panther_ep_01], AI class: dark_panther_ep_01 ...

[dark_panther_ep_01] again whitout OK or ERR. Are you have limit to longer of line?

Next...

Make report only to BAD class, because i cant find errors in my big file. Or make guide for all reports (I mean documentation - "How find error in log file?" )
HF is offline  
Old 30.10.2006, 13:08   #12
vex
Архивный участник
 
Join Date: Dec 2005
Posts: 83
Default

hehe
of course all files in ansi

to found errors just Ctrl-F -> ERR or WARN and check Match case!
vex is offline  
Old 30.10.2006, 13:26   #13
vex
Архивный участник
 
Join Date: Dec 2005
Posts: 83
Default

let it be )
v2: checks if npc_ai class exist, print only errors
vex is offline  
Old 30.10.2006, 22:31   #14
palace
Архивный участник
 
Join Date: Jul 2006
Posts: 118
Default v2 is very interesting

Thank for share
palace is offline  
Old 30.10.2006, 23:28   #15
Sauron
Архивный участник
 
Join Date: Feb 2005
Posts: 357
Default

thx for sharing
Sauron is offline  
Old 31.10.2006, 00:21   #16
vopros
Архивный участник
 
Join Date: Sep 2006
Posts: 26
Default

Loading ai.obj...
Finished loading ai.obj
Loading npcdata...
Checking NPC: [ g r e m l i n ] , AI class: ...
Checking NPC: [ r a b b i t ] , AI class: ...
Checking NPC: [ g o b l i n ] , AI class: ...

Error?

thx and thx for sharing
vopros is offline  
Old 31.10.2006, 02:24   #17
Sauron
Архивный участник
 
Join Date: Feb 2005
Posts: 357
Default

NPC: [r14_roomboss_teleport], AI class: r14_roomboss_teleport parameter: TeleportEffect ERR

that skill is only for visual effect but that npc doesn't teleports itself neither players at least not in our ai, any idea?
Sauron is offline  
Old 31.10.2006, 15:11   #18
vex
Архивный участник
 
Join Date: Dec 2005
Posts: 83
Default

Quote:
Originally Posted by vopros View Post
Loading ai.obj...
Finished loading ai.obj
Loading npcdata...
Checking NPC: [ g r e m l i n ] , AI class: ...
Checking NPC: [ r a b b i t ] , AI class: ...
Checking NPC: [ g o b l i n ] , AI class: ...

Error?

thx and thx for sharing
May be npcdata not in ANSI format???
vex is offline  
Old 31.10.2006, 15:21   #19
vex
Архивный участник
 
Join Date: Dec 2005
Posts: 83
Default

Quote:
Originally Posted by Sauron View Post
NPC: [r14_roomboss_teleport], AI class: r14_roomboss_teleport parameter: TeleportEffect ERR

that skill is only for visual effect but that npc doesn't teleports itself neither players at least not in our ai, any idea?
May be need to remove TeleportEffect from this npc in npcdata, if it is not needed. I dont know what does it mean at all. It is just cheker - it see exist or not. Then you have to decise what to do by self ))
vex 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 16:27.