Page 1 of 2

Explosion emission tags

Posted: 21 Sep 2007, 10:08
by REVENGE
So the tag water,ground,air for custom explosions, are they based on which type of terrain a unit is over when a weapon collides with it?

Posted: 21 Sep 2007, 10:36
by Pressure Line
yes.

Posted: 21 Sep 2007, 16:42
by Argh
More or less. The only tricky part is ground / air. Spring has an arbitrary height (which I could look up in the source, but I am too busy with other stuff at the moment) at which CEG events only occur if they are "air". This distance used to be very low, causing some problems (like CEG events that had a conditional groundflash not working correctly, etc.). I think this stuff has been mainly fixed at this point, as I haven't seen a lot of problems with the FX in PURE, but I haven't really torture-tested it.

Posted: 21 Sep 2007, 18:20
by KDR_11k
Personally I use air to designate a unit hit for effects that should look different when hitting vs. missing.

Posted: 22 Sep 2007, 06:25
by REVENGE
This is what I was afraid of...

DOH

In Final Frontier, fake space is simulated using water with voidwater. This means that if I use FunTA/Gundam explosions as is, everything looks like crap when units are over space because they are technically over water, and only water explosions are used. Doing a replace of all water tags doesn't work because then I'm left with no explosions over "space" at all. And now with the air tag problem and height values, everything just goes to hell.

:roll:

Great, this means I have to comb through 50 or so explosions tdf files by hand looking for problems to correct.

Posted: 22 Sep 2007, 07:45
by REVENGE
REGULAR EXPRESSIONS + MULTILINE SEARCH/REPLACE WIN!

WOOOT!

Posted: 22 Sep 2007, 08:04
by Snipawolf
...?

Duh...

Posted: 22 Sep 2007, 17:35
by Argh
He just discovered what a grep parser is ;) It's cool, I felt the same way the first time I used one, they're great tools.

Posted: 22 Sep 2007, 23:17
by REVENGE
Unfortunately, I'm using phReplace for PSPad right now, and it appears that only the Search box honors regexp, not the replace box... :evil:

Posted: 23 Sep 2007, 00:06
by Snipawolf
Use notepad++

It can do find and replaces quite well.

Posted: 23 Sep 2007, 00:24
by rattle
Can it do regex replaces well and fast? I use EditPlus (no freeware) especially because of that. Although it's not fast, it's rather slow. Took about 30 minutes on my old PC to replace about 115,000 newlines, and only newlines, nothing complex.

Was 14 megs of PI which was full of newlines each 100 characters.

Posted: 23 Sep 2007, 01:10
by REVENGE
Snipawolf wrote:Use notepad++

It can do find and replaces quite well.
I know, but TextFX's multiline function isn't finished yet, and you can't operate over multiple files.

This is why I switched to PSPad in the first place but go figure, its multiline search/replace extension doesn't work with backrefs from the Replace box to the Search box. :roll:

Posted: 23 Sep 2007, 03:33
by Argh
Advanced Find and Replace. It's great, it does some very advanced regular expressions (it will do math, treating numbers as numbers, for example).

Love it, paid for it, try it, you'll like it.

Posted: 23 Sep 2007, 05:28
by REVENGE
Argh wrote:Advanced Find and Replace. It's great, it does some very advanced regular expressions (it will do math, treating numbers as numbers, for example).

Love it, paid for it, try it, you'll like it.
Thanks Argh, but I've limited my self to free stuff only thus far. I'll take a look though. :-)

Posted: 23 Sep 2007, 05:30
by Dragon45
[quote="Argh"]He just discovered what a grep parser is ;).[/quote

a grep parser? grep is a program. grep *is* a parser. perhaps you meant grep-based parser.

and grep can't really replace. at all. you need sed (stream editor) for that.


And Notepad++'s find and its replace are crappy as hell. In general, notepad++'s multi-file utilities are shitty as hell.

go CLI.

Posted: 23 Sep 2007, 05:31
by Snipawolf
Well, last time I modified all... 25 of my unit fbis explosions it worked fine. Seemed alright to me.

Posted: 23 Sep 2007, 07:42
by Dragon45
25 files? anything will work for that.

reason im spouting off against notepad++ is because i had to deal with a 60,000+ in-file search, replace, etc. first thing i tried searching with was notepad++. bad idea. raped my resources, took forever.

grep/sed are the Divine Twins.

of course, i ended up using Python to solve the problem. it worked pretty fast, i was surprised. for an interpreted language as high-level as python, the operation pretty much flew by.

Posted: 23 Sep 2007, 07:52
by REVENGE
Snipawolf wrote:Well, last time I modified all... 25 of my unit fbis explosions it worked fine. Seemed alright to me.
How can you get the regular Find box to match for multiple lines though???

For example:

Code: Select all

		}
	water=1;
	count=1;
	}
All parts of a CEG explosion which contain these lines appear only while a unit is over the water. Since these explosions were originally designed for regular maps where "water is water", I want to remove these parts entirely by changing water=1; to water=0;. If I were to just change all water=1; into water=0;, I wouldn't get an explosion at all while over water [which is fake space in FF].

Next:

Code: Select all

      }
   air=1;
   ground=1;
   count=1;
   }
These are parts of an explosion that occur only when a unit is over ground or in air, but not when they are over water. I need to change this and add a water=1; tag so these parts of the explosion will appear while a unit is over water [fake space].

And again, there are a few more situations that need changing, such as well tag order is inverted, etc etc.

EDIT: I also need to learn python, but for today I want lazy way of fixing problem. :P

Posted: 23 Sep 2007, 07:52
by Snipawolf
What the hell are you doing with 60,000 files...? O__o

Oh, like that, maybe, I am not sure, have you tried adding in tabs? Also, you don't need to make do single spaced lines, it just looks cleaner.

Ex: Water=0; Ground=1; Air=1; Count=1;

would work, even if you copied it straight like it is.

Posted: 23 Sep 2007, 20:07
by REVENGE
Snipawolf wrote:What the hell are you doing with 60,000 files...? O__o

Oh, like that, maybe, I am not sure, have you tried adding in tabs? Also, you don't need to make do single spaced lines, it just looks cleaner.

Ex: Water=0; Ground=1; Air=1; Count=1;

would work, even if you copied it straight like it is.
Hmm, let me check this out.