Making a Destroyable Object Into a Non-Destroyable Object
Posted: 2013-02-22 00:22
Making a destroyable object into a non-destroyable object
1. Make a copy of the .con and .tweak file and place those copies in the same folder as the original but re-name the two new files with a _nondest suffix.
2. Now open the stonebridge_nondest.con file, which looks like this:
3. Change the name of the static each time it appears EXCEPT for the two lines where it points to the collision mesh and geometry. Those two need to stay because the non-destroyable static will still use the same meshes as the destroyable one. It should look like this:
4. Then change "DestroyableObject" to "SimpleObject":
Save and close.
5. Now open the stonebridge_nondest.tweak file:
6. Delete the middle rem statements and all the lines inbetween. Also find the lines that say "ObjectTemplate.isDestructable 1" and "ObjectTemplate.setNetworkableInfo BasicInfo" and delete those too:
7. Lastly, change the name of the static EXCEPT for the two lines where it points to the collision mesh and geometry, and change "DestroyableObject" to "SimpleObject".
Save and close.
1. Make a copy of the .con and .tweak file and place those copies in the same folder as the original but re-name the two new files with a _nondest suffix.
Code: Select all
[stonebridge_dest]
[indent][Meshes]
stonebridge_dest.con
stonebridge_dest.tweak
[color=Red]stonebridge_nondest.con
stonebridge_nondest.tweak[/color][/indent]
Code: Select all
GeometryTemplate.create StaticMesh stonebridge_dest
CollisionManager.createTemplate stonebridge_dest
ObjectTemplate.create DestroyableObject stonebridge_dest
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.creator MB03:mb
ObjectTemplate.collisionMesh stonebridge_dest
ObjectTemplate.mapMaterial 0 concrete 0
ObjectTemplate.mapMaterial 1 gravel 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType 3
ObjectTemplate.geometry stonebridge_dest
include stonebridge_dest.tweakCode: Select all
GeometryTemplate.create StaticMesh [color=Red]stonebridge_nondest[/color]
CollisionManager.createTemplate [color=Red]stonebridge_nondest[/color]
ObjectTemplate.create DestroyableObject [color=Red]stonebridge_nondest[/color]
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.creator MB03:mb
ObjectTemplate.collisionMesh [color=Green]stonebridge_dest[/color]
ObjectTemplate.mapMaterial 0 concrete 0
ObjectTemplate.mapMaterial 1 gravel 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType 3
ObjectTemplate.geometry [color=Green]stonebridge_dest[/color]
include [color=Red]stonebridge_nondest[/color].tweakCode: Select all
GeometryTemplate.create StaticMesh [color=Red]stonebridge_nondest[/color]
CollisionManager.createTemplate [color=Red]stonebridge_nondest[/color]
ObjectTemplate.create [color=Red][b]SimpleObject[/b][/color] [color=Red]stonebridge_nondest[/color]
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.creator MB03:mb
ObjectTemplate.collisionMesh [color=Green]stonebridge_dest[/color]
ObjectTemplate.mapMaterial 0 concrete 0
ObjectTemplate.mapMaterial 1 gravel 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType 3
ObjectTemplate.geometry [color=Green]stonebridge_dest[/color]
include [color=Red]stonebridge_nondest[/color].tweak5. Now open the stonebridge_nondest.tweak file:
Code: Select all
rem *** Generated with Bf2Editor.exe [created: 2006/5/15 12:52]
GeometryTemplate.setSubGeometryLodDistance 0 0 50
GeometryTemplate.setSubGeometryLodDistance 0 1 150
GeometryTemplate.setSubGeometryLodDistance 1 0 50
GeometryTemplate.setSubGeometryLodDistance 1 1 150
GeometryTemplate.doNotGenerateLightmaps 0
GeometryTemplate.lightmapOverride 0
GeometryTemplate.compressVertexData 1
GeometryTemplate.maxTextureRepeat 16
GeometryTemplate.glowing 0
GeometryTemplate.noLighting 0
ObjectTemplate.activeSafe DestroyableObject stonebridge_dest
ObjectTemplate.creator MB03:mb
ObjectTemplate.modifiedByUser "mb"
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.isDestructable 1
ObjectTemplate.cullRadiusScale 6
rem ---BeginComp:Armor ---
ObjectTemplate.createComponent Armor
ObjectTemplate.armor.maxHitPoints 1000
ObjectTemplate.armor.hitPoints 1000
ObjectTemplate.armor.defaultMaterial 78
ObjectTemplate.armor.waterLevel -0.3
ObjectTemplate.armor.explosionDamage 80
ObjectTemplate.armor.explosionRadius 5
ObjectTemplate.armor.explosionForce 5
ObjectTemplate.armor.explosionForceMod 8
ObjectTemplate.armor.explosionForceMax 50
ObjectTemplate.armor.explosionMaterial 78
ObjectTemplate.armor.wreckExplosionMaterial 78
ObjectTemplate.armor.wreckHitPoints 100
ObjectTemplate.armor.timeToStayAsWreck -1
ObjectTemplate.armor.timeToStayAfterDestroyed -1
ObjectTemplate.armor.wreckDelay 0.05
ObjectTemplate.armor.canBeDestroyed 0
ObjectTemplate.armor.canBeRepairedWhenWreck 1
ObjectTemplate.armor.showDamageAsDirt 500
ObjectTemplate.armor.addArmorEffect 0 e_mexp_m_prwall 0/0/0 0/0/0
rem ---EndComp ---
rem ---BeginComp:StrategicObject ---
rem ObjectTemplate.createComponent StrategicObject
rem ObjectTemplate.StrategicObject.strategicObjectName stbrdg
rem ObjectTemplate.StrategicObject.destroyedIcon Ingame\Minimap\Icons\Bridge_broken.tga
rem ObjectTemplate.StrategicObject.intactIcon Ingame\Minimap\Icons\Bridge.tga
rem ObjectTemplate.StrategicObject.part 1
rem ---EndComp ---
ObjectTemplate.geometry stonebridge_dest
ObjectTemplate.setCollisionMesh stonebridge_dest
ObjectTemplate.mapMaterial 0 concrete 78
ObjectTemplate.mapMaterial 1 gravel 3
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType MeshCode: Select all
rem *** Generated with Bf2Editor.exe [created: 2006/5/15 12:52]
GeometryTemplate.setSubGeometryLodDistance 0 0 50
GeometryTemplate.setSubGeometryLodDistance 0 1 150
GeometryTemplate.setSubGeometryLodDistance 1 0 50
GeometryTemplate.setSubGeometryLodDistance 1 1 150
GeometryTemplate.doNotGenerateLightmaps 0
GeometryTemplate.lightmapOverride 0
GeometryTemplate.compressVertexData 1
GeometryTemplate.maxTextureRepeat 16
GeometryTemplate.glowing 0
GeometryTemplate.noLighting 0
ObjectTemplate.activeSafe DestroyableObject stonebridge_dest
ObjectTemplate.creator MB03:mb
ObjectTemplate.modifiedByUser "mb"
[color=Red][-]ObjectTemplate.setNetworkableInfo BasicInfo[/-][/color]
ObjectTemplate.saveInSeparateFile 1
[-][color=Red]ObjectTemplate.isDestructable 1[/color][/-]
ObjectTemplate.cullRadiusScale 6
[-][color=Red]rem ---BeginComp:Armor ---
ObjectTemplate.createComponent Armor
ObjectTemplate.armor.maxHitPoints 1000
ObjectTemplate.armor.hitPoints 1000
ObjectTemplate.armor.defaultMaterial 78
ObjectTemplate.armor.waterLevel -0.3
ObjectTemplate.armor.explosionDamage 80
ObjectTemplate.armor.explosionRadius 5
ObjectTemplate.armor.explosionForce 5
ObjectTemplate.armor.explosionForceMod 8
ObjectTemplate.armor.explosionForceMax 50
ObjectTemplate.armor.explosionMaterial 78
ObjectTemplate.armor.wreckExplosionMaterial 78
ObjectTemplate.armor.wreckHitPoints 100
ObjectTemplate.armor.timeToStayAsWreck -1
ObjectTemplate.armor.timeToStayAfterDestroyed -1
ObjectTemplate.armor.wreckDelay 0.05
ObjectTemplate.armor.canBeDestroyed 0
ObjectTemplate.armor.canBeRepairedWhenWreck 1
ObjectTemplate.armor.showDamageAsDirt 500
ObjectTemplate.armor.addArmorEffect 0 e_mexp_m_prwall 0/0/0 0/0/0
rem ---EndComp ---
rem ---BeginComp:StrategicObject ---
rem ObjectTemplate.createComponent StrategicObject
rem ObjectTemplate.StrategicObject.strategicObjectName stbrdg
rem ObjectTemplate.StrategicObject.destroyedIcon Ingame\Minimap\Icons\Bridge_broken.tga
rem ObjectTemplate.StrategicObject.intactIcon Ingame\Minimap\Icons\Bridge.tga
rem ObjectTemplate.StrategicObject.part 1
rem ---EndComp ---[/color][/-]
ObjectTemplate.geometry stonebridge_dest
ObjectTemplate.setCollisionMesh stonebridge_dest
ObjectTemplate.mapMaterial 0 concrete 78
ObjectTemplate.mapMaterial 1 gravel 3
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType MeshCode: Select all
rem *** Generated with Bf2Editor.exe [created: 2006/5/15 12:52]
GeometryTemplate.setSubGeometryLodDistance 0 0 50
GeometryTemplate.setSubGeometryLodDistance 0 1 150
GeometryTemplate.setSubGeometryLodDistance 1 0 50
GeometryTemplate.setSubGeometryLodDistance 1 1 150
GeometryTemplate.doNotGenerateLightmaps 0
GeometryTemplate.lightmapOverride 0
GeometryTemplate.compressVertexData 1
GeometryTemplate.maxTextureRepeat 16
GeometryTemplate.glowing 0
GeometryTemplate.noLighting 0
ObjectTemplate.activeSafe [color=Red]SimpleObject stonebridge_nondest[/color]
ObjectTemplate.creator MB03:mb
ObjectTemplate.modifiedByUser "mb"
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.cullRadiusScale 6
ObjectTemplate.geometry [color=Green]stonebridge_dest[/color]
ObjectTemplate.setCollisionMesh [color=Green]stonebridge_dest[/color]
ObjectTemplate.mapMaterial 0 concrete 78
ObjectTemplate.mapMaterial 1 gravel 3
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh