@Cyborg: yes, an export option is needed, I just don't have time right now.
So "FastAndDangerous" is normal speed?
Correct; it used to be that what's now "Epic" was normal and what's now normal was "Fast And Dangerous". The actual definition:
public enum CombatStyle
{
Normal,
FastAndDangerous,
Blitz
}
On the questions about the randoms, Hearteater is correct.
How do I disabled certain ship types(Swallowers)?
RemoveOptionalShipCategory("Swallowers");
Here's the corresponding enum:
public enum OptionalShipCategory
{
Cloaking,
Teleporting,
HeavyDefense,
Mines,
Parasites,
Starships,
Turrets,
TractorBeams,
CoreShieldGenerators,
Swallowers,
Length
}
FYI, whenever you see "None" at the beginning and/or "Length" at the end of one of those, just ignore it. Definitely don't use it
It's just for our convenience in code logic.
While I'm at it with the reference info, here's the enum from which the script commands that actually "do" something to the setup are drawn:
public enum TextScenarioChangeType
{
None,
SetNumberOfPlanets,
SetMapStyle,
SetCampaignType,
SetMapSeed,
SetShipDifficulty,
AddOptionalShipCategory,
RemoveOptionalShipCategory,
AddAllOptionalShipCategories,
RemoveAllOptionalShipCategories,
SetCombatStyle,
SetUnitCapScale,
SetFogOfWarType,
SetMinorFactionIntensity,
RemoveAllMinorFactions,
AddAIModifier,
RemoveAIModifier,
AddAllAIModifiers,
RemoveAllAIModifiers,
SetAutoAIPMagnitude,
SetAutoAIPInterval,
SetFirstPlayerAIPlotIntensity,
RemoveAllFirstPlayerAIPlots,
SetSecondPlayerAIPlotIntensity,
RemoveAllSecondPlayerAIPlots,
SetFirstAIType,
SetSecondAIType,
SetShowUnexploredPlanets,
SetFirstAIDifficulty,
SetSecondAIDifficulty,
SetFirstAIHandicap,
SetSecondAIHandicap,
SetAccessibilityOf_FirstAIType,
SetAccessibilityOf_SecondAIType,
SetAccessibilityOf_FirstAIDifficulty,
SetAccessibilityOf_SecondAIDifficulty,
SetAccessibilityOf_FirstAIHandicap,
SetAccessibilityOf_SecondAIHandicap,
SetAccessibilityOf_MinorFactions,
SetAccessibilityOf_AIModifiers,
SetAccessibilityOf_AutoAIP,
SetAccessibilityOf_FirstPlayerAIPlots,
SetAccessibilityOf_SecondPlayerAIPlots,
Length
}
And how do I specify which Minor Factions, AI Modifiers and AI Plots I want? I don't want them to be random.
Example:
SetMinorFactionIntensity("HumanMarauders",4);
(make sure you use 1 as the second parameter for a faction that doesn't take an intensity; I think it will just default to 1 even if you do give it something else, but... never assume
)
Reference:
public enum AIMinorFaction
{
HumanMarauders,
HumanResistanceFighters,
HumanColonyRebellions,
ZenithTraders,
ZenithMiners,
ZenithDysonSphere,
ZenithDevourer,
NeinzulRocketryCorps,
NeinzulPreservationWardens,
NeinzulRoamingEnclaves,
FallenSpire,
SpireCivilianLeaders,
BrokenGolemsEasy,
BrokenGolemsModerate,
BrokenGolemsHard,
SpirecraftEasy,
SpirecraftModerate,
SpirecraftHard,
BotnetGolemEasy,
BotnetGolemModerate,
BotnetGolemHard,
Length
}
(the three botnet ones at the end are in my working copy, not in the public version, but they'll be there soon)
Example:
AddAIModifier("Schizophrenic");
Reference:
public enum AIModifier
{
None,
Schizophrenic,
DoubleWaves,
HalfWaves,
NuclearCommandStations,
NoWaves,
RevealRandomAITypes,
NoWaveWarnings,
CrossPlanetWaves,
Length
}
Examples:
SetFirstAIPlayerAIPlotIntensity("Avenger",1);
SetSecondAIPlayerAIPlotIntensity("AstroTrains",1);
Reference:
public enum AIPlot
{
Avenger,
Defender,
WrathOfNature,
EXP2_Subroutines,
EXP2_AdvancedSubroutines,
AstroTrains,
EXP3_Beachheads,
Length
}
(Defender and WrathOfNature were never used, "Subroutines" means "Hybrids")
When specifying the AI types can I make it so it selects pairs of AIs.. like ..
AI 1/2
Raid Engine/One Way Doormaster
Speed Racer/Tag Teamer
Spire Hammer/Support Corps
You could achieve that with:
SetIntVariableToRandom("RandomRoll",1,3);
IfLeftIntEqualToRightInt(RandomRoll,1)
{
SetFirstAIType("Raid_Engine");
SetSecondAIType("OneWayDoormaster");
}
IfLeftIntEqualToRightInt(RandomRoll,2)
{
SetFirstAIType("SpeedRacer");
SetSecondAIType("TagTeamer");
}
IfLeftIntEqualToRightInt(RandomRoll,3)
{
SetFirstAIType("SpireHammer");
SetSecondAIType("SupportCorps");
}
And if there were specific other things you wanted in each bundle (like turning on/off schizo waves, turning on/off Avenger, etc) they could go in the right block.
The list of AI type values is earlier in this thread, iirc, I can post them again if desired.
I'm trying to make a challenge setup script.
That's one of the use cases I had in mind