Skip to content

Laser shelling#4473

Open
Haecriver wants to merge 4 commits intoCombatExtended-Continued:Developmentfrom
Haecriver:features/laser-shelling
Open

Laser shelling#4473
Haecriver wants to merge 4 commits intoCombatExtended-Continued:Developmentfrom
Haecriver:features/laser-shelling

Conversation

@Haecriver
Copy link
Copy Markdown
Contributor

@Haecriver Haecriver commented Feb 23, 2026

Additions

Describe new functionality added by your code, e.g.

  • Laser projectiles can be used as mortar
  • Fix binoculars

Changes

Describe adjustments to existing features made in this merge, e.g.

  • Improve the C# property ProjectileProps in Building_TurretGunCE
  • Make laser able to flyOverhead (that is to mean they can be shot above roofs)

References

Links to the associated issues or other related pull requests, e.g.

  • Closes #[ISSUE_NUMBER]
  • Contributes towards #[ISSUE_NUMBER]

Testing

Check tests you have performed:

  • Compiles without warnings
  • Game runs without errors
  • Playtested

You can add these defs to try it :

<Defs>
    <CombatExtended.AmmoSetDef>
        <defName>AmmoSet_Laser_Mortar</defName>
        <label>test</label>
        <ammoTypes>
            <Shell_HighExplosive>Laser_Turret_Mortar_Bullet</Shell_HighExplosive>
        </ammoTypes>
    </CombatExtended.AmmoSetDef>

    <ThingDef Class="CombatExtended.Lasers.LaserBeamDefCE" ParentName="LaserBulletRed">
        <defName>Laser_Turret_Mortar_Bullet</defName>
        <label>Anticraft caster beam</label>
        <projectile Class="CombatExtended.ProjectilePropertiesCE">
            <flyOverhead>true</flyOverhead>
            <beamStartOffset>1.25</beamStartOffset>
            <armorPenetrationBase>0.5</armorPenetrationBase>
            <damageDef>BeamBypassShields</damageDef>
			<damageAmountBase>10</damageAmountBase>
            <shellingProps>
                <tilesPerTick>99999</tilesPerTick>
                <range>36</range>                <!-- based on VanillaGravshipExpanded.CompProperties_WorldArtillery.worldMapAttackRange -->
                <damage>0.05</damage>
            </shellingProps>
        </projectile>
    </ThingDef>

    <ThingDef ParentName="BaseArtilleryBuilding">
        <defName>Laser_Turret_Mortar</defName>
        <label>laser mortar</label>
        <description>test.</description>
        <costListForDifficulty>
            <difficultyVar>classicMortars</difficultyVar>
            <invert>true</invert>
            <costList>
                <ComponentIndustrial>6</ComponentIndustrial>
                <ReinforcedBarrel>1</ReinforcedBarrel>
            </costList>
            <costStuffCount>50</costStuffCount>
        </costListForDifficulty>
        <designationHotKey>Misc4</designationHotKey>
        <terrainAffordanceNeeded>Heavy</terrainAffordanceNeeded>
        <building>
            <turretGunDef>Laser_Turret_Mortar_Gun</turretGunDef>
            <buildingTags>
                <li>Artillery_BaseDestroyer</li>
                <li>Artillery_MannedMortar</li>
            </buildingTags>
        </building>
        <uiIconPath>Things/Building/Security/TurretMortar_MenuIcon</uiIconPath>
        <uiIconScale>0.9</uiIconScale>
    </ThingDef>

    <ThingDef ParentName="BaseArtilleryWeapon">
        <defName>Laser_Turret_Mortar_Gun</defName>
        <label>laser mortar</label>
        <description>Test</description>
        <recoilPower>3</recoilPower>
        <graphicData>
            <texPath>Things/Building/Security/TurretMortar_Top</texPath>
        </graphicData>
        <weaponTags>
            <li>Artillery_BaseDestroyer</li>
        </weaponTags>
        <statBases>
			<RangedWeapon_Cooldown>1.00</RangedWeapon_Cooldown>
			<SightsEfficiency>1.00</SightsEfficiency>
			<ShotSpread>0</ShotSpread>
			<SwayFactor>0</SwayFactor>
		</statBases>
        <verbs>
            <li Class="CombatExtended.VerbPropertiesCE">
                <verbClass>CombatExtended.Verb_ShootMortarCE</verbClass>
                <forceNormalTimeSpeed>false</forceNormalTimeSpeed>
                <hasStandardCommand>true</hasStandardCommand>
                <defaultProjectile>Laser_Turret_Mortar_Bullet</defaultProjectile>
                <warmupTime>5.5</warmupTime>
                <minRange>32</minRange>
                <range>700</range>
                <burstShotCount>5</burstShotCount>
                <soundCast>Mortar_LaunchA</soundCast>
                <targetParams>
                    <canTargetLocations>true</canTargetLocations>
                </targetParams>
            </li>
        </verbs>
        <building>
            <fixedStorageSettings>
                <filter>
                    <categories>
                        <li>MortarShells</li>
                    </categories>
                </filter>
            </fixedStorageSettings>
            <defaultStorageSettings>
                <filter>
                    <categories>
                        <li>MortarShells</li>
                    </categories>
                    <disallowedThingDefs>
                        <li>Shell_Firefoam</li>
                        <li>Shell_AntigrainWarhead</li>
                    </disallowedThingDefs>
                </filter>
            </defaultStorageSettings>
        </building>
    </ThingDef>

</Defs>

@Haecriver Haecriver changed the title Features/laser shelling Laser shelling Feb 23, 2026
@Haecriver Haecriver marked this pull request as ready for review February 23, 2026 17:32
@Haecriver Haecriver requested review from a team as code owners February 23, 2026 17:32
@github-actions
Copy link
Copy Markdown

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-22317426708.zip

@github-actions github-actions bot added the Download in Comments This PR has a zipfile download available. label Feb 23, 2026
@Haecriver
Copy link
Copy Markdown
Contributor Author

Haecriver commented Feb 23, 2026

Savegame to test it quickly

CE Laser test.zip

YOU NEED TO ADD THE XML DEFS TO MAKE IT WORK :

<Defs>
    <CombatExtended.AmmoSetDef>
        <defName>AmmoSet_Laser_Mortar</defName>
        <label>test</label>
        <ammoTypes>
            <Shell_HighExplosive>Laser_Turret_Mortar_Bullet</Shell_HighExplosive>
        </ammoTypes>
    </CombatExtended.AmmoSetDef>

    <ThingDef Class="CombatExtended.Lasers.LaserBeamDefCE" ParentName="LaserBulletRed">
        <defName>Laser_Turret_Mortar_Bullet</defName>
        <label>Anticraft caster beam</label>
        <projectile Class="CombatExtended.ProjectilePropertiesCE">
            <flyOverhead>true</flyOverhead>
            <beamStartOffset>1.25</beamStartOffset>
            <armorPenetrationBase>0.5</armorPenetrationBase>
            <damageDef>BeamBypassShields</damageDef>
			<damageAmountBase>10</damageAmountBase>
            <shellingProps>
                <tilesPerTick>99999</tilesPerTick>
                <range>36</range>                <!-- based on VanillaGravshipExpanded.CompProperties_WorldArtillery.worldMapAttackRange -->
                <damage>0.05</damage>
            </shellingProps>
        </projectile>
    </ThingDef>

    <ThingDef ParentName="BaseArtilleryBuilding">
        <defName>Laser_Turret_Mortar</defName>
        <label>laser mortar</label>
        <description>test.</description>
        <costListForDifficulty>
            <difficultyVar>classicMortars</difficultyVar>
            <invert>true</invert>
            <costList>
                <ComponentIndustrial>6</ComponentIndustrial>
                <ReinforcedBarrel>1</ReinforcedBarrel>
            </costList>
            <costStuffCount>50</costStuffCount>
        </costListForDifficulty>
        <designationHotKey>Misc4</designationHotKey>
        <terrainAffordanceNeeded>Heavy</terrainAffordanceNeeded>
        <building>
            <turretGunDef>Laser_Turret_Mortar_Gun</turretGunDef>
            <buildingTags>
                <li>Artillery_BaseDestroyer</li>
                <li>Artillery_MannedMortar</li>
            </buildingTags>
        </building>
        <uiIconPath>Things/Building/Security/TurretMortar_MenuIcon</uiIconPath>
        <uiIconScale>0.9</uiIconScale>
    </ThingDef>

    <ThingDef ParentName="BaseArtilleryWeapon">
        <defName>Laser_Turret_Mortar_Gun</defName>
        <label>laser mortar</label>
        <description>Test</description>
        <recoilPower>3</recoilPower>
        <graphicData>
            <texPath>Things/Building/Security/TurretMortar_Top</texPath>
        </graphicData>
        <weaponTags>
            <li>Artillery_BaseDestroyer</li>
        </weaponTags>
        <statBases>
			<RangedWeapon_Cooldown>1.00</RangedWeapon_Cooldown>
			<SightsEfficiency>1.00</SightsEfficiency>
			<ShotSpread>0</ShotSpread>
			<SwayFactor>0</SwayFactor>
		</statBases>
        <verbs>
            <li Class="CombatExtended.VerbPropertiesCE">
                <verbClass>CombatExtended.Verb_ShootMortarCE</verbClass>
                <forceNormalTimeSpeed>false</forceNormalTimeSpeed>
                <hasStandardCommand>true</hasStandardCommand>
                <defaultProjectile>Laser_Turret_Mortar_Bullet</defaultProjectile>
                <warmupTime>5.5</warmupTime>
                <minRange>32</minRange>
                <range>700</range>
                <burstShotCount>5</burstShotCount>
                <soundCast>Mortar_LaunchA</soundCast>
                <targetParams>
                    <canTargetLocations>true</canTargetLocations>
                </targetParams>
            </li>
        </verbs>
        <building>
            <fixedStorageSettings>
                <filter>
                    <categories>
                        <li>MortarShells</li>
                    </categories>
                </filter>
            </fixedStorageSettings>
            <defaultStorageSettings>
                <filter>
                    <categories>
                        <li>MortarShells</li>
                    </categories>
                    <disallowedThingDefs>
                        <li>Shell_Firefoam</li>
                        <li>Shell_AntigrainWarhead</li>
                    </disallowedThingDefs>
                </filter>
            </defaultStorageSettings>
        </building>
    </ThingDef>

</Defs>

@github-actions
Copy link
Copy Markdown

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-22318426885.zip

@github-actions
Copy link
Copy Markdown

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-22318652724.zip

@Haecriver Haecriver force-pushed the features/laser-shelling branch from 9ff461b to 2ec8633 Compare March 2, 2026 16:45
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 2, 2026

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-22586024403.zip

@Haecriver Haecriver force-pushed the features/laser-shelling branch from 2ec8633 to f7da12d Compare March 21, 2026 14:24
@github-actions
Copy link
Copy Markdown

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-23381662468.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Download in Comments This PR has a zipfile download available.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant