News:

Rings of Reznor!

Main Menu

Problems with the characters' AI

Started by DoctorRuina, August 23, 2024, 01:25:20 PM

Previous topic - Next topic

DoctorRuina

Hi friends! I always have problems with the characters' AI. For example, many times the characters stand there like fools or try to move away to throw a projectile and fail. How can I make them launch their projectiles at melee range?

stumpy

Is this with FFvt3R? If so, my recollection is that IG made a change when they released the game that set a minimum distance for using ranged attacks. It was much complained about and we discovered a fix in scripting. The fix was setting
import ff
ff.RANGED_MIN = 0.5
in one of the startup files.

If you install FFX, this will be set up for you. (FFX does this in System/localinit.py, if you are looking to do this without FFX.)
Courage is knowing it might hurt, and doing it anyway. Stupidity is the same. And that's why life is hard. - Jeremy Goldberg

DoctorRuina

Thanks for the quick response, stumpy. Yes, I use FFvt3R. And I have installed FFX too. But I don't see this command in localinit.py. Should I write it there?

oktokels

Quote from: DoctorRuina on August 23, 2024, 01:25:20 PMHi friends! I always have problems with the characters' AI. For example, many times the characters stand there like fools or try to move away to throw a projectile and fail. How can I make them launch their projectiles at melee range?
Can you post the AI code of the character here to take a look at it?

stumpy

Doc, maybe open the localinit.py you are using and post the contents? That will help determine what it needs. Also, post the full path of that file. It's possible it's not in the right spot or it's being ignored for some reason. Mine has those two lines I posted, though it has other lines between them. I don't recall if mine is the default that we included with FFX or if I customized it.
Courage is knowing it might hurt, and doing it anyway. Stupidity is the same. And that's why life is hard. - Jeremy Goldberg

DoctorRuina

Quote from: oktokels on August 24, 2024, 02:38:26 PM
Quote from: DoctorRuina on August 23, 2024, 01:25:20 PMHi friends! I always have problems with the characters' AI. For example, many times the characters stand there like fools or try to move away to throw a projectile and fail. How can I make them launch their projectiles at melee range?
Can you post the AI code of the character here to take a look at it?
Thanks oktokels! These problems usually happen to me with all characters.. I want to learn how to do AI well to solve all these problems.

DoctorRuina

This is my localinit.py

#
# IGA system initialisation file
#
import js
import ff
ff.Language = 'English'
ff.AI_STEADY_EP_THRESHOLD = -1.0
# Startup Plugins Importer; info in the StartupPlugins folder
try:
    import startupplugins
except:
    pass

stumpy

I would try adding
ff.RANGED_MIN = 0.5right below the "THRESHOLD" line.
Courage is knowing it might hurt, and doing it anyway. Stupidity is the same. And that's why life is hard. - Jeremy Goldberg

DoctorRuina

Thanks a lot, stumpy. I think that with this the way the game works has changed.