Author Topic: remove-goal build  (Read 3654 times)

0 Members and 1 Guest are viewing this topic.

OK, this could either go here or in the FRED area. It's gone here :P

This build contains the remove-goal sexp which inadvertantly got left out at some point.
The actual sexp itself has 2 parameters, the ship/wing and the order to remove, and if a priority is specified, uses that while sorting through the goals.
If a priority is not specified, the first goal matching the sexp directive in the Ai_info structure is removed.

A very basic test was done with a mission supplied by The_E, but it was by no means conclusive, only that the general idea worked.
Things that probably need to be beaten to death are:
-removing goals from wings
-removing goals from ships
-removing goals based on priority
-removing every possible goal there is. I might have made a mistake in any one of them (and you'll understand when you see the patch - this turned out to be a lot more hideous than it could have been)

The priority code uses atoi(CTEXT(CDR... atm, so no sub sexps for calculating the priority yet :(

There are 5 builds here: fs2 release, debug, fred release and debug, and mib_cyzrzks modified debug version with a console capable of executing arbitrary sexps in-game.
The patch is also here. Without further ado, and an 'anything that goes wrong is your own damn fault':

The Patch
SCP Release Version
SCP Debug Version
FRED Release Version
FRED Debug Version
Debug with mib_cyzrzks console Version

Please don't hit the server too hard  :nervous:
STRONGTEA. Why can't the x86 be sane?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
The priority code uses atoi(CTEXT(CDR... atm, so no sub sexps for calculating the priority yet :(

I wouldn't worry too much about that. I don't think any FREDders actually use SEXPs or variables to supply priorities. I doubt anyone would notice for months or even years if you left it the way it is now.

The reason for using eval_num rather than atoi(CTEXT()) is more to make sure your code is future proof. You never know what someone might do with the code next that might make using a SEXP there much more useful.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 
I've just realised how close sexps are to Scheme or Lisp (one of the CAD systems here accepts commands in Scheme).  ;)
STRONGTEA. Why can't the x86 be sane?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Goober's commented on that fact several times himself. :D
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 
Thanks to The_E for testing these builds.
STRONGTEA. Why can't the x86 be sane?

 

Offline The E

  • He's Ebeneezer Goode
  • Global Moderator
  • 213
  • Nothing personal, just tech support.
    • Skype
    • Steam
    • Twitter
I should hasten to add that I didn't test how it would react with differing priorities. I'll attach my test mission for your consideration and further testing.

[attachment deleted by ninja]
**** every cause that ends in murder and children crying. ― Iain Banks
Join the fun at the HLP IRC channel. Get the latest spam and gossip as long as it's fresh!

 
Here's the dealio folks (and Goob has told me I'm allowed to nag you lot).
Test this, or you might regret it when it gets committed.

EDIT: I forgot to add: Post your experiences here, or hit me up on IRC.
STRONGTEA. Why can't the x86 be sane?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
This unfortunately is the problem with new SEXPs. They get very little testing when they're new. Often they'll sit around for months before someone comes up with a mission that needs them.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline SypheDMar

  • 210
  • Student, Volunteer, Savior
    • Minecraft
Is it possible for me to just download the patch by itself?

 
yep, it's the diff file linked to by 'The Patch' in the first post

EDIT: Here
STRONGTEA. Why can't the x86 be sane?

 
Recommend this gets committed.

Cheers for the awesome work by The_E and kara and Goober.
STRONGTEA. Why can't the x86 be sane?

 
Committed
STRONGTEA. Why can't the x86 be sane?