Author Topic: AI Priority Changes Build  (Read 8225 times)

0 Members and 1 Guest are viewing this topic.

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
AI Priority Changes Build
New build based on SVN as of right now.


I've made a few changes to the current AI goals priorities system that a few FREDders might want to play with. The old system used to work like this. The mission designer could give orders with a priority between 0 and 89. Orders given by the player had a priority of 95 for an entire wing or 100 if given to a single ship.

With these changes the mission designer can give any order a priority between 0 and 200 (From SEXP or Initial Orders). This means that you can have missions where the player can give orders to his wing but have them countermanded by command. You shouldn't have to prevent the player from being able to give a ship orders just because you want to make sure the ship attacks a certain craft at a certain time any more.

As always with great power comes great responsibility, don't use this to remove the player's ability to ever order his wing.


The only other changes that aren't in SVN yet are

1) This build should fix the problem with primaries in multiplayer
2) Pilot's score is now displayed in the barracks
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Harbinger of DOOM

  • 28
  • Three fries short of a Happy Meal.
Re: AI Priority Changes Build
Super nice! This will come in very handy for mission designers, as well as players.

Thanks a bunch, Kara!
aldo_14 ~ "The ego has landed."
an0n ~ "Wheee, I can spam and no-one will notice!"

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: AI Priority Changes Build
I need people to check that score in the barracks thing with pilots who have a large variety of kills. I only have a new pilot who's currently about 10 missions into FS1 so I have next to no kills to test it with.

I doubt there's a problem but better to find out now than after I commit it.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline captain-custard

  • previously known as andicirk
  • 210
  • one sandwich short of a picnic
Re: AI Priority Changes Build
I need people to check that score in the barracks thing with pilots who have a large variety of kills. I only have a new pilot who's currently about 10 missions into FS1 so I have next to no kills to test it with.

I doubt there's a problem but better to find out now than after I commit it.


it shows up ok in my barracks...... thanks kara will try to bug test th build tonight... saturday
"Duct tape is like the force. It has a light side, a dark side, and it holds the universe together."

 

Offline asyikarea51

  • 210
  • -__-||
Re: AI Priority Changes Build
Zero to 200? That's a wide range.

I can see its usefulness for extremely long missions (more than 10-15 minutes), but what about player commands? A preset order of 150-200 means the player can't really do anything to alter that order, since he can only give out commands with a 95 to 100 prio? (just realised the traitor argument doesn't work because FS is pretty strict in IFF handling IMO).

Or maybe he can, but the AI will respond much slower or something? (i.e. standing orders and/or stubborn character-pilots?)

Just asking :nervous:
Inferno plz
The Power of Nightmares
TheHound: "Nice idea, but I have a thing against announcing campaigns before having them already finished."
G5K: "The flipside of that is that if you don't announce your campaign, yet take too long to finish it, other people may independently come up with some of the same ideas."

 

Offline Shade

  • Moderator
  • 211
Re: AI Priority Changes Build
Quote
I need people to check that score in the barracks thing with pilots who have a large variety of kills.
Works for my FS2 multi pilot, and there aren't many FS2 ships he hasn't killed.
Report FS_Open bugs with Mantis  |  Find the latest FS_Open builds Here  |  Interested in FRED? Check out the Wiki's FRED Portal | Diaspora: Website / Forums
"Oooooooooooooooooooooooooooooooooooooooh ****ing great. 2200 references to entry->index and no idea which is the one that ****ed up" - Karajorma
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct." - Niels Bohr
<Cobra|> You play this mission too intelligently.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: AI Priority Changes Build
I can see its usefulness for extremely long missions (more than 10-15 minutes), but what about player commands? A preset order of 150-200 means the player can't really do anything to alter that order, since he can only give out commands with a 95 to 100 prio? (just realised the traitor argument doesn't work because FS is pretty strict in IFF handling IMO).

Or maybe he can, but the AI will respond much slower or something? (i.e. standing orders and/or stubborn character-pilots?)

Just asking :nervous:

If you give a ship orders with a higher priority than the player can give it then it will do that instead. This feature does need to be used with care. It's intended for times when you get a message from command saying "Wingman Y do X" and you don't want the player countermanding that order.

Previously your only choice was to prevent the player being able to give any orders at all to the ship. This gives you an alternative.
« Last Edit: May 31, 2008, 06:37:29 am by karajorma »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Tolwyn

  • The Admiral
  • Administrator
  • 214
  • Ridiculously Old Fraud
    • Wing Commander Saga
Re: AI Priority Changes Build
Nice! That will help me scripting a couple of WCS missions. ;)

I see following issues though:

- the fighter in question will confirm the order with "yes, sir"
- if the order with the higher priority is fulfilled, the fighter in question will follow the previously given order
« Last Edit: June 01, 2008, 11:00:09 am by Tolwyn »
Wing Commander Saga: A Legend Is Reborn | WingCenter
 
Tolwyn’s reputation for risk taking with other people’s lives was considered  to understate the facts. The admiral’s willingness to sacrifice anyone or anything to achieve his objectives had long been lauded in the popular press. He was “the man who got things done”.- Colonel Blair

No errors, no random CTDs, just pure fun and proof of why getting hit with missiles is a bad thing.
-WC Saga's beta tester


Report Wing Commander Saga bugs with Mantis

 

Offline Shade

  • Moderator
  • 211
Re: AI Priority Changes Build
That seems to  be the idea, actually. If you don't want the player to give orders at all, you can just turn off the player orders. This seems intended to let the designer override player orders from time to time, then letting the AI go back to following player orders once they've done the mission designer's bidding.

Of course, the mission should include a message from command alerting the player to the fact that right now, his wingmen are doing someone else's work, so that he doesn't rely on them to carry out his orders in the meantime.
Report FS_Open bugs with Mantis  |  Find the latest FS_Open builds Here  |  Interested in FRED? Check out the Wiki's FRED Portal | Diaspora: Website / Forums
"Oooooooooooooooooooooooooooooooooooooooh ****ing great. 2200 references to entry->index and no idea which is the one that ****ed up" - Karajorma
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct." - Niels Bohr
<Cobra|> You play this mission too intelligently.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: AI Priority Changes Build
The issue with them saying yes sir was one I need to check into actually. I realised it was a possible problem earlier but I've not checked whether they will or not.

The problem of order stacking can be solved by simply clearing orders after the ultra-high priority goal is achieved. Between that an a player-orders SEXP (which I have planed but will be slightly more work) the FREDder has the option of choosing how he wants to deal with orders given which countermand those of Command.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Tolwyn

  • The Admiral
  • Administrator
  • 214
  • Ridiculously Old Fraud
    • Wing Commander Saga
Re: AI Priority Changes Build
what will happen if two orders with the same priority are issued (player & mission designer)?
Wing Commander Saga: A Legend Is Reborn | WingCenter
 
Tolwyn’s reputation for risk taking with other people’s lives was considered  to understate the facts. The admiral’s willingness to sacrifice anyone or anything to achieve his objectives had long been lauded in the popular press. He was “the man who got things done”.- Colonel Blair

No errors, no random CTDs, just pure fun and proof of why getting hit with missiles is a bad thing.
-WC Saga's beta tester


Report Wing Commander Saga bugs with Mantis

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: AI Priority Changes Build
To be honest I'm not certain. The only thing I actually checked when I looked at the code was how the game was using the value of the priority (whether I could make this change was dependent on whether the values 0-100 were arbitrary or actually used as a percentage. If it was the latter priorities over 100% would cause problems. However the game only ever does a straight comparison and then simply decides the bigger number is the higher priority.

I'll have to do some actual deeper spadework to see which one would be used. Bear in mind that since retail days you could give two orders the exact same priority. What happened in those cases is what will happen here. Whether the new order takes priority over the old one isn't something I'm sure of at the moment.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Tolwyn

  • The Admiral
  • Administrator
  • 214
  • Ridiculously Old Fraud
    • Wing Commander Saga
Re: AI Priority Changes Build
Actually when given two orders with the same priority fighters tend to ignore both. That's my impression at least.
Wing Commander Saga: A Legend Is Reborn | WingCenter
 
Tolwyn’s reputation for risk taking with other people’s lives was considered  to understate the facts. The admiral’s willingness to sacrifice anyone or anything to achieve his objectives had long been lauded in the popular press. He was “the man who got things done”.- Colonel Blair

No errors, no random CTDs, just pure fun and proof of why getting hit with missiles is a bad thing.
-WC Saga's beta tester


Report Wing Commander Saga bugs with Mantis

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: AI Priority Changes Build
Based on what I can see if given two goals with the same priority the ship will try to do the first one it received and then once that is no longer possible, try to do the second one.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline eliex

  • 210
Re: AI Priority Changes Build
If I use this FRED build, can I use a Fs2 mission made by the Priorities build with another Fs2 mission made by FRED 3.9.6 in the same campaign?

Hey, sorry can't test it out - download speed is real slow  :(

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: AI Priority Changes Build
If you run in anything as new or newer than this build, yes. Otherwise possibly not. It will complain that a priority is over 89 if you try.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline eliex

  • 210
Re: AI Priority Changes Build
Excellent  :)