SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 25/01/2019, 04:05 PM   #41
Freaksken
Gangsta
 
Freaksken's Avatar
 
Join Date: Mar 2009
Location: Belgium
Posts: 501
Reputation: 367
Default Re: FCNPC A.I.

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.
__________________
Always keep in mind that a lot of people are active on this forum in their spare time.
They are sacrificing time they could easily spend on things they would rather do, to help you instead.


[Include] FCNPC A.I. - [Tutorial] Speedometer - [WIP] Single-player-like co-op mission - [Other] List of all my work
Freaksken is offline   Reply With Quote
Old 25/01/2019, 07:29 PM   #42
faxxe
Big Clucker
 
faxxe's Avatar
 
Join Date: Nov 2009
Location: Aachen
Posts: 130
Reputation: 31
Default Re: FCNPC A.I.

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?
__________________
Hardware & software knowledge base
PAWN & C Developing inquires below, using contact form


faxxe is offline   Reply With Quote
Old 26/01/2019, 10:26 AM   #43
Freaksken
Gangsta
 
Freaksken's Avatar
 
Join Date: Mar 2009
Location: Belgium
Posts: 501
Reputation: 367
Default Re: FCNPC A.I.

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.
__________________
Always keep in mind that a lot of people are active on this forum in their spare time.
They are sacrificing time they could easily spend on things they would rather do, to help you instead.


[Include] FCNPC A.I. - [Tutorial] Speedometer - [WIP] Single-player-like co-op mission - [Other] List of all my work
Freaksken is offline   Reply With Quote
Old 08/02/2019, 06:32 PM   #44
GermanBud
Little Clucker
 
Join Date: Dec 2014
Posts: 2
Reputation: 0
Default Re: FCNPC A.I.

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?
GermanBud is offline   Reply With Quote
Old 08/02/2019, 07:33 PM   #45
Freaksken
Gangsta
 
Freaksken's Avatar
 
Join Date: Mar 2009
Location: Belgium
Posts: 501
Reputation: 367
Default Re: FCNPC A.I.

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.
__________________
Always keep in mind that a lot of people are active on this forum in their spare time.
They are sacrificing time they could easily spend on things they would rather do, to help you instead.


[Include] FCNPC A.I. - [Tutorial] Speedometer - [WIP] Single-player-like co-op mission - [Other] List of all my work
Freaksken is offline   Reply With Quote
Old 08/02/2019, 08:03 PM   #46
GermanBud
Little Clucker
 
Join Date: Dec 2014
Posts: 2
Reputation: 0
Default Re: FCNPC A.I.

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!
GermanBud is offline   Reply With Quote
Old 08/02/2019, 08:44 PM   #47
Freaksken
Gangsta
 
Freaksken's Avatar
 
Join Date: Mar 2009
Location: Belgium
Posts: 501
Reputation: 367
Default Re: FCNPC A.I.

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.
__________________
Always keep in mind that a lot of people are active on this forum in their spare time.
They are sacrificing time they could easily spend on things they would rather do, to help you instead.


[Include] FCNPC A.I. - [Tutorial] Speedometer - [WIP] Single-player-like co-op mission - [Other] List of all my work
Freaksken is offline   Reply With Quote
Old 09/02/2019, 01:58 AM   #48
Freaksken
Gangsta
 
Freaksken's Avatar
 
Join Date: Mar 2009
Location: Belgium
Posts: 501
Reputation: 367
Default Re: FCNPC A.I.

The aggro viewing angle feature, requested by liguanhua123, has been implemented on the v2.0 branch.
__________________
Always keep in mind that a lot of people are active on this forum in their spare time.
They are sacrificing time they could easily spend on things they would rather do, to help you instead.


[Include] FCNPC A.I. - [Tutorial] Speedometer - [WIP] Single-player-like co-op mission - [Other] List of all my work
Freaksken is offline   Reply With Quote
Old 17/02/2019, 02:21 AM   #49
Freaksken
Gangsta
 
Freaksken's Avatar
 
Join Date: Mar 2009
Location: Belgium
Posts: 501
Reputation: 367
Default Re: FCNPC A.I.

I've just completed the Leatherface example (fixed a few bugs and resolved the remaining TODOs). See the latest version here.
__________________
Always keep in mind that a lot of people are active on this forum in their spare time.
They are sacrificing time they could easily spend on things they would rather do, to help you instead.


[Include] FCNPC A.I. - [Tutorial] Speedometer - [WIP] Single-player-like co-op mission - [Other] List of all my work
Freaksken is offline   Reply With Quote
Old 11/04/2019, 03:45 PM   #50
Freaksken
Gangsta
 
Freaksken's Avatar
 
Join Date: Mar 2009
Location: Belgium
Posts: 501
Reputation: 367
Default Re: FCNPC A.I.

Added line of sight support with ColAndreas on the 2.0 branch.
__________________
Always keep in mind that a lot of people are active on this forum in their spare time.
They are sacrificing time they could easily spend on things they would rather do, to help you instead.


[Include] FCNPC A.I. - [Tutorial] Speedometer - [WIP] Single-player-like co-op mission - [Other] List of all my work
Freaksken is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FCNPC GOD mod bug HELP :( peti784 Scripting Help 0 07/09/2016 05:57 PM
Need help with FCNPC valerastar Scripting Help 1 05/05/2016 08:54 AM
Help Me FCNPC Pagle Scripting Help 0 30/07/2015 07:11 AM
FCNPC help blackwave Scripting Help 1 20/04/2014 04:36 AM


All times are GMT. The time now is 06:33 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.