Author Topic: reduce ai attack range??  (Read 2055 times)

Offline shadow06

  • Posts: 15
  • Cookies: 0
reduce ai attack range??
« on: June 10, 2008, 05:14:16 PM »
i want to make battle like startrek series good ship fight scenes. is there possible reduce ai ship combat range?? they allways engage far

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: reduce ai attack range??
« Reply #1 on: June 10, 2008, 05:22:28 PM »
Reduce these values in scripts/AI/PlainAI/TorpedoRun.py
Code: [Select]
fMinDistance = 25
fIdealDistance = 200
fMaxDistance = 250

And I think when it comes to Phasers it always is firing them, but you don't see them because they are out of range.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline shadow06

  • Posts: 15
  • Cookies: 0
Re: reduce ai attack range??
« Reply #2 on: June 10, 2008, 06:38:43 PM »
is there any way to stop this??
Quote
And I think when it comes to Phasers it always is firing them, but you don't see them because they are out of range.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: reduce ai attack range??
« Reply #3 on: June 10, 2008, 06:51:51 PM »
No, not that I know of and doesn't include trawling through AI code.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
Re: reduce ai attack range??
« Reply #4 on: June 11, 2008, 12:32:52 PM »
AFAIK, changing the minimal firing distance in the hardpoint (phaser property) seems to work. distances around 10-30 should work

these settings should give you a ds9-like galaxy phaser.
Quote
charges: 4
damage: <depends on the desired balance>
discharge rate: 1
distance: 15
minimum charge: 4
recharge rate: 1.2
width: 0.04
sides: 4
core scale: 0.3
texture scale: 0.02

these setting will look like a NEM Ent-e phaser
Quote
charges: 0.5
damage: <also, depends on balance>
discharge rate: 1
distance: 15
minimum charge: 0.5
recharge rate: 0.4
width: 0.04
sides: 4
core scale: 0.7
texture scale: 1

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: reduce ai attack range??
« Reply #5 on: June 11, 2008, 12:35:52 PM »
ya but the ships only seem to charge towards an enemy when the torps are loaded and ready to fire...
im not so sure that decreasing the max distance on the phasers would make the sphere of battle smaller - tho i could be very wrong...

Offline Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
Re: reduce ai attack range??
« Reply #6 on: June 11, 2008, 01:09:31 PM »
im not so sure that decreasing the max distance on the phasers would make the sphere of battle smaller - tho i could be very wrong...
not quite, if the ships are fast and agile.
but heavy ships like the galaxy or the warbird will come closer when they see their weapons barely damage the target.

also, you can make the ships fire torpedoes closer by making them get out of guidance or disappear closer
it won't make the AI come actually closer, but make them think deeper when they attack, not just "ready?->fire", but more "ready?->close enough?->coming?->weak?-fire"

(something I learned by waaaaaay too much testing ^_^)
 
I was going to pack some scripts for that, but, you know, Wowwy and CK left me on permanent hold lol

Offline jayce

  • Posts: 20
  • Cookies: 2
Re: reduce ai attack range??
« Reply #7 on: June 18, 2008, 06:13:22 AM »
i want to make battle like startrek series good ship fight scenes. is there possible reduce ai ship combat range?? they allways engage far

at what range would you like the AI to engauge? if I remember correctly, the minimun intercept range is about 52km. afterwards, the AI enguages targets at about 50km. I have a fairly simple code, a formula that will control when the AI can actually fire weapons simply by entering in the approiate km value; 50, 40, 32 etc. it will only control when the AI can fire, but the AI will still follow its pre-defined manuvers which takes place whenever the AI is not trying to intercept a target. changing manuvers will require a complete rewrite of the entire AI. if all you want is to reduce the range in which the AI fires, then I'll fire up my old computer and get the script from one of my old AI's.