Joined: 09 Mar 2008 Location: Osaka (JP)/Hong Kong/Germany
Posted: Sun May 17, 2015 7:50 pm Post subject:
Damage from Overlays [support request]
Is it somehow possible to attach a particle system or animation to an overlay to make it deal damage to units that pass over it while it exists? For example, to make fences that deal damage when units crush them? _________________
Mao Zedong wrote:
Our mission, unfinished, may take a thousand years.
You can try CellAnim=, but i'm pretty sure the animation never goes away if it's made to loop. Even if the overlay it was "attached" to is gone long time ago.
If you want to make damaging walls, i would say that you should try structures with firestorm wall logic or IsPassable=yes that have a damaging animation on them. QUICK_EDIT
For DTA, Bittah and me tested art.ini debris on Tiberium overlays via CellAnim.
The animation was also looping and removed once the overlay was gone.
IIRC Bittah added a certain key to the animation, so it was removed once the overlay was gone. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Joined: 09 Mar 2008 Location: Osaka (JP)/Hong Kong/Germany
Posted: Mon May 18, 2015 11:26 pm Post subject:
I'm experimenting with it now... according to ModEnc, the animation is always deleted when the overlay is removed.
A related question, are the "FENCE*" overlays needed for anything? They have corresponding artmd entries, but I couldn't find corresponding art files for them, nor does anything convert to them when placed. Are they used anywhere? Otherwise I might clean them out/recycle them for my own fences.
and anyway, does the OverlayTypes list depend on being in a particular order? I would like to move stuff around in it, but it seems like the designers put alot of bizarre effort into making the order just the way it is. _________________
Mao Zedong wrote:
Our mission, unfinished, may take a thousand years.
Joined: 09 Mar 2008 Location: Osaka (JP)/Hong Kong/Germany
Posted: Tue May 19, 2015 12:31 am Post subject:
Oh, so they are referenced in maps by list number, not by ID?
Ah... well. I guess the shipped maps are already broken, as I've removed some tech structures and other changes. _________________
Mao Zedong wrote:
Our mission, unfinished, may take a thousand years.
I've noticed that some of the FENCE overlays aren't properly read by FA2, for example I replaced some of them with new walls which work fine ingame but in FA2 you can only place the first frame. I changed them to replace the DUMMY entries at the top of the list & they then worked correctly in FA2. _________________
Can anyone read 0F4EAF4A?
I'm curious if its a general issue with anything you do to the list, or if its maybe just because I touched something sensitive. _________________
Mao Zedong wrote:
Our mission, unfinished, may take a thousand years.
Last edited by Millennium on Tue May 19, 2015 10:04 am; edited 1 time in total QUICK_EDIT
Joined: 09 Mar 2008 Location: Osaka (JP)/Hong Kong/Germany
Posted: Tue May 19, 2015 10:03 am Post subject:
Still it would be interesting to know... like, can you add anything to the list? Can you change existing entries if the order stays the same? Can you edit existing, but unused overlays if the header remains the same? Lots of questions in there. _________________
Mao Zedong wrote:
Our mission, unfinished, may take a thousand years.
Joined: 09 Mar 2008 Location: Osaka (JP)/Hong Kong/Germany
Posted: Tue May 19, 2015 10:52 am Post subject:
Yes, I meant the ID.
So does that mean I'm limited to just editing the contents of a section, but keeping the ID the same?
Or can I actually change the ID of an unused list entry?
For example, if
Code:
189=FENCE06
do I have to edit the entry with header [FENCE06]?
Or could I change 189=APPLE (for example), and then make an APPLE section, as long as the order for the USED entries stays the same?
On that note, I think overlays do not have to be listed in here at all... ToOverlay certainly works with objects that aren't listed, and ToOverlay is (for me) the main reason why I'd even make/edit overlaytypes at all. _________________
Mao Zedong wrote:
Our mission, unfinished, may take a thousand years.
Joined: 09 Mar 2008 Location: Osaka (JP)/Hong Kong/Germany
Posted: Tue May 19, 2015 11:19 am Post subject:
Interesting! Thank you.
Also, it appears CellAnim does not work...
I have added CellAnim=BIGBLUE to GASAND, copied from the entry in TS, as a test (because one can be certain that BIGBLUE would work as it's used as CellAnim in TS) but it did not appear in-game.
Is any other tag needed? The BIGBLUE file is present in RA2. _________________
Mao Zedong wrote:
Our mission, unfinished, may take a thousand years.
ToOverlay certainly works with objects that aren't listed, and ToOverlay is (for me) the main reason why I'd even make/edit overlaytypes at all.
ToOverlay changes a BuildingType into the specified OverlayType. Even if it might work without that Overlay being listed (which i doubt), you surely get a savegame crash and other bugs when using non-listed Overlays.
The game has to store and find them somehow, and that's what the list is there for. No list-entry -> bugs, crashes, other issues.
Especially problematic when you know that a map can store only 1 Byte (0-255) for Overlays on each cell.
Imagine you have 255 in the list and use an unlisted Overlay. This will get number 256. Where should the game store this 2 Byte value? Impossible -> crash, bug, horror.
Joined: 09 Mar 2008 Location: Osaka (JP)/Hong Kong/Germany
Posted: Tue May 19, 2015 11:34 pm Post subject:
Okay, after some more experiments... things are getting very weird. I have ONLY removed commented-out entries from the list and changed the IDs of most of the unused ones to "unused". There is no Overlay Exception crash anymore.
Yet, now I'm getting bridge overlays in random places (perhaps in place of craters or smudges, even though those are not overlays!) and the "Replace Fence" overlays showed up in random places on maps (presumably instead of trees) until I removed the FENCE* entries from the list too.
Could it be that the game counts commented-out list entries too when making the array, even if it doesn't read them? Just to get the list numbers? And/or does it count empty lines within the list?
Or is there any other explanation.
The game does not use the numbers, but the position in the list
It does not matter what you write in front of the = sign. The game gives new numbers when loading the list.
So you can also write this
DO=Overlay0
NOT=Overlay1
REMOVE=Overlay2
ENTRIES=Overlay3
which is the same as
00=Overlay0
01=Overlay1
02=Overlay2
03=Overlay3
With your removal of entries, you gave them new numbers, thus messed up the list order. _________________ SHP Artist of Twisted Insurrection: Nod buildings
I was just about to say same as Mig Eater but he got first but indeed...
If you insert same thing more than once after =
only the first instance is used and else the rest is discarded AFAIK and this messed up the indexing internally very bad.
There is reason WW numbered the dummys but yeah changing to what you did makes little point anyways except break it.
Goes to say, overlay list is very sensitive thing to tamper with even if you know it well QUICK_EDIT
Actually, to prevent any confusion at all, you can have only have OverlayTypes from indexes #0 to #254, 255 is used in a map to specify there is no Overlay on that cell.
Same goes for the frame amount, you can only have 256 usable frames (I believe this is excluding shadow frames).
If you want any special behavior to specific OverlayTypes you can start coding it yourself.
The OverlayTypes list is a mere reflection of a header file they used to assign special behavior and properties (bridge, tiberium, walls) to a Type.
As for the entry before the '=' character, this (LOL=GAWALL) works for the game itself, but not for FinalAlert 2. FA2 is stupid and looks only at numbers.
My new map editor will read INIs like the game does, so no issues there.
@ApolloTD:
The rest of a secondary entry overwrites the content of the first.
And yes, the reason WW inserted dummies was to ensure the internal array did not move and thus not correspond with the hardcoded header with definitions about them Types.
It would be like BARB getting the gate slam 'connection' of GAWALL, which could result in crashes.
If you need more information about the OverlayTypes list and what is accepted, just let me know, Millennium. _________________
Joined: 09 Mar 2008 Location: Osaka (JP)/Hong Kong/Germany
Posted: Wed May 20, 2015 10:24 am Post subject:
Well, some more preliminary test results:
Wall=yes seems to enforce some special cases:
* Land= does not work on Overlay objects that are also Wall=yes. Using Wall=yes enforces Land=Wall and any manual Land= entry gets ignored.
* CellAnim does work on any Overlay that is NOT Wall=yes, however it will use a wrong palette (terrain palette?) and not animate if the Overlay is not also Tiberium=yes
* It is possible to combine Wall=yes and Tiberium=yes, and harvester-type units will get a harvest cursor over such overlays, but they cannot actually be harvested - presumably this is because the enforced Land prevents harvesters from driving onto the cell. Just out of curiosity, the next step would be to test a harvester with a speedtype that has >0% on Wall terrain, but I've not done that yet.
(CellAnims still won't play on such overlays)
So essentially, this means my original idea of crushable damage-dealing fences will not work like ordinary fences - there can't be facing/connection-dependent frames and it can never be placed in a line. If anyone wants to make an overlay with a CellAnim, it has to be placed tile-by-tile.
Misc:
* Crushable=yes also seems to work only on Wall=yes, although it may instead be tied to LegalTarget=yes or Land=Wall.
* It may be that on Wall=yes, CellAnim is simply invisible, but still causes effects (such as damage etc). I've not tested this. _________________
Mao Zedong wrote:
Our mission, unfinished, may take a thousand years.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum