Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: TrashMan on May 25, 2003, 05:47:29 am

Title: A very usefull AI cammand
Post by: TrashMan on May 25, 2003, 05:47:29 am
A attack any capship command (for capships..maby even bombers)..
Very usefull in larger capship battles.

Imagine 3 of your capships attacking 12 smaller ones.. Each capship can have only 4 slots(i think) in fred for commands..
So ..you have one of your capships attacking 4 of the enemy..
If one of yours gets tagged, other capships will just stand still and will not attack/follow his remaining targets...

See the problem?:D
Title: A very usefull AI cammand
Post by: LtNarol on May 25, 2003, 08:40:58 am
In most parts of most campaigns, the player is at most a Commander in grade.  Most capital ships are commanded by officers of higher grade than Commander.  The player really shouldn't be able to give orders to bigger ships.

Now, if you meant one of those commands in the ships editor, I say to you: use sexps.
Title: A very usefull AI cammand
Post by: karajorma on May 25, 2003, 10:22:18 am
Script the battle using waypoints. Even if you added this SEXP the ships would fly around the target and look stupid anyway.
Title: A very usefull AI cammand
Post by: TrashMan on May 25, 2003, 12:01:07 pm
I was talking about the ships commands in the FRED ship editor...

And it's far easier to just have that simple command insted of three hours of mission scripting ans SEXPs....

The capships would look for hostile ships with a capital flag and jut attack...when the target is dead, they'll look for another...simple...

And it wouldn't stop you from using SEXP's if you wanted to, but for really big battles it's a godsend....:D
Title: A very usefull AI cammand
Post by: Joey_21 on May 25, 2003, 02:02:53 pm
Simple solution: Tell all of your capital ships to attack every enemy capital ship with the following s-exp.

Event Name
---add-goal
------
------ai-chase
---------
---------89
Title: A very usefull AI cammand
Post by: Solatar on May 25, 2003, 02:29:39 pm
Quote
Originally posted by Joey_21
Simple solution: Tell all of your capital ships to attack every enemy capital ship with the following s-exp.

Event Name
---add-goal
------
------ai-chase
---------
---------89


...

We wanted this new ai command so we wouldn't have to do this...
Title: A very usefull AI cammand
Post by: Joey_21 on May 25, 2003, 02:37:07 pm
Quote
Originally posted by Solatar


...

We wanted this new ai command so we wouldn't have to do this...


And what's so hard about using this command. Use it once on every ship and you're done. :rolleyes:
Title: A very usefull AI cammand
Post by: karajorma on May 25, 2003, 03:37:43 pm
Quote
Originally posted by TrashMan
I was talking about the ships commands in the FRED ship editor...

And it's far easier to just have that simple command insted of three hours of mission scripting ans SEXPs....

The capships would look for hostile ships with a capital flag and jut attack...when the target is dead, they'll look for another...simple...

And it wouldn't stop you from using SEXP's if you wanted to, but for really big battles it's a godsend....:D


It would be easier but unless the ai is also improved (which is not an easy task) then the resulting battle would probably look like crap.
 Capships that are told to attack the enemy tend to circle around the enemy in a pretty stupid looking manner. Thats why I said to script the battle properly. That way you know where your ships are at any given time.

That said if you really want this SEXP I have no problem with that. Combined with a distance SEXP in a later event it could have uses.  All I'm saying is don't ONLY use this SEXP to do your scripting or your missions will look dreadful.
Title: A very usefull AI cammand
Post by: Solatar on May 25, 2003, 03:50:41 pm
Quote
Originally posted by Joey_21


And what's so hard about using this command. Use it once on every ship and you're done. :rolleyes:


Have you even read this thread? Do you understand what this new ai would do?

Obviously not.
Title: A very usefull AI cammand
Post by: TrashMan on May 25, 2003, 06:37:50 pm
Well, large battles are allway chaotic, and ship stupidly circling around each other would look rather real:D

No...seriously...
Thes AI command would be of great use...
Set all ships to attack, and during the mission you can allways allso use the SEXP....

----------------
Originally posted by Joey_21
Simple solution: Tell all of your capital ships to attack every enemy capital ship with the following s-exp.

Event Name
---add-goal
------
------ai-chase
---------
---------89
-----------------------

That will command the GTD Galatea to attack the SD Tantalus..
It will not attack the SD Eva, SD Demon, SCV Tiamant, etc...
But note that you havle LOTS of ships...
Title: A very usefull AI cammand
Post by: phreak on May 25, 2003, 08:21:10 pm
if you have THAT many capitals in a mission at once (3 taking on 12!!), you better rethink it
Title: A very usefull AI cammand
Post by: Liberator on May 26, 2003, 02:04:16 am
I can think of at least one scenario that is at the very least feasable:  The 3 v 12 could be 12 cruisers of various class vs. a mix of destroyers and corvettes.
Title: A very usefull AI cammand
Post by: TrashMan on May 26, 2003, 03:32:16 am
Ups..double post..:o [color=66ff00]Fix0red :D [/color]

Some campaigns have large battles where ships are spred out a bit (and some are running away)... In those situations some ships often stand idle which looks very stupid....
Title: A very usefull AI cammand
Post by: Joey_21 on May 26, 2003, 03:49:11 am
Quote
Originally posted by Solatar


Have you even read this thread? Do you understand what this new ai would do?

Obviously not.


Yes, I do believe I know of what is being thought of, but I think it may be a waste of the coder's time because cap ship beams are automatically supposed to detect enemy cap ships. Really, I don't think there is any need for s-exping because of this.

The friendlies will randomly pick an enemy and fire. Simple as that.
Title: A very usefull AI cammand
Post by: LAW ENFORCER on May 26, 2003, 04:23:57 am
so you mean they will randomy fire ther guns? so they wont br attacking a ship will they... :rolleyes:

and whats this about beams supposed to detect other ships? Who cares about the fiction? the code does not have to adhear to the games universe:wtf:
Title: A very usefull AI cammand
Post by: Joey_21 on May 26, 2003, 04:35:42 am
Quote
Originally posted by LAW ENFORCER
so you mean they will randomy fire ther guns? so they wont br attacking a ship will they... :rolleyes:  


Quote
Originally posted by Joey_21
The friendlies will randomly pick an enemy and fire. Simple as that.


Put a colossus and a sathanas in a mission. Give neither of them any orders, only beam-free-all both ships. Watch them fight.

Then... add a ravana next to the sathanas (still giving no orders to any of them but just beam-free-all) facing the colossus and make the colossus invulnerable and watch them fight. Watch the colossus 0wn both of them.

I have been FREDing since 1999 so I think I would know what I'm talking about. :p Unless, of course, this feature has been disabled in recent versions. :ick
Title: A very usefull AI cammand
Post by: TrashMan on May 26, 2003, 05:40:05 am
That will work ONLY if the enemy is in weapons range..
Will the Collossus chast the Stah if it moes away? NO
Will it go after the Ravana after the Sath is destroyed (ravana is far away)? NO

See the problem NOW?
Title: A very usefull AI cammand
Post by: Joey_21 on May 26, 2003, 05:51:55 am
Quote
Originally posted by TrashMan
That will work ONLY if the enemy is in weapons range..
Will the Collossus chast the Stah if it moes away? NO
Will it go after the Ravana after the Sath is destroyed (ravana is far away)? NO

See the problem NOW?


Ok, so basically, the enemies are moving away. Why not use waypoints then? Even then the friendlies would still fight and travel at the same time. :)
Title: A very usefull AI cammand
Post by: LtNarol on May 26, 2003, 09:32:12 am
I agree with Joey, capital ship battle need to be scripted using waypoints, unless you just want ships circling around each other ten minutes at a time.  You can also set up the waypoints so that you present the most available firepower.

Example: the Sobek has 2 main beams, both facing forward with rather generous firing arcs, but once within a certain distance of its target, it simple circles around that ship, presenting it with a broadside attack.  Despite the Sobek's firing arcs on its 2 main beams, only one can attack its target in a broadside engagement.  A more effective way to implement the battle would be to put the Sobek on a path that would keep it in the aft quarter of its target, thus always presenting that target with both beams.
Title: A very usefull AI cammand
Post by: SadisticSid on May 26, 2003, 02:22:44 pm
I'm not really sure what you're asking here. If you want an Orion to attack 12 cruisers in some arbitrary order, you need to use the add-goal SEXP with varying appropriate goal priorities.

But this is a stupid idea. You should be using waypoints. That is what mission scripting is all about. If you can't make capital ships move and behave the way you want to with the tools offered, you need to learn how to FRED properly. I've scripted certain situations in Inferno's mission scripts where a ship will change its orientation using waypoints. It's easy.

Sid.
Title: A very usefull AI cammand
Post by: YodaSean on May 26, 2003, 07:38:13 pm
I kind of llike the suggestion for the AI.  I'm all for anything that will make my battle-of-endor mission making easier.  On a similar note, did anyone ever do that automatic beam-free-all thingy? :)
Title: A very usefull AI cammand
Post by: TrashMan on May 27, 2003, 01:08:15 am
The beam-free-all thingy is in the mission speification (a checkbox) in FRED2_Open 3.5.3...I think...

Anyway, would this be really so hard to do?
NOTE: This ai command could work with the ai-set-ship sexp, thus making FREDing a whole lot easier!
(look at the last post in the sexp thread)
Title: A very usefull AI cammand
Post by: ##UnknownPlayer## on May 27, 2003, 01:14:39 am
What's really needed here are some precalculated values of where on a capship the most firepower is available for each class of ship it might take on. Then we can let the AI intelligently choose how to assault a target i.e. if predominantly it only has forward facing guns, then it will try and position itself out of the firing arc of the ship its attacking and then sit there firing away at it (reconsidering its position every so often). If on the other hand it had a 2:1 split of firepower between its front and rear then it would consider doing fly by's of the target to minimize damage to itself.

We'd need a well structured data format to do this though that was quick to query for information.
Title: A very usefull AI cammand
Post by: TrashMan on May 27, 2003, 04:25:13 am
Ummm.... yeah that could be implemented in the AI...
OR
We could use the ai-face-ship sexp....the one in the sexp thread...

Whichever is better...but with a sexp you could order a ship to face the target anyway you want and attack it from any side you want... much easier than waypoints and it does give some freedom to the AI...
Title: A very usefull AI cammand
Post by: aldo_14 on May 27, 2003, 09:14:31 am
Quote
Originally posted by ##UnknownPlayer##

We'd need a well structured data format to do this though that was quick to query for information.


You'd need to work out both teh turret positions & normals and do some weapons calcs for 'em, I think - i.e. if one side has lots of weak turrets, whilst the front has forward beams.  Maybe you could go for the easy route and simply put in an optional 'best side' entry for the ship in the tbls?  Default to side on if there's no entry parsed or something.....

Guess it depends how intelligent the turrets should be  - whether they just attack the ship closest to the center of their firing 'zone', or whether they (i.e.) attack the enemy ship which has it's best side facing.....
Title: A very usefull AI cammand
Post by: phreak on May 27, 2003, 02:33:36 pm
or maybe a lethality parameter that calculates the power of its weapons upon startup, basically add up all the turret weapon damages for a quadrant and divide by the number of turrets. then you can get the average damage dealt per turret. after that, you can get the ai to do something with those averages.

the ai should also recalculate these parameters when a turret is destroyed
Title: A very usefull AI cammand
Post by: J3Vr6 on May 27, 2003, 04:27:16 pm
But is all that possible?
Title: A very usefull AI cammand
Post by: phreak on May 27, 2003, 05:05:10 pm
not yet, maybe after 3.6 is released
Title: A very usefull AI cammand
Post by: TrashMan on May 28, 2003, 03:56:54 am
Yes, it could be done that way!:nod:

But what about the ai-ship-facing sexp? Why doesn't anyone comment on that?