[Include] FCNPC A.I.
#41

Oof that's a tough one. Making NPCs walk around and shooting players shouldn't be that difficult. Given the current tools you could do that in a few lines of code. However, making them act realistic is not an easy task.
Reply
#42

Hmm okay. Challenge accepted.
I think i will use a chess engine like structure to do that.
The AI must be able to decide what to do with some given options. Maybe using randoms in some cases.

I guess its a nice project.

Also need some advice how to implement it. Maybe creating an include? Or filterscript?
Reply
#43

Thing I always do (with SA-MP projects at least, including this project) is first try to create what you want to achieve and see if it's even possible. At that stage you're creating a proof of concept, so your code will not and should not have to be perfect. If you you ever complete that stage, then worry about packaging it in an include or whatever suits the project best.

To point you somewhat in the right direction, I recommend using the latest FCNCP pre-release. Support for NPC pathfinding will be implemented in the future, so don't worry about that part. If you decide to use my include, I recommend using the in-development 2.0 version, which has some significant improvements over the latest stable release. However, I don't know if using this include is the best choice for your use case, you'll have to experiment with that yourself.
Reply
#44

Hey Freaksken, first of all amazing project! I was trying to test it using one of your examples, in this case the leatherface FS. I've the includes and everything on my server to test it, but when I load the fs the NPC/Boss doesn't appear. On server.log it says the following:

[08/02/2019 18:18:21] RCON (In-Game): Player [German] sent command: loadfs leatherface
[08/02/2019 18:18:21] ---------------------
[08/02/2019 18:18:21] FCNPC A.I. loaded
[08/02/2019 18:18:21] - Version: 1.1.1
[08/02/2019 18:18:21] - Author: Freaksken
[08/02/2019 18:18:21] ---------------------
[08/02/2019 18:18:21] [npc:join] BossLeatherface has joined the server (49:127.0.0.1)
[08/02/2019 18:18:21] Filterscript 'leatherface.amx' loaded.
[08/02/2019 18:18:21] [death] BossLeatherface died 255
[08/02/2019 18:18:22]
*** [FCNPC] Info: A newer version (v1.8.2) is available at https://github.com/ziggi/FCNPC/releases ***

Everything from the FS loads, the npc is assigned an ID, the objects appear accordingly, but the bot doenst appear on the map, neither can I go to it. I suspect maybe is something related to the FCNPC, as it says there's a new version of the plugin, but I already went and downloaded the latest 2.0.0 release, of both the plugin and include, so I'm just at a loss here. Any ideas?
Reply
#45

FCNPC A.I. version 1.1.1 and the leatherface example are both written for FCNPC version 1.8.2.

FCNPC A.I. version 2.0.0 is written for FCNPC version 2.0.0. This FCNPC A.I. version is still under development, so the Leatherface example hasn't been updated for this version yet, or at least not pushed to the repository. If you really want to, I can provide you with the updated Leatherface example, however, I can't guarantee it works flawlessly, since it hasn't been fully tested yet.
Reply
#46

Ah I see, I'll try again tomorrow and see how it goes with the downgraded version of the FCNPC plugin then. If you already have the example updated for the 2.0.0 I wouldn't mind checking it out either, but if it's too much of a hassle to do it then don't worry about it. Anyway, thanks for the quick answer!
Reply
#47

I've just pushed it to the repository. The updated Leatherface example is on the v2.0 branch.

Compared to the old version this one performs a lot better and has much cleaner and more readable code. However, it's not fulled tested yet (denoted by the //TODOs). Any feedback on it is appreciated.
Reply
#48

The aggro viewing angle feature, requested by liguanhua123, has been implemented on the v2.0 branch.
Reply
#49

I've just completed the Leatherface example (fixed a few bugs and resolved the remaining TODOs). See the latest version here.
Reply
#50

Added line of sight support with ColAndreas on the 2.0 branch.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)