PDA

View Full Version : [Tweaking] How to build a sticky bomb


FatJoeM
21 Mar 2007, 11:29
The sticky bomb was available in W3D, but unfortunately it is not available in W4.

I am trying to rebuild the Sticky Bomb by tweaking the Grenade:
For a beginning, I can set the Grenade to detonate on impact with everything. This way it will detonate at the exact same location a Sticky Bomb would have. What I further want to do is setting a delay between the impact and the detonation, such that the grenade will stop flying when it touches anything and will detonate at that position three seconds later.

Can this be achieved by tweaking?

Good Ork
23 Mar 2007, 03:23
Dont see why not :) :)

robowurmz
23 Mar 2007, 07:10
If there was a way to increase the grenade's friction, it may well be possible. Have a look around for anything friction-related, and remember that it could be in Tweak.xml instead of WeapTwk.xml.

However, if there IS a friction option:

Set the friction really high, and the grenade shouldn't be able to move from that position, so you could have it blow up on timer instead.

_Kilburn
23 Mar 2007, 15:17
I think this should work well:


<?xml version='1.0' ?>
<xomArchive>
<xomObjects>
<XDataBank id='id-0'>
<Section>0</Section>
...
<ContainerResources href='kWeaponGrenade'/>
<ContainerResources href='kWeaponStuckGrenade'/>
...
<XContainerResourceDetails id='kWeaponGrenade'>
<Value href='kWeaponGrenade-0'/>
<Name>kWeaponGrenade</Name>
<Flags>81</Flags>
</XContainerResourceDetails>
<PayloadWeaponPropertiesContainer id='kWeaponGrenade-0'>
...
<DetonatesOnLandImpact>true</DetonatesOnLandImpact>
<DetonatesOnExpiry>false</DetonatesOnExpiry>
<DetonatesOnObjectImpact>true</DetonatesOnObjectImpact>
<DetonatesOnWormImpact>true</DetonatesOnWormImpact>
...
<WormDamageMagnitude>0</WormDamageMagnitude>
<ImpulseMagnitude>0</ImpulseMagnitude>
<WormDamageRadius>0</WormDamageRadius>
<LandDamageRadius>0</LandDamageRadius>
...
<NumBomblets>1</NumBomblets>
<BombletMaxConeAngle>0</BombletMaxConeAngle>
<BombletMaxSpeed>0</BombletMaxSpeed>
<BombletMinSpeed>0</BombletMinSpeed>
<BombletWeaponName>kWeaponGrenadeStuck</BombletWeaponName>
<FxLocator>grenade</FxLocator>
<ArielFx></ArielFx>
<DetonationFx></DetonationFx>
<DetonationSfx></DetonationSfx>
<ExpiryFx></ExpiryFx>
...
</PayloadWeaponPropertiesContainer>


Then, insert this code before <XContainerResourceDetails id='kWeaponHomingMissile'>, just after the </PayloadWeaponPropertiesContainer> closing the grenade weapon container.


<XContainerResourceDetails id='kWeaponGrenadeStuck'>
<Value href='kWeaponGrenadeStuck-0'/>
<Name>kWeaponGrenadeStuck</Name>
<Flags>81</Flags>
</XContainerResourceDetails>
<PayloadWeaponPropertiesContainer id='kWeaponGrenadeStuck-0'>
<IsAimedWeapon>true</IsAimedWeapon>
<IsPoweredWeapon>true</IsPoweredWeapon>
<IsTargetingWeapon>false</IsTargetingWeapon>
<IsControlledBomber>false</IsControlledBomber>
<IsBomberWeapon>false</IsBomberWeapon>
<IsDirectionalWeapon>true</IsDirectionalWeapon>
<IsHoming>false</IsHoming>
<IsLowGravity>true</IsLowGravity>
<IsLaunchedFromWorm>true</IsLaunchedFromWorm>
<HasAdjustableFuse>true</HasAdjustableFuse>
<HasAdjustableBounce>true</HasAdjustableBounce>
<HasAdjustableHerd>false</HasAdjustableHerd>
<IsAffectedByGravity>false</IsAffectedByGravity>
<IsAffectedByWind>false</IsAffectedByWind>
<EndTurnImmediate>true</EndTurnImmediate>
<ColliderFlags>0</ColliderFlags>
<CameraId>PayloadTrackCamera</CameraId>
<PayloadGraphicsResourceID>Grenade.Payload</PayloadGraphicsResourceID>
<Payload2ndGraphicsResourceID></Payload2ndGraphicsResourceID>
<Scale>1</Scale>
<Radius>3</Radius>
<AnimTravel></AnimTravel>
<AnimSmallJump></AnimSmallJump>
<AnimBigJump></AnimBigJump>
<AnimArm></AnimArm>
<AnimSplashdown></AnimSplashdown>
<AnimSink></AnimSink>
<AnimIntermediate></AnimIntermediate>
<AnimImpact></AnimImpact>
<DirectionBlend>0.4</DirectionBlend>
<FuseTimerGraphicOffset>8</FuseTimerGraphicOffset>
<FuseTimerScale>8</FuseTimerScale>
<BasePower>0.125</BasePower>
<MaxPower>0.525</MaxPower>
<MinTerminalVelocity>0</MinTerminalVelocity>
<MaxTerminalVelocity>0</MaxTerminalVelocity>
<LogicalLaunchZOffset>0</LogicalLaunchZOffset>
<LogicalLaunchYOffset>0</LogicalLaunchYOffset>
<OrientationOption>1</OrientationOption>
<SpinSpeed>0.1</SpinSpeed>
<InterPayloadDelay>0</InterPayloadDelay>
<MinAimAngle>-1.57</MinAimAngle>
<MaxAimAngle>1.57</MaxAimAngle>
<DetonatesOnLandImpact>false</DetonatesOnLandImpact>
<DetonatesOnExpiry>true</DetonatesOnExpiry>
<DetonatesOnObjectImpact>false</DetonatesOnObjectImpact>
<DetonatesOnWormImpact>false</DetonatesOnWormImpact>
<DetonatesAtRest>false</DetonatesAtRest>
<DetonatesOnFirePress>false</DetonatesOnFirePress>
<DetonatesWhenCantJump>false</DetonatesWhenCantJump>
<DetonateMultiEffect>1</DetonateMultiEffect>
<WormCollideResponse>0</WormCollideResponse>
<WormDamageMagnitude>55</WormDamageMagnitude>
<ImpulseMagnitude>0.28</ImpulseMagnitude>
<WormDamageRadius>75</WormDamageRadius>
<LandDamageRadius>46</LandDamageRadius>
<ImpulseRadius>110</ImpulseRadius>
<ImpulseOffset>-45</ImpulseOffset>
<Mass>0</Mass>
<WormImpactDamage>0</WormImpactDamage>
<MaxPowerUp>0</MaxPowerUp>
<TangentialMinBounceDamping>0.7</TangentialMinBounceDamping>
<ParallelMinBounceDamping>0.35</ParallelMinBounceDamping>
<TangentialMaxBounceDamping>0.8</TangentialMaxBounceDamping>
<ParallelMaxBounceDamping>0.8</ParallelMaxBounceDamping>
<SkimsOnWater>true</SkimsOnWater>
<MinSpeedForSkim>0.2</MinSpeedForSkim>
<MaxAngleForSkim>-0.4</MaxAngleForSkim>
<SkimDamping x='0.75' y='-0.75' z='0.75' />
<SinkDepth>6</SinkDepth>
<NumStrikeBombs>0</NumStrikeBombs>
<NumBomblets>0</NumBomblets>
<BombletMaxConeAngle>0</BombletMaxConeAngle>
<BombletMaxSpeed>0</BombletMaxSpeed>
<BombletMinSpeed>0</BombletMinSpeed>
<BombletWeaponName></BombletWeaponName>
<FxLocator>grenade</FxLocator>
<ArielFx></ArielFx>
<DetonationFx>WXP_ExplosionX_Med</DetonationFx>
<DetonationSfx>ExplosionRegular</DetonationSfx>
<ExpiryFx></ExpiryFx>
<SplashFx>WXP_WaterSplash</SplashFx>
<SplishFx>WXP_WaterSmallSplash</SplishFx>
<SinkingFx>WXP_UnderWaterBubbles</SinkingFx>
<BounceFx>WXP_Poof_VFast</BounceFx>
<StopFxAtRest>true</StopFxAtRest>
<BounceSfx></BounceSfx>
<PreDetonationSfx></PreDetonationSfx>
<ArmSfx1Shot></ArmSfx1Shot>
<ArmSfxLoop></ArmSfxLoop>
<LaunchSfx>Throw</LaunchSfx>
<LoopSfx></LoopSfx>
<BigJumpSfx></BigJumpSfx>
<WalkSfx></WalkSfx>
<TrailBitmap></TrailBitmap>
<TrailLocator1></TrailLocator1>
<TrailLocator2></TrailLocator2>
<TrailLength>0</TrailLength>
<AttachedMesh></AttachedMesh>
<AttachedMeshScale>0</AttachedMeshScale>
<StartsArmed>true</StartsArmed>
<ArmOnImpact>false</ArmOnImpact>
<ArmingCourtesyTime>0</ArmingCourtesyTime>
<PreDetonationTime>0</PreDetonationTime>
<ArmingRadius>0</ArmingRadius>
<LifeTime>6000</LifeTime>
<IsFuseDisplayed>true</IsFuseDisplayed>
<DisplayName>Text.kWeaponGrenade</DisplayName>
<WeaponGraphicsResourceID>Grenade.Weapon</WeaponGraphicsResourceID>
<WeaponType>4</WeaponType>
<DefaultPreference>0</DefaultPreference>
<CurrentPreference>0</CurrentPreference>
<LaunchDelay>80</LaunchDelay>
<PostLaunchDelay>500</PostLaunchDelay>
<FirstPersonOffset x='1' y='-0.2' z='0' />
<FirstPersonScale x='0' y='0' z='0' />
<FirstPersonFiringParticleEffect></FirstPersonFiringParticleEffect>
<HoldParticleFX></HoldParticleFX>
<DisplayInFirstPerson>true</DisplayInFirstPerson>
<CanBeFiredWhenWormMoving>false</CanBeFiredWhenWormMoving>
<RumbleLight>10</RumbleLight>
<RumbleHeavy>0</RumbleHeavy>
<CanBeUsedWhenTailNailed>true</CanBeUsedWhenTailNailed>
<RetreatTimeOverride>-1</RetreatTimeOverride>
<WXAnimDraw>DrawThrown</WXAnimDraw>
<WXAnimAim>AimGrenade</WXAnimAim>
<WXAnimFire>FireThrown</WXAnimFire>
<WXAnimHolding>HoldThrown</WXAnimHolding>
<WXAnimEndFire></WXAnimEndFire>
<WXAnimTaunt>TauntThrown</WXAnimTaunt>
<WXAnimTargetSelected></WXAnimTargetSelected>
</PayloadWeaponPropertiesContainer>

I have not tried it yet, but I think it should work. ;) The grenade does a "silent explosion" when it hits something, and clusters into an identical grenade that isn't affected by gravity. It should give a sticky grenade effect.

Killaz
25 Mar 2007, 10:57
I think this should work well:
<snip>
I have not tried it yet, but I think it should work. ;) The grenade does a "silent explosion" when it hits something, and clusters into an identical grenade that isn't affected by gravity. It should give a sticky grenade effect.


erm,where do i exactly put this in weaptwk.xml ?

FatJoeM
26 Mar 2007, 16:57
I think this should work well:

...

I have not tried it yet, but I think it should work. ;) The grenade does a "silent explosion" when it hits something, and clusters into an identical grenade that isn't affected by gravity. It should give a sticky grenade effect.

Learned something. Thank you.