Heres a bit of a Updated RCFF Table: -OLD- See the newest at the bottom of this post.
I really hope some of you creative minds will create your own Table by using this framework and post here or also at pastebin.
Also feel free to request any Events or Options to this script.
I may have rushed through the explanation and purpose of RCFF, so here:
RCFF - Random-Contacts Flights Framework is a script written by me to make all kinds of custom-made Random Contacts EzPz.
From Dependencies of other RCFF-Table Flights to just Radio call outs every X Minutes, you will be able to customize your flight in many several and different ways.
I have added 3 Main Fleet Configuration Options, firstly the "PreGen" one, it doesn't really have a name... lets just call it that, so PreGen gets to create your Custom Flight when the other 2 Config Options are both off, this is probably the easiest one to create and understand, since basically everything you have at variables are in this case:
"FMinStrength" - Minimal Strength of the flight (See Create_Flight_2.script)
"FMaxStrength" - Self explanatory.
"FCapital" - This is a Table of several Ship_Description names of your desired Flights Main Carcass which where one gets randomy chosen, this Carcass will get Escorted by either PreGen, "ManualEscort"'s or "FullManualEscorts".
"FEscortMin" - Only relevant if PreGen is selected, this value sets the minimal amount of Escort Flights to Spawn.
"FEscortMax" - Self explanatory.
"FFaction" - The Faction id of your Flight, "Vks" or "uft"=FTU or "pat", you get it.
"FTeam" - You might set it to the same as your id above.
"FTeamGroup" - usually you might just put your id in there and add "Group" to it.
"InitialWait" - Initial wait after this flight is allowed to Spawn.
"IntervalWait" - This value controls which every X Seconds the flight is able to spawn.
And here we get to the "Properties" or rather the MAIN Configuration of the Flights.
I will just not include "Prop_" in all my examples here, since im lazy.
"AllHostile" - Controls wether this flight is hostile to all Teams/Groups/Factions it encounters INCLUDING the player.
"SpawnRelationState" - The Spawning relation state of this Flight, "RELATION_WAR" or "RELATION_NEUTRAL", or "RELATION_FRIEND".
"HostileTable" - Here you can specify a Table of your desire which includes the Factions which you want to have this Flight be in War with.
"AllowMultiInstances" - This allows or disallows this Flight being able to Spawn multiple times in the same system.
"AllowDespawn" - This tells the game if this flight is to be Despawned in a couple of X Seconds, although it needs to be Enabled by replacing the FALSE with TRUE.
"PermVisible" - If set to TRUE, the player will permanently see where this flight is headed
"PermVisibleEscort" (I KNOW IT ISNT IN THE LIST, SORRY, BUT IT WILL BE IN THE FUTURE!). - The same as the original, but this one is solely for the Escorts, both of the PermVisible Properties can be set to True independently.
"AllowRadio" - If set to TRUE the game will each X Seconds drop a Message to the player (or more realistically to the whole system) with X Content in the Message.
"EnableChanceTrigger" - If Enabled, this Trigger has a certain amount of Chance (see second variable) to activate AFTER x Seconds (third variable), and then its triggering a Function which is the 4th Variable as a String.
"AllSystems" - This basically tells the rcff script if its to be spawned in all Systems in the game.
"SystemTable" - Awaits a Table with specified systems where this Flight is able to Spawn.
"PlayerInteraction" - This is just a condition for some Events.
"CallsSOS" - Triggers the SOS Function when this flight gets attacked by the Player.
"CapitalFlees" - If Enabled, the Capital will escape to the nearest portal when its escort has Died.
"EscortFlees" - The same as above only with the Escort.
"SpecificPortals" - If Enabled, the script will ONLY spawn the flight in the specified Systems at "SpecificPortalsTable"
"SpecificPortalsTable" - Requires "SpecificPortals" to be TRUE, has the Portal Names which are allowed.
And now we get to the "ManualEscort" which I have talked about earlier.
"ManualEscort" - If Enabled, will automatically disable "PreGen" or "FullManualEscort" Methods.
To use this Method, we firstly we need to understand what
Code:
{
"1",
"11",
"16",
"default"
},
Actually Means!, don't we?.
Well the "1" represents the Type of the Flight, since YES. this whole structure above is enough to make a Flight with RCFF, if you ever have had some experience with modding SW, you should know there are 3 main types of ships in scripting, theres "1" which are Interceptors, "2" which are Bombers and lastly "3" which are Capital Ships, or "BigShips" if you want to call em by their coding name.
The "11" which you see above is the Minimal Strength (Can you allready guess what "16" ? ;), I hope this doesn't need an explanation also :D. B
ut im still going to write what it is: its the Maximal Strength.
and then we have the "default" string, this is actually a very useful thing which I would have almost NOT included, but luckily here we are with me talking about this great thing, so what is it? DRAGONS?! No. Far more simple, its the Object which this Flight needs to Escort.
the main RCFF-Script allready does it for you IF you leave it at "default", but you can modify it by simple typing a number of your desired ESCORT flight which this one will escort (Escort-ception o.O?).
This works like so in a Table:
Code:
{--0
"1",
"11",
"16",
"default"
},
{--1
"1",
"5",
"8",
"0"
}
The Second flight which I have marked with --1 will now Escort the Escort with number "0", can you guess why ;) ?.
It will Escort 0, and 0 is the first Escort Flight which is defined up there, then it goes from 0 - to whatever amount of escorts you have/add.
So... that was Easy!, wasn't it?, sadly FullManualEscort is a bit more Complex, but it is also waaaay more customizable.
So lets get into it, firstly we have again the FullManualEscort Variable itself, this can either be TRUE or FALSE, and it tells the main script if you want to use this method and ignore all other 2 methods.
"FullManualEscortTable" - I Hope you can see some similarities to ManualEscortTable, since its the same thing mostly, only with more variables.
So lets decode everything, shall we?
NOTE: The Current RCFF FullManualEscort Table has a bit different formatting, but if you understand this, you will also understand the new format.
Code:
{
F_Carcass1 = "StoneArrow_vksR10",
F_Carcass2 = "disabled",
F_Carcass3 = "disabled",
F_Carcass4 = "disabled",
F_Carcass5 = "disabled",
F_Carcass6 = "disabled",
F_Pilot1 = "VksOfficer",
F_Pilot2 = "disabled",
F_Pilot3 = "disabled",
F_Pilot4 = "disabled",
F_Pilot5 = "disabled",
F_Pilot6 = "disabled",
F_Roles1 = "ROLE_LEADER",
F_Roles2 = "disabled",
F_Roles3 = "disabled",
F_Roles4 = "disabled",
F_Roles5 = "disabled",
F_Roles6 = "disabled",
F_Formation = "default",
F_EscortObj = "0"
},
As you can see, most of the vars go from 1 to 6, which is the max Ships inside a Flight, without the AI going apeshit.
I will replace all numerical Names inside those functions with X from now on.
"F_CarcassX" tells the script what kind of Carcass you want Ship Number X to be, you can take one from Carcasses.xml or ShipDescriptions.xml if you wish so.
"F_PilotX" is the Pilot which will be used for X Ship, see Pilots.xml for names.
"F_RolesX" is the Role this ship is Assigned.
Here are all Relevant Roles: "ROLE_LEADER", "ROLE_ATTACK", "ROLE_CLOACKER", "ROLE_MISSLEDEFENCE", "ROLE_DEFEND", "ROLE_REPAIR".
I know there are spelling errors inside there, but you can thank Elite games team for that, not my fault ^^.
So now we have the "F_Formation" variable, which you can leave at "default" or change it to a Formation, umm look around inside the Scripts/AI/group_formation.script for Valid Names.
Lastly we have the "F_EscortObj" Variable, its the exact same thing like with "ManualEscort"'s 4th Variable, this variable expects a number which represents a Escort Flight, because it will Escort that specified Escort Flight(Which it gets by this Number).
Heres sample Code where the 2nd Escort Escorts the first Escort (never thought im going to speak that out loud while typing, it feels veerry... mh... akward!)
Code:
{--0
F_Carcass1 = "StoneArrow_vksR10",
F_Carcass2 = "disabled",
F_Carcass3 = "disabled",
F_Carcass4 = "disabled",
F_Carcass5 = "disabled",
F_Carcass6 = "disabled",
F_Pilot1 = "VksOfficer",
F_Pilot2 = "disabled",
F_Pilot3 = "disabled",
F_Pilot4 = "disabled",
F_Pilot5 = "disabled",
F_Pilot6 = "disabled",
F_Roles1 = "ROLE_LEADER",
F_Roles2 = "disabled",
F_Roles3 = "disabled",
F_Roles4 = "disabled",
F_Roles5 = "disabled",
F_Roles6 = "disabled",
F_Formation = "default",
F_EscortObj = "default"
},
{--1
F_Carcass1 = "StoneArrow_vksR10",
F_Carcass2 = "disabled",
F_Carcass3 = "disabled",
F_Carcass4 = "disabled",
F_Carcass5 = "disabled",
F_Carcass6 = "disabled",
F_Pilot1 = "VksOfficer",
F_Pilot2 = "disabled",
F_Pilot3 = "disabled",
F_Pilot4 = "disabled",
F_Pilot5 = "disabled",
F_Pilot6 = "disabled",
F_Roles1 = "ROLE_LEADER",
F_Roles2 = "disabled",
F_Roles3 = "disabled",
F_Roles4 = "disabled",
F_Roles5 = "disabled",
F_Roles6 = "disabled",
F_Formation = "default",
F_EscortObj = "0"
},
By now you should figured out how this works, so what are you waiting for?, create some cool stuff with it and send so I can debug RCFF more efficiently! :D.
BUT W8 M8!!!!!!1111, WHY IS THERE "disabled" inside those Vars and WHAI??!.
I forgot to mention that, but you can write "disabled" into one of "F_Carcass", "F_Pilot" and "F_Roles" if you don't need 1 or a few more of them.
PRO TIP: If you want to be REEALY space efficient, you can just put "" into "F_Pilot" and "F_Roles", as long the COUNTER-PART "F_Carcass" is set to "disabled" the script won't look for these Pilots/Roles.
Reminder: Please be aware of your "," placement, it can be a pain if you aren't careful.
We are Nearing towards the end!
Now we have the Objective handling
"Objective" - you can currently choose from 0 to 4 Objective modes.
0 = Default(Patrols X AMOUNT RANDOM Vector3's and leaves the system)
1 = Escort Object, example: mothership, Be sure the specified object exists in the system this flight gets called in.
2 = Attack Object, same as above, only with the Flight attacking the Object.
3 = Fly to Vector3 Coordinates and return to any portal (This needs Table of Vector3s, which means you have to manually input Coordinates for this flight to fly to)
4 = Visit Random Stations (Visits random available stations and returns to portal)
Objective_Object - The Object talked about above.
Objective_Vector3 - Specifically for Objective #3, this is a Table with Vector3's.
Objective_VRandStMax - Max number of Stations to visit, specifically for Objective #4
Objective_VRandVMax - Max number of Random Vector3's to Visit, specifically for Objective #0
Objective_VRandVMax_YMax - Maximal Y value difference, example: if you would input 50, a Vector3 would have its Y Coordinate to be somewhere from -50 to 50. - Since in all honesty tho, it would be a CLUSTERFUCK if you would put the number too high, how would ever any flight get to meet any other one :D?
Here we get to the Events.
OnSpawn - If Enabled, it will trigger a Function by String in the 2nd Variable when the Flight spawns.
OnLeave - Same as above, only this time when the flight Leaves.
OnDeath - Same as above, only this time when the CAPITAL ship Dies.
OnEscortDeath - Same as above, only this time when the ESCORTS Die.
Conditional Events
C_OnArrival - If Objective 3 or 4 have been Selected, and also if enabled, it will Trigger a function by string when the flight has reached ANY Vector3 Coordinates. (This trigger will get triggered MULTIPLE times)
C_FirstPoint - same as above, only this time it will get triggered ONCE and only for the First Vector3.
C_LastPoint - samer as above, only this time on the last point.
C_PlayerNear - If PlayerInteraction is set to TRUE, and if enabled, this will trigger a function when the player gets too close.
The End.
Note: C_PlayerNear will get a third Variable, which will define the size of the trigger which the player needs to be in, it will be a simple integer value.
Dear god what a Textwall!.
TL;DR: Theres no way to make this a one liner....
PS: A Working version of RCFF will be included in RC-2, so be prepared :).
PSS: Feel VERY free to write me some Requests about new Properties and Events or C_Events!.
Quick Q/A:
Does This Replace Random Contacts?: No, it will work with it, since this acts as a Seperate Layer.
Does it break Fleet Mod?: No.
What can I do with it?: You really can't be bothered to read the post, cant ya?.
Why should I use it?: At the current state, you can't create something like the for example Market Caravans, but in the future you will surely be able to.
This script is also much more useful to work around with than creating a new event/RC from scratch.
Where and how can I show you my Awesome creation?: Pastebin
============================================
Oh and don't mind The 'todo in the pastebin, I forgot to remove that one note.
I allready have have a Function which reads the Table Values.
By the way: Tell me if you like the shown FullManualEscort Table Layout, or this one Better: (Please ignore the Lines)
Code:
--{
-- F_Carcasses =
-- {
-- "Wyvern_nav2",
-- "Wyvern_nav2",
-- "Wyvern_nav2",
-- "Wyvern_nav2",
-- "Trident_nav",
-- "Trident_nav"
-- },
-- F_Pilots =
-- {
-- "VksOfficer",
-- "VksOfficer",
-- "VksOfficer",
-- "VksOfficer",
-- "VksOfficer",
-- "VksOfficer"
-- },
-- F_Roles =
-- {
-- "ROLE_LEADER",
-- "ROLE_ATTACK",
-- "ROLE_ATTACK",
-- "ROLE_ATTACK",
-- "ROLE_MISSLEDEFENCE",
-- "ROLE_DEFEND"
-- }
-- F_Formation = "default",
-- F_EscortObj = "default
--}
EDIT 2: Here a updated Table:
http://pastebin.com/iznxrfKf
New Stuff:
Prop_PermEscortVisible - Same as PermVisible, only for the Escorts.
Prop_StackVectorMode - If enabled, this will "push" the next flight that gets generated by the specified first variable's Coordinate unit, either X, Y or Z. the value of the "push" is the second variable, in this cae its a 10.
InFlight Generation:
The ESCORT-FLIGHT Table formatting has changed a little bit, but you should be fine, the concept is the same!.
F_OverrideSpawnVector3 - if enabled, you can Override the Spawning Vector3 of this specific Flight, the second variable is the Vector3.
Use it like so: "TRUE", Vector3(X Coordinate, Y Coordinate, Z Coordinate).