Post Pacific  

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

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 19.03.2006, 08:11   #1
Firedaemon
Архивный участник
 
Join Date: Oct 2005
Posts: 267
Default OMG, AI is so easy

Seriously, I have found AI to be so incredibly easy. I dont know why I didnt dive right into it in the begining. I am a programmer so thats why it is easy, but I had no idea how easy it could be with NASC. I was really avoiding dealing with it for the longest time.

Today, I just removed about 30 mob classes from ai.obj and replced it with a single class. The class is seriously dope and handles everything including up to 6 attack spells, healing, buffing, raid boss & minions, soul crystal leveling, waypoints and even toggling of parameters like aggressivness, fleeing and alot more.

Previously ai.obj had classes for just about every senerio. NO MORE!

I may share the compiled ai code to everyone cause this ai code rocks so much. You can use one single class for all mobs including raid bosses and fighters. All parameters can be set straight from npcdata and npcpos for each mob.

Im excited if you cant tell. Share probably coming within days
Firedaemon is offline  
Old 19.03.2006, 09:02   #2
Shawnmb
Архивный участник
 
Join Date: Feb 2005
Posts: 307
Default

Thanks for...filling us in >.>
Shawnmb is offline  
Old 19.03.2006, 10:15   #3
knife_sj
Архивный участник
 
Join Date: Feb 2005
Posts: 165
Default

well, i cant learn ai cause nasc crashs on my pc ¬¬ dunno why
just c:\nasc.exe sample.ai and Chunk delphi debugger ¬¬

anyway gratz
knife_sj is offline  
Old 19.03.2006, 10:34   #4
Firedaemon
Архивный участник
 
Join Date: Oct 2005
Posts: 267
Default

Quote:
Originally Posted by knife_sj
well, i cant learn ai cause nasc crashs on my pc ¬¬ dunno why
just c:\nasc.exe sample.ai and Chunk delphi debugger ¬¬

anyway gratz
put nasc.exe in your scripts folder. Make sure you rename your ai.obj to something else though cause nasc will write over ai.obj

If the files it needs are not found then it will crash. Also, if you do not use it properly from the command line it will crash as well.

chdir to the directory it is in and then "nasc script.txt"
Firedaemon is offline  
Old 19.03.2006, 15:32   #5
archy
Архивный участник
 
Join Date: Mar 2005
Posts: 280
Default

Seems like an extremely bad idea, as Raid bosses are ten times more complex than normal mobs - so all you do is slowing down the system.

But thats just what I think.
archy is offline  
Old 19.03.2006, 16:12   #6
Shawnmb
Архивный участник
 
Join Date: Feb 2005
Posts: 307
Default

Quote:
Originally Posted by archy
Seems like an extremely bad idea, as Raid bosses are ten times more complex than normal mobs - so all you do is slowing down the system.

But thats just what I think.
Slow down the system? The whole point of the NPC server application is to run these scripts, let alone that if you check your TimeAnalasis while your server is running at full capacity, you'll notice that the NPC server still has plenty of room to work with.
Shawnmb is offline  
Old 19.03.2006, 16:17   #7
archy
Архивный участник
 
Join Date: Mar 2005
Posts: 280
Default

Quote:
Originally Posted by Shawnmb
Slow down the system? The whole point of the NPC server application is to run these scripts
Actually, the point of NPC server is to use inheriting classes, not to run everything through one common class - that in runtime checks what its suppose to do.
archy is offline  
Old 19.03.2006, 17:52   #8
Sauron
Архивный участник
 
Join Date: Feb 2005
Posts: 357
Default

cool man, i'm gonna merge elpy's ai with antaras's ai or even better the new 3er class change with a keltier.

c'on :roll:
Sauron is offline  
Old 19.03.2006, 17:55   #9
Shawnmb
Архивный участник
 
Join Date: Feb 2005
Posts: 307
Default

<elpy runs into town, aggro, fossilizes everyone>
Shawnmb is offline  
Old 19.03.2006, 20:38   #10
Metalmurphy
Архивный участник
 
Join Date: Feb 2005
Posts: 766
Default

Thats a very bad idea oO. Why are you going to overload a class with stuff they might not need? Also do those classes do MP checks? re use time checks? Smart ai instead of rand % to use skills? etc...
Metalmurphy is offline  
Old 19.03.2006, 22:23   #11
Aikeleer
Архивный участник
 
Join Date: Jun 2005
Posts: 374
Default

NASC is kinda so-so anyways, just learn writing the compiled code. :P
Aikeleer is offline  
Old 19.03.2006, 22:49   #12
Firedaemon
Архивный участник
 
Join Date: Oct 2005
Posts: 267
Default

I am using the class strictly for warriors. Anything that fights using skills basically, which includes most mobs.

Yes it checks for MP consumption as well as checks for health before applying heals and buffs. It can also cast a certain spell on seeing an enemy as well. The onyl thing I have not built into it is the reuse delay calculation, but I will be adding that shortly. Also, I have it setup so that way it uses its skills in stages much like Antaras does with its skills.

If I have a mob with up to 4 attack spells, I divide the maximum health of the mob by the amount of attack spells (which is figures out all on its own) and then the mob uses each different spell as the mob gets lower in health. The thoery is, the more devastating the spell, the lower the mobs HP will be before it starts casting it. Progressive spell casting I think makes it more challenging to the player and allows them to deal with the mobs in stages.

Also dunno how you can say NASC is kinda so-so... its very powerful and my only guess is that you dont know how to program with it if you are under that impression. I actually do know how to write and deal with the compiled stack in ai.obj cause thats how I started with it. I didnt even bother with NASC until I had already written my own raid boss and raid fighter classes as well as a couple of quests from scratch.

I am all about building reusable code and I always build things that are optimized. I really do think this class is the bomb and when I share it with you guys I believe you will also be under the same impression; especially when you see it in action.

Hopefully I can have it shared within the next week with decent documentation. I also just implimented a timed auto-looter for unclaimed drops... in testing now.
Firedaemon is offline  
Old 19.03.2006, 23:00   #13
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default Re: OMG, AI is so easy

Quote:
Originally Posted by Firedaemon
All parameters can be set straight from npcdata and npcpos for each mob.
i see a problem... with this kind of AI ... if I use //summon command npc don't work... can parse parameteres with summon command... or not ?
FidoW is offline  
Old 19.03.2006, 23:12   #14
Firedaemon
Архивный участник
 
Join Date: Oct 2005
Posts: 267
Default

When you use //summon mob_name

It will automatically use the AI class and parameters set in npcdata
Firedaemon is offline  
Old 19.03.2006, 23:28   #15
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

ouch, its true... im tired... i go to sleep a little... xD
FidoW is offline  
Old 19.03.2006, 23:45   #16
Aikeleer
Архивный участник
 
Join Date: Jun 2005
Posts: 374
Default

Quote:
Also dunno how you can say NASC is kinda so-so... its very powerful and my only guess is that you dont know how to program with it if you are under that impression. I actually do know how to write and deal with the compiled stack in ai.obj cause thats how I started with it. I didnt even bother with NASC until I had already written my own raid boss and raid fighter classes as well as a couple of quests from scratch.
no use bragging about that, nothing special. Coding in the original stack stuff gives you way more control over your code imo, doing it exactly the way you want it and often in way less lines. I also worked with nasc a lot, I know how it works and I also made some stuff in it, but still I don't like it.
Aikeleer is offline  
Old 20.03.2006, 01:16   #17
Sauron
Архивный участник
 
Join Date: Feb 2005
Posts: 357
Default

Quote:
Originally Posted by Aikeleer
Quote:
Also dunno how you can say NASC is kinda so-so... its very powerful and my only guess is that you dont know how to program with it if you are under that impression. I actually do know how to write and deal with the compiled stack in ai.obj cause thats how I started with it. I didnt even bother with NASC until I had already written my own raid boss and raid fighter classes as well as a couple of quests from scratch.
no use bragging about that, nothing special. Coding in the original stack stuff gives you way more control over your code imo, doing it exactly the way you want it and often in way less lines. I also worked with nasc a lot, I know how it works and I also made some stuff in it, but still I don't like it.
"original stack stuff " sucks, have you seen antaras ai?? It's hard to understand the 2100 lines it has decompiled i can't imagine reading it directly from ai.obj.

if the only thing you wanna do is adding the open/close door of a clan hall, ok that is a bit different because it takes 15min. however there are some other stuff that can not be done, well if ur patient you can do it in 3 years.
for example all the tattoo ai... my beta version (nasc) took me 5k lines, once compiled it is arround 85k lines, i actually coded in c++ to take the data from l2j and generate the nasc version and you are saying you prefer doing it directly in ai.obj...what can i say? o_O
Sauron is offline  
Old 20.03.2006, 01:34   #18
SoaPy
Архивный участник
 
Join Date: Feb 2005
Posts: 705
Default

i coded a beta version of tatoo system directly in AI and has around 4k lines and isnt complete yet :P
SoaPy is offline  
Old 20.03.2006, 01:45   #19
Sauron
Архивный участник
 
Join Date: Feb 2005
Posts: 357
Default

well i know there are several ways of doing it, i did something similar of torune's share, anyway it's frozen i never tested it.

this is 1/3 of the script, it doesnt let me post it -.-

http://pastebin.com/611688
Sauron is offline  
Old 20.03.2006, 01:51   #20
SoaPy
Архивный участник
 
Join Date: Feb 2005
Posts: 705
Default

that 300000 of adena is retail cost? because i dont know the real amount of it in retail :P
SoaPy is offline  
Old 20.03.2006, 01:56   #21
Sauron
Архивный участник
 
Join Date: Feb 2005
Posts: 357
Default

hehe i really don't know, i took the infro from a datapack.

i used this info (see below)
Sauron is offline  
Old 20.03.2006, 02:00   #22
SoaPy
Архивный участник
 
Join Date: Feb 2005
Posts: 705
Default

ohhh i see ^^, tnx
SoaPy is offline  
Old 20.03.2006, 02:01   #23
Firedaemon
Архивный участник
 
Join Date: Oct 2005
Posts: 267
Default

Quote:
Originally Posted by Sauron
Quote:
Originally Posted by Aikeleer
Quote:
Also dunno how you can say NASC is kinda so-so... its very powerful and my only guess is that you dont know how to program with it if you are under that impression. I actually do know how to write and deal with the compiled stack in ai.obj cause thats how I started with it. I didnt even bother with NASC until I had already written my own raid boss and raid fighter classes as well as a couple of quests from scratch.
no use bragging about that, nothing special. Coding in the original stack stuff gives you way more control over your code imo, doing it exactly the way you want it and often in way less lines. I also worked with nasc a lot, I know how it works and I also made some stuff in it, but still I don't like it.
"original stack stuff " sucks, have you seen antaras ai?? It's hard to understand the 2100 lines it has decompiled i can't imagine reading it directly from ai.obj.

if the only thing you wanna do is adding the open/close door of a clan hall, ok that is a bit different because it takes 15min. however there are some other stuff that can not be done, well if ur patient you can do it in 3 years.
for example all the tattoo ai... my beta version (nasc) took me 5k lines, once compiled it is arround 85k lines, i actually coded in c++ to take the data from l2j and generate the nasc version and you are saying you prefer doing it directly in ai.obj...what can i say? o_O
Yeah the application logic layout of the original stack is just so combersome compared to writing nice clean and easily understandable code. Guess thats why we all have programming languages like C++ and Java because the entire world didnt want to program everything in ASM.

While you may prefer notepad to to write combersom line after line, with NASC you accomplish the same thing in probably 1/10th of the time.

Although I am prefering NASC rather than doing each line; I am not knocking it doing that way though. Every developer has their own way of doing things. I guess the real measure of success is the fruits of your labor and what and how mu9ch you achieve doing it your way.
Firedaemon is offline  
Old 20.03.2006, 02:05   #24
SoaPy
Архивный участник
 
Join Date: Feb 2005
Posts: 705
Default

yes i know that some people can code in nasc in less time than me in the compiled AI but i dont understand the whole sintax of nasc because i dont know C++ ^^ or any of that languaje but i know the sintax of a primitive stack language :P
SoaPy is offline  
Old 20.03.2006, 02:14   #25
krapno
Архивный участник
 
Join Date: May 2005
Posts: 368
Default

interesting topic ... i am a NASC fan
krapno 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 18:28.