Can't change weapon icon

Ask questions, discuss ideas, get answers
Post Reply
Khaine
Posts: 7
Joined: Thu Feb 23, 2012 3:49 pm

Can't change weapon icon

Post by Khaine »

Hi there.

My problem is simple, I'm making a hotfix and I would like to change the weapon icon of a modified vehicle.
I'm modding on FHSW mod, and I made FW190 plane able to fire the same rockets used by Typhoon.
It works (I can see the rockets on the FW190 and I can use them), but the FW190 still have its old weapon icons, and I don't know what to edit to make it works.
Here are a couple of screenshots to show you my problem (look at the bottom right corner) :


Typhoon http://img15.hostingpics.net/pics/58724 ... 133228.jpg
FW190 http://img15.hostingpics.net/pics/47736 ... 142190.jpg

So I would like FW190 to have as primary ammo icon the 20mm + 13mm (this one is done), and as secondary ammo the 76,2mm rocket that you can see on the typhoon.

This is my weapons.con, I trid to add « ObjectTemplate.SetAmmoIcon "Ammo/icon_76,2mmRP-3.tga" » but it does not show the correct icon.

Code: Select all

rem ===== EOF =====
rem ============================================================================
rem folder = fw190
rem sauce = Weapons.con
rem ============================================================================
rem ----- FW190Guns-----
ObjectTemplate.create FireArms FW190Guns
ObjectTemplate.setNetworkableInfo PlaneFireArmInfo
ObjectTemplate.loadSoundScript Sounds/Mono_13mm900RPM.ssc
ObjectTemplate.aiTemplate FW190MachineGun
rem -------------------------------------
ObjectTemplate.visibleBarrelTemplate e_Muzz13mm
rem -------------------------------------
ObjectTemplate.projectileTemplate HE_13x64_Projectile
ObjectTemplate.projectilePosition 0/0/2
ObjectTemplate.setTracerTemplate APTracerOrange_13x64_Projectile CRD_NONE/3/0/0
ObjectTemplate.magSize 950
ObjectTemplate.numOfMag 1
ObjectTemplate.velocity 750
ObjectTemplate.roundOfFire 15.0
ObjectTemplate.setMinDev 0.50
ObjectTemplate.setAsynchronyFire 0
ObjectTemplate.setFireCameraShakeAnimationState FirePlaneGunsLightShake
ObjectTemplate.addFireArmsPosition 0.094/1.057/1.277 -0.03/0/0
ObjectTemplate.addFireArmsPosition -0.091/1.057/1.277 0.03/0/0
ObjectTemplate.AmmoType	8


rem ----- FW190Cannons-----
ObjectTemplate.create FireArms FW190Cannons
ObjectTemplate.setNetworkableInfo PlaneFireArmInfo
ObjectTemplate.loadSoundScript Sounds/20mm700RPMHV.ssc
ObjectTemplate.aiTemplate FW190MachineGun
rem -------------------------------------
ObjectTemplate.visibleBarrelTemplate e_Muzz20mm
rem -------------------------------------
ObjectTemplate.projectileTemplate HE_20x82_Projectile
ObjectTemplate.projectilePosition 0/0/2
ObjectTemplate.setTracerTemplate APTracer_20x82_Projectile CRD_NONE/2/0/0
ObjectTemplate.magSize 500
ObjectTemplate.numOfMag 1
ObjectTemplate.velocity 800
ObjectTemplate.roundOfFire 11.6
ObjectTemplate.setMinDev 0.50
ObjectTemplate.setAsynchronyFire 0
ObjectTemplate.setFireCameraShakeAnimationState FirePlaneGunsBigShake
ObjectTemplate.addFireArmsPosition 0.987/0.074/1.376 -0.29/0/0
ObjectTemplate.addFireArmsPosition -0.982/0.074/1.376 0.29/0/0
ObjectTemplate.AmmoType	8

rem ----- FW190CannonsWing -----
ObjectTemplate.create FireArms FW190CannonsWing
ObjectTemplate.setNetworkableInfo PlaneFireArmInfo
ObjectTemplate.loadSoundScript Sounds/Mono_20mm700RPMHV.ssc
ObjectTemplate.aiTemplate FW190Cannon
rem -------------------------------------
ObjectTemplate.visibleBarrelTemplate e_Muzz20mm
rem -------------------------------------
ObjectTemplate.projectileTemplate HE_20x82_Projectile
ObjectTemplate.projectilePosition 0/0/2
ObjectTemplate.setTracerTemplate APTracer_20x82_Projectile CRD_NONE/2/0/0
ObjectTemplate.magSize 280
ObjectTemplate.numOfMag 1
ObjectTemplate.velocity 800
ObjectTemplate.roundOfFire 11.6
ObjectTemplate.setMinDev 1.00
ObjectTemplate.setAsynchronyFire 0
ObjectTemplate.setFireCameraShakeAnimationState FirePlaneGunsBigShake
ObjectTemplate.setInputFire c_PIAltFire
ObjectTemplate.addFireArmsPosition 2.273/0.215/1.046 -0.66/0/0
ObjectTemplate.addFireArmsPosition -2.273/0.215/1.046 0.66/0/0
ObjectTemplate.AmmoType	8


rem ----- FW190BombDummy -----
ObjectTemplate.create FireArms FW190BombRack
ObjectTemplate.setNetworkableInfo PlaneFireArmInfo
ObjectTemplate.setAsynchronyFire 1
ObjectTemplate.projectileTemplate 250kgBomb
ObjectTemplate.visibleDummyProjectileTemplate Fw190BombDummy
ObjectTemplate.aiTemplate FW190Bombs
ObjectTemplate.projectilePosition 0/-0.4/0
ObjectTemplate.magSize 4
ObjectTemplate.numOfMag 1
ObjectTemplate.velocity 0
ObjectTemplate.roundOfFire 4
ObjectTemplate.autoReload 1
ObjectTemplate.reloadtime 15
ObjectTemplate.setInputFire c_PIAltFire
ObjectTemplate.addFireArmsPosition 2.4/-0.027/0.055 0/0/0
ObjectTemplate.addFireArmsPosition -2.4/-0.027/0.055 0/0/0
ObjectTemplate.addFireArmsPosition 0.2/-0.327/0.655 0/0/0
ObjectTemplate.addFireArmsPosition -0.2/-0.327/0.655 0/0/0
ObjectTemplate.AmmoType	7

ObjectTemplate.create SimpleObject Fw190BombDummy
ObjectTemplate.geometry Big_Bomb_M1


rem ----- FW190RocketRails -----
ObjectTemplate.create FireArms FW190RocketRails
ObjectTemplate.setNetworkableInfo PlaneFireArmInfo
ObjectTemplate.aiTemplate FW190Rockets
ObjectTemplate.projectileTemplate Rocket_76,2mm_RP-3_HEAT_Projectile
ObjectTemplate.visibleDummyProjectileTemplate FW190RocketDummy
ObjectTemplate.setAsynchronyFire 1
ObjectTemplate.autoReload 1
ObjectTemplate.magSize 8
ObjectTemplate.numOfMag 1
ObjectTemplate.velocity 233
ObjectTemplate.roundOfFire 8
ObjectTemplate.reloadtime 10
ObjectTemplate.setInputFire c_PIAltFire
ObjectTemplate.addFireArmsPosition -3.9730/-0.6512/0.6575 1/0/0
ObjectTemplate.addFireArmsPosition 3.9730/-0.6512/0.6575 -1/0/0
ObjectTemplate.addFireArmsPosition -3.6371/-0.6926/0.6575 1/0/0
ObjectTemplate.addFireArmsPosition 3.6371/-0.6926/0.6575 -1/0/0
ObjectTemplate.addFireArmsPosition -3.1703/-0.7433/0.6575 1/0/0
ObjectTemplate.addFireArmsPosition 3.1703/-0.7433/0.6575 -1/0/0
ObjectTemplate.addFireArmsPosition -2.8027/-0.7833/0.6575 1/0/0
ObjectTemplate.addFireArmsPosition 2.8027/-0.7833/0.6575 -1/0/0
ObjectTemplate.setMinDev 3.0
ObjectTemplate.AmmoType	9

ObjectTemplate.create SimpleObject FW190RocketDummy
ObjectTemplate.geometry AirATRocket_M1
And objects.con :

Code: Select all

rem ===== EOF =====
rem ============================================================================
rem folder = fw190
rem sauce = Objects.con
rem ============================================================================
rem ===== COMPRESS = GER

rem *** FW190
rem *** FW190_SP70
rem *** FW190_SP71
rem *** FW190_SP75
rem *** FW190_SP76
rem *** FW190_SP77
rem Prm 13mm MG131	x2
rem     20mm MG151	x2
rem Sec 20mm MG151	x2

rem ***************************************************************
rem *** FW190 Fighter
rem ***************************************************************
ObjectTemplate.create PlayerControlObject FW190
include ../fw190/FW190.inc

ObjectTemplate.create PlayerControlObject FW190_SP70
include ../fw190/FW190.inc
ObjectTemplate.addTemplate FW190_PilotSpawn_SP70
ObjectTemplate.destroyOnExit 1
ObjectTemplate.disableSpawnPointsOnEnter 1

ObjectTemplate.create PlayerControlObject FW190_SP71
include ../fw190/FW190.inc
ObjectTemplate.addTemplate FW190_PilotSpawn_SP71
ObjectTemplate.destroyOnExit 1
ObjectTemplate.disableSpawnPointsOnEnter 1

ObjectTemplate.create PlayerControlObject FW190_SP75
include ../fw190/FW190.inc
ObjectTemplate.addTemplate FW190_PilotSpawn_SP75
ObjectTemplate.destroyOnExit 1
ObjectTemplate.disableSpawnPointsOnEnter 1

ObjectTemplate.create PlayerControlObject FW190_SP76
include ../fw190/FW190.inc
ObjectTemplate.addTemplate FW190_PilotSpawn_SP76
ObjectTemplate.destroyOnExit 1
ObjectTemplate.disableSpawnPointsOnEnter 1

ObjectTemplate.create PlayerControlObject FW190_SP77
include ../fw190/FW190.inc
ObjectTemplate.addTemplate FW190_PilotSpawn_SP77
ObjectTemplate.destroyOnExit 1
ObjectTemplate.disableSpawnPointsOnEnter 1



rem *** FW190_PilotSpawn_SP70 ***
ObjectTemplate.create SpawnPoint FW190_PilotSpawn_SP70
ObjectTemplate.setSpawnRotation 0/0/0
ObjectTemplate.setSpawnPositionOffset 0/0/0
ObjectTemplate.setSpawnPreventionDelay 0
ObjectTemplate.setSpawnId 0
ObjectTemplate.setGroup 70
ObjectTemplate.setEnterOnSpawn 1
ObjectTemplate.setAIEnterOnSpawn 1
ObjectTemplate.setSpawnAsParaTroper 0

rem *** FW190_PilotSpawn_SP71 ***
ObjectTemplate.create SpawnPoint FW190_PilotSpawn_SP71
ObjectTemplate.setSpawnRotation 0/0/0
ObjectTemplate.setSpawnPositionOffset 0/0/0
ObjectTemplate.setSpawnPreventionDelay 0
ObjectTemplate.setSpawnId 0
ObjectTemplate.setGroup 71
ObjectTemplate.setEnterOnSpawn 1
ObjectTemplate.setAIEnterOnSpawn 1
ObjectTemplate.setSpawnAsParaTroper 0

rem *** FW190_PilotSpawn_SP75 ***
ObjectTemplate.create SpawnPoint FW190_PilotSpawn_SP75
ObjectTemplate.setSpawnRotation 0/0/0
ObjectTemplate.setSpawnPositionOffset 0/0/0
ObjectTemplate.setSpawnPreventionDelay 0
ObjectTemplate.setSpawnId 0
ObjectTemplate.setGroup 75
ObjectTemplate.setEnterOnSpawn 1
ObjectTemplate.setAIEnterOnSpawn 1
ObjectTemplate.setSpawnAsParaTroper 0

rem *** FW190_PilotSpawn_SP76 ***
ObjectTemplate.create SpawnPoint FW190_PilotSpawn_SP76
ObjectTemplate.setSpawnRotation 0/0/0
ObjectTemplate.setSpawnPositionOffset 0/0/0
ObjectTemplate.setSpawnPreventionDelay 0
ObjectTemplate.setSpawnId 0
ObjectTemplate.setGroup 76
ObjectTemplate.setEnterOnSpawn 1
ObjectTemplate.setAIEnterOnSpawn 1
ObjectTemplate.setSpawnAsParaTroper 0

rem *** FW190_PilotSpawn_SP77 ***
ObjectTemplate.create SpawnPoint FW190_PilotSpawn_SP77
ObjectTemplate.setSpawnRotation 0/0/0
ObjectTemplate.setSpawnPositionOffset 0/0/0
ObjectTemplate.setSpawnPreventionDelay 0
ObjectTemplate.setSpawnId 0
ObjectTemplate.setGroup 77
ObjectTemplate.setEnterOnSpawn 1
ObjectTemplate.setAIEnterOnSpawn 1
ObjectTemplate.setSpawnAsParaTroper 0


rem *** lodFW190 ***
ObjectTemplate.create LodObject lodFW190
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
rem -------------------------------------
ObjectTemplate.addTemplate FW190Complex
ObjectTemplate.addTemplate FW190Simple
ObjectTemplate.addTemplate FW190Wreck
rem -------------------------------------
ObjectTemplate.lodSelector FW190LodSelector


rem *** FW190Complex ***
ObjectTemplate.create Bundle FW190Complex
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
rem -------------------------------------
ObjectTemplate.addTemplate lodFW190Cockpit
ObjectTemplate.addTemplate FW190Camera
ObjectTemplate.setPosition 0/1.20/-1.1
ObjectTemplate.addTemplate FW190stickrotation
ObjectTemplate.setPosition 0/0.836/-0.749
ObjectTemplate.addTemplate FW190Entry
ObjectTemplate.setPosition 0/0/-1.199
ObjectTemplate.addTemplate FW190Seat
ObjectTemplate.setPosition 0/0.62/-1.2
ObjectTemplate.addTemplate FW190Engine
ObjectTemplate.setPosition 0/0.398/2.315
ObjectTemplate.addTemplate FW190BodyWingVertical
ObjectTemplate.setRotation 0/0/-89.999
ObjectTemplate.addTemplate FW190Flaps1
ObjectTemplate.setPosition 4.087/0.367/-0.375
ObjectTemplate.setRotation -6.045/0.735/6.961
ObjectTemplate.addTemplate FW190Flaps2
ObjectTemplate.setPosition -4.076/0.368/-0.373
ObjectTemplate.setRotation 6.045/0.735/-6.961

ObjectTemplate.addTemplate FW190WingRegulatorL
ObjectTemplate.setPosition -3/0/1
ObjectTemplate.addTemplate FW190WingRegulatorR
ObjectTemplate.setPosition 3/0/1

ObjectTemplate.addTemplate FW190TailFlapR
ObjectTemplate.setPosition 0.957/0.599/-5.151
ObjectTemplate.addTemplate FW190TailFlapL
ObjectTemplate.setPosition -0.952/0.599/-5.154
ObjectTemplate.addTemplate FW190wheelBack
ObjectTemplate.setPosition 0/-.054/-5.451
ObjectTemplate.addTemplate FW190Rudder
ObjectTemplate.setPosition 0/1.053/-5.557
ObjectTemplate.setRotation 0/0/-90
ObjectTemplate.addTemplate FW190Guns
ObjectTemplate.addTemplate FW190RocketRails
ObjectTemplate.addTemplate FW190Cannons
rem -------------------------------------


rem *** lodFW190Cockpit ***
ObjectTemplate.create LodObject lodFW190Cockpit
rem -------------------------------------
ObjectTemplate.addTemplate FW190CockpitStatic
ObjectTemplate.addTemplate FW190CockpitBlurred
rem -------------------------------------
ObjectTemplate.lodSelector FW190cockpitSelector


rem *** FW190CockpitStatic ***
ObjectTemplate.create Bundle FW190CockpitStatic
ObjectTemplate.hasDynamicShadow 1
ObjectTemplate.geometry FW190_fus_M1
rem ----------------------------------------------
ObjectTemplate.addTemplate FW190cockpit
ObjectTemplate.setPosition 0.001/1.159/-1.036
rem ----------------------------------------------

rem *** FW190Cockpit ***
ObjectTemplate.create SimpleObject FW190Cockpit
ObjectTemplate.geometry FW190_can_M1

rem *** FW190CockpitBlurred ***
ObjectTemplate.create SimpleObject FW190CockpitBlurred
ObjectTemplate.geometry 1P_fw190_M1



rem *** FW190cockpitSelector ***
LodSelectorTemplate.create DistCompareSelector FW190cockpitSelector
LodSelectorTemplate.addLodDistance 10
LodSelectorTemplate.addLodComparison 0.5



rem *** fw190stickrotation ***
ObjectTemplate.create RotationalBundle fw190stickrotation
rem ---------------------------------------------
ObjectTemplate.addTemplate fw190Stick
rem ---------------------------------------------
ObjectTemplate.setMinRotation 0/0/-30
ObjectTemplate.setMaxRotation 0/0/30
ObjectTemplate.setMaxSpeed 0/0/100
ObjectTemplate.setAcceleration 0/0/-100
ObjectTemplate.setInputToRoll c_PIRoll
ObjectTemplate.setAutomaticReset 1


rem *** fw190Stick ***
ObjectTemplate.create RotationalBundle fw190Stick
ObjectTemplate.geometry 
rem ---------------------------------------------
ObjectTemplate.addTemplate lodfw190Steering
rem ---------------------------------------------
ObjectTemplate.setMinRotation 0/-20/0
ObjectTemplate.setMaxRotation 0/20/0
ObjectTemplate.setMaxSpeed 0/100/0
ObjectTemplate.setAcceleration 0/110/0
ObjectTemplate.setInputToPitch c_PIPitch
ObjectTemplate.setAutomaticReset 1


rem *** lodfw190Steering ***
ObjectTemplate.create LodObject lodfw190Steering
rem -------------------------------------
ObjectTemplate.addTemplate fw190HighRSteering
ObjectTemplate.addTemplate fw190LowSteering
rem -------------------------------------
ObjectTemplate.lodSelector fw190SteeringSelector

rem *** fw190HighRSteering ***
ObjectTemplate.create SimpleObject fw190HighRSteering
ObjectTemplate.geometry fw190_stick

rem *** fw190LowSteering ***
ObjectTemplate.create SimpleObject fw190LowSteering

LodSelectorTemplate.create DistanceSelector fw190SteeringSelector
LodSelectorTemplate.addLodDistance 0.6


rem *** FW190Camera ***
ObjectTemplate.create Camera FW190Camera
ObjectTemplate.setMinRotation -65/-40/0
ObjectTemplate.setMaxRotation 65/5/0
ObjectTemplate.setMaxSpeed 90/-90/0
ObjectTemplate.setAcceleration 5000/5000/0
ObjectTemplate.setInputToYaw c_PIMouseLookX
ObjectTemplate.setInputToPitch c_PIMouseLookY
ObjectTemplate.toggleMouseLook 1
ObjectTemplate.OutsideHudOffset 0/-0.6/4.2
rem ObjectTemplate.OutsideHudOffset 0/-0.6/3.5

rem *** FW190Entry ***
ObjectTemplate.create EntryPoint FW190Entry
ObjectTemplate.setEntryRadius 5


rem *** FW190Seat ***
ObjectTemplate.create SeatObject FW190Seat
ObjectTemplate.seatFlags c_SeatShowHalfBodySoldier


rem *** lodFW190Propeller ***
ObjectTemplate.create LodObject lodFW190Propeller
rem -------------------------------------
ObjectTemplate.addTemplate FW190PropellerStatic
ObjectTemplate.addTemplate FW190PropellerBlurred
rem -------------------------------------
ObjectTemplate.lodSelector FW190PropSelector


rem *** FW190PropellerStatic ***
ObjectTemplate.create SimpleObject FW190PropellerStatic
ObjectTemplate.geometry FW190_prop_m1


rem *** FW190PropellerBlurred ***
ObjectTemplate.create SimpleObject FW190PropellerBlurred
ObjectTemplate.geometry FW190_prp2


LodSelectorTemplate.create CompareSelector FW190PropSelector
LodSelectorTemplate.addLodComparison 0.08


rem *** FW190LandingGearR ***
ObjectTemplate.create LandingGear FW190LandingGearR
ObjectTemplate.loadSoundScript ../Common/Sounds/LandingGear.ssc
ObjectTemplate.geometry FW190_gear_right_M1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
rem -------------------------------------
ObjectTemplate.addTemplate FW190wheelR
ObjectTemplate.setPosition -0.47/-1.45/.47
rem -------------------------------------
ObjectTemplate.setMinRotation -24/0/-69
ObjectTemplate.setMaxSpeed -30/0/-30
ObjectTemplate.setAcceleration 75/0/75
ObjectTemplate.setGearDownHeight 25
ObjectTemplate.setGearUpHeight 23
ObjectTemplate.setGearDownEngineInput 0.4
ObjectTemplate.setGearUpEngineInput 0.7


rem *** FW190LandingGearL ***
ObjectTemplate.create LandingGear FW190LandingGearL
ObjectTemplate.loadSoundScript ../Common/Sounds/LandingGear.ssc
ObjectTemplate.geometry FW190_gear_left_M1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
rem -------------------------------------
ObjectTemplate.addTemplate FW190wheelL
ObjectTemplate.setPosition 0.47/-1.45/.47
rem -------------------------------------
ObjectTemplate.setMaxRotation 24/0/69
ObjectTemplate.setMaxSpeed 30/0/30
ObjectTemplate.setAcceleration 75/0/75
ObjectTemplate.setGearDownHeight 25
ObjectTemplate.setGearUpHeight 23
ObjectTemplate.setGearDownEngineInput 0.4
ObjectTemplate.setGearUpEngineInput 0.7


rem *** FW190WheelBack ***
ObjectTemplate.create RotationalBundle FW190WheelBack
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
rem -------------------------------------
ObjectTemplate.addTemplate FW190WheelBackSpring
ObjectTemplate.setPosition 0/-0.054/0
rem -------------------------------------
ObjectTemplate.setMinRotation -20/0/0
ObjectTemplate.setMaxRotation 20/0/0
ObjectTemplate.setMaxSpeed 200/0/0
ObjectTemplate.setAcceleration -110/0/0
ObjectTemplate.setInputToYaw c_PIYaw
ObjectTemplate.setAutomaticReset 1


rem *** FW190Simple ***
ObjectTemplate.create SimpleObject FW190Simple
ObjectTemplate.geometry FW190_fus_m1


rem *** FW190Wreck ***
ObjectTemplate.create SimpleObject FW190Wreck
ObjectTemplate.geometry wreck_fw190_m1


rem *** FW190LodSelector ***
LodSelectorTemplate.create DistCompareSelector2 FW190LodSelector
LodSelectorTemplate.hasDestroyedLod 1
LodSelectorTemplate.addLodDistance 200
exe
Posts: 60
Joined: Wed Feb 08, 2012 10:04 pm

Re: Can't change weapon icon

Post by exe »

Usually this is found in the vehicle's objects.con but the FHSW devs often put all the code that is used by different variants of the same vehicle into an own file with the ending .inc. Within the FW190 folder there is a file called FW190.inc, open it with notepad and you can edit the icons.
Khaine
Posts: 7
Joined: Thu Feb 23, 2012 3:49 pm

Re: Can't change weapon icon

Post by Khaine »

Thank you so much exe, fast and clear, I did notice this .inc file but I'm a moron, I didn't know you could open it with notepad and edit it :oops:

Problem solved !!
Post Reply