12.07.2016, 13:51
(
Last edited by Freaksken; 13/04/2019 at 07:22 PM.
)
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: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.
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
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.
See changelog.
License:
See license.
Credits:
Many people have (indirectly) contributed to make this system possible. See credits to see who.