Author Topic: [Sexp Request] ai-scan-object  (Read 4185 times)

0 Members and 1 Guest are viewing this topic.

Offline mjn.mixael

  • Cutscene Master
  • 212
  • I release things
    • Steam
    • Twitter
    • Mix-Hai Productions
[Sexp Request] ai-scan-object
I'd like to see an ai-scan-cargo sexp. Basically forcing the ai to fly within the scanning distance of the cargo/ship and stay there for the allotted scan time. Now I know you can fake this with waypoints and other trickery for cargo containers.. but what I have in mind would be useful for simulating wingmen scanning freighters and transports

Quote from: irc
<@MjnMixael> I'd like to see an ai-scan-cargo sexp. Basically forcing the ai to fly within the scanning distance of the cargo/ship and stay there for the allotted scan time. Now I know you can fake this with waypoints and other trickery for cargo containers.. but what I have in mind would be usefull for simulating wingmen scanning freighters and transports

<@Zacam-Away> Hmmm. Why simulate? Why not actually have it update the stack? Friendlies share data, so if a wingman "scans" something, that info should then become available to you as well without having you needing to scan it as well.

<@MjnMixael> well, yeah that could go with it

<@Zacam-Away> Unlike "Place of Chariots" where the cargo is "unscannable" (a hack cheat) it could start as "unscanned" or "unknown" and then actually dynamically update it's status whenever any-of "scans" it.

<@MjnMixael> aye, that would be quite useful, IMO

<@Zacam-Away> So, it would combine elements of "fly to" "within distance of" "play-dead" and a data list update to change the value of the $cargo element for the object it has "scanned"

<@MjnMixael> would "play-dead" work well with moving targets to be scanned?

<@Zacam-Away> Well, if the target is moving, then it would be ai-chase (with "no attack" orders if it's a neutral/hostile object)

<@MjnMixael> ah, yes, that's exactly the sexp I would like to see

<@Zacam-Away> So the question is, will it be "ai-scan-cargo" or "ai-scan-object"

<@Zacam-Away> I've never written a sexp though, but from what I gather of the existing sexp stacks, it should be possible to put the right combination of existing sexps into a container sexp called "ai-scan-object", the only factor there would then be if aicode needs any updating to handle the request which might be slightly more tricky.

Thoughts?
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes - MjnMixael's Render Boutique
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline SypheDMar

  • 210
  • Student, Volunteer, Savior
    • Minecraft
Re: [Sexp Request] ai-scan-object
It'd be very useful to do this without any making a mess. I kinda wish there was a C-1-1-[scan Cargo] to tag along with this, too.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: [Sexp Request] ai-scan-object
Mjn, you know I think you're awesome, but I can't help but feel this is a lot of work for relatively little gain.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • I release things
    • Steam
    • Twitter
    • Mix-Hai Productions
Re: [Sexp Request] ai-scan-object
Mjn, you know I think you're awesome, but I can't help but feel this is a lot of work for relatively little gain.

Oh I dunno. I can think of a crapton of uses for this kinda of thing. Regardless, I'd like to hear that from a coder familiar with the sexp system.

TBH, I'm surprised this kinda thing doesn't exist yet because it seems like a pretty simple way to make your wingmen feel more like -actual- wingmen... Seriously, wth do I have to do all the scanning of major vessels? There's FOUR of us, YOU do it. I'm tired of scanning, it's not fun! I'd rather blow stuff up while you do the boring job.
« Last Edit: June 03, 2011, 09:24:29 am by mjn.mixael »
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes - MjnMixael's Render Boutique
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Re: [Sexp Request] ai-scan-object
In most situations (though I'll grant not quite all) you can fake this acceptably by givig the AI attack orders and then locking their primaries and secondaries. Then update the cargo with sexps.
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline Angelus

  • 210
  • The Angriest Angel
Re: [Sexp Request] ai-scan-object
I support this request.
While you can do that with a bunch of SEXPs and Ai orders, it'd be easier to have one.
while ( !asleep)     |     Building a Warmachine for FreeSpace: Chronicles of a dark Age        |       My WIP's                                 
{Eights++}

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • I release things
    • Steam
    • Twitter
    • Mix-Hai Productions
Re: [Sexp Request] ai-scan-object
In most situations (though I'll grant not quite all) you can fake this acceptably by givig the AI attack orders and then locking their primaries and secondaries. Then update the cargo with sexps.

You can get close, however the ai pretty much never flys within the scanning distance.. just close enough to shoot at it.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes - MjnMixael's Render Boutique
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker
    • My old squad sub-domain
Re: [Sexp Request] ai-scan-object
I support this as a SEXP request and a potential new Comms order :D

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: [Sexp Request] ai-scan-object
Here's the problem: what you think you're asking for isn't actually what you're asking for. :)  The sexp system is very simple, and it is quite easy to add a new sexp to both FSO and FRED.  Having the sexp do what you want, though, is another matter entirely.

The component pieces of this task are all already written, save one.  We have the following:

1) ai-waypoints-once
2) ai-play-dead / ai-stand-still
3) [a delay for X seconds]
4) set-cargo-scanned

Thus, it is perfectly possible to simulate an AI-controlled fighter scanning a cargo container, and in fact people have; it was done in TVWP's Unification War and a few other campaigns.

The missing link is the artificial intelligence for the fighter: the AI goal that will make it fly a certain route, without waypoints; face the cargo; avoid colliding with the cargo; sit still for a period of time regardless of whether it comes under fire; and then resume its previous goal.  And the AI system is famously difficult to work with.

This is the problem with a naive interpretation of the sexp system; it's easy to miss the fact that a sexp actually has to do something under the hood.  I think the worst sexp suggestion ever was when someone, in complete seriousness, asked for a sexp to enable multiple ship docking.  (This was still back when ships could only dock with one other ship.  For context, when I coded that feature, it involved re-implementing the entire docking section of the code and took two weeks of intensive programming, followed by a year of bugfixing.)

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • I release things
    • Steam
    • Twitter
    • Mix-Hai Productions
Re: [Sexp Request] ai-scan-object
Goober, your suggestion works except for moving targets. Didn't you read my post?
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes - MjnMixael's Render Boutique
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Minecraft
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: [Sexp Request] ai-scan-object
waypoints and cap-speed
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline Angelus

  • 210
  • The Angriest Angel
Re: [Sexp Request] ai-scan-object
waypoints and cap-speed

The number of Waypoints is limited, and if you have alternate routes for the transports, you running out of waypoints very quickly.
while ( !asleep)     |     Building a Warmachine for FreeSpace: Chronicles of a dark Age        |       My WIP's                                 
{Eights++}

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Minecraft
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: [Sexp Request] ai-scan-object
Shouldn't be too difficult to set up the waypaths so the fighter uses the transpot's waypoints and use the cap speed when the fighter hits the required distance, I am presuming the scanning will be part of a set piece, either way you will know when you want the set of scannings to start, when you want them to end and how long you want each scan to last.  Using guardian? sexp will stop the AI dynamic targeting the scanning fighter thus resetting the waypaths. 

I am not saying it is as simple as using a dedicated AI order but with a little mission planning you can overcome most difficulties using existing SEXPs and avoid any that cant be solved.
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • I release things
    • Steam
    • Twitter
    • Mix-Hai Productions
Re: [Sexp Request] ai-scan-object
This is the most frustrating...

That system is still pretty ding-dang limited. Not to mention the idea of a mod getting C-1-1-[scan] ability is pretty stinkin exciting.

But whatever, there's been enough negative posts in this thread that it'll likely get ignored from here on out. Looks like I'm going to be seriously reading that sexp tutorial The_E posted...
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes - MjnMixael's Render Boutique
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: [Sexp Request] ai-scan-object
Goober, your suggestion works except for moving targets. Didn't you read my post?
Yes, I did.  I didn't catch the part about freighters and transports, but that doesn't make a material difference.  Just do what headdie recommended: have the fighter approach from the back and use the same waypoint the freighter/transport is using, and match the speed using cap-waypoint-speed.  I don't think AI fighters aren't affected by engine wash like players are, so you should be able to get close.


But whatever, there's been enough negative posts in this thread that it'll likely get ignored from here on out.
Excuse me, what?  The posts in this thread have been pretty positive, even if mostly misinformed.  And we're not ignoring the problem, we're telling you how to solve it using existing tools.

This problem is going to be difficult however you solve it.  But the difficulty of solving it using sexps and waypoints is significantly less than the difficulty of solving it by designing a new AI goal.

Writing the actual sexp is not the obstacle here.  In fact I could write you the ai-scan-object sexp itself in about 15 minutes; it just wouldn't do anything.  The meat of the problem is the AI.

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: [Sexp Request] ai-scan-object
Actually, AI is damaged by engine wash, it just doesn't care about it.

 
Re: [Sexp Request] ai-scan-object
Personally, this would solve one of the biggest gripes i've had about this game from the beginning. From a player's perspective, the fact that only Alpha 1 had the capability of scanning anything always ruined the game's immersion for me.  If you guys can do this, could you also conceivably write a 'Scan My Target' comm order option?
Could we with ink the ocean fill, and were the skies of parchment made
Were every stalk on earth a quill, and every man a scribe by trade
To write the love of God above, would drain the ocean dry
Nor could the scroll contain the whole, though stretched from sky to sky!

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: [Sexp Request] ai-scan-object
Personally, this would solve one of the biggest gripes I've had about this game from the beginning. From a player's perspective, the fact that only Alpha 1 had the capability of scanning anything always ruined the game's immersion for me.  If you guys can do this, could you also conceivably write a 'Scan My Target' comm order option?

Writing the actual sexp is not the obstacle here.  In fact I could write you the ai-scan-object sexp itself in about 15 minutes; it just wouldn't do anything.  The meat of the problem is the AI.
The Trivial Psychic Strikes Again!

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: [Sexp Request] ai-scan-object
Is it possible to write a simple new AI that scans objects and takes minimal evasive manoevers (possibly rip some from the regular AI)?   If so, just switch control to the scanning AI and then back again after scan is complete.  Although it's probably way more complicated than that, I imagine...

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: [Sexp Request] ai-scan-object
Is it possible to write a simple new AI that scans objects and takes minimal evasive manoevers (possibly rip some from the regular AI)?   If so, just switch control to the scanning AI and then back again after scan is complete.  Although it's probably way more complicated than that, I imagine...

Anything with the AI code is really annoyingly complex.