Explosion Speed
Moderator: Moderators
Explosion Speed
Explosionspeed doesnt seem to do anything. Ive set it as high as 10 and low as 0.01. Nothing seems to change.
So whats up?
So whats up?
- BlackLiger
- Posts: 1371
- Joined: 05 Oct 2004, 21:58
- PauloMorfeo
- Posts: 2004
- Joined: 15 Dec 2004, 20:53
The source code doesn't even read that tag from the weapon definitions:
https://taspring.clan-sy.com/svn/spring ... andler.cpp
http://lolut.utbm.info/pipermail/taspri ... 01739.html
https://taspring.clan-sy.com/svn/spring ... andler.cpp
http://lolut.utbm.info/pipermail/taspri ... 01739.html
PauloMorfeo wrote: In the change log for version 0.73 i can see the line:
"- New weapon tdf tag ExplosionSpeed"
And, in fact, i see some weapons using that tag. But the source doesn't seems
to be loading it from the .TDFs. "WeaponDefHandler.cpp" only has this line:
"weaponDefs[id].explosionSpeed = (8+gd*2.5f)/(9+sqrtf(gd)*0.7f)*0.5f;"
I supose someone forgot to add the loading of that tag to
CWeaponDefHandler::ParseTAWeapon ()? I seem to remember one or two more tags
that i didn't found in the source but i don't remember which ones they are
anymore, i forgot to take note.
Too bad this method of loading tags needs to have people explicitly go load
them from the files.
- PauloMorfeo
- Posts: 2004
- Joined: 15 Dec 2004, 20:53
Haa, why would you do that? It already has a "default" value assigned.Argh wrote:...
I'll just go in and give it a default value, and submit a patch...
Why not just add the loading of it from the weapon definitions like Mass was added to features? Seems fairly similar:
trepan wrote:How about something like this? (it compiles)
P.S. I haven't actually checked if the max() safety is requiredCode: Select all
const string massStr = wreckParser.SGetValueDef("", name + "\\Mass"); if (massStr.empty()) { // generate the mass from the metal and health values fd->mass = (fd->metal * 0.4f) + (fd->maxHealth * 0.1f); } else { fd->mass = (float)atof(massStr.c_str()); } fd->mass = max(0.001f, fd->mass);
-
- MC: Legacy & Spring 1944 Developer
- Posts: 1948
- Joined: 21 Sep 2004, 08:25
Omfg, unit idea. Wouldn't it be completely and utterly cool beyond all reasoning to have some sort of nuclear-detonating kamikaze unit whose explosions moved at a snail's pace? So you could send it to the middle of the map, blow it, and slowly watch as it takes 20+ minutes for the map to be completely obliterated. Countdown!
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
how about... no.SpikedHelmet wrote:Omfg, unit idea. Wouldn't it be completely and utterly cool beyond all reasoning to have some sort of nuclear-detonating kamikaze unit whose explosions moved at a snail's pace? So you could send it to the middle of the map, blow it, and slowly watch as it takes 20+ minutes for the map to be completely obliterated. Countdown!
No, why? It only gets computed once at load time.Argh wrote:A. Because doing it with that much complex math is laggy.
I think most mods assume the current default value and would be confused if that just changed.B. Using a straight value that is very fast shouldn't disrupt most mods' gameplay very much.
It's not even close to instant, and the way it works is not exactly the way I'd strongly prefer.
Personally, I'd rather just have instant explosions, but be able to call more explosions through the customExplosionGenerator code if I want to muck around with expansion, randomness, or duration. Yeha, I don't suppose that could be done? That would be more than flexible enough to allow for all sorts of fancy stuff, and going to instant explosions would probably save quite a bit of processing time (which we could then spend either on giving them duration by calling them over multiple frames, or spend on more pretty FX, heh). Just my opinion, of course...
Personally, I'd rather just have instant explosions, but be able to call more explosions through the customExplosionGenerator code if I want to muck around with expansion, randomness, or duration. Yeha, I don't suppose that could be done? That would be more than flexible enough to allow for all sorts of fancy stuff, and going to instant explosions would probably save quite a bit of processing time (which we could then spend either on giving them duration by calling them over multiple frames, or spend on more pretty FX, heh). Just my opinion, of course...
It's instant if you can get it to expand fully on one frame. It saves ressources because the explosion's range check exists shorter and when many explosions occur fewer of them are alive at the same time.zwzsg wrote:I'd have thought the default value would be instant. Is it even possible to have instant explosions instead of very fast and does it save on ressources drain?
I wish the default was instant but I guess they didn't want to break mods that were built expecting the expanding blasts. I think the last time we had a discussion about that the players were for expanding explosions while the modders were against it except for the really big explosions where the delay is actually visible instead of hogging ressources for no visible gain.
Aaaactually this is a rather cool idea :) Reeeeeally slow expanding "energy fields" (explosions, basically) :DForboding Angel wrote:how about... no.SpikedHelmet wrote:Omfg, unit idea. Wouldn't it be completely and utterly cool beyond all reasoning to have some sort of nuclear-detonating kamikaze unit whose explosions moved at a snail's pace? So you could send it to the middle of the map, blow it, and slowly watch as it takes 20+ minutes for the map to be completely obliterated. Countdown!
<shrugs> I still think explosions should be able to reference other explosions. We'd be able to do a lot of interesting things with this, like fires that grow more "intense" over time, "gas" that slowly kills things... and, if we could use the randomization like customExplosionGenerator, it could do really interesting stuff, like have one bomb turn into 30-50 "bomblets" when it died, etc.
Good for a larf ^^Omfg, unit idea. Wouldn't it be completely and utterly cool beyond all reasoning to have some sort of nuclear-detonating kamikaze unit whose explosions moved at a snail's pace? So you could send it to the middle of the map, blow it, and slowly watch as it takes 20+ minutes for the map to be completely obliterated. Countdown!