damage_system of custom map

Ask questions, discuss ideas, get answers
maehnaebteheu
Posts: 18
Joined: Sat May 22, 2010 2:52 pm

damage_system of custom map

Post 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?
motoko
Posts: 217
Joined: Sun Nov 21, 2010 8:43 pm
Location: Dante's 6th Pit of Hell

Re: damage_system of custom map

Post 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!
maehnaebteheu
Posts: 18
Joined: Sat May 22, 2010 2:52 pm

Re: damage_system of custom map

Post 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.
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: damage_system of custom map

Post 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
maehnaebteheu
Posts: 18
Joined: Sat May 22, 2010 2:52 pm

Re: damage_system of custom map

Post 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
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: damage_system of custom map

Post by freddy »

yes, easiest is to copy a whole material setup and just use "find and change" for the numbers with wordpad.
maehnaebteheu
Posts: 18
Joined: Sat May 22, 2010 2:52 pm

Re: damage_system of custom map

Post 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?
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: damage_system of custom map

Post 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
maehnaebteheu
Posts: 18
Joined: Sat May 22, 2010 2:52 pm

Re: damage_system of custom map

Post 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
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re:

Post 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
Post Reply