Author Topic: Forcing capships to keep distance?  (Read 2005 times)

0 Members and 1 Guest are viewing this topic.

Offline Zarax

  • 210
Forcing capships to keep distance?
Hello,

is there any way to create an AI capital behaviour where while attacking they will keep a minimum distance from the target?

Thank you!
The Best is Yet to Come

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: Forcing capships to keep distance?
I think there's a Sexp for that in the events editor.
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Zarax

  • 210
Re: Forcing capships to keep distance?
AI-keep-distance is greyed out if you're thinking about that one.
The Best is Yet to Come

 

Offline wookieejedi

  • 29
  • Intensify Forward Firepower
Re: Forcing capships to keep distance?
Hello,

is there any way to create an AI capital behavior where while attacking, they will keep a minimum distance from the target?

Thank you!

Do you want the a capital ship to reach a certain distance and position relative to it's target, then stop and rotate to bring guns to bear? Then if the target moves do you want the capital ship to dynamically maintain that position relative to it's target?

If so, I might recommend trying these custom sexps:
https://www.hard-light.net/forums/index.php?topic=96082.0

 

Offline Zarax

  • 210
Re: Forcing capships to keep distance?
Hello,

is there any way to create an AI capital behavior where while attacking, they will keep a minimum distance from the target?

Thank you!

Do you want the a capital ship to reach a certain distance and position relative to it's target, then stop and rotate to bring guns to bear? Then if the target moves do you want the capital ship to dynamically maintain that position relative to it's target?

If so, I might recommend trying these custom sexps:
https://www.hard-light.net/forums/index.php?topic=96082.0

Yes, that's specifically the behaviour I'm looking for.
Thank you, I shall study those sexps and see how I can make them work.
The Best is Yet to Come

 

Offline wookieejedi

  • 29
  • Intensify Forward Firepower
Re: Forcing capships to keep distance?
Sounds great! Happy to answer questions here or on the Discord in the #fredding channel, too (https://discord.gg/kgYgknmmdu).

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Forcing capships to keep distance?
AI-keep-distance is greyed out if you're thinking about that one.

That's propably because it is not permitted for the object-type of the ship in question. Which AI orders a ship can recieve is definined by its object-type, which is established by a related flag in its ships.tbl-entry, e.g. "fighter", "bomber" or "capital".
Objecttypes.tbl allows you to maniplulate which AI orders are valid for a ship with the respective flag.


While you should be good with the new SEXPs wookiejedi presented to you, I feel obliged to mention the legacy method to do this is using waypoints. However that requires a number of geometrical calculations (or lots of trial and error) each time but can be made to work dynamically, as waypoints can be moved using the coordinate manipulation SEXPs.
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline Zarax

  • 210
Re: Forcing capships to keep distance?
I'm very aware of the legacy method, I've been modding FS2 since the 20th century although never released anything relevant.
I'll take a look at objectypes, although I suspect putting small craft sized routines on destroyer size ships is bound to cause weird reactions.
The Best is Yet to Come

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: Forcing capships to keep distance?
How do you mean?   If a destroyer had the right flags, strike craft orders shouldn't apply to it.  Is this related to the VLS craft you mentioned in another topic?  :)


Is it a custom ship you're working with?
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Zarax

  • 210
Re: Forcing capships to keep distance?
How do you mean?   If a destroyer had the right flags, strike craft orders shouldn't apply to it.  Is this related to the VLS craft you mentioned in another topic?  :)


Is it a custom ship you're working with?

Yes, it's in part related to the VLS concept and I wish I had something custom but in reality I'm working with heavily table modded versions of vanilla FS2 ships.
I have a concept in my head of a FS campaign where Sol basically got the other side of shivan tech, namely capital shields, and focuses on bombarding enemies from long range to deplete shielding before sending bombers to disable capital sub systems.

The balance is such that class for class terran ships are able to overcome capital shields with time but if a beam armed ship gets close enough to fire it's game over as you know what LRED can do to a destroyer, even when if you add 25k hitpoints of shields.

What I'm trying here is to make battles a lot less static when involving capital ships (after all even the battleships of old didn't sit and pound each other to death, quite the opposite) but FS2 AI even on FSO still makes capships very collision happy.
The Best is Yet to Come

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: Forcing capships to keep distance?
Just trying to identify possible cause for your distance concern.

Heavily modded table may be a factor?
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Zarax

  • 210
Re: Forcing capships to keep distance?
Well, the ships mostly get the surface shield tag and in Orion's case higher turret FOV and new weapons, nothing too radical.

What happens is that if for example I order 2 orions to attack a lucy, they will get closer and closer, kind of orbit around it then collide.
Even worse if I order both ships to attack each other, they will "dodfight" until they collide...
The Best is Yet to Come

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Forcing capships to keep distance?
Nice question, and interesting answers.

This goes back to the good old debate on how to manage warship battles and escort duties in FreeSpace. Personally, due to turret FOVs, storytelling purposes, and event management issues, I prefer to use waypoints regardless of the situation. This way, the FREDder has full control on how the mission is going to turn out, and one major advantage in terms of mission balance is avoiding particular configurations where friendly ships are unable to bring their key armaments to bear on relevant targets (enemy warships and incoming bombers alike).

In poor words, I generally don't order warships to attack each other.
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito
My interviews: [ 1 ] - [ 2 ] - [ 3 ]

 

Offline Zarax

  • 210
Re: Forcing capships to keep distance?
Thank you Mobius, this has basically been the default FS2 community stance since forever, however I was hoping that after over 20 years there were easier ways to handle capship behaviour...
The Best is Yet to Come

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Forcing capships to keep distance?
To be fair, I think ordering warships to attack each other is still a rather common practice. I prefer waypoints for the reasons stated above, so it's up to you to do the same or not. :)

Personally, I think it's the best way to have direct control on a battle, as you can tell in advance what turrets can be brought to bear on the opponent, what turrets and subsystems are exposed to enemy fire, and how much time it takes to get the warships within a specific range. Also, should reinforcements from either side jump in, you can also tell in advance what they'll be doing, and how.
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito
My interviews: [ 1 ] - [ 2 ] - [ 3 ]

 

Offline Zarax

  • 210
Re: Forcing capships to keep distance?
I agree with you that this approach leaves you a lot more control, however it tends to encourage a "mission as a puzzle" approach, where too often the difficulty is in figuring out how the creator wanted the mission to be done rather than being just a challenging fight.

What ideally I'm aiming for is to have battles being cahotic and with luck having some influence, take into account that unlike the average FS2 missions in what I fred destroyer size ships aren't jumping close to each other but rather at 20-30km away, which leaves time for wings to deploy and plenty of room for reaction even on capital scale.

The Best is Yet to Come

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Forcing capships to keep distance?
I agree with you that this approach leaves you a lot more control, however it tends to encourage a "mission as a puzzle" approach, where too often the difficulty is in figuring out how the creator wanted the mission to be done rather than being just a challenging fight.

What ideally I'm aiming for is to have battles being cahotic and with luck having some influence,

In my eperience, the less control you excerise as a mission designer, the more possible permutations a mission will have - which will adds up as work during testing and complicates your ability to respond to feedback.

Unless you have huge QA workforce in the wings, I would encourage you to prioritize managable permutations.

If you want to still inject more player agency you can always run multiple waypoint paths for your capships and bombers and then have the player influence which one is used somehow (e.g. give the player limited time to perform scans along a possible path).
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: Forcing capships to keep distance?
Or if the capship damage is within a threshold at the time it reaches a way point.

Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Zarax

  • 210
Re: Forcing capships to keep distance?
I agree with you that this approach leaves you a lot more control, however it tends to encourage a "mission as a puzzle" approach, where too often the difficulty is in figuring out how the creator wanted the mission to be done rather than being just a challenging fight.

What ideally I'm aiming for is to have battles being cahotic and with luck having some influence,

In my eperience, the less control you excerise as a mission designer, the more possible permutations a mission will have - which will adds up as work during testing and complicates your ability to respond to feedback.

Unless you have huge QA workforce in the wings, I would encourage you to prioritize managable permutations.

If you want to still inject more player agency you can always run multiple waypoint paths for your capships and bombers and then have the player influence which one is used somehow (e.g. give the player limited time to perform scans along a possible path).

TBH it's easier for me to be my own QA than the other way, it's been around 20 years since I did serious FREDing (and Rise of GCA was definitely cringe worthy seen today) and players tend to break things a lot more than I can account for (like for example, disabling a Deimos with a Loki and HL7...)
The Best is Yet to Come

 

Offline wookieejedi

  • 29
  • Intensify Forward Firepower
Re: Forcing capships to keep distance?
Sorry, just poking in to say the custom movement sexps do use dynamic waypoints at their core  :)