:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: 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 Wed Jan 24, 2018 7:17 am
All times are UTC + 0
 Forum index » Modding Central » Tiberian Sun Editing Forum » Mapping Discussion
Overlay Frames Limit
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [10 Posts] View previous topic :: View next topic
Author Message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Oct 21, 2014 7:51 am    Post subject:   Overlay Frames Limit Reply with quote

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.
 Filesize:  51.42 KB
 Viewed:  1954 Time(s)

OverlayLimit.png



_________________
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
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Tue Oct 21, 2014 10:26 am    Post subject: Reply with quote

Oh oh oh, I know! #Tongue

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 Very Happy
_________________


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
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Oct 21, 2014 10:38 am    Post subject: Reply with quote

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.


You made a map editor? Is it public?
_________________
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
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyörgy, Hungary

PostPosted: Tue Oct 21, 2014 10:51 am    Post subject: Reply with quote

His map editor is still WIP AFAIK.
_________________



AS Discord server: https://discord.gg/7aM7Hm2

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


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Tue Oct 21, 2014 10:58 am    Post subject: Reply with quote

Yeah, it's still a WIP. I believe we spoke about it too, LKO #Tongue

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


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
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Oct 21, 2014 11:14 am    Post subject: Reply with quote

RP wrote:
Yeah, it's still a WIP. I believe we spoke about it too, LKO #Tongue

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

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
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Tue Oct 21, 2014 11:21 am    Post subject: Reply with quote

How did you find out what to edit in the [OverlayDataPack]?
You put a track with a different index there I presume?

As for tracks, you edited something to Land=Railroad.
That does mean there is initial hardcoding for tracks then #Tongue
_________________


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
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Oct 21, 2014 11:48 am    Post subject: Reply with quote

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 #Tongue

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

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
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Tue Oct 21, 2014 11:57 am    Post subject: Reply with quote

Ah, that's one way to do it. I thought you were only working with the packed section.

Isn't that what you insinuated with the talk about Land and MovementRestrictedTo?
_________________


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
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Oct 21, 2014 12:12 pm    Post subject: Reply with quote

RP wrote:
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

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
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [10 Posts] View previous topic :: View next topic
 Forum index » Modding Central » Tiberian Sun Editing Forum » Mapping Discussion
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.2354s ][ Queries: 15 (0.0810s) ][ Debug on ]