[Include] FCNPC A.I.
#1

FCNPC A.I.
Previously know as "FCNPC Boss like World of Warcraft", but this include is capable of much more than just that. Which is why I decided to change the name.
Introduction:
This include extends on the FCNPC plugin by adding an artificial intelligence system to the NPCs. It provides a wide range of functions and callbacks which allows you to customize nearly anything about the state or the behaviour of the NPC. One of the most notable features is allowing the NPC to have more than just the standard 100 health, say for example 1 million. If however you simply want a plug and play solution, there are also default settings present which makes creating an intelligent NPC as easy as using 1 line of code. Once you get the hang of it though, you can create some pretty impressive NPC systems.

Easy plug and play example:
You can customize a lot if you want to, but you certainly don't have to utilize every function. The simplest use consists of just creating the NPC, spawning it and letting the include handle everything else. The following example filterscript shows how to do exactly that.
Code:
#define FILTERSCRIPT

#include <a_samp>
#include <FCNPC>
#include <FAI>

#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
	FAI_UseDestroyNPCsOnExit();

	new npcid = FCNPC_Create("BigSmoke");
	FCNPC_Spawn(npcid, 149, 1086.9752, 1074.7021, 10.8382);
	return 1;
}
#endif
The FAI_CreateBoss and FAI_GetBossNPCID functions are provided by this include. The FCNPC_Spawn function is provided by the FCNPC plugin. This shows that you can still use the FCNPC functions as normal.

As you can see, every function of this include is prefixed with FAI_. An NPC created with this include is called a Boss, which is just a remnant from the first implementation (see below). It doesn't mean that you can only create bosses with this include! Normal NPCs without the extra health or abilities work just as well. So don't be put off by the naming scheme.

More advanced examples:
This include provides more than just a simple A.I. system. You can do a lot more than what it looks like at first. The following examples show that it is capable of much more.

MMORPG-like bossfight

Description:
This example was the first script I made with this include. In fact, it was written before I decided to hide the complexity in an include so it would become much easier to use and release it on the forums. This script had the goal to create a bossfight like in the popular MMORPG, World of Warcraft (WOW). It uses most of the features this include provides, including casting spells, showing the healthbar, ...

Video:
A demonstration can be seen here. Demonstrations of earlier versions are present as well.

Download:
If you would like to play this yourself, you can download it here. It uses Incognito's streamer for objects and pickups.

Leatherface/Jason Voorhees/Michael Myers

Description:
This second example script shows that you don't have to use every feature that is provided to add a nice boss-like script to your server. It had the goal to create a horror-like bossfight like you see in many of those 'Leatherface in GTA:SA' videos in which a strong NPC with a lot of health attacks you when you approach it. It is a bit of a mix of The Texas Chain Saw Massacre, Friday the 13th and Halloween.

Video:
A demonstration can be seen here.

Download:
If you would like to play this yourself, you can download it here. It uses Incognito's streamer for objects.

Single-player-like co-op mission

Description:
This script shows that with creativity, you can create something very impressive. It had the goal to create a mission in the style of Rockstar and GTA SA, but one that you can play with more than just 1 person.

Video:
A demonstration can be seen here. Demonstrations of earlier versions are present as well.

Download:
The script is still being worked on. It will be released when it is finished.

Other scripts:
Have an impressive script you want to share? Don't hesitate and post a reply on this thread! I really want to know what people can come up with by using this include.

Documentation:
The workings of every define, function, callback or feature is extensively explained on the wiki.

Download:
The latest version can be found on the releases page.

Bugs:
Please report any bug with detailed steps on how to reproduce it.

Suggestions:
If you have any constructive criticism or suggestions, please share your opinion.

Possible upcoming changes/features:
Planned upcoming changes can be found on the issues page.
There are some other things left that I want to implement, but I always get new ideas, so the list keeps growing. The following list items will be implemented someday, but I can't give a specific date or priority.
  • Spell mana.
  • Spell range.
  • Spell cooldown.
  • Status effects (buffs and debuffs).
  • Status effects stacks.
  • Party/raid-like system.
Changelog:
See changelog.

License:
See license.

Credits:
Many people have (indirectly) contributed to make this system possible. See credits to see who.
Reply


Messages In This Thread
FCNPC A.I. - by Freaksken - 12.07.2016, 13:51
Re: FCNPC Boss like World of Warcraft - by n0minal - 12.07.2016, 14:21
Re: FCNPC Boss like World of Warcraft - by Freaksken - 12.07.2016, 14:26
Re: FCNPC Boss like World of Warcraft - by Jpew - 12.07.2016, 14:34
Re: FCNPC Boss like World of Warcraft - by Freaksken - 12.07.2016, 14:42
Re: FCNPC Boss like World of Warcraft - by n0minal - 12.07.2016, 15:03
Re: FCNPC Boss like World of Warcraft - by Ritzy2K - 12.07.2016, 15:16
Re: FCNPC Boss like World of Warcraft - by Freaksken - 12.07.2016, 15:22
Re: FCNPC Boss like World of Warcraft - by JustMe.77 - 12.07.2016, 15:25
Respuesta: FCNPC Boss like World of Warcraft - by Whyd - 12.07.2016, 16:38
Re: FCNPC Boss like World of Warcraft - by ZiGGi - 12.07.2016, 17:42
Re: FCNPC Boss like World of Warcraft - by JeaSon - 14.07.2016, 08:58
Re: FCNPC Boss like World of Warcraft - by Freaksken - 18.07.2016, 01:12
Re: FCNPC Boss like World of Warcraft - by Crayder - 18.07.2016, 05:12
Re: FCNPC Boss like World of Warcraft - by Freaksken - 18.07.2016, 15:28
Re: FCNPC Boss like World of Warcraft - by Crayder - 18.07.2016, 16:01
Re: FCNPC Boss like World of Warcraft - by Stones - 22.07.2016, 17:15
Re: FCNPC Boss like World of Warcraft - by SetPlayerNameTag - 23.07.2016, 21:21
Re: FCNPC Boss like World of Warcraft - by Freaksken - 29.07.2016, 20:11
Re: FCNPC Boss like World of Warcraft - by Freaksken - 05.08.2016, 02:22
Re: FCNPC Boss like World of Warcraft - by Crayder - 05.08.2016, 04:30
Re: FCNPC Boss like World of Warcraft - by Freaksken - 06.08.2016, 00:41
Re: FCNPC Boss like World of Warcraft - by Crayder - 06.08.2016, 05:41
Re: FCNPC Boss like World of Warcraft - by Freaksken - 08.10.2016, 17:57
Re: FCNPC Boss like World of Warcraft - by Red_Devils - 13.01.2017, 18:55
Re: FCNPC Boss like World of Warcraft - by Freaksken - 14.01.2017, 13:41
Re: FCNPC Boss like World of Warcraft - by Red_Devils - 14.01.2017, 15:23
Re: FCNPC Boss like World of Warcraft - by Freaksken - 25.03.2017, 22:39
Re: FCNPC A.I. - by Freaksken - 17.04.2017, 22:01
Re: FCNPC A.I. - by Freaksken - 11.07.2017, 06:27
Re: FCNPC A.I. - by tarjet - 25.07.2017, 18:54
Re: FCNPC A.I. - by Freaksken - 25.07.2017, 19:27
Re: FCNPC A.I. - by tarjet - 25.07.2017, 21:04
Re: FCNPC A.I. - by Freaksken - 25.07.2017, 22:35
Re: FCNPC A.I. - by Freaksken - 12.09.2018, 13:57
Re: FCNPC A.I. - by JuninhoSAMP - 21.10.2018, 18:50
Re: FCNPC A.I. - by Alteh - 22.10.2018, 05:29
Re: FCNPC A.I. - by liguanhua123 - 03.01.2019, 23:40
Re: FCNPC A.I. - by Freaksken - 04.01.2019, 01:09
Re: FCNPC A.I. - by faxxe - 24.01.2019, 19:47
Re: FCNPC A.I. - by Freaksken - 25.01.2019, 15:05
Re: FCNPC A.I. - by faxxe - 25.01.2019, 18:29
Re: FCNPC A.I. - by Freaksken - 26.01.2019, 09:26
Re: FCNPC A.I. - by GermanBud - 08.02.2019, 17:32
Re: FCNPC A.I. - by Freaksken - 08.02.2019, 18:33
Re: FCNPC A.I. - by GermanBud - 08.02.2019, 19:03
Re: FCNPC A.I. - by Freaksken - 08.02.2019, 19:44
Re: FCNPC A.I. - by Freaksken - 09.02.2019, 00:58
Re: FCNPC A.I. - by Freaksken - 17.02.2019, 01:21
Re: FCNPC A.I. - by Freaksken - 11.04.2019, 14:45

Forum Jump:


Users browsing this thread: 2 Guest(s)