Author Topic: Question: AI Player Orders  (Read 2805 times)

0 Members and 1 Guest are viewing this topic.

Offline Redstreblo

  • Darth Lobster
  • 26
  • Current Project: Vasudan Imperium (\/) (;,;) (\/)
Question: AI Player Orders
Hello, I have a question about AI Player Orders. Basically what happens is the player is playing as Aries 2 (custom wing names) and Aries 1 gets destroyed in a scripted event. At the start of the mission the player has no control over any ship and can only call support. I want him to be able to take control of the other ships and be able to tell them "attack my target" "cover me" "warp out" etc, durring the middle of the mission.

Is this possible? :confused: If it is how would I go about doing this?
I, Aries one, have proved myself superior to the legendary Terran pilot Alpha one! Let the Vasudan people take pride in this accomplishment, and take the Parliamentary Vasudan Empire to victory over the inferior Galactic Terran Alliance! Long live the Emperor!

 

Offline bigchunk1

  • bigchunk1 = Awesome²
  • 29
  • ...and by awesome I mean Jerk!
Re: Question: AI Player Orders
There is a SEXP under status called 'time-elapsed-last-order'. This SEXP detects when Aries 2 (player) is trying to send orders to other AI. You could use this sexp to detect when Aries 2(player) is trying to send orders to his/her wingmen. Stop the player's orders from taking effect by using 'clear-ai orders', followed by a chained event which reissues the current mission's orders (whatever the orders were before). you can use trigger count or repeat count to make sure this happens more than once. That's kind of complicated though.

Another thing you can do is make the priority of the default orders over 100 until Aries 1 dies. You can have the players' orders trigger messages using 'time-elapsed-last-order' such as: "Who do you think you are? squadleader?" to give the player the idea that his wingmen won't follow his orders. When Aries 1 dies, lower the priority of the initial orders below 89 so the players orders take effect. You can do this using 'clear-ai orders' followed by a chained event that re-issues the same orders at a lower priority.

I hope this was helpful, sounds like an interesting idea.      
BP Multi
The Antagonist
Zacam: Uh. No, using an effect is okay. But you are literally using the TECHROOM ani as the weapon effect.

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
Re: Question: AI Player Orders
Hmm. This doesn't address the problem with the orders being available/unavailable on the comms menu. The first one has them never available, the second one has them always available but ignored.

I simply love the concept of a field promotion, though, and I'd like to hear what some of the advanced FREDders can do with it.
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Question: AI Player Orders
There is no way that I know of to carry this out directly, unless the player can be assigned to a new ship (rather than changing the player's ship class, the player's POV is literally moved to a new vessel.)

There are lots of roundabout hacks to kind of imitate this behavior, but no way to genuinely cause greyed out orders to suddenly appear.

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
Re: Question: AI Player Orders
Hm. Could there be a way to swap out ships in-mission, that are not allowed player orders, with new ones that are? Since it's mission 1, the team loadout is fixed, so there shouldn't really be any difference between two ships with the same hull strength.
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline Redstreblo

  • Darth Lobster
  • 26
  • Current Project: Vasudan Imperium (\/) (;,;) (\/)
Re: Question: AI Player Orders
Hm. Could there be a way to swap out ships in-mission, that are not allowed player orders, with new ones that are? Since it's mission 1, the team loadout is fixed, so there shouldn't really be any difference between two ships with the same hull strength.

Wouldn't that mean I would need to create a hundred different events? I would need the event to have lines and lines of SEXPs to make sure that the swapped model will have the same hit-points, be in the same position and appear instantaneously with player orders turned on on top of all of that stuff.
« Last Edit: June 23, 2010, 12:23:21 pm by Redstreblo »
I, Aries one, have proved myself superior to the legendary Terran pilot Alpha one! Let the Vasudan people take pride in this accomplishment, and take the Parliamentary Vasudan Empire to victory over the inferior Galactic Terran Alliance! Long live the Emperor!

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Question: AI Player Orders
I've been meaning to make an Allow-Orders SEXP for a while now because as far as I know there is no way to change the allowed orders in-mission and that's rather dumb.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
Re: Question: AI Player Orders
Aha. I suppose we can wait for that, then.

Here's what I would do in the mean time... make the player Aries 3. Then make sure both Aries 1 and Aries 2 bite the dust, and have Command promote the player to leader of Aries wing. There won't be any fighters left to command, so there's no problem. :)

In later missions the players is Aries 1 and has command of Aries wing's loadout and orders, but not of Virgo or Cancer. In a few more missions, he can be promoted to squad leader and have the full range of orders available to him for all friendly fighters and bombers in the mission.
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline Aardwolf

  • 211
  • Posts: 16,384
Re: Question: AI Player Orders
@Karajorma: That would be awesome. And preferably not hackish.