Author Topic: Altering AI  (Read 2272 times)

0 Members and 1 Guest are viewing this topic.

Offline esarai

  • 29
  • Steathy boi
I was wondering,
say you have a ship that doesn't have many powerful beams, but has one helluva powerful main cannon riding in the front. How do you alter the capital ship AI so that at the right range it uses the cannon instead of attempting a broadside of its target?

I think the best way for this ship to function would be something like
     If range to target => 10000, AI attempts to line up the main gun for a strike.
     If range to target < 10000, AI changes course to attempt a new attack.

Do realize that this ship is not supposed to be a Destroyer or a Juggernaut, it's something sizing in between a cruiser and a corvette, and would be meant as a small ship intended to effectively (and cheaply) counter larger ships.

Also, coming to think about it, is there any way to make beams punch through a ship without destroying it?

Any ideas on how to pull this off?

P.S. for those of you who are waiting for the Fenris MkII (AKA GTC Garm), I haven't forgotten about it. I'm being crushed under a pile of textbooks. Really heavy textbooks. Don't take this post as a sign I'm working on something different--I was just curious.

I guess while we're on the topic of the Garm, does anybody know how to stop mipmapping? Its something I've noticed that all my models that use jpg-based dds textures do. Perhaps I need to export as a bitmap and then make dds's? Any help here greatly appreciated.
<Nuclear>   truth: the good samaritan actually checked for proof of citizenship and health insurance
<Axem>   did anyone catch jesus' birth certificate?
<Nuclear>   and jesus didnt actually give the 5000 their fish...he gave it to the romans and let it trickle down
<Axem>and he was totally pro tax breaks
<Axem>he threw out all those tax collectors at the temple
<Nuclear>   he drove a V8 camel too
<Nuclear>   with a sword rack for his fully-automatic daggers

Esarai: hey gaiz, what's a good improvised, final attack for a ship fighting to buy others time to escape to use?
RangerKarl|AtWork: stick your penis in the warp core
DarthGeek: no don't do that
amki: don't EVER do that

 

Offline redsniper

  • 211
  • Aim for the Top!
Waypoints. Just fake it.
"Think about nice things not unhappy things.
The future makes happy, if you make it yourself.
No war; think about happy things."   -WouterSmitssm

Hard Light Productions:
"...this conversation is pointlessly confrontational."

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
AI coding is hard.
Waypoints are much easier :P
(´・ω・`)
=============================================================

 

Offline esarai

  • 29
  • Steathy boi
Will a ship still fire a hardpoint weapon while following paths?

Can Capital ships even fire hardpoint-based weapons?

Could you tell a really large ship that it's a fighter, so that it will do the fighter things that it does, but set it to ignore all the other fighters in the mission so it won't try to dogfight with something 100 times smaller?

Or wait... ships like to charge each other before they engage... so just use a normal turret that's scripted to turn off when the ship gets too close.
<Nuclear>   truth: the good samaritan actually checked for proof of citizenship and health insurance
<Axem>   did anyone catch jesus' birth certificate?
<Nuclear>   and jesus didnt actually give the 5000 their fish...he gave it to the romans and let it trickle down
<Axem>and he was totally pro tax breaks
<Axem>he threw out all those tax collectors at the temple
<Nuclear>   he drove a V8 camel too
<Nuclear>   with a sword rack for his fully-automatic daggers

Esarai: hey gaiz, what's a good improvised, final attack for a ship fighting to buy others time to escape to use?
RangerKarl|AtWork: stick your penis in the warp core
DarthGeek: no don't do that
amki: don't EVER do that

 

Offline Hellstryker

  • waffles
  • 210
    • Skype
Could you tell a really large ship that it's a fighter, so that it will do the fighter things that it does, but set it to ignore all the other fighters in the mission so it won't try to dogfight with something 100 times smaller?

Try it and see what happens.  :p

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
You can tell a large ship its a bomber, and it'll fire its turrets at other ships, AND its hardpoint-based weapons.
It'd try to dogfight (and fail) due to its slow speed and turning, or, in the case of the Colossus, kill swaths of fighters by smashing into them.
(´・ω・`)
=============================================================

 

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • FLAMES OF WAR
Hardpoint?
How come it doesn't have a turret?
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 
If you tell a ship it's a bomber, the enemy also sees a bomber and figures out using bombs against it doesn't make sens, so you'd have to fake bombing runs if you do that.
'Teeth of the Tiger' - campaign in the making
Story, Ships, Weapons, Project Leader.

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
That's rather unfortunate.

On a slightly different topic, has anyone tried mixing typse (like "bomber" "cruiser") to see what hapens? Or doest hat break the AI even more?
(´・ω・`)
=============================================================

 

Offline Aardwolf

  • 211
  • Posts: 16,384
That breaks damage. I once had a freighter/fighter and as soon as it got shot the game CTDs. Explanation at the time was a divide by zero error caused by doing something stupid.

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
The best solution is making the weapon a turret and giving the ship waypoints. Capships with hardpoints is a bad idea...

 

Offline Retsof

  • 210
  • Sanity is over-rated.
Could one make a turret with a firing arc of 0?
:::PROUD VASUDAN RIGHTS SUPPORTER:::

"Get off my forum" -General Battuta
I can't help but hear a shotgun cocking with this.

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
That might break something. Try 1.
(´・ω・`)
=============================================================

 

Offline esarai

  • 29
  • Steathy boi
Sweet. Thanks for all the suggestions.

Hardpoint?
How come it doesn't have a turret?

The purpose for using a hardpoint instead of a turret was to prevent the ship from saying, "Whoo hoo hoo I'm gonna defy the laws of just about everything and fire some lasers out my arse." I've seen some ships do that... and it annoys the hell out of me.

It seems like this would be remedied with a firing arc of 1. How exactly does one set the firing arc?
<Nuclear>   truth: the good samaritan actually checked for proof of citizenship and health insurance
<Axem>   did anyone catch jesus' birth certificate?
<Nuclear>   and jesus didnt actually give the 5000 their fish...he gave it to the romans and let it trickle down
<Axem>and he was totally pro tax breaks
<Axem>he threw out all those tax collectors at the temple
<Nuclear>   he drove a V8 camel too
<Nuclear>   with a sword rack for his fully-automatic daggers

Esarai: hey gaiz, what's a good improvised, final attack for a ship fighting to buy others time to escape to use?
RangerKarl|AtWork: stick your penis in the warp core
DarthGeek: no don't do that
amki: don't EVER do that

  
You have to mess with the pof, specifically, the field of view ($fov) on the turret submodel.