Posted: Tue Oct 21, 2014 7:51 am Post subject:
Overlay Frames Limit
While adding tracks to DTA, i had to notice that FinalSun can handle only max 60 frames for a single Overlay.
Does anyone know how the OverlayDataPack in a map works? I would like to set manually a higher frame to check if the game can handle more and if the 60 frames limit is only a FinalSun issue.
Right now the only way would be creating another Overlay with the missing frames, but that would be quite unclean. (Also problematic since FinalSun renders only Tracks1-16 correct and any other Overlay is shown 12 pixel upwards, so you would have to give FS a special SHP with the frames moved 12 pixel down in the canvas)
OverlayLimit.png
Description:
Basically very convenient that one Overlay can give you many different pieces via the frames. Too bad it's limited to 60 frames in FinalSun. The set actually has 70 frames, including corners for the last tracks-only pieces.
Basically, you can only have 0 - 254 frames (or 255, IIRC that was used in OverlayPack to specify cells without Overlay).
The compression works with bytes and well... you know that bytes can be 0 - 255.
OverlayPack holds the index of the OverlayType used on a cell, this can be 0 - 254 because 255 is used to specify a cell without an OverlayType on it.
OverlayDataPack holds the index of the frames from the OverlayType you use.
Don't assume that when FinalSun doesn't show everything (correct) it doesn't work, you know how great the tool is.
Theoretically you can have 0 to 254 (or again, 255) frames for an Overlay item on a map.
It could perhaps be that Tracks have special logic attached to them (index X is always tracks in OverlayTypes list) which could explain some different behaviour.
Creating a new OverlayType for the missing frames is in this case not-done, as Tracks are hardcoded to a specific index range AFAIK.
You could test this in-game, unfortunately there's no way of hacking in the frame index in FinalSun.
I could try parsing the map and inserting different frame indexes with the map editor from myself, but it is not optimized for TS so it might result in strange behaviour. If it's for TS I might have to add some method calls to also read firestrm.ini.
Then again, you can always try _________________
Thanks for the info about OverlayPack and OverlayDataPack. I only knew the limit of 255 for each, but not their difference.
I changed one Overlay from one frame to another and compared the old with the new map
In the OverlayDataPack i have the following changes
from
6=cBfgqAYwAA
to
6=cBfgqAaAAA
How does Yw translate into frame 02 and aA into frame 60 (assuming that the first frame has index 1 and not 0)?
TS has Tracks 13-16 with unused frames set. Thus it's no problem to replace these 4 Overlays with sets that have multiple tracks on different frames in one single Overlay.
I assume the only hardcoded stuff about the tracks has something to do with the trains pathfinding and the auto-track-placing tool in the map editor (WW internal map editor worked probably similar to FinalSun). Other than that, do other overlays work as well for trains.
Joined: 22 Nov 2010 Location: Iszkaszentgyorgy, Hungary
Posted: Tue Oct 21, 2014 10:51 am Post subject:
His map editor is still WIP AFAIK. _________________ "If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more... QUICK_EDIT
Yeah, it's still a WIP. I believe we spoke about it too, LKO
You're talking about the lines in a map file with that 6= thing, right?
If so, you are editing a Base64'd RLE compressed line, which you shouldn't do.
Not to be harsh, but you have no idea what you're editing; the lines are cut off after 70 characters by default which doesn't mean each new line is a new command or frame index.
The chance you're editing an actual OverlayType frame index and not a compression command byte (the byte it uses to see how to handle the data after it when decompressing).
Best thing to do is fully parse it (Base64, then decompress) to edit the frames.
Quote:
Other than that, do other overlays work as well for trains.
You mean that other OverlayType indexes work as well, or are you asking me this? _________________
Yeah, it's still a WIP. I believe we spoke about it too, LKO
I don't think so, or i completely forgot about that. But beside zz-attacks map renderer, this is the first time for quite a while that i hear another map editor is in the works.
about Base64, that explains a lot. Thanks for the info.
I gave it another test and only changed a single overlay from frame 59 to 60. This only changed a single byte in the overlaydatapack. This way i could enter easy a higher value.
Ingame i was able to see frame 61, while FinalSun only shows me 0x34 as hex value on the cell.
So at least i can confirm that it's a FinalSun only issue of not supporting more Overlay frames.
RP wrote:
Quote:
Other than that, do other overlays work as well for trains.
You mean that other OverlayType indexes work as well, or are you asking me this?
yes, i mean other OverlayType indexes work too. When you set Land=Railroad, the train can use any other overlay.
However in the past, tests revealed that if you set MovementRestrictedTo=Weeds (or Ice) for a train and then use Land=Weeds (or Ice) on the tracks, the train pathfinding gets unreliable (wagons randomly disconnect from the train; train simply stops without a cause etc)
So there seems to be something special hardcoded to TerrainType Railroad and the pathfinding algorithm. _________________ SHP Artist of Twisted Insurrection: Nod buildings
as written, i took the map with FinalSun, changed a single overlay from frame 60 to 59, saved the map and compared old with new one. Then i edited the single byte that changed between the 2 versions.
RP wrote:
As for tracks, you edited something to Land=Railroad.
That does mean there is initial hardcoding for tracks then
why does that mean this? All normal tracks 1 to 16 have Land=Railroad set in rules.ini too. Nothing hardcoded there. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Isn't that what you insinuated with the talk about Land and MovementRestrictedTo?
Only concerning train-pathfinding or movement in combination with Railroad TerrainType. Trains work only well on Railroad terrain. Other terraintypes cause trouble.
Track Overlays however, don't seem to have any hardcodings attached to them. _________________ SHP Artist of Twisted Insurrection: Nod buildings
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