Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Config file made for Nanaki's Fleet Mod
- --This file has all the spawn rate values from now on -
- --instead them being in all individual sw3 system files.
- --DD.MM.YY
- --12.06.2016: Increased Wait-time.
- --08.10.2016: Added Conditional Values.
- --04.08.2017: Fixed ConditionalQLEnable stopping the script's routine.
- --Fleet Mod Config (Systems, Waittimes, allowance, CopyAttributeFrom(System), Conditional Quest Label Enable, Conditional Quest Label Name, Conditional Quest Label Expected Value(if the value matches the expected value, then proceed))
- __Fleet_Mod_Config = {
- -- SYSTEM NAME, InitialWait, IntervalWait, Allow, CopyAttributeFrom(Optional), ConditionalQLEnable, ConditionalQLName, ConditionalQLExpectedValue
- -- {"Dionis", 110, 140, "True", "Ahilles"},
- {"Ahilles", 110, 140, "True"},
- {"Altair", 140, 130, "True"},
- {"Altrabon", 130, 170, "True"},
- {"Alzed", 100, 120, "False"},
- {"Angarsk", 120, 180, "False"},
- {"Areko", 130, 110, "True"},
- {"Argon", 140, 160, "True"},
- {"Ashelon", 180, 150, "True"},
- {"Aurora", 100, 100, "True"},
- {"Avalon", 120, 130, "True"},
- {"B_leftera1", 150, 170, "False"},
- {"B_leftera2", 150, 170, "False"},
- {"B_leftera3", 150, 170, "False"},
- {"Callipso", 100, 120, "True"},
- {"Corrino", 100, 110, "True"},
- {"Dalled", 100, 100, "True"},
- {"Danstag", 100, 110, "True"},
- {"Debris1", 120, 130, "True"},
- {"Debris2", 140, 130, "True"},
- {"Debris3", 130, 130, "True"},
- {"Debris4", 130, 130, "True"},
- {"Debris6", 100, 130, "True"},
- {"Deosis", 100, 110, "True"},
- {"Dionis", 150, 160, "True", "", "True", "Blow", "Blowed"},
- {"Dosis", 120, 120, "True"},
- {"Egleon", 110, 100, "True"},
- {"Elinor", 100, 100, "True"},
- {"Elio", 100, 130, "True"},
- {"El_ariash", 100, 140, "True"},
- {"Endoria1", 100, 100, "True"},
- {"Endoria2", 120, 100, "True"},
- {"Ergelan", 120, 120, "True"},
- {"Eridan", 110, 120, "False"},
- {"Escaflon", 110, 130, "True"},
- {"Farles", 100, 130, "True"},
- {"Fiasar", 100, 140, "True"},
- {"Fort_russ", 120, 150, "True"},
- {"Fronn", 100, 160, "True"},
- {"Gaeon", 120, 120, "False"},
- {"Gaoba", 110, 110, "True"},
- {"Gideon", 120, 140, "False"},
- {"Golkonda", 120, 120, "True"},
- {"Gredos", 100, 120, "True"},
- {"Hafa", 100, 130, "False"},
- {"Hanoi", 100, 150, "True"},
- {"Haron", 100, 120, "False"},
- {"Heos", 150, 180, "True"},
- {"Kadenoa", 130, 170, "True"},
- {"Kadi", 120, 100, "True"},
- {"Kassilia", 110, 120, "True"},
- {"Kitaro", 100, 130, "True"},
- {"Kondel", 110, 120, "True"},
- {"Kron", 110, 180, "True"},
- {"Kruger", 100, 160, "True"},
- {"Lasad", 100, 170, "True"},
- {"Lidau", 100, 170, "True"},
- {"Llanovar1", 120, 140, "True"},
- {"Llanovar2", 120, 140, "True"},
- {"Moscowia", 100, 130, "True"},
- {"ND", 100, 150, "True"},
- {"NJ1", 120, 140, "True"},
- {"NJ2", 120, 140, "True"},
- {"NJ3", 120, 140, "True"},
- {"NK", 100, 140, "True"},
- {"Pandora", 150, 170, "True"},
- {"Pegas", 130, 130, "True"},
- {"Poseidon", 120, 180, "True"},
- {"Prien", 130, 140, "True"},
- {"Proserpina", 100, 130, "True"},
- {"Shula", 120, 140, "True"},
- {"Simeiz", 200, 240, "False"},
- {"Solncevka", 120, 170, "True"},
- {"Solpuga", 110, 150, "True"},
- {"Sunji", 130, 160, "True"},
- {"Taira", 140, 120, "True"},
- {"Tarrot", 140, 110, "True"},
- {"Torr", 150, 125, "True"},
- {"Ule", 200, 110, "True"},
- {"Valensia", 100, 120, "True"},
- {"Vuadil", 120, 140, "True"},
- {"Vulcan", 120, 180, "False"},
- {"x244", 140, 200, "True"},
- {"x297", 140, 200, "True"},
- {"xb13", 120, 110, "True"},
- {"xb15", 120, 110, "True"},
- {"xb17", 130, 110, "True"},
- {"xb19", 140, 120, "True"},
- {"xk10", 140, 150, "True"},
- {"xk16", 150, 160, "True"},
- {"xt05", 100, 120, "True"},
- {"xt11", 120, 120, "True"},
- {"xt17", 110, 100, "True"},
- {"xt20", 120, 130, "True"},
- {"xt23", 120, 140, "True"},
- {"xt24", 110, 150, "True"},
- {"xt26", 120, 130, "True"},
- {"xt27", 130, 130, "True"},
- {"xt39", 160, 100, "True"},
- {"xt41", 170, 120, "True"},
- {"xt45", 240, 140, "True"},
- {"xt52", 170, 140, "True"},
- {"xt54", 130, 130, "False"},
- {"xt81", 120, 100, "True"},
- {"xt86", 150, 190, "True"},
- {"xt93", 120, 150, "True"},
- {"Zebos", 120, 200, "True"},
- {"Earth", 100, 100, "False"},
- {"DisonSphere", 100, 100, "False"},
- {"Precursors", 100, 100, "False"},
- --Custom Systems
- {"Inv_Aliens", 120, 100, "True"},
- {"Inv_BER", 120, 100, "True"},
- {"Inv_GREYS", 120, 100, "True"},
- {"Inv_HUNTER", 120, 100, "True"},
- {"Inv_INOCO", 120, 100, "True"},
- {"Inv_NAVY", 120, 100, "True"},
- {"Inv_NESF", 120, 100, "True"},
- {"Inv_PATROL", 120, 100, "True"},
- {"Inv_PIRATES", 120, 100, "True"},
- {"Inv_PRECURSORS", 120, 100, "True"},
- {"Inv_REBEL", 120, 100, "True"},
- {"Inv_TEMPLARS", 120, 100, "True"},
- {"Inv_TRADE", 120, 100, "True"},
- {"Inv_TRADE_SOS", 120, 100, "True"},
- {"Inv_TRIAD", 120, 100, "True"},
- {"Inv_UFT", 120, 100, "True"},
- {"Inv_USS", 120, 100, "True"},
- {"SW2_Areko", 120, 120, "True"},
- {"SW2_Lasad", 120, 120, "True"},
- {"SW2_Tarrot", 120, 120, "True"},
- {"SW3EXP_BareX", 110, 150, "False"},
- {"SW3EXP_Sternschnuppe", 110, 140, "False"},
- {"SW3EXP_TE_HeavensGate", 100, 100, "True"},
- {"SW3EXP_TE_XEON", 150, 150, "True"},
- {"SW3EXP_TE_Tesla", 180, 360, "True"},
- {"SW3EXP_TE_Nanite", 130, 420, "True"},
- {"SW3EXP_TE_GodsThrone", 130, 420, "True"},
- {"SW3EXP_TE_GodsThrone_Inner", 130, 420, "False"},
- {"SW3EXP_TRZ_Zero", 100, 120, "True"},
- {"SW3EXP_TRZ_Z49511", 80, 110, "True"},
- {"SW3EXP_TRZ_Z999", 120, 90, "True"},
- {"SW3EXP_TRZ_ZNULL", 80, 80, "True"},
- {"SW3EXP_Tunguska", 130, 140, "True"},
- {"SW3EXP_xb19_1", 100, 100, "False"},
- {"SW3EXP_xt256", 100, 100, "False"},
- {"SW3EXP_PREC_Echo", 120, 140, "False"},
- {"SW3EXP_UB1", 100, 100, "False"},
- {"SW1_level_1_01", 110, 120, "False"},
- {"SysM_Kobra", 120, 140, "True"},
- {"SW3CINEMA", 120, 90, "False"},
- {"SW3CINEMA_GREENSCREEN", 120, 90, "False"},
- {"PRESTUS_xt79", 90, 90, "True"},
- {"PRESTUS_Tandrum", 70, 80, "True"},
- --Template
- {"_template_", 100, 100, "True"}
- };
- -- Config
- __FM_EnableDelayedStart = FALSE; --Delays the Initialization of Random Contacts
- __FM_SecondsDelay = 10;
- __FM_EnableModifier = TRUE; --Enables the wait-time modifier.
- __FM_ModifierLowest = -50;
- __FM_ModifierHighest = 40;
- __FM_Modifier = random(__FM_ModifierLowest, __FM_ModifierHighest);
- __FM_EnableExtendedLog = TRUE; --Enables the serialization of the Config into a file.
- -- Vars
- __FM_Temp_IniW = 0;
- __FM_Temp_IntW = 0;
- function StartRandomContactsNEW(System)
- LOG("SW3EXP::ScriptingSystem: New Random Contacts Initializing");
- for Systems, CurSystem in __Fleet_Mod_Config do
- --Player System
- if System == strlower(CurSystem[1]) then
- LOG("SW3EXP::ScriptingSystem: System Found");
- --Random Contacts Allowed
- if CurSystem[4] == "True" then
- LOG("SW3EXP::ScriptingSystem: Random Contacts are Allowed ["..System.."]");
- --CopyAttributeFrom is Enabled
- if (CurSystem[5]=="") then
- LOG("SW3EXP::ScriptingSystem: Copying Attributes");
- for Systems2, CurSystem2 in __Fleet_Mod_Config do
- if (CurSystem2[1] == CurSystem[5]) then
- --ConditionalQLEnable is Enabled
- if (CurSystem[6]=="True") then
- LOG("SW3EXP::ScriptingSystem: RC Data Has Condition["..CurSystem[1].."]");
- if (MGQL(CurSystem[7])==CurSystem[8]) then --Check of Condition
- LOG("SW3EXP::ScriptingSystem: RC Data Conditional Value Matches. at System["..CurSystem[1].."], exected condition was ["..MGQL(CurSystem[7]).."], and the given condition was ["..CurSystem[8].."]");
- --Modifier Disabled
- if not __FM_EnableModifier == TRUE then
- --Is Not Delayed
- if not (__FM_EnableDelayedStart)==TRUE then
- StartRandomContacts(tonumber(CurSystem2[2]), tonumber(CurSystem2[3]));
- LOG("SW3EXP::ScriptingSystem: StartRandomContacts() Executed. "..tonumber(CurSystem2[2]).." "..tonumber(CurSystem2[3]));
- else -- Is Delayed
- __FM_Temp_IniW = tonumber(CurSystem[2]);
- __FM_Temp_IntW = tonumber(CurSystem[3]);
- Timer_Seq(__FM_SecondsDelay, FM_DelayedStartContacts());
- LOG("SW3EXP::ScriptingSystem: StartRandomContacts() with Delay Executed.");
- end;--Delayment
- else --Modifier Enabled
- --Is Not Delayed
- if not (__FM_EnableDelayedStart)==TRUE then
- StartRandomContacts(tonumber(CurSystem2[2])+__FM_Modifier, tonumber(CurSystem2[3])+__FM_Modifier);
- LOG("SW3EXP::ScriptingSystem: StartRandomContacts() Executed. "..tonumber(CurSystem2[2]).." "..tonumber(CurSystem2[3]));
- else -- Is Delayed
- __FM_Temp_IniW = tonumber(CurSystem[2])+__FM_Modifier;
- __FM_Temp_IntW = tonumber(CurSystem[3])+__FM_Modifier;
- Timer_Seq(__FM_SecondsDelay, FM_DelayedStartContacts());
- LOG("SW3EXP::ScriptingSystem: StartRandomContacts() with Delay Executed.");
- end;--Delayment
- end;--Modifier
- else
- --Condition is Different than Expected.
- LOG("SW3EXP::ScriptingSystem: RC Data Conditional Difference detected! at System["..CurSystem[1].."], exected condition was ["..MGQL(CurSystem[7]).."], but the given condition was ["..CurSystem[8].."]");
- end;--Check of Condition
- else--ConditionalQLEnable is Disabled
- --Modifier Disabled
- if not __FM_EnableModifier == TRUE then
- --Is Not Delayed
- if not (__FM_EnableDelayedStart)==TRUE then
- StartRandomContacts(tonumber(CurSystem2[2]), tonumber(CurSystem2[3]));
- LOG("SW3EXP::ScriptingSystem: StartRandomContacts() Executed. "..tonumber(CurSystem2[2]).." "..tonumber(CurSystem2[3]));
- else -- Is Delayed
- __FM_Temp_IniW = tonumber(CurSystem[2]);
- __FM_Temp_IntW = tonumber(CurSystem[3]);
- Timer_Seq(__FM_SecondsDelay, FM_DelayedStartContacts());
- LOG("SW3EXP::ScriptingSystem: StartRandomContacts() with Delay Executed.");
- end;--Delayment
- else --Modifier Enabled
- --Is Not Delayed
- if not (__FM_EnableDelayedStart)==TRUE then
- StartRandomContacts(tonumber(CurSystem2[2])+__FM_Modifier, tonumber(CurSystem2[3])+__FM_Modifier);
- LOG("SW3EXP::ScriptingSystem: StartRandomContacts() Executed. "..tonumber(CurSystem2[2]).." "..tonumber(CurSystem2[3]));
- else -- Is Delayed
- __FM_Temp_IniW = tonumber(CurSystem[2])+__FM_Modifier;
- __FM_Temp_IntW = tonumber(CurSystem[3])+__FM_Modifier;
- Timer_Seq(__FM_SecondsDelay, FM_DelayedStartContacts());
- LOG("SW3EXP::ScriptingSystem: StartRandomContacts() with Delay Executed.");
- end;--Delayment
- end;--Modifier
- LOG("SW3EXP::ScriptingSystem: RC Data has no Condition at System["..CurSystem[1].."]");
- end;--ConditionalQLEnable is Enabled
- end;
- end;
- --CopyAttributeFrom is Disabeld
- else
- LOG("SW3EXP::ScriptingSystem: Not Copying Attributes");
- --ConditionalQLEnable is Enabled
- if (CurSystem[6]=="True") then
- LOG("SW3EXP::ScriptingSystem: RC Data Has Condition["..CurSystem[1].."]");
- if (MGQL(CurSystem[7])==CurSystem[8]) then --Check of Condition
- LOG("SW3EXP::ScriptingSystem: RC Data Conditional Value Matches. at System["..CurSystem[1].."], expected condition was ["..MGQL(CurSystem[7]).."], and the given condition was ["..CurSystem[8].."]");
- --Modifier Disabled
- if not __FM_EnableModifier == TRUE then
- --Is Not Delayed
- if not (__FM_EnableDelayedStart)==FALSE then
- StartRandomContacts(tonumber(CurSystem[2]), tonumber(CurSystem[3]));
- LOG("SW3EXP::ScriptingSystem: StartRandomContacts() Executed. "..tonumber(CurSystem2[2]).." "..tonumber(CurSystem2[3]));
- else -- Is Delayed
- __FM_Temp_IniW = tonumber(CurSystem[2]);
- __FM_Temp_IntW = tonumber(CurSystem[3]);
- Timer_Seq(__FM_SecondsDelay, FM_DelayedStartContacts());
- LOG("SW3EXP::ScriptingSystem: StartRandomContacts() with Delay Executed.");
- end;--Delayment
- else--Modifier Enabled
- --Is Not Delayed
- if not (__FM_EnableDelayedStart)==FALSE then
- StartRandomContacts(tonumber(CurSystem[2])+__FM_Modifier, tonumber(CurSystem[3])+__FM_Modifier);
- LOG("SW3EXP::ScriptingSystem: StartRandomContacts() Executed. "..tonumber(CurSystem2[2]).." "..tonumber(CurSystem2[3]));
- else -- Is Delayed
- __FM_Temp_IniW = tonumber(CurSystem[2])+__FM_Modifier;
- __FM_Temp_IntW = tonumber(CurSystem[3])+__FM_Modifier;
- Timer_Seq(__FM_SecondsDelay, FM_DelayedStartContacts());
- LOG("SW3EXP::ScriptingSystem: StartRandomContacts() with Delay Executed.");
- end;--Delayment
- end;--Modifier
- else
- --Condition is Different than Expected.
- LOG("SW3EXP::ScriptingSystem: RC Data Conditional Value Mismatch detected! at System["..CurSystem[1].."], expected condition was ["..MGQL(CurSystem[7]).."], but the given condition was ["..CurSystem[8].."]");
- end;--Check of Condition
- else--ConditionalQLEnable is Disabled
- LOG("SW3EXP::ScriptingSystem: RC Data has no Condition at System["..CurSystem[1].."]");
- --Modifier Disabled
- if not __FM_EnableModifier == TRUE then
- --Is Not Delayed
- if not (__FM_EnableDelayedStart)==TRUE then
- StartRandomContacts(tonumber(CurSystem2[2]), tonumber(CurSystem2[3]));
- LOG("SW3EXP::ScriptingSystem: StartRandomContacts() Executed. "..tonumber(CurSystem2[2]).." "..tonumber(CurSystem2[3]));
- else -- Is Delayed
- __FM_Temp_IniW = tonumber(CurSystem[2]);
- __FM_Temp_IntW = tonumber(CurSystem[3]);
- Timer_Seq(__FM_SecondsDelay, FM_DelayedStartContacts());
- LOG("SW3EXP::ScriptingSystem: StartRandomContacts() with Delay Executed.");
- end;--Delayment
- else --Modifier Enabled
- --Is Not Delayed
- if not (__FM_EnableDelayedStart)==TRUE then
- StartRandomContacts(tonumber(CurSystem2[2])+__FM_Modifier, tonumber(CurSystem2[3])+__FM_Modifier);
- LOG("SW3EXP::ScriptingSystem: StartRandomContacts() Executed. "..tonumber(CurSystem2[2]).." "..tonumber(CurSystem2[3]));
- else -- Is Delayed
- __FM_Temp_IniW = tonumber(CurSystem[2])+__FM_Modifier;
- __FM_Temp_IntW = tonumber(CurSystem[3])+__FM_Modifier;
- Timer_Seq(__FM_SecondsDelay, FM_DelayedStartContacts());
- LOG("SW3EXP::ScriptingSystem: StartRandomContacts() with Delay Executed.");
- end;--Delayment
- end;--Modifier
- end;--ConditionalQLEnable is Enabled
- end;
- LOG("SW3EXP::ScriptingSystem: Finalized RC Data. Systemname["..CurSystem[1].."], InitialWait["..CurSystem[2].."], IntervalWait["..CurSystem[3].."], Allow["..CurSystem[4].."]");
- end;
- if CurSystem[4] == "False" then
- LOG("SW3EXP::ScriptingSystem: Random Contacts are NOT Allowed ["..System.."]");
- end;
- end;
- end;
- if (__FM_EnableExtendedLog)==TRUE then
- local game_path = GetUserFolder();
- local input_filename = game_path.."Autogen/_AUTO_FM.lua";
- SaveToFile(input_filename, __Fleet_Mod_Config, "FM_CONFIG");
- end;
- end;
- function FM_DelayedStartContacts()
- LOG("SW3EXP::ScriptingSystem: Executing StartRandomContacts");
- StartRandomContacts(__FM_Temp_IniW, __FM_Temp_IntW);
- LOG("SW3EXP::ScriptingSystem: Executed StartRandomContacts");
- end;
- function FM_AllowRandomContacts(System, Value)
- -- Values,
- -- True
- -- False
- for Systems, CurSystem in __Fleet_Mod_Config do
- if CurSystem[1]==System then
- -- System Found
- CurSystem[4] = Value;
- end;
- end;
- end;
- function FM_SetInitialWait(System, Value)
- -- Values,
- -- Any Number
- for Systems, CurSystem in __Fleet_Mod_Config do
- if CurSystem[1]==System then
- -- System Found
- CurSystem[2] = Value;
- end;
- end;
- end;
- function FM_SetIntervalWait(System, Value)
- -- Values,
- -- Any Number
- for Systems, CurSystem in __Fleet_Mod_Config do
- if CurSystem[1]==System then
- -- System Found
- CurSystem[3] = Value;
- end;
- end;
- end;
- function FM_AddSystem(System, InitialWait, IntervalWait, Allow, CopyAttributeFrom)
- tinsert(__Fleet_Mod_Config, System);
- for Systems, CurSystem in __Fleet_Mod_Config do
- CurSystem[2] = InitialWait;
- CurSystem[3] = IntervalWait;
- CurSystem[4] = Allow;
- end;
- if (CopyAttributeFrom) then
- __Fleet_Mod_Config[5] = CopyAttributeFrom;
- end;
- end;
- function FM_RemoveSystem(System)
- local CountNumber = 0;
- for Systems, CurSystem in __Fleet_Mod_Config do
- if CurSystem[1]==System then
- -- System Found
- remove(__Fleet_Mod_Config, CountNumber);
- end;
- CountNumber = CountNumber + 1;
- end;
- end;
- --ToDo: Add Functions:
- -- FM_SetParameter(System, Parameter) Parameters: "-D(Debug), -F(Fast), -V(Default), -X(CopyAttributeIsNotAllowed)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement