Bridge Commander Central
BC Forums => BC Scripting => Topic started by: AlexMB2000 on November 27, 2008, 02:31:10 AM
-
The AI in my game aim terrible. When an AI comes around to face its forward torpedoes, it starts shooting well before it is ready. Maybe by the time it fires the fourth torpedo the AI actually is aiming correctly and hits me. Is there a way to make the AI aim it's torpedoes and then fire them?
-
It already is aiming.
I suppose it's "just" aiming too soon.
In the TorpedoRun.py (scripts/AI/PlainAI) there are 3 constants:
fMinDistance = 25
fIdealDistance = 200
fMaxDistance = 250Change those and you can get what you want, to make the AI start later.
-
The AI in the stock game hits better than the AI in my game. I played around with those #s they didn't change the fact the AI starts shooting before it has turned around. I have KM 1.0 with DJ's galaxy installed with many of my own changes in the scripts but none have to do with the AI. Is there another way to make AI aim?
-
Try turning off FoundationTechnologies (for now anyway).
-
That didn't work. :(
-
Ok, you can turn FoundationTechnologies back on. If both didn't work, then it has to be some other variable in the AI scripts.
What I would suggest for now, is try doing a search over the entire forum, I believe (know) that this question has been asked before.
-
I did search for days now. I was very reluctant to ask for fear for sounding like an idiot. I even checked another BC forum site. I can't find anything. :(
Thanks anyways. I suppose I will live with it. I will probably make the torpedoes ridiculously accurate.
-
I figured it out. I started to think when I first started to see the problem. When I first encountered the AI aiming stupid is when I first downloaded MVAM Infinite back when it came out. Then I noticed again after getting DJ's Galaxy. So I looked up MVAM AI scripts and found a line in one of them about InaccruateTorps and then a change a couple of values to experiment.
It worked and my AI now shoot like they did in Stock BC. Thank you for trying to help me out MLeo.
-
Interesting, I forgot about MVAM(AI).
Now we have a neat record for this.
*Locked*
-
please forgive me for unlocking this thread for just one second, i apologize for stepping on your toes, MLeo... but the MvamAI is something i had never considered myself...
i am curious tho - how and why does the MvamAI script control this function, as far as affecting the accuracy of torps hitting?
i see it is located in the script in this section
#we need to find what group the ship was in... 0 = enemy, 1 = friend, 2 = neut
pAttackEnemies = None
if pEnemies.IsNameInGroup(pShip.GetName()):
if pMission.GetFriendlyGroup().GetNameTuple():
pAttackEnemies = AI.Compound.BasicAttack.CreateAI(pShip, pMission.GetFriendlyGroup(), Difficulty = 0.1, InaccurateTorps = 1)
elif pMission.GetEnemyGroup().GetNameTuple():
pAttackEnemies = AI.Compound.BasicAttack.CreateAI(pShip, pMission.GetEnemyGroup(), Difficulty = 0.1, InaccurateTorps = 1)
if not pAttackEnemies:
return None
what would be a better value to make them more accurate, 0?
and for that matter, what does Difficulty = 0.1 mean?
-
InaccurateTorps is a boolean (just checked the scripts).
So 1 in less accurate, 0 is accurate.
The Difficulty parameter (from 0, being the dumbest, to 1 being the most complex, ie. appear smartest), basicly controls the complexity of the AI.
At 0.0 it only uses the "InaccurateTorps" and "DumbFireTorps" AI modules.
At 1.0 it uses the "UseRearTorps", "UseSideArcs", "SmartShields", "ChooseSubsystemTargets", "AvoidTorps", "NeverSitStill", "PowerManagement", "SmartWeaponBalance", "SmartPhasers", "SmartTorpSelection", "DisableBeforeDestroy" and "AggressivePulseWeapons" AI modules.
Other values are just between these.
Difficulty 0.1 means "InaccurateTorps", "UseSideArcs".
-
aaaaah okee i understand now :)
thanks for clarifying that, MLeo! :D
+cookie
(feel free to lock the thread down again, i promise i wont step on your toes and unlock it again lol :P)
-
As Moderator you could have just posted. :P