Space Engineers

Space Engineers

S Guns Rocket Launcher
BlackRedDead 8 Sep, 2015 @ 11:38am
Updated Code
  • adds 3 missing files
  • full code for easy c&p
  • doubles some balancing related values
  • request permission to use this in 2-3 planned packs with real balancing effort ;-)
(added you for this and maybe other possibilitys ;-)

Update 2:
Updated Code&Suggestion Below

[Suggestion]
could you make a real sight?
i played around with the texture and made one with a transparent "red glass" for the sight - so could you make the model so that it addapts it? (look at transparent concept block mod {Dx11 Version} ;-)

also increase the diameter of the tube/barrel about ~20% (10% increased radius)
(the rocket is bigger than the weapon xD)

"outdated - new smaller rocket model"

[Code]
AmmoMagazines.sbc
<?xml version="1.0"?> <Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <AmmoMagazines> <AmmoMagazine> <Id> <TypeId>AmmoMagazine</TypeId> <SubtypeId>RLMissile</SubtypeId> </Id> <DisplayName>Rocket Launcher Missile</DisplayName> <Icon>Textures\GUI\Icons\ammo\RocketLauncherSmall_Rocket.dds</Icon> <Size> <X>1.2</X> <Y>0.2</Y> <Z>0.2</Z> </Size> <Mass>30</Mass><!-- 45 --> <Volume>40</Volume><!-- 60 --> <Model>Models\Weapons\Projectile_Hand_RL-Missile.mwm</Model> <Capacity>1</Capacity> <AmmoDefinitionId Subtype="RocketLauncherMissile" /> </AmmoMagazine> </AmmoMagazines> </Definitions>

Ammo.sbc
<?xml version="1.0"?> <Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Ammos> <Ammo xsi:type="MyObjectBuilder_MissileAmmoDefinition"> <Id> <TypeId>AmmoDefinition</TypeId> <SubtypeId>RocketLauncherMissile</SubtypeId> </Id> <BasicProperties> <DesiredSpeed>800</DesiredSpeed><!-- 700 --> <SpeedVariance>0</SpeedVariance> <MaxTrajectory>800</MaxTrajectory> <IsExplosive>true</IsExplosive> <BackkickForce>470</BackkickForce><!-- 700 --> </BasicProperties> <MissileProperties> <MissileMass>30</MissileMass><!-- 45 --> <MissileExplosionRadius>3</MissileExplosionRadius><!-- 4 --> <MissileModelName>Models\Weapons\Projectile_Hand_RL-Missile.mwm</MissileModelName> <MissileAcceleration>500</MissileAcceleration><!-- 600 --> <MissileInitialSpeed>100</MissileInitialSpeed> <MissileSkipAcceleration>false</MissileSkipAcceleration> <MissileExplosionDamage>350</MissileExplosionDamage><!-- 500 --> </MissileProperties> </Ammo> </Ammos> </Definitions>

BlockCategories.sbc
<?xml version="1.0" encoding="utf-8"?> <Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <CategoryClasses> <Category xsi:type="MyObjectBuilder_GuiBlockCategoryDefinition"> <Id> <TypeId>GuiBlockCategoryDefinition</TypeId> <SubtypeId/> </Id> <DisplayName>DisplayName_Category_CharacterTools</DisplayName> <Name>CharacterTools</Name> <SearchBlocks>false</SearchBlocks> <ItemIds> <string>RocketLauncherItem</string> </ItemIds> </Category> </CategoryClasses> </Definitions>

BlueprintClasses.sbc
<?xml version="1.0"?> <Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <BlueprintClassEntries> <Entry Class="Components" BlueprintSubtypeId="RLMissile" /> <Entry Class="Ammo" BlueprintSubtypeId="RLMissile" /> <Entry Class="Tools" BlueprintSubtypeId="RocketLauncher" /> </BlueprintClassEntries> </Definitions>

Blueprints.sbc
<?xml version="1.0"?> <Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Blueprints> <Blueprint> <Id> <TypeId>BlueprintDefinition</TypeId> <SubtypeId>RocketLauncher</SubtypeId> </Id> <DisplayName>Rocket Launcher</DisplayName> <Icon>Textures\GUI\Icons\rocketlauncher.dds</Icon> <Prerequisites> <Item Amount="6" TypeId="Ingot" SubtypeId="Iron" /> <Item Amount="2" TypeId="Ingot" SubtypeId="Nickel" /> <Item Amount="2" TypeId="Ingot" SubtypeId="Silicon" /> </Prerequisites> <Result Amount="1" TypeId="PhysicalGunObject" SubtypeId="RocketLauncherItem" /> <BaseProductionTimeInSeconds>10</BaseProductionTimeInSeconds> </Blueprint> <Blueprint> <Id> <TypeId>BlueprintDefinition</TypeId> <SubtypeId>RocketLauncherLMissile</SubtypeId> </Id> <DisplayName>Rocket Launcher Missile</DisplayName> <Icon>Textures\GUI\Icons\ammo\RocketLauncherSmall_Rocket.dds</Icon> <Prerequisites> <Item Amount="36.6" TypeId="Ingot" SubtypeId="Iron" /> <Item Amount="4.6" TypeId="Ingot" SubtypeId="Nickel" /> <Item Amount="0.13" TypeId="Ingot" SubtypeId="Silicon" /> <Item Amount="0.06" TypeId="Ingot" SubtypeId="Uranium" /> <Item Amount="0.026" TypeId="Ingot" SubtypeId="Platinum" /> <Item Amount="0.8" TypeId="Ingot" SubtypeId="Magnesium" /> </Prerequisites> <Result Amount="1" TypeId="AmmoMagazine" SubtypeId="RLMissile" /> <BaseProductionTimeInSeconds>10</BaseProductionTimeInSeconds> </Blueprint> </Blueprints> </Definitions>

HandItems.sbc
<?xml version="1.0"?> <Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <HandItems> <HandItem> <Id> <TypeId>MyObjectBuilder_AutomaticRifle</TypeId> <SubtypeId>RocketLauncher</SubtypeId> </Id> <LeftHandOrientation> <X>0.650943041</X> <Y>-0.5748888</Y> <Z>0.37158832</Z> <W>0.328173965</W> </LeftHandOrientation> <LeftHandPosition> <X>-0.0472789332</X> <Y>-0.0986197</Y> <Z>0.02958548</Z> </LeftHandPosition> <RightHandOrientation> <X>0.5127417</X> <Y>0.5127415</Y> <Z>0.486925066</Z> <W>-0.486925125</W> </RightHandOrientation> <RightHandPosition> <X>0.008732129</X> <Y>-0.0582269281</Y> <Z>0.171104714</Z> </RightHandPosition> <ItemOrientation> <X>0</X> <Y>0</Y> <Z>0</Z> <W>1</W> </ItemOrientation> <ItemPosition> <X>0.0936874151</X> <Y>-0.08382714</Y> <Z>-0.22</Z> </ItemPosition> <ItemWalkingOrientation> <X>0.03635861</X> <Y>-0.07427699</Y> <Z>0.0164107047</Z> <W>0.9964395</W> </ItemWalkingOrientation> <ItemWalkingPosition> <X>0.14792788</X> <Y>-0.0542416573</Y> <Z>-0.10355103</Z> </ItemWalkingPosition> <BlendTime>1</BlendTime> <XAmplitudeOffset>-0.455334216</XAmplitudeOffset> <YAmplitudeOffset>0.06504716</YAmplitudeOffset> <ZAmplitudeOffset>-1.61173737</ZAmplitudeOffset> <XAmplitudeScale>0.104075037</XAmplitudeScale> <YAmplitudeScale>0.219715342</YAmplitudeScale> <ZAmplitudeScale>0</ZAmplitudeScale> <RunMultiplier>3.22636747</RunMultiplier> <ItemWalkingOrientation3rd> <X>0.120745391</X> <Y>0.04014123</Y> <Z>0.01575381</Z> <W>0.9917465</W> </ItemWalkingOrientation3rd> <ItemWalkingPosition3rd> <X>0.14792788</X> <Y>0.0295847654</Y> <Z>-0.13806808</Z> </ItemWalkingPosition3rd> <AmplitudeMultiplier3rd>1.21696043</AmplitudeMultiplier3rd> <ItemOrientation3rd> <X>0.127060741</X> <Y>0.141615316</Y> <Z>-0.0885914341</Z> <W>0.977728069</W> </ItemOrientation3rd> <ItemPosition3rd> <X>0.0493093729</X> <Y>-0.1429987</Y> <Z>-0.207101285</Z> </ItemPosition3rd> <FingersAnimation>HoldingWeapon</FingersAnimation> <ItemShootOrientation> <X>0</X> <Y>0</Y> <Z>0</Z> <W>1</W> </ItemShootOrientation> <ItemShootPosition> <X>0.036136236</X> <Y>-0.137324154</Y> <Z>-0.22</Z> </ItemShootPosition> <ItemShootOrientation3rd> <X>0</X> <Y>0</Y> <Z>0</Z> <W>1</W> </ItemShootOrientation3rd> <ItemShootPosition3rd> <X>0.036136236</X> <Y>-0.137324154</Y> <Z>-0.22</Z> </ItemShootPosition3rd> <ShootBlend>0</ShootBlend> <MuzzlePosition> <X>0</X> <Y>0.08</Y> <Z>-0.84</Z><!-- -0.44/-0.84 --> </MuzzlePosition> <ShootScatter> <X>0</X> <Y>0</Y> <Z>0</Z> </ShootScatter> <ScatterSpeed>0</ScatterSpeed> <PhysicalItemId> <TypeId>MyObjectBuilder_PhysicalGunObject</TypeId> <SubtypeId>RocketLauncherItem</SubtypeId> </PhysicalItemId> <LightColor> <X>0</X> <Y>0</Y> <Z>0</Z> <W>0</W> </LightColor> <LightFalloff>0</LightFalloff> <LightRadius>0</LightRadius> <LightGlareSize>0</LightGlareSize> <LightIntensityLower>0</LightIntensityLower> <LightIntensityUpper>0</LightIntensityUpper> <ShakeAmountTarget>0</ShakeAmountTarget> <ShakeAmountNoTarget>0</ShakeAmountNoTarget> </HandItem> </HandItems> </Definitions>

PhysicalItems.sbc
<?xml version="1.0"?> <Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <PhysicalItems> <PhysicalItem xsi:type="MyObjectBuilder_WeaponItemDefinition"> <Id> <TypeId>PhysicalGunObject</TypeId> <SubtypeId>RocketLauncherItem</SubtypeId> </Id> <DisplayName>Rocket Launcher</DisplayName> <Icon>Textures\GUI\Icons\rocketlauncher.dds</Icon> <Size> <X>1.6</X> <Y>0.48</Y> <Z>0.16</Z> </Size> <Mass>6</Mass> <Volume>28</Volume> <Model>Models\Weapons\rocketlauncher.mwm</Model> <WeaponDefinitionId Subtype="RocketLauncher" /> </PhysicalItem> </PhysicalItems> </Definitions>

WeaponsGuns.sbc
<?xml version="1.0"?> <Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Weapons> <Weapon> <Id> <TypeId>WeaponDefinition</TypeId> <SubtypeId>RocketLauncher</SubtypeId> </Id> <MissileAmmoData RateOfFire="60" ShootSoundName="WepShipSmallMissileShot" /> <NoAmmoSoundName>WepPlayRifleNoAmmo</NoAmmoSoundName> <DeviateShotAngle>0.2</DeviateShotAngle> <ReleaseTimeAfterFire>250</ReleaseTimeAfterFire> <MuzzleFlashLifeSpan>40</MuzzleFlashLifeSpan> <AmmoMagazines> <AmmoMagazine Subtype="RLMissile" /> </AmmoMagazines> </Weapon> </Weapons> </Definitions>
Last edited by BlackRedDead; 6 Oct, 2015 @ 1:20am