Desert Combat Realism: The plan for a new release

Ask questions, discuss ideas, get answers
tanelorn
Posts: 42
Joined: Thu Oct 14, 2010 6:19 pm

Re: Desert Combat Realism: The plan for a new release

Post by tanelorn »

Wow I just typed out a detailed reply to you and the forum logged me out and deleted all my work...

Basically, it doesn't seem that we can use collision materials with bundles / PCOs like we can with projectiles. Having an impact explosion using materials seems to only be for projectiles. I can experiment some more with 'die on impact' and 'explosion damage upon death' effects, but in my earlier attempts it seemed that the object didn't have the proper commands to get a useful result.
Tanelorn-Desert Combat Realism mod lead
DCR Website: http://www.tanelorn.us/dcr/pages/index.htm
DCR AI development: http://www.battlefieldsingleplayer.com/ ... opic=15529
DCR new features: http://bfmods.com/viewtopic.php?f=6&t=727
trapo
Posts: 13
Joined: Mon Nov 01, 2010 9:43 pm

Re: Desert Combat Realism: The plan for a new release

Post by trapo »

if you need a betatester, please contact me
tanelorn
Posts: 42
Joined: Thu Oct 14, 2010 6:19 pm

Re: Desert Combat Realism: The plan for a new release

Post by tanelorn »

I'll put a build up for everyone once we're a bit further along. I'd like to get as many maps as possible set up for COOP before betatesting.
Tanelorn-Desert Combat Realism mod lead
DCR Website: http://www.tanelorn.us/dcr/pages/index.htm
DCR AI development: http://www.battlefieldsingleplayer.com/ ... opic=15529
DCR new features: http://bfmods.com/viewtopic.php?f=6&t=727
mrhowdoimodClassic
Posts: 31
Joined: Fri Oct 29, 2010 7:36 pm
Location: World Loc: 0,0,0
Contact:

Re: Desert Combat Realism: The plan for a new release

Post by mrhowdoimodClassic »

tanelorn wrote:Wow I just typed out a detailed reply to you and the forum logged me out and deleted all my work...

Basically, it doesn't seem that we can use collision materials with bundles / PCOs like we can with projectiles. Having an impact explosion using materials seems to only be for projectiles. I can experiment some more with 'die on impact' and 'explosion damage upon death' effects, but in my earlier attempts it seemed that the object didn't have the proper commands to get a useful result.
Ahh yes, that's why you should always type up detailed or lengthy messages in a word processor, then copy paste into here, add links, ect.

But are you saying you could not make a custom mesh for the backblast, just a cube even, make a COL mesh then make it's polygons all like an ID of 45. Then make that a bundled mesh or PCO out of that, not sure which one you're using. Than give that a really simple speedmod of like 99. then something like this?

Code: Select all

ObjectTemplate.explosionDamage 15
ObjectTemplate.explosionRadius 6
ObjectTemplate.explosionForceMod 15
ObjectTemplate.hasArmor 1
ObjectTemplate.hitpoints 10
ObjectTemplate.maxHitpoints 10
ObjectTemplate.material 45
ObjectTemplate.speedmod 99
As far as I can remember this all works in bf42. could you not use these parameters to tweak a good blast back explosion if you shot out this bundled mesh/PCO and it hit the wall behind the player? or have I missed something? =/
_____________________________________________
Thanks so much for the years of support and friendship to both: SSM.com and it's legacy, BFMods.com
Sincerely, John P. Harrell
_____________________________________________
tanelorn
Posts: 42
Joined: Thu Oct 14, 2010 6:19 pm

Re: Desert Combat Realism: The plan for a new release

Post by tanelorn »

Hey that looks pretty good! I never had a reason to use the speedmod command, so I wasn't familiar with it. Now that I've looked it up, I think your approach could be quite excellent! There is one issue though...

Doing it this way does not allow you to harm anyone standing behind you when you fire the weapon (well, perhaps if they are directly in the path of the bundle object). Still, I think it would be much more common for players to encounter the backblast when firing in a cramped space, vs the number of times someone is actually behind you when you fire.

I'd love to get this to work both ways, and I think it may be possible by attaching a negative health bubble (negative health supplydepot) to the bundle. Then anyone near the bundle object would get hurt, and we would all get hurt if the object hit a wall before it disappeared.

One final issue with this, is that the bundle object will last a full second if it doesn't hit a wall. That means I have to keep its velocity low enough so that you don't trigger an explosion against a wall far behind you. But... the tradeoff is that you could potentially back up into the slower moving object while it's still flying backwards. A full second is a long time...

Another potential issue would be the sound effect of a collision. Wouldn't an impact register on the materials collision list, and trigger an appropriate effect? That would probably generate dust/debris (easily masked by the backblast animation) but also a metal-creak sound that would seem very odd.

Still, I think your approach seems the best yet!
Tanelorn-Desert Combat Realism mod lead
DCR Website: http://www.tanelorn.us/dcr/pages/index.htm
DCR AI development: http://www.battlefieldsingleplayer.com/ ... opic=15529
DCR new features: http://bfmods.com/viewtopic.php?f=6&t=727
mrhowdoimodClassic
Posts: 31
Joined: Fri Oct 29, 2010 7:36 pm
Location: World Loc: 0,0,0
Contact:

Re: Desert Combat Realism: The plan for a new release

Post by mrhowdoimodClassic »

tanelorn wrote:Hey that looks pretty good! I never had a reason to use the speedmod command, so I wasn't familiar with it. Now that I've looked it up, I think your approach could be quite excellent! There is one issue though...

Doing it this way does not allow you to harm anyone standing behind you when you fire the weapon (well, perhaps if they are directly in the path of the bundle object). Still, I think it would be much more common for players to encounter the backblast when firing in a cramped space, vs the number of times someone is actually behind you when you fire.

I'd love to get this to work both ways, and I think it may be possible by attaching a negative health bubble (negative health supplydepot) to the bundle. Then anyone near the bundle object would get hurt, and we would all get hurt if the object hit a wall before it disappeared.

One final issue with this, is that the bundle object will last a full second if it doesn't hit a wall. That means I have to keep its velocity low enough so that you don't trigger an explosion against a wall far behind you. But... the tradeoff is that you could potentially back up into the slower moving object while it's still flying backwards. A full second is a long time...

Another potential issue would be the sound effect of a collision. Wouldn't an impact register on the materials collision list, and trigger an appropriate effect? That would probably generate dust/debris (easily masked by the backblast animation) but also a metal-creak sound that would seem very odd.

Still, I think your approach seems the best yet!
Well if you make the COL mesh just about half the players size (like crouching player height), anyone that would be behind it would be hurt (and this is one reason you should create a new material for this BM/PCO, more on that later). Just because it's acting as a form of projectile doesn't mean it has to be the normal projectile size, but if you wish to add a death bubble there's no reason not to test it out.

Unless we get lucky to find some unique code, the 'one second' issue is just something to live with. I don't think anyone's going to be time the blast back effect honestly in the heat of the game.

Also, as with the issue of the mesh hitting a player directly, and with the sound/effect templates, it just makes sense to make a new material. it's not like it's hard, but unbelievably boring. then you can have it not make any sound when it collides with something, and you could even fine tweak the damage it does to a player if they're directly hit by the "blast-back" mesh.

One thing I learned long ago from a grumpy little green guy (tell me someone remembers urglub too? :mrgreen: ) is that the material system is extremely versatile.

Hope this helps! sorry, I don't even have a version of bf42/bfv installed or I'd be snatching code for you. But I'm certainly willing to continue with the idea if you have any questions.
_____________________________________________
Thanks so much for the years of support and friendship to both: SSM.com and it's legacy, BFMods.com
Sincerely, John P. Harrell
_____________________________________________
tanelorn
Posts: 42
Joined: Thu Oct 14, 2010 6:19 pm

Re: Desert Combat Realism: The plan for a new release

Post by tanelorn »

SOunds like a solid approach. I'm familiar with the materials system. The biggest pain that I have is searching through all of my and BF's and DC's material definitions to find one not being used...
Tanelorn-Desert Combat Realism mod lead
DCR Website: http://www.tanelorn.us/dcr/pages/index.htm
DCR AI development: http://www.battlefieldsingleplayer.com/ ... opic=15529
DCR new features: http://bfmods.com/viewtopic.php?f=6&t=727
mrhowdoimodClassic
Posts: 31
Joined: Fri Oct 29, 2010 7:36 pm
Location: World Loc: 0,0,0
Contact:

Re: Desert Combat Realism: The plan for a new release

Post by mrhowdoimodClassic »

I understand! Well Good luck, I look forward to the results.
_____________________________________________
Thanks so much for the years of support and friendship to both: SSM.com and it's legacy, BFMods.com
Sincerely, John P. Harrell
_____________________________________________
tanelorn
Posts: 42
Joined: Thu Oct 14, 2010 6:19 pm

Re: Desert Combat Realism: The plan for a new release

Post by tanelorn »

Everything seems to be working fine, with one important exception: the object seems to simply disappear with no damage generated if it dies upon collision.
I set it up so it has 1 second to live, using critical damage. I gave it an armor effect at 0HP just so I could see that it is functioning properly. If I fire and it flies into the distance, the armoreffect takes place, showing me that it killed itself. But upon impact, it simply dissapears with no effect and complete silence. Here's the code for it. I didn't include the firearms portion. It is being emitted as an effect out the back of the launcher. I attached a glowing fireball just so I could see it more easily. I'm using the RPG rocket as the collision object, as it obviously has a collision mesh.

Code: Select all

rem ===== Backblast emulator ===========================================

ObjectTemplate.create EffectBundle e_RPG_Backblast
ObjectTemplate.saveInSeparateFile 1
rem -------------------------------------
ObjectTemplate.addTemplate Em_RPG_Backblast
ObjectTemplate.timeToLive CRD_NONE/-1/0/0
rem -------------------------------------

rem *** Em_RPG_Backblast ***
ObjectTemplate.create Emitter Em_RPG_Backblast
ObjectTemplate.template RPG_Backblast_m1
ObjectTemplate.addEmitterSpeed 1
ObjectTemplate.emitterSpeedScale 1
ObjectTemplate.startProbability 1
ObjectTemplate.lodDistance 1000
ObjectTemplate.timeToLive CRD_NONE/0.1/0/0
ObjectTemplate.intensity CRD_NONE/10/0/0
ObjectTemplate.relativePositionInDof CRD_NONE/0/0/0
ObjectTemplate.positionalSpeedInDof CRD_NONE/100/0/0
ObjectTemplate.positionalSpeedInUp CRD_NONE/0/0/0
ObjectTemplate.positionalSpeedInRight CRD_NONE/0/0/0
ObjectTemplate.startRotation CRD_NONE/0/0/0

ObjectTemplate.create Bundle RPG_Backblast_m1
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.geometry rpg_projectile
ObjectTemplate.setHasCollisionPhysics 1
ObjectTemplate.setHasResponsePhysics 1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.drag 0.01
ObjectTemplate.mass 10
ObjectTemplate.gravityModifier 0.01
ObjectTemplate.destroyed 0
ObjectTemplate.explosionDamage 15
ObjectTemplate.explosionRadius 6
ObjectTemplate.explosionForceMod 15
ObjectTemplate.hasArmor 1
ObjectTemplate.hitpoints 10
ObjectTemplate.maxHitpoints 10
ObjectTemplate.criticalDamage 10
ObjectTemplate.hpLostWhileCriticalDamage 10
ObjectTemplate.material 45
ObjectTemplate.speedmod 99
ObjectTemplate.damageFromWater 0
ObjectTemplate.hpLostWhileUpSideDown 0
ObjectTemplate.addArmorEffect 0 e_ExplGas_car 0/0/0
ObjectTemplate.addTemplate e_TracerBallFire
ObjectTemplate.startoneffects 1
ObjectTemplate.setPosition 0/0/0
ObjectTemplate.setRotation 0/0/0
Tanelorn-Desert Combat Realism mod lead
DCR Website: http://www.tanelorn.us/dcr/pages/index.htm
DCR AI development: http://www.battlefieldsingleplayer.com/ ... opic=15529
DCR new features: http://bfmods.com/viewtopic.php?f=6&t=727
mrhowdoimodClassic
Posts: 31
Joined: Fri Oct 29, 2010 7:36 pm
Location: World Loc: 0,0,0
Contact:

Re: Desert Combat Realism: The plan for a new release

Post by mrhowdoimodClassic »

Well as for using the RPG rocket mesh.. you really should make a custom mesh, because just setting (template.material 45) wont correctly make collision mesh have that material id. I could be wrong on that one though, it's been awhile since I've modded 42.

but there a few lines that may or may not be needed there, not sure, like Objecttemplate.damage 0 I'm even sure what that does. and I dont believe it needs response physics. and have you tried making the Bundle a PCO instead? Maybe the explosion lines only work with PCO's. just a few things to try out maybe, I'm not positive on why it's not working, but i'm assuming that it needs to be a PCO.
_____________________________________________
Thanks so much for the years of support and friendship to both: SSM.com and it's legacy, BFMods.com
Sincerely, John P. Harrell
_____________________________________________
Post Reply