View Full Version : Need help with AI
Hi... I am making custom PI (party zone), but the mobs spawn in groups of 4 or whatever... so I deleted {[Privates]=[deinonychus1:deinonychus1:1:0sec;deinonychus2:dein onychus2:1:0sec;deinonychus3:deinonychus3:1:0sec]} on npcdata, but I still have a problem... the mobs come with an orc behind (instead of the other 3 mobs, it spawns 1 orc)... I asked it to a friend and he told me it has to do with AI... but we both suck at it so... could anyone help me with this (AI) part?
Thanks a lot in advance...
Regards,
Kumy
Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 07-20-2009, 11:59 AM. Открыть источник (https://web.archive.org/web/20100324122840id_/http://www.postpacific.com:80/archive/index.php/t-852.html).
Renobizarro
20.07.2009, 12:59
the spawns are in npcpos.txt
Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 07-20-2009, 12:59 PM. Открыть источник (https://web.archive.org/web/20100324122840id_/http://www.postpacific.com:80/archive/index.php/t-852.html).
I already changed that... :/
Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 07-20-2009, 01:07 PM. Открыть источник (https://web.archive.org/web/20100324122840id_/http://www.postpacific.com:80/archive/index.php/t-852.html).
Bother to look at the ai class, perhaps?
before you start changing things on whim.
Your fault is there.
Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 07-20-2009, 04:18 PM. Открыть источник (https://web.archive.org/web/20100324122840id_/http://www.postpacific.com:80/archive/index.php/t-852.html).
OpalSnow
20.07.2009, 16:22
there's a CreatePrivates function in your AI class. If you dont define 'Privates' in your npcdata as one of the ai parameters, it'll use what is assigned in the AI class.
Read through your AI class and see what the condition is to create privates and just reverse it.
Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 07-20-2009, 04:22 PM. Открыть источник (https://web.archive.org/web/20100324122840id_/http://www.postpacific.com:80/archive/index.php/t-852.html).
there's a CreatePrivates function in your AI class. If you dont define 'Privates' in your npcdata as one of the ai parameters, it'll use what is assigned in the AI class.
Read through your AI class and see what the condition is to create privates and just reverse it.
I'm sorry but would you mind doing a little guide on how to make that? I'm kinda new on this and I don't understand the AI stuff :s
Thanks in advance.
Best regards,
Kumy
Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 07-20-2009, 04:54 PM. Открыть источник (https://web.archive.org/web/20100324122840id_/http://www.postpacific.com:80/archive/index.php/t-852.html).
goodtimeshaxor
20.07.2009, 19:28
He probably won't make a guide, but if he does, I'm going to Wiki it =)
Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 07-20-2009, 07:28 PM. Открыть источник (https://web.archive.org/web/20100324122840id_/http://www.postpacific.com:80/archive/index.php/t-852.html).
I really hope that he/another person make it because I'm pretty sure it will be helpful to another persons :) ... So please... Help me out :)
Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 07-20-2009, 08:07 PM. Открыть источник (https://web.archive.org/web/20100324122840id_/http://www.postpacific.com:80/archive/index.php/t-852.html).
Guide to what?
How to decompile AI.obj -> find HF, sauron, lightmare decompiler
How to understand NASC code -> Find HF Guide, wiki guide, other people's guides
How to work with L2NPC functions handlers, etc -> Find HF guide, wiki guide, other people's guides
How to understand programming logic -> Start drinking
How to compile with NASC -> Find NASC compiler
What u want won't be answered specifically by a single guide, you're going to have to learn how to work with AI in general.
Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 07-20-2009, 10:55 PM. Открыть источник (https://web.archive.org/web/20100324122840id_/http://www.postpacific.com:80/archive/index.php/t-852.html).
OpalSnow
21.07.2009, 05:03
...
L8
push_parameter Leader
push_const 1
equal
branch_false L10
L9
push_event // myself
push_const 704
add
fetch_i
push_parameter Privates
func_call 184615141 // func[CreatePrivates]
...
Look at L8. It checks if 'Leader' is 1 if so, continue L9, if false, it goes to L10.
Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 07-21-2009, 05:03 AM. Открыть источник (https://web.archive.org/web/20100324122840id_/http://www.postpacific.com:80/archive/index.php/t-852.html).
Renobizarro
21.07.2009, 10:52
How to understand programming logic -> Start drinking
that's the best part of programming indeed.
maybe the mob clan is wrong...
Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 07-21-2009, 10:52 AM. Открыть источник (https://web.archive.org/web/20100324122840id_/http://www.postpacific.com:80/archive/index.php/t-852.html).
default private its an orc
example:
class 1 lv3_party_leader_monster : lv3_monster
parameter_define_begin
string Privates "orc:party_private:1:20sec"
parameter_define_end
class 1 party_leader_param_warrior : warrior
parameter_define_begin
int AttackLowHP 0
string Privates "orc:party_private:1:20sec"
int ShoutTarget 0
int SummonPrivateRate 0
parameter_define_end
And if you are using some IL o HB pack you have for sure
class 1 warrior_universal : monster_parameter
parameter_define_begin
...
string Privates "orc:party_private:1:20sec"
...
parameter_define_end
Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 07-21-2009, 01:43 PM. Открыть источник (https://web.archive.org/web/20100324122840id_/http://www.postpacific.com:80/archive/index.php/t-852.html).
...This still up in discussion?
The simple answer is to remove the npcdata ai param 'Leader'
In the interest of promoting self learning and whatever to be able to mess with AI on ones own later on, the better process would be:
* Looking at npcdata entry, and seeing the ai class is 'deinonychus'
* Searching in ai.obj for that class.
* Decompiling that class (with one of aforementioned decompilers) and seeing that there's not much in there that has anything to do with Privates.
* Following then to the parent class 'warrior_universal'
* Decompiling 'warrior_universal' and finding the section
if( Leader == 1 )
{
myself::CreatePrivates( Privates );
myself.sm.weight_point = 10;
myself::AddTimerEx( 1007, 120 * 1000 );
}
as well as ofc the parameter at top
int Leader = 0;
* Figuring out that if Leader is set to 1 in either one of the child classes or in npcdata ai param, then it'll spawn stuff.
* Finding whereever it is that does that (npcdata ai param), removing it
* Winning many interwebs
Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 07-21-2009, 02:19 PM. Открыть источник (https://web.archive.org/web/20100324122840id_/http://www.postpacific.com:80/archive/index.php/t-852.html).
Thanks everyone for the help :) but I made it in another way... I changed the type of mobs ^^ problem solved hehe
Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 07-21-2009, 05:33 PM. Открыть источник (https://web.archive.org/web/20100324122840id_/http://www.postpacific.com:80/archive/index.php/t-852.html).
In the end, not much learned :<
Internets unwinned.
Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 07-21-2009, 06:56 PM. Открыть источник (https://web.archive.org/web/20100324122840id_/http://www.postpacific.com:80/archive/index.php/t-852.html).