rdeioris / UnrealUtilityAI

Simple Utility AI implementation for Unreal Engine 4
MIT License
93 stars 20 forks source link

Richiesta di aiuto #1

Open Daimones81 opened 4 years ago

Daimones81 commented 4 years ago

Salve Sig. De Ioris, Innanzitutto grazie per questa fantastica Utility AI. Sto provando ad implementarla nel mio progetto Blueprint, ma sto trovando diverse difficoltà. Il passaggio che ho fatto è stato il seguente : Creare una nuova classe C++ (actor component) si apre Visual 2017 copio e incollo i codici AIComponent.pp e .h e compilo Mi ritrovo nella cartella c++ il nuovo component. Creo una classe bp AIController e nell'editor vado in Add Components e trovo il mio AIComponent, solo che non ha nessun setting nella cartella "details" Mentre non so proprio come creare l'AIAction. Potrebbe essere così gentile da aiutarmi. Grazie infinite. Roberto.

rdeioris commented 4 years ago

Please use English.

Btw you need to clone the whole repository in the Plugins/ directory of the project, regenerate the visual studio solution (right click on the project icon from the explorer to do it) and build again. It is a standard Unreal Plugin, once enabled you will find the classes in your editor automatically (then you can use Blueprints)

Daimones81 commented 4 years ago

Sorry, I thought it was Italian. Perfect I'll try as soon as possible! Thank you

Daimones81 commented 4 years ago

Perfect!! It worked!! Now I have to understand how it works. Thank you

Daimones81 commented 4 years ago

Mr. Iorio I managed to implement both AIController and AIAction. Can I ask you, if possible and if it doesn't disturb you too much, a short video tutorial on how to use it? It would be a great kindness to me. Thanks anyway.

rdeioris commented 4 years ago

Hi, sorry, unfortunately i have no spare time right now, but in the Content/ Plugin directory you find lot of functional tests that could be useful as a reference

Daimones81 commented 4 years ago

Good morning and thanks for the quick answers. Yes, I had found the tests, but unfortunately I don't really know how to use them. I am trying in different ways but I can't make it work. I have only been using Unreal for 3 months. I created a utilityAiController with the AIComponent component inside, in the AI ​​utility details I put "UAI_TestCanRunTrue" as an action And in Activation I ticked "auto activate". Then I created a Blueprints class Character and in its default class I set "UtilityAiController" (created earlier) as AI Controller Class, i also tried with "AI_test". Now the "AIPerception" can I implement it anyway, as if I were working with behavior trees? Do you have to put it in the character or in the UtilityAiController? As far as I understand in the AIController there must be nothing but the AIcomponent. Quite right? However with these settings nothing happens to me. When you have time, if you can, I will wait for your help. Infinite thanks Mr. De Ioris.

Daimones81 commented 4 years ago

Hi Mr. De Ioris, thank you for your patience. However I found the test folder and the test level (I have little time these days to access Unreal) However, I can't find the 'Refresh Tests' in the Automation tool. Since I'm working with blueprints, can I find this tool in the Visual studio compiler?

rdeioris commented 4 years ago

@Daimones81 i think this video should help you in understanding the functional test stuff: https://www.youtube.com/watch?v=HscEt4As0_g

btw i do not think using this plugin is the best approach for you, it requires (in its current form) a pretty deep comprehension of various internals. As soon as i will have a bunch of spare time i will add docs and examples for sure (as well as more features)

Daimones81 commented 4 years ago

Thanks for your kindness and quick response. Yes, this video helped me a lot to understand. I have only been working on Unreal for a few months (3), but I have a mind trained in programming in C ++ and I spend little time learning. I created an advanced AI (patrol / investigation / fire) but with behavior trees. Now I am very happy to learn this plug-in. I will gladly await your updates and documentation.

Daimones81 commented 4 years ago

Hi Sig De Ioris, I ask you to confirm if what I am writing is correct so if I am at least understanding the logic of using the AI ​​utility. I have to create an AI as if I created it with behavior trees, (but without it obviously, but the steps are the same) then I create an AIController (I use the one created by you, "UtilityAiController" which already has AIComponent inside it) I create an AIAction which I call in the AIComponent Settings inside the aicontroller. This is the basis of work. In AIAction I will create all the various logics, such as the score, the increase in the score, the canrun etc .... which will be analyzed by the aicomponent. Then I create the "enemy" and obviously give him the Aicontroller as the "brain". (I implement AI sensing and navmesh on the map of course) To move the random enemy I can safely use the bp (just for example) like Ai_Move_To (as if I were creating a simple AI) but the logic I created in AIAction will begin immediately. It's correct?

Daimones81 commented 4 years ago

Hi, what do you think I created 2 AIAction. AIComponent will perform the one with the highest score. I just have to automate the "ScoreRob" variable through another AIAction where it will be increased or decreased based on an action taken. In the example I sent, I created 2 identical activities, only to highlight that when the value of the "ScoreRob" variable changes, the action with the highest score will be performed. The password to watch the video is

utilityai (all lowercase)

https://vimeo.com/442733465