:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Sun May 27, 2018 3:17 pm
All times are UTC + 0
 Forum index » Modding Central » Red Alert 2 Editing Forum
Damage from Overlays [support request]
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [22 Posts] View previous topic :: View next topic
Author Message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Sun May 17, 2015 7:50 pm    Post subject:   Damage from Overlays [support request] Reply with quote

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?
_________________
The Jaunt wrote:

It's eternity in there...

Back to top
View user's profile Send private message
mevitar
Cyborg Firebomber


Joined: 31 Dec 2010

PostPosted: Mon May 18, 2015 1:29 pm    Post subject: Reply with quote

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.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon May 18, 2015 1:53 pm    Post subject: Reply with quote

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

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Mon May 18, 2015 11:26 pm    Post subject: Reply with quote

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.

I mean these here:
Code:

184=FENCE01
185=FENCE02
186=FENCE03
187=FENCE04
188=FENCE05
189=FENCE06
190=FENCE07
191=FENCE08
192=FENCE09
193=FENCE10
194=FENCE11
195=FENCE12
196=FENCE13
197=FENCE14
198=FENCE15
199=FENCE16
200=FENCE17
201=FENCE18
202=FENCE19
203=FENCE20
204=FENCE21
205=FENCE22


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.
_________________
The Jaunt wrote:

It's eternity in there...

Back to top
View user's profile Send private message
G-E
General


Joined: 09 Feb 2015

PostPosted: Mon May 18, 2015 11:53 pm    Post subject: Reply with quote

It's hardcoded as a table in the correct order, if you move anything around expect the maps to get screwed up.
_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Tue May 19, 2015 12:31 am    Post subject: Reply with quote

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.
_________________
The Jaunt wrote:

It's eternity in there...

Back to top
View user's profile Send private message
G-E
General


Joined: 09 Feb 2015

PostPosted: Tue May 19, 2015 4:02 am    Post subject: Reply with quote

Doing a direct 1:1 replacement for some overlays should work fine, as long as the order and count doesn't change until the end of the original list.
_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Mig Eater
General


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Tue May 19, 2015 5:59 am    Post subject: Reply with quote

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.
_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Tue May 19, 2015 9:59 am    Post subject: Reply with quote

Well... I did only some slight re-ordering. And this is what I got:

(excerpt)
Code:

Preparing Mixfiles for Side 00.
     Initilizing SIDEC01MD.MIX
     Initilizing SIDEC01.MIX
     Initilizing SIDENC01.MIX
RadarClass::Init_For_House()
MapClass::Init_Clear entry
MapClass::Init_Clear done
RadarClass::Init_Clear
RadarClass::Init_Clear done
Loaded 254 isometric tiles consuming 1541 Kb
Overlay Exception handler fired!
Exception C0000005 at 0F4EAF4A

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.
_________________
The Jaunt wrote:

It's eternity in there...

Last edited by Millennium on Tue May 19, 2015 10:04 am; edited 1 time in total

Back to top
View user's profile Send private message
Mig Eater
General


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Tue May 19, 2015 10:02 am    Post subject: Reply with quote

Just change the list back to it's original order.
_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Tue May 19, 2015 10:03 am    Post subject: Reply with quote

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.
_________________
The Jaunt wrote:

It's eternity in there...

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue May 19, 2015 10:20 am    Post subject: Reply with quote

List max length is 255. You can't add more than 255 Overlays

The game uses the index to find things.
If an Overlay is used already ingame, then do not change that.

Tiberiums have hardcoded indexes, so do not change the order.

If you mean with Header the ID, then yes, you can change these unused overlays.
_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Tue May 19, 2015 10:52 am    Post subject: Reply with quote

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.
_________________
The Jaunt wrote:

It's eternity in there...

Back to top
View user's profile Send private message
Mig Eater
General


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Tue May 19, 2015 11:02 am    Post subject: Reply with quote

Yes you can change the ID of the unused entries.
_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Tue May 19, 2015 11:19 am    Post subject: Reply with quote

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.
_________________
The Jaunt wrote:

It's eternity in there...

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue May 19, 2015 1:13 pm    Post subject: Reply with quote

Millennium wrote:
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.


Millennium wrote:
Also, it appears CellAnim does not work...

Try it with some other looping animation.
_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Tue May 19, 2015 11:34 pm    Post subject: Reply with quote

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.

This is my OverlayTypes:

Code:

; *** Overlay Object List ***

[OverlayTypes]
1=GASAND   ; Sandbag Wall
2=CYCL
3=GAWALL   ; Allied Wall
4=BARB
5=WOOD
6=unused
7=unused
8=unused
9=unused
10=unused
11=unused
12=unused
13=unused
14=unused
15=unused
16=unused
17=unused
18=unused
19=unused
20=unused
21=unused
22=unused

23=FENC
24=unused
25=BRIDGE1      ; 25 &
26=BRIDGE2      ; 26 are the same art.
27=NAWALL   ; Soviet Wall

28=GEM01
29=GEM02
30=GEM03
31=GEM04
32=GEM05
33=GEM06
34=GEM07
35=GEM08
36=GEM09
37=GEM10
38=GEM11
39=GEM12


42=TRACKS01
43=TRACKS02
44=TRACKS03
45=TRACKS04
46=TRACKS05
47=TRACKS06
48=TRACKS07
49=TRACKS08
50=TRACKS09
51=TRACKS10
52=TRACKS11
53=TRACKS12
54=TRACKS13
55=TRACKS14
56=TRACKS15
57=TRACKS16
58=TRACKTUNNEL01
59=TRACKTUNNEL02
60=TRACKTUNNEL03
61=TRACKTUNNEL04
62=RAILBRDG1
63=RAILBRDG2
64=CRAT01
65=CRAT02
66=CRAT03
67=CRAT04
68=CRAT0A
69=CRAT0B
70=CRAT0C
71=DRUM01
72=DRUM02
73=PALET01
74=PALET02
75=PALET03
76=PALET04
77=LOBRDG01
78=LOBRDG02
79=LOBRDG03
80=LOBRDG04
81=LOBRDG05
82=LOBRDG06
83=LOBRDG07
84=LOBRDG08
85=LOBRDG09
86=LOBRDG10
87=LOBRDG11
88=LOBRDG12
89=LOBRDG13
90=LOBRDG14
91=LOBRDG15
92=LOBRDG16
93=LOBRDG17
94=LOBRDG18
95=LOBRDG19
96=LOBRDG20
97=LOBRDG21
98=LOBRDG22
99=LOBRDG23
100=LOBRDG24
101=LOBRDG25
102=LOBRDG26
103=LOBRDG27
104=LOBRDG28
105=TIB01
106=TIB02
107=TIB03
108=TIB04
109=TIB05
110=TIB06
111=TIB07
112=TIB08
113=TIB09
114=TIB10
115=TIB11
116=TIB12
117=TIB13
118=TIB14
119=TIB15
120=TIB16
121=TIB17
122=TIB18
123=TIB19
124=TIB20
125=LOBRDGE1
126=LOBRDGE2
127=LOBRDGE3
128=LOBRDGE4
129=DUMMYOLD;gs another thing that is big and useless and getting loaded. VEINS
130=TIB2_01
131=TIB2_02
132=TIB2_03
133=TIB2_04
134=TIB2_05
135=TIB2_06
136=TIB2_07
137=TIB2_08
138=TIB2_09
139=TIB2_10
140=TIB2_11
141=TIB2_12
142=TIB2_13
143=TIB2_14
144=TIB2_15
145=TIB2_16
146=TIB2_17
147=TIB2_18
148=TIB2_19
149=TIB2_20
150=TIB3_01
151=TIB3_02
152=TIB3_03
153=TIB3_04
154=TIB3_05
155=TIB3_06
156=TIB3_07
157=TIB3_08
158=TIB3_09
159=TIB3_10
160=TIB3_11
161=TIB3_12
162=TIB3_13
163=TIB3_14
164=TIB3_15
165=TIB3_16
166=TIB3_17
167=TIB3_18
168=TIB3_19
169=TIB3_20
170=USELESS
171=SROCK01
172=SROCK02
173=SROCK03
174=SROCK04
175=SROCK05
176=TROCK01
177=TROCK02
178=TROCK03
179=TROCK04
180=TROCK05
181=VEINHOLEDUMMY
182=CRATE

184=unused
185=unused
186=unused
187=unused
188=unused
189=unused
190=unused
191=unused
192=unused
193=unused
194=unused
195=unused
196=unused
197=unused
198=unused
199=unused
200=unused
201=unused
202=unused
203=unused
204=unused
205=unused
206=unused

207=CAFNCB
208=CAFNCW

209=LOBRDB01
210=LOBRDB02
211=LOBRDB03
212=LOBRDB04
213=LOBRDB05
214=LOBRDB06
215=LOBRDB07
216=LOBRDB08
217=LOBRDB09
218=LOBRDB10
219=LOBRDB11
220=LOBRDB12
221=LOBRDB13
222=LOBRDB14
223=LOBRDB15
224=LOBRDB16
225=LOBRDB17
226=LOBRDB18
227=LOBRDB19
228=LOBRDB20
229=LOBRDB21
230=LOBRDB22
231=LOBRDB23
232=LOBRDB24
233=LOBRDB25
234=LOBRDB26
235=LOBRDB27
236=LOBRDB28
237=LOBRDGB1
238=LOBRDGB2
239=LOBRDGB3
240=LOBRDGB4
241=BRIDGEB1   ;241 &
242=BRIDGEB2   ;242 are the same art.
243=RUBBLE_OVERLAY
244=CAKRMW
245=CAFNCP
246=WCRATE
247=GAFWLL
248=LUNRK1
249=LUNRK2
250=LUNRK3
251=LUNRK4
252=LUNRK5
253=LUNRK6


250 list entries in total, which is the vanilla list, minus the two commented-out entries (GAFWLL and GAGATE_A).
_________________
The Jaunt wrote:

It's eternity in there...

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed May 20, 2015 5:15 am    Post subject: Reply with quote

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

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Mig Eater
General


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Wed May 20, 2015 5:17 am    Post subject: Reply with quote

If there are two entries with the same name only one of them is read, change the unused to unused01-unused40.

I don't see the point tho, it doesn't make any difference if they are called DUMMY01 or unused01 etc :/
_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
ApolloTD
Commander


Joined: 19 Nov 2003

PostPosted: Wed May 20, 2015 5:23 am    Post subject: Reply with quote

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 Smile

Back to top
View user's profile Send private message
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Wed May 20, 2015 7:05 am    Post subject: Reply with quote

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.
_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

Back to top
View user's profile Send private message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Wed May 20, 2015 10:24 am    Post subject: Reply with quote

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.
_________________
The Jaunt wrote:

It's eternity in there...

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [22 Posts] View previous topic :: View next topic
 Forum index » Modding Central » Red Alert 2 Editing Forum
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

Wildcard SSL Certificates
[ Time: 0.1542s ][ Queries: 11 (0.0169s) ][ Debug on ]