Open source Star Ruler 2 source code!
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
Subsystem: BroadcastAntenna
|
||||
Name: #S_BROADCAST_ANTENNA
|
||||
Description: #S_BROADCAST_ANTENNA_DESC
|
||||
BaseColor: #f67bed
|
||||
TypeColor: #f67bed
|
||||
Elevation: 3
|
||||
|
||||
Tags: Category:Equipment, HighMaint, HasInternals
|
||||
Tags: HeraldsDLC
|
||||
Hull: Flagship, Station
|
||||
|
||||
Size := HexSize * Hexes
|
||||
|
||||
InfluenceBuildCost := floor(5 * max(sqrt(ShipSize/128), 1.0))
|
||||
PowerUse := 3.0 * Size
|
||||
|
||||
ConvertInterval := 5 / (Size / ShipSize) / if(ShipSize > 128, sqrt(ShipSize/128), ShipSize/128)
|
||||
|
||||
Hook: ApplyStatusRandomPlanets(Propaganda, 30, 300, Allow Self = False, Allow Allied = False)
|
||||
Hook: RandomlyConvertSupports(ConvertInterval, Allow Allied = False, Interval Margin = 0.25)
|
||||
|
||||
Requires:
|
||||
Command = 3
|
||||
Power = PowerUse
|
||||
|
||||
Assert: ShipSize >= 64
|
||||
Message: #ERROR_MIN_SIZE:$1:64
|
||||
|
||||
Assert: Size / ShipSize > 0.15
|
||||
Message: #ERROR_TOO_SMALL
|
||||
|
||||
Module: Core
|
||||
Hex.HP := Hex.HP * 3
|
||||
Hex.BuildCost := Hex.BuildCost * 10
|
||||
Hex.Mass := Hex.Mass * 5
|
||||
|
||||
Sprite: Antenna
|
||||
|
||||
Module: Default
|
||||
Hex.BuildCost := Hex.BuildCost * 2
|
||||
@@ -0,0 +1,22 @@
|
||||
Subsystem: BusterBeam
|
||||
Name: #S_BUSTER_BEAM
|
||||
Description: #S_BUSTER_BEAM_DESC
|
||||
BaseColor: #e900ff
|
||||
TypeColor: #e900ff
|
||||
Elevation: 2
|
||||
|
||||
Tags: BaseCost, Category:Equipment, HasInternals, ExteriorCore
|
||||
Tags: Disabled, Ability:BusterBeam
|
||||
Hull: Flagship
|
||||
|
||||
Size := HexSize * Hexes
|
||||
Hex.Mass := HexSize
|
||||
|
||||
Hex.Resistance := 0.2
|
||||
Hex.HP := 18 * HexSize
|
||||
|
||||
Requires:
|
||||
Command = 1
|
||||
|
||||
Module: Core
|
||||
Sprite: HexagonSubsystems::6 * #e900ff
|
||||
@@ -0,0 +1,30 @@
|
||||
Subsystem: CargoStorage
|
||||
Name: #S_CARGO_STORAGE
|
||||
Description: #S_CARGO_STORAGE_DESC
|
||||
BaseColor: #91692c
|
||||
Elevation: 1
|
||||
|
||||
Tags: DefaultUnlock, ScaledCost, NonContiguous, NoCore, HasInternals, Category:Equipment, StaticMaintenance
|
||||
Tags: Compressible
|
||||
Hull: Flagship, Station
|
||||
|
||||
Size := HexSize * Hexes
|
||||
CargoStorage := Size * 4
|
||||
|
||||
Hook: AddCargoStorage(CargoStorage)
|
||||
Hook: AddPermanentStatus(CanGiveCargo)
|
||||
Hook: AddPermanentStatus(CanTakeCargo)
|
||||
|
||||
Hex.Resistance := 0.2
|
||||
Hex.HP := 18 * HexSize
|
||||
Hex.Mass := HexSize * 3
|
||||
|
||||
Hex.LaborCost := 0.1 * HexSize
|
||||
Hex.BuildCost := 1.1 * HexSize
|
||||
Hex.MaintainCost := HexSize - (HexSize/ShipSize * 8 * ShipSize^0.5)
|
||||
|
||||
Modifier: Compress(Amount)
|
||||
CargoStorage := CargoStorage + Base::CargoStorage * (Amount / Hexes)
|
||||
|
||||
Module: Default
|
||||
Sprite: SupplyStorage * #91692c
|
||||
@@ -0,0 +1,25 @@
|
||||
Subsystem: CloakPlating
|
||||
Name: #S_CLOAKPLATING
|
||||
Description: #S_CLOAKPLATING_DESC
|
||||
BaseColor: #5188e6
|
||||
Elevation: -3
|
||||
|
||||
Tags: Category:Equipment, NoWall, NoFloor, PassExterior
|
||||
Tags: NoCore, NonContiguous, Ephemeral
|
||||
Tags: Ability:Cloak
|
||||
Hull: Flagship, Station
|
||||
|
||||
Size := HexSize * Hexes
|
||||
|
||||
Ship.ExternalHexes := Ship.ExternalHexes + Hexes
|
||||
|
||||
Hex.BuildCost := 0.5 * ShipSize / Hexes
|
||||
Hex.LaborCost := 0.05 * ShipSize / Hexes
|
||||
|
||||
Assert: Hexes == ExteriorHexes
|
||||
Message: #ERROR_MUST_BE_EXTERIOR
|
||||
|
||||
OnCheckErrors: designs::checkCoversAllDirections
|
||||
|
||||
Module: Default
|
||||
Sprite: PlateArmor * #5188e6a0
|
||||
@@ -0,0 +1,27 @@
|
||||
Subsystem: ConstructionBay
|
||||
Name: #S_CONSTRUCTION_BAY
|
||||
Description: #S_CONSTRUCTION_BAY_DESC
|
||||
BaseColor: #fca404
|
||||
TypeColor: #fca404
|
||||
Elevation: 1
|
||||
|
||||
Tags: Category:Equipment, BaseCost, HasInternals, StaticMaintenance
|
||||
Hull: Flagship, Station
|
||||
|
||||
Size := HexSize * Hexes
|
||||
|
||||
LaborIncome := Size / 4
|
||||
|
||||
Hook: AllowConstruction(True, False, False)
|
||||
Hook: AddLaborIncome(LaborIncome)
|
||||
Hook: AddPermanentStatus(ConstructionBay)
|
||||
|
||||
Module: Core
|
||||
Sprite: ComputerCore * #fca404
|
||||
|
||||
Hex.BuildCost := Hex.BuildCost + LaborIncome * 60
|
||||
Hex.LaborCost := Hex.BuildCost + LaborIncome * 3
|
||||
Hex.MaintainCost := Hex.MaintainCost + LaborIncome * 25
|
||||
|
||||
Module: Default
|
||||
Sprite: SupplyStorage * #fca404
|
||||
@@ -0,0 +1,30 @@
|
||||
Subsystem: EmergencySupplies
|
||||
Name: #S_EMERGENCY_SUPPLIES
|
||||
Description: #S_EMERGENCY_SUPPLIES_DESC
|
||||
BaseColor: #b88b00
|
||||
TypeColor: #b88b00
|
||||
Elevation: 2
|
||||
|
||||
Tags: BaseCost, Category:Equipment, HasInternals
|
||||
Tags: Ability:EmergencySupplies
|
||||
Hull: Flagship, Station
|
||||
|
||||
Size := HexSize * Hexes
|
||||
Hex.Mass := HexSize
|
||||
|
||||
EnergyCost := 10 * max(1,round(Size*4))
|
||||
Resupply := EnergyCost * 100
|
||||
|
||||
HaveStatus := 1
|
||||
out Duration := HaveStatus * sqrt(Size / ShipSize) * 120
|
||||
|
||||
Hex.Resistance := 0.2
|
||||
Hex.HP := 18 * HexSize
|
||||
|
||||
Requires:
|
||||
Command = 1
|
||||
|
||||
Module: Default
|
||||
|
||||
Module: Core
|
||||
Sprite: AntimatterReactor * #b8b800
|
||||
@@ -0,0 +1,30 @@
|
||||
Subsystem: FlareBomb
|
||||
Name: #S_FLARE_BOMB
|
||||
Description: #S_FLARE_BOMB_DESC
|
||||
|
||||
BaseColor: #e45500
|
||||
TypeColor: #e45500
|
||||
Elevation: 2
|
||||
|
||||
Tags: BaseCost, Category:Equipment, HasInternals, ExteriorCore
|
||||
Tags: Disabled, Ability:FlareBomb, HeraldsDLC
|
||||
Hull: Flagship
|
||||
|
||||
Size := HexSize * Hexes
|
||||
Hex.Mass := HexSize
|
||||
|
||||
Hex.Resistance := 0.2
|
||||
Hex.HP := 18 * HexSize
|
||||
|
||||
Requires:
|
||||
Command = 1
|
||||
|
||||
Module: Default
|
||||
Hex.BuildCost := 3.0 * Hex.BuildCost
|
||||
Hex.MaintainCost := 3.0 * Hex.MaintainCost
|
||||
|
||||
Module: Core
|
||||
Hex.BuildCost := 3.0 * Hex.BuildCost
|
||||
Hex.MaintainCost := 3.0 * Hex.MaintainCost
|
||||
Sprite: MissileLauncher::0 * #e45500
|
||||
DrawMode: 1
|
||||
@@ -0,0 +1,34 @@
|
||||
Subsystem: GravitonCondenser
|
||||
Name: #S_GRAVITON_CONDENSER
|
||||
Description: #S_GRAVITON_CONDENSER_DESC
|
||||
|
||||
BaseColor: #e45500
|
||||
TypeColor: #e45500
|
||||
Elevation: 2
|
||||
|
||||
Tags: BaseCost, Category:Equipment, HasInternals, ExteriorCore
|
||||
Tags: Ability:GravitonCondenser
|
||||
Hull: Flagship
|
||||
|
||||
Size := HexSize * Hexes
|
||||
Hex.Mass := HexSize
|
||||
|
||||
Hex.Resistance := 0.2
|
||||
Hex.HP := 18 * HexSize
|
||||
|
||||
StellarDamage := 4000000 * (Size / 100)
|
||||
PowerUse := 15 * Size
|
||||
|
||||
Requires:
|
||||
Command = 1
|
||||
Power = PowerUse
|
||||
|
||||
Module: Default
|
||||
Hex.BuildCost := 3.0 * Hex.BuildCost
|
||||
Hex.MaintainCost := 3.0 * Hex.MaintainCost
|
||||
|
||||
Module: Core
|
||||
Hex.BuildCost := 3.0 * Hex.BuildCost
|
||||
Hex.MaintainCost := 3.0 * Hex.MaintainCost
|
||||
Sprite: TractorGun::0 * #e45500
|
||||
DrawMode: 1
|
||||
@@ -0,0 +1,24 @@
|
||||
Subsystem: IonCannon
|
||||
Name: #S_ION_CANNON
|
||||
Description: #S_ION_CANNON_DESC
|
||||
BaseColor: #ff8d00
|
||||
TypeColor: #ff8d00
|
||||
Elevation: 3
|
||||
|
||||
Tags: BaseCost, Category:Equipment, HasInternals, ExteriorCore
|
||||
Tags: Ability:IonCannon
|
||||
Hull: Flagship
|
||||
|
||||
Size := HexSize * Hexes
|
||||
Hex.Mass := HexSize
|
||||
|
||||
Hex.Resistance := 0.2
|
||||
Hex.HP := 18 * HexSize
|
||||
|
||||
Duration := 300 * (Size / ShipSize * 5)
|
||||
|
||||
Requires:
|
||||
Command = 1
|
||||
|
||||
Module: Core
|
||||
Sprite: HexagonSubsystems::6 * #ff8d00
|
||||
@@ -0,0 +1,38 @@
|
||||
Subsystem: MiningLaser
|
||||
Name: #S_MINING_LASER
|
||||
Description: #S_MINING_LASER_DESC
|
||||
BaseColor: #a1692c
|
||||
TypeColor: #a1692c
|
||||
Elevation: 3
|
||||
|
||||
Tags: DefaultUnlock, ScaledCost, Category:Equipment, HasInternals, ExteriorCore, Rotatable, StaticMaintenance
|
||||
Tags: Ability:MineAsteroid, Ability:DropoffPoint, Ability:AutoMine
|
||||
Hull: Flagship
|
||||
|
||||
Size := HexSize * Hexes
|
||||
Hex.Mass := HexSize
|
||||
|
||||
CargoStorage := Size / 4
|
||||
MiningRate := Size / 20
|
||||
MiningLasers := 1
|
||||
|
||||
Hex.Resistance := 0.2
|
||||
Hex.HP := 18 * HexSize
|
||||
|
||||
Hex.LaborCost := 0.1 * HexSize
|
||||
Hex.BuildCost := 1.1 * HexSize
|
||||
Hex.MaintainCost := HexSize - (HexSize/ShipSize * 8 * ShipSize^0.5)
|
||||
|
||||
Hook: AddCargoStorage(CargoStorage)
|
||||
Hook: AddPermanentStatus(CanGiveCargo)
|
||||
|
||||
Assert: Sum.MiningLasers == 1
|
||||
Unique: True
|
||||
Message: #ERROR_ONLY_ONE
|
||||
|
||||
Requires:
|
||||
Command = 1
|
||||
|
||||
Module: Core
|
||||
Sprite: Laser::0 * #91692c
|
||||
DrawMode: 1
|
||||
@@ -0,0 +1,29 @@
|
||||
Subsystem: OreProcessor
|
||||
Name: #S_ORE_PROCESSOR
|
||||
Description: #S_ORE_PROCESSOR_DESC
|
||||
BaseColor: #8870ac
|
||||
TypeColor: #8870ac
|
||||
Elevation: 2
|
||||
|
||||
Tags: Category:Equipment, BaseCost, HasInternals, NoCore, NonContiguous
|
||||
Hull: Flagship, Station
|
||||
|
||||
Size := HexSize * Hexes
|
||||
|
||||
OreProcessRate := Size / 5
|
||||
LaborProcessRate := OreProcessRate / 25 * 60
|
||||
LaborStorage := LaborProcessRate * 5
|
||||
Hook: AddLaborStorage(LaborStorage)
|
||||
Hook: ProcessCargo(Ore, OreProcessRate, 25, AddStoredLabor(1, True))
|
||||
|
||||
CargoStorage := OreProcessRate
|
||||
Hook: AddCargoStorage(CargoStorage)
|
||||
Hook: AddPermanentStatus(CanTakeCargo)
|
||||
|
||||
Assert: Sum.LaborIncome > 0
|
||||
Message: #REQUIRE_CONSTRUCTION_BAY
|
||||
|
||||
Module: Default
|
||||
Sprite: SupportCommand * #8870ac
|
||||
|
||||
Hex.LaborCost := Hex.LaborCost * 2.0
|
||||
@@ -0,0 +1,44 @@
|
||||
Subsystem: SelfDestruct
|
||||
Name: S_SELF_DESTRUCT
|
||||
Description: S_SELF_DESTRUCT_DESC
|
||||
BaseColor: #ff0000
|
||||
TypeColor: #ff0000
|
||||
Picture: AntimatterReactor
|
||||
Elevation: 2
|
||||
|
||||
Tags: BaseCost
|
||||
Tags: Category:Equipment, Ability:SelfDestruct
|
||||
Tags: Weapon, IsExplosiveWeapon, HasInternals, NoAugment
|
||||
Hull: Flagship, Station
|
||||
|
||||
Size := HexSize * Hexes
|
||||
Damage := Size * 120
|
||||
Radius := ((ShipSize + Size)/2)^(1/2.5) * 50
|
||||
PowerUse := 10 * Size
|
||||
|
||||
Hex.Mass := HexSize
|
||||
|
||||
Hex.HP := 18 * HexSize
|
||||
Hex.Resistance := 0.2
|
||||
|
||||
Requires:
|
||||
Command = 1
|
||||
Power = PowerUse
|
||||
|
||||
Module: Default
|
||||
|
||||
Module: Core
|
||||
Hex.HP := Hex.HP * 2
|
||||
Hex.BuildCost := 5.0 * Hex.BuildCost
|
||||
Hex.Mass := 5.0 * Hex.Mass
|
||||
|
||||
Sprite: AntimatterReactor * #ff0000
|
||||
|
||||
Hex.DamageResist := ShipSize / 64.0
|
||||
Effect: DamageResist
|
||||
Resist = Hex.DamageResist
|
||||
|
||||
Effect: SelfDestruct
|
||||
Amount = Damage
|
||||
Radius = Radius
|
||||
Hits = 4
|
||||
@@ -0,0 +1,26 @@
|
||||
Subsystem: Simulator
|
||||
Name: #S_SIMULATOR
|
||||
Description: #S_SIMULATOR_DESC
|
||||
BaseColor: #f17757
|
||||
TypeColor: #f17757
|
||||
Elevation: 3
|
||||
|
||||
Tags: BaseCost, Category:Equipment, HasInternals
|
||||
Tags: HeraldsDLC
|
||||
Hull: Flagship
|
||||
|
||||
Size := HexSize * Hexes
|
||||
Hex.Mass := HexSize
|
||||
|
||||
Hex.Resistance := 0.2
|
||||
Hex.HP := 18 * HexSize
|
||||
|
||||
Rate := (Size / 60) * 2
|
||||
|
||||
Hook: ExperienceOverTime(Rate, True)
|
||||
|
||||
Requires:
|
||||
Command = 3
|
||||
|
||||
Module: Core
|
||||
Sprite: Simulator
|
||||
@@ -0,0 +1,24 @@
|
||||
Subsystem: SkipDrive
|
||||
Name: #S_SKIP_DRIVE
|
||||
Description: #S_SKIP_DRIVE_DESC
|
||||
BaseColor: #fff980
|
||||
TypeColor: #fff980
|
||||
Elevation: 3
|
||||
|
||||
Tags: BaseCost, Category:Equipment, HasInternals
|
||||
Tags: Ability:Blink
|
||||
Hull: Flagship
|
||||
|
||||
Size := HexSize * Hexes
|
||||
Hex.Mass := HexSize
|
||||
|
||||
Hex.Resistance := 0.2
|
||||
Hex.HP := 18 * HexSize
|
||||
|
||||
CostFactor := 0.08 / (Size / ShipSize)
|
||||
|
||||
Requires:
|
||||
Command = 1
|
||||
|
||||
Module: Core
|
||||
Sprite: HexagonSubsystems::10 * #fff980
|
||||
@@ -0,0 +1,30 @@
|
||||
Subsystem: TractorBeam
|
||||
Name: #S_TRACTOR_BEAM
|
||||
Description: #S_TRACTOR_BEAM_DESC
|
||||
BaseColor: #8bb800
|
||||
TypeColor: #8bb800
|
||||
Elevation: 2
|
||||
|
||||
Tags: BaseCost, Category:Equipment, HasInternals, ExteriorCore
|
||||
Tags: DefaultUnlock, Ability:TractorBeam
|
||||
Hull: Flagship
|
||||
|
||||
Size := HexSize * Hexes
|
||||
Hex.Mass := HexSize
|
||||
|
||||
Hex.Resistance := 0.2
|
||||
Hex.HP := 18 * HexSize
|
||||
|
||||
Assert: Size / ShipSize > 0.33
|
||||
Message: #ERROR_TOO_SMALL
|
||||
|
||||
Requires:
|
||||
Command = 1
|
||||
|
||||
Module: Default
|
||||
Hex.BuildCost := 3.0 * Hex.BuildCost
|
||||
|
||||
Module: Core
|
||||
Hex.BuildCost := 3.0 * Hex.BuildCost
|
||||
Sprite: TractorGun::0 * #8bb800
|
||||
DrawMode: 1
|
||||
@@ -0,0 +1,45 @@
|
||||
Subsystem: TroopPods
|
||||
Name: #S_TROOPPODS
|
||||
Description: #S_TROOPPODS_DESC
|
||||
BaseColor: #dd3b4e
|
||||
TypeColor: #dd3b4e
|
||||
Elevation: 2
|
||||
|
||||
Tags: HeraldsDLC
|
||||
Tags: Category:Equipment, Troops, NonContiguous, NoCore
|
||||
Tags: Ability:TroopPods
|
||||
Tags: HasInternals
|
||||
Hull: Flagship, Station
|
||||
|
||||
Hex.LaborCost := 0.10 * HexSize + 0.8
|
||||
Hex.BuildCost := 2.0 * HexSize + 2
|
||||
Hex.MaintainCost := 3 * HexSize + 5 - (4 * HexSize / ShipSize^0.5)
|
||||
|
||||
Size := HexSize * Hexes
|
||||
Hex.Mass := HexSize
|
||||
|
||||
MaxLoyalty := floor(Size / 9)
|
||||
Duration := 2 * ceil(MaxLoyalty / 10) * 60
|
||||
|
||||
TroopCost := 50.0 * MaxLoyalty
|
||||
TroopLabor := 2.0 * MaxLoyalty
|
||||
TroopStorage := 1
|
||||
|
||||
Hex.HP := 18 * HexSize
|
||||
Hex.Resistance := 0.2
|
||||
|
||||
Hook: OnEnable(AddStatus(Troops))
|
||||
Hook: LimitStatusStacks(Troops, TroopStorage)
|
||||
|
||||
Requires:
|
||||
Command = ceil(Hexes * 0.6)
|
||||
|
||||
Assert: MaxLoyalty >= 1
|
||||
Unique: True
|
||||
Message: #ERROR_TOO_SMALL
|
||||
|
||||
Module: Default
|
||||
Hex.BuildCost := Hex.BuildCost + (TroopCost / Hexes)
|
||||
Hex.LaborCost := Hex.LaborCost + (TroopLabor / Hexes)
|
||||
|
||||
Sprite: TroopPods
|
||||
Reference in New Issue
Block a user