eladan wrote:jumbled wrote:Beta stuff...? Do you mean that AL set for the FBC?
That, plus the patrol code, plus assorted other bits and pieces that I had lying around being worked on.
I don't recall any patrol code or anything other than the AL thing for the FBC. Which, BTW, brings me to the point where I'm currently working on trying to combine 5 different versions of sector patrol scripts (between the player menu command, one for the FBC and a few more from the TF files...ugh) into one generic file that I can use for everything (do param and error checking external to the "guts" of the patrol script). What is it that you had in your set? (might be worth taking a look before I get too deep)
What I'm going to do is combine features of the existing scripts, give an array of wingmen (optional number for different size patrol squads) plus a target sector. The wing leader will run it from the start, so no more guessing who's the highest rank inside the script since the TF member array will be pre-sorted with highest member running the script and pulling in several of the lowest members from the same array. I also want to try to work in giving "better" pilots (with better traits) the lead so they build up leadership to get into bigger ships.
This is now all monitored in plugin.cpilot.gocombat, which, BTW, I'm also going to make more of a permanent feature, like the tracker, only put to sleep on occasion (like if docked or "resting"). So pilots who get left out in the cold may look like they're sleeping, but it'll be more like dozing off with one eye open.

The issue with this, that I never found a satisfactory solution for, is: what happens if you want to run another combat-related command on the cpilot ship? E.g. say you want to have a cpilot ship as a wingman running "Protect my ship". With gocombat running permanently, your wingman will go haring off into the distance at the first sign of a hostile, which is clearly at odds with what you want him to do.
I'm working on this and have a few ideas in mind already.
First, let's say, you have a standard patrol (FBC/TF managed). Each pilot has a "job" recorded in his ship computer. If he's a patrol leader, he'll go run down a red with wingmen in tow. The wingmen, on the other hand, set to "Attack Same" will see their orders (job="patrol") and stay on their leader's target, whatever that target is, even though they may also be picking up reds (same or different) in their own scans. This is how it
should work for patrols, IMO, rather than each ship taking on the nearest red by itself.
Next, lets say you have an escort job (like a trader escort). The pilot will guard the TS and only attack if a red targets the TS for attack (and probably I'll also have to have him watch his own back, too), so he won't go running off attacking everything in the sector that otherwise isn't a threat to his mission.
Let's also say you have a scout (now using a job called "recon"). He won't engage at all (so no more M5's taking on M1's

)...rather he's going to report back to central, if there's no other patrol in the sector, and ask for backup. He'll work it either of two possible ways (depending on how I program it)... 1) He'll simply stay away from it ("evade" tactic) and continue his duty, or; 2) go into "decoy" mode -- run up to it and get it's attention, then fly in circles on the edge of scanner range while he calls in for a "strike team" to come kill the bogie. The strike team will be a replacement to the original Attack script, which was really nothing more than a modified patrol and no better at killing stuff than any other patrol (I once watched as an "attack squad" was called in and just went in circles missing the intended target it was sent after). The strike team will home in on the bogie based on signals from the scout, who is basically leading the reds into an ambush.
Strike teams may also be used to target ships scanned by "friendly" assets (player ships, stations and sats).
So far, "evade" and "decoy" are still just ideas I need to work on, but it's a job that'll have to wait till later after I get a few other parts running properly.
As for your idea... I've also considered the prospect that the player might call one or more ships to his own side, like as wingmen or guards. In this case, he should have them leave any FBC/TF control (otherwise they might go running off under FBC/TF direction. In this case, I'll be working on improving the AI to look for an "unattached" condition and "active orders". Their internal "job" will probably have to be programmed to reset itself to a default (like job="none") if they're not in a TF or FBC, and any ship commands (what the player orders them to do) will make the AI "assume" the player is doing something, in which case default orders will kick in depending on the situation. For instance, if you give them "Protect Me" orders, they'll go into something similar to the "escort" job mode, etc. (try to re-use existing code in this case.)
This will also have to wait till I can test the early steps.
BTW, I'm going to put the TF leader to work having him do sector patrols around the home sector in his list (the first one you give him), with standard rest breaks in-between. His personal guard (mine often places several M6's in formatrion with him) will be on "sentry" duty...another form of "escort".
...That means files 8069, 8071 and 7430 get combined into, say, 8069 (it's the biggest with all the primary cpilot stuff in it).
If you're volunteering to combine it, I won't stand in your way, though I think you'd find it's a bigger job than you might guess.
Well, I think I'm done. I got time during my trip to do a lot of major conversion work, and I -think- I got all the references changed over. I still need to run the game properly through to test things, but I moved files 7430 and 8071 into 8069, with all cmds and messages copied and renumbered. I also renamed all addon.cpilot.tf.* files into plugin.cpilot.tf.* and changed all references there. Plus I did a huge conversion of all local variable names to prefix "cpilot.*" onto them, to make naming more consistent and meaningful and not to have any accidents with other scripts using similar names.
Fight 42 is used by an unsigned copy of Bunny's Attack Rocks cmd, which may be available (that one now uses a signed version), or Fight 43 seems to be open. What do you think?
Shouldn't matter - either should be fine.
At the moment, I'm using Fight 42 (key 342) for my new command. Still need to finish converting the script, but I'll get to it.
A thought... In cases where a TF leader has too few docking bays for follower ships and needs to move pilots up...how about if he can make use of a transporter (if available) to "beam" things over?
Sounds ok, but it might get messy. Too many conditionals makes for fun code.
Actually, the way things are written, I don't think it'd be too bad...just need to make sure that, instead of docking, the ships are within 5km of the carrier before continuing.
Which brings me nicely on to another new task I'm giving to my pilots... "assemble", a special command to be stacked along with any other orders (going into a kind of pseudo-queue) where the pilots will take care of their own business, rather than making a TF or FBC leader "wait" for them. Just tell them "pull yourselves together and do...this" type of thing. We'll see how it works once I get it up and running.
Oh, and did I mention I gave my pilots the ability to do police scans in times of "peace"? Just give them a freight scanner, and be sure they're flying patrols in race sectors where you have a police license, and they'll have a random chance of doing scans to uncover pirates.

I've been waiting for any of mine to actually find one, though. I might have to ramp up the chance to 100% and script in a few just to try it out.