Page 1 of 4

damage_system of custom map

Posted: Sat May 22, 2010 3:07 pm
by maehnaebteheu
Hi,
I'm trying to edit the damage_system of a custom map by running a *.con with this code
  • MaterialManager.attGroup 205
    MaterialManager.defGroup 40
    MaterialManager.damageMod 0
    MaterialManager.setEffectTemplate e_ExplGranade

    MaterialManager.attGroup 205
    MaterialManager.defGroup 41
    MaterialManager.damageMod 0
    MaterialManager.setEffectTemplate e_ExplGranade

    MaterialManager.attGroup 205
    MaterialManager.defGroup 42
    MaterialManager.damageMod 0
    MaterialManager.setEffectTemplate e_ExplGranade
I want the nades to make no damage versus soldiers. My Problem is that this code will have no effect? I already modded the damage_system of a mod by editing directly the game.rfa. But how to do for a custom map?

Re: damage_system of custom map

Posted: Sat May 22, 2010 3:18 pm
by motoko

Code: Select all

ObjectTemplate.Active GrenadeAllies
ObjectTemplate.magType 1

ObjectTemplate.Active ExpPack
ObjectTemplate.magType 1 
Will disable the nades.

PS: Use the ServerSideModding Backup for these types of things! A simple search and you can find what you look for!

Re: damage_system of custom map

Posted: Sat May 22, 2010 3:23 pm
by maehnaebteheu
don't want to disable them. I want them to make damage only versus one specific object (a boat). So I thought I should remove the damage to everything else for example soldiers.

Re: damage_system of custom map

Posted: Sat May 22, 2010 3:35 pm
by freddy
it doesnt work to change the material damage per map basis, atleast i have never got it to work. instead you have to use either another already existing material number that could fit your purposes, or you have to build a new material yourself .

example

Code: Select all

MaterialManager.material 805
MaterialManager.materialAttGroup 805
MaterialManager.materialDefGroup 805
MaterialManager.materialDamage 10


code]MaterialManager.attGroup 805
MaterialManager.defGroup 40
MaterialManager.damageMod 0

Re: damage_system of custom map

Posted: Sat May 22, 2010 4:49 pm
by maehnaebteheu
thanks this works now. only problem is that i lost the explosion effect by this way. I think I have to link following path new?

MaterialManager.setEffectTemplate e_ExplGranade

and maybe this one?

ObjectTemplate.endEffectTemplate e_ExplGranade

Re: damage_system of custom map

Posted: Sat May 22, 2010 10:52 pm
by freddy
yes, easiest is to copy a whole material setup and just use "find and change" for the numbers with wordpad.

Re: damage_system of custom map

Posted: Sun May 23, 2010 2:35 am
by maehnaebteheu
can anybody help me with the explosion effect? I also have sometimes the problem when I mod an Object with sound that the sound is gone and don't know how to find the right path for the right sound. Same thing here I think?

Re: damage_system of custom map

Posted: Sun May 23, 2010 9:43 am
by freddy
if your using the games standard explosion effects it should work ok, same with sounds

if your using own effects or sounds its a different story, however if the sound path is wrong the game usually crash

Re: damage_system of custom map

Posted: Sun May 23, 2010 10:22 am
by maehnaebteheu
no sorry ... don't know why but for example when I edit the MP40 by running following code in my custom map it will have no sound. I think it's because of the last line?

Code: Select all

ObjectTemplate.create HandFireArms Mp40
ObjectTemplate.itemIndex 3
ObjectTemplate.projectileTemplate mp40Projectile
rem ObjectTemplate.setTracerTemplate Tracer_Projectile CRD_UNIFORM/2/4/0
ObjectTemplate.projectilePosition 0/0/0
ObjectTemplate.hasDynamicShadow 1
ObjectTemplate.magSize 32
ObjectTemplate.numOfMag 5
ObjectTemplate.magType 0
ObjectTemplate.reloadtime 4.3
ObjectTemplate.roundOfFire 9
ObjectTemplate.GUIIndex 7
ObjectTemplate.setHudAmmoType ATAmmoBar
ObjectTemplate.setAmmoBar "Ingame/Magbar_SMG_empty_32x64.tga"
ObjectTemplate.setAmmoBarFill "Ingame/Magbar_SMG_full_32x64.tga"
ObjectTemplate.setAmmoBarSize 46
ObjectTemplate.setAmomBarPosX 4
ObjectTemplate.setAmomBarPosY -11
ObjectTemplate.setAmomBarTextPosX 8
ObjectTemplate.setAmomBarTextPosY 4
ObjectTemplate.setCrossHairType CHTCrossHair
objectTemplate.aiTemplate MP40AI
ObjectTemplate.zoomFov 0.6
ObjectTemplate.altFireOnce 1
ObjectTemplate.soldierZoomFov 0.9 
ObjectTemplate.soldierZoomPosition -0.02/-0.0/-0.08
ObjectTemplate.soldierCameraPosition 0.01/-0.04/0.09
ObjectTemplate.addRootSpeed 0
ObjectTemplate.AmmoType	1

ObjectTemplate.minDamage 0.5
ObjectTemplate.distToStartLoseDamage 50
ObjectTemplate.distToMinDamage 100

rem ObjectTemplate.autoReload 1
Rem *** Deviation Begin *****

ObjectTemplate.velocity 1000
ObjectTemplate.setRecoilForceUp CRD_UNIFORM/0.21/0.25/0
ObjectTemplate.setRecoilForceLeftRight CRD_UNIFORM/-0.1/0.1/0
ObjectTemplate.setHasRecoilForce 1
ObjectTemplate.setGoBackOnRecoil 1

ObjectTemplate.setFireDev 2.0 0.35 0.06
ObjectTemplate.setDevMod 1.2 1.05 0.9
ObjectTemplate.setMinDev 0.4
ObjectTemplate.setTurnDev 0 0 0 0
ObjectTemplate.setSpeedDev 0.8 0.2 0.2 0.1
ObjectTemplate.setMiscDev 2.5 2.5 0.1

Rem *** Deviation  End *****

ObjectTemplate.fireInCameraDof 1
ObjectTemplate.loadSoundScript Sounds/mp40.ssc

Re:

Posted: Sun May 23, 2010 3:43 pm
by freddy
well is it a imported weapon or is it already in the mod your running? like Desert Combat. im not familiar with those mods but i guess you can try the long way around with placing all the files needed in your map.

you need all the soundscript files and the wav files for the weapon, put them in your map and see to that they are linked together

map root example:

Code: Select all

load @ROOT/Sound/@RTD/BFMG2.wav
tell you what, its complicated to explain, so if you can, download this map and take a look how its done, the froggy/flettner is the best (tidiest) example, you can decide to cut out the mid and low sound to save time and space but its not recommended.

http://www.filefront.com/16523621/rocket_sea_final.rfa