![]() |
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 :) |
Thanks for...filling us in >.>
|
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 |
Quote:
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" |
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. |
Quote:
|
Quote:
|
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: |
<elpy runs into town, aggro, fossilizes everyone>
|
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...
|
NASC is kinda so-so anyways, just learn writing the compiled code. :P
|
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. |
Re: OMG, AI is so easy
Quote:
|
When you use //summon mob_name
It will automatically use the AI class and parameters set in npcdata |
ouch, its true... im tired... i go to sleep a little... xD
|
Quote:
|
Quote:
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 |
i coded a beta version of tatoo system directly in AI and has around 4k lines and isnt complete yet :P
|
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 |
that 300000 of adena is retail cost? because i dont know the real amount of it in retail :P
|
hehe i really don't know, i took the infro from a datapack.
i used this info (see below) |
ohhh i see ^^, tnx
|
Quote:
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. |
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
|
interesting topic ... i am a NASC fan :D
|
Firedeamon,
Why do you think AI supports inheriting classes? 1. It removes the need to code a single class for each and every NPC - just because they are a little different from eachother 2. It removes the need to code a common AI class like you are doing. Your idea is flawed, yes NASC/AI is powerfull, even more than you think it would seem. |
I see a L2OFF server where NPCs send greetings like retail... and talk to player when is close, this is possible with AI ? anyone knows ?
I know talk is posible, but greetings ? |
Quote:
I do completley understand the whole inherited class thing and it is great. But having reusable code is also very valuable as well as way more flexible than 300 functions which all do the same thing anyway pretty much. I am still taking advantage of the inherited classes and such... I just got rid of all the garbage and condensed it down to a streamline class. You can diss it all you want, but the functionality I have built into it gives way more power and flexibility to me as a developer in creating a streamlined AI that players can interact with. Dunno how you can say its flawed... 600 concurrent players are interacting with hundreds of mobs using the class right now and there is no performance loss. In addition I have complete flexibility with the mobs now whereas previously I did not. Before I would have to copy and past the same crap over and over again in different places when the mobs could simply be utilizing the application logic L2NPC.exe was written for. When it comes to upgrading or scalability it will be far superior to having 50 different classes that do just about the same thing with only a slight difference here or there. |
Quote:
|
| All times are GMT. The time now is 16:23. |