Code: Select all
// This adds a special improvement- the high-G augment facility.
// These irreproduceable structures were built thousands of years ago by the Aelion empire.
// High-gravity augment facilities train and modify standard infantry, turning them into super-soldiers.
//
// Augment facilities differ from normal infantry academies significantly:
//
// a) they convert existing units rather than creating new ones
// b) they are not the primary structure on their world, so they can exist on worlds of any designation
// c) they exist only on a small subset of worlds determined at the time of scenario creation
//
// Smart players might turn high-G worlds into academies, citadels or sector capitals.
// This will provide a continuous stream of basic infantry to convert into heavy infantry.
Trait core.highGravity
// This planetary feature will show up in the same area as mineral abundance
// It signals to players that a world has a high-G augment facility
// We will apply it to a few underground and transuranic worlds at scenario creation.
{
category: feature
name: "high gravity"
}
Trait core.highGfacility {
// This is a special improvement that converts normal infantry into heavy infantry.
// I think it will work without a "role:", provided that it is not considered "industry"
// If it were industry, it would get overwritten when the world gets redesignated.
// These improvements will persist like the "neural processors" still visible on some planets in Alpha 1
// We want it to remain on the world no matter what the world is being used as.
// The player should not be able to build or destroy it.
// Players manually control WU allocation to the structure, similar to the militia base; they can even set it to 100% if they are committed to periodically shipping in infantry from elsewhere.
name: "high-gravity augment facility"
category: improvement
defaultAlloc: { alloc:fixed allocValue:5.0 }
requirements: (core.highGravity)
production: (core.heavyInfantry)
}
ResourceType core.heavyInfantry
{
category: groundUnit
name: "heavy infantry brigade"
isCargo: true
mass: 20.0
halfLife: 5.0
elementCount: 5000
attack: { name:"pressure-caviton bolter" damage:2 type:direct range:0.0 area:0.1 }
// I don't know what messing with range, area, elementcount do to ground units
// so I'm keeping it pretty basic. This unit is tougher than infantry and imperial guards
// but not as strong as armored infantry.
defense: { armor:4 minArea:10.0 counters:{ missile:1 } }
production: {
workUnits: 250.0
inputs: (
{ type:core.infantry amount:1.0 }
)
// This unit requires other units as an input!
// I believe it should work fine, although it probably will not import infantry via trade routes
minTechLevel: 4
}
}
// Add the following code to the creation block of a scenario after player worlds are created
// There is a more elegant way to accomplish this, by modifying worlds at or after generation, but IDK how
// This just adds worlds, which will upset the distribution of world types a little
Table scenario.highGWorldClassTable
{
type: byTrait
value: (
// does not spawn at all in bright nebula, I hope this will not mess things up
(core.inDarkNebula
{ type: table
value: (
(75 core.transuranicWorld)
(25 core.undergroundWorld)
)
}
)
(()
{ type: table
value: (
(75 core.transuranicWorld)
(25 core.undergroundWorld)
)
}
)
)
}
{ create:worlds
count:80
region:sectorRegion
minDist:16
sovereign:core.independent
traits: (
worldTechTable
highGWorldClassTable
core.highImperialCulture
core.highGravity
core.highGfacility // I hope we can add a facility this way
)
resources: (
{ type: core.infantry
value: { type:gaussian
median: { type:byTechAndPopulation
value: (
(preIndustrial 0.1)
(industrial 0.1)
(atomic 0.1)
(digital 0.09)
(spacefaring 0.08)
(fusion 0.07)
(biotech 0.05)
(antimatter 0.04)
(quantum 0.04)
(postIndustrial 0.04)
)
}
low: 150
high: 300
}
}
)
}