Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 02.03.2006, 10:38   #1
zcold
Архивный участник
 
Join Date: Nov 2005
Posts: 146
Default Trying to learn AI

Hi everybody!

I have some questions to AI coders And I'll be happy if you answer them

Ok, first is:
In AI.obj code:
push_const 271873
push_const 1
push_const 0
push_const 1000000
func_call 10 // func[AddUseSkillDesire]

Is 271873 - skill_id? How to calculate it from skilldata?

or that part:

push_event // skill_name_id
push_const 120
add
fetch_i
push_const 536577
equal
branch_false L42258

Is 536577 - skill_id? How to know what number this skill have in skilldata?

Can somebody describe this parts of code by steps?
Something like:
push_event // put value of event (handler?) on stack. What is event in that case (push_event)?
push_const 120 // put 120 on stack
add // add event+stack
fetch_i // get result on top of stack
push_const 536577 // put 536577 on stack
equal // compare: equal=true, not equal=false
branch_false L42258 // if false - jump to label L42258

Is my understanding of that part is correct?


Can somebody give any information about using NASC or making NASC-scripts?
I want to learn, want to make scripts, but haven't enough information
zcold is offline  
Old 02.03.2006, 11:25   #2
Radmin
Архивный участник
 
Join Date: Oct 2005
Posts: 54
Default

skillid =
skill_id+skill_lvl*256

or try to see : skill_pch.txt %)
Radmin is offline  
Old 02.03.2006, 11:58   #3
zcold
Архивный участник
 
Join Date: Nov 2005
Posts: 146
Default

Thanks, I see skill_pch.txt
And must correct your formula a little: skillid=skill_id*256+skill_lvl
Thanks for hint
zcold is offline  
Old 02.03.2006, 12:28   #4
zcold
Архивный участник
 
Join Date: Nov 2005
Posts: 146
Default

One more question:
If there is no handler in sub-class, but there is handler in super-class, will this handler act?

I mean, if I have something like:

Code:
class superclass: default_npc
handler 2
...
handler_end
class_end

class subclass: superclass
handler 1
....
handler_end
class_end
If handler 2 called in subclass, will act handler 2 in superclass?
zcold is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 21:10.