Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Wed Apr 24, 2024 4:18 pm
All times are UTC + 0
Alternate tile splitting?
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [29 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Mon Jul 06, 2015 10:41 am    Post subject:  Alternate tile splitting? Reply with quote  Mark this post and the followings unread

So I notice FA2 at least is mixing the tileset variations when I place them, instead of substituting the whole piece... you can clearly see parts of my graffiti get abruptly cut off.

Is there any way to change this behaviour in FA2?



splitting.jpg
 Description:
 Filesize:  273.53 KB
 Viewed:  8074 Time(s)

splitting.jpg



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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Jul 06, 2015 10:46 am    Post subject: Reply with quote  Mark this post and the followings unread

You mean the column is a complete one in the SHP, but FA2 then mixes parts of 2 separate columns into one?
That is very strange.

Does that also happen ingame?
I only know from FinalSun, that the bridge column/start/end is often shown damaged in FS while perfectly fine looking ingame.
Maybe this is also a FA2 issue only and ingame it works.

_________________
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
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Mon Jul 06, 2015 11:14 am    Post subject: Reply with quote  Mark this post and the followings unread

FA2 & the game randomly select tiles separately so what you see in FA2 isn't the same as what will be ingame.

BTW the game randomly selects the first cell of a tile separately from the rest of the tile! So if you have two 2x2 tiles there is a 50% chance that the first cell will be from the other tile. All the tiles that use random selection in the original game tho are 1x1 so this bug/effect isn't normally seen.

As I pointed out before, bridges are also a special case where the random selection is instead used to for the damaged logic. The damaged/repair is also coded to only work with specific tile sets. So while looking nice these bridges cant be made to fully work.

_________________



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
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Mon Jul 06, 2015 12:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
You mean the column is a complete one in the SHP, but FA2 then mixes parts of 2 separate columns into one?
That is very strange.

Yes.

What you're seeing in the bottom row is the same bridge section with 3 alternates (fover03, fover03a, fover03b...) and as you see FA2 is sort of randomly placing bits of each.

The top right most graffiti-heavy column is almost correct, except the right side of the yellow gem is shown on the second from bottom, and apparently vice versa.

I haven't tried this in game yet, as I'm trying to figure out how to arrange these things, like if I can't make the alternates work properly, I might just re-number the whole set so each variation becomes a unique piece. This was supposed to be a simple test, but clearly a bit more complex.

Quote:
As I pointed out before, bridges are also a special case where the random selection is instead used to for the damaged logic. The damaged/repair is also coded to only work with specific tile sets. So while looking nice these bridges cant be made to fully work.

Like I said, I'm not worried about the logic, these would be for decorating a map, such as a poorer/ghetto section with damaged overpasses...

And if you're right about the random 1x1 tile being random, that doesn't explain what's going on here, these pieces are 2x5 and clearly several tiles are being switched.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

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


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Mon Jul 06, 2015 12:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

If the logic for those bridges work the same as actual tile variations from AutoLAT, then I think you might need to reconsider your design.

The thing is that the game always recalculates the AutoLAT tiles, it just sees a grass tile, next to it a pavement tile; oh, let's randomly select one of the a-g transition tiles. There is no indication which one is used.

So if it is indeed the same as the normal tiles, you're best bet is to resize the grafitti to fit a single cell.
That way nothing can get cut off.

But mind that it's just a thought as bridges use a different logic.
Did you test this in-game? Are the issues present there, too?

_________________


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
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Mon Jul 06, 2015 12:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

RP: As you know the original bridge columns are used with water tiles, so there's no MM or Morphable specified... and my hope is that the entire alternate piece is used rather than a few tiles from it only.

The next step is testing in game of course, need to figure out the logic, and go from there. Just thought someone might have experienced this before.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Mon Jul 06, 2015 12:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

Can't you make those as buildings instead of bridge pieces.

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


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Mon Jul 06, 2015 1:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

G-E, I don't see what Marble Madness or Morphable properties have to do with it.
I think you'll get the definitive answer when you test it in-game.  Razz
I'm looking forward to the results!

_________________


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
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Mon Jul 06, 2015 1:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ok back to back: CNC-Map-Renderer vs RA2.

Appears that the game does re-calculate alternates just like LAT, but the method is still wonky/uncertain...



render.jpg
 Description:
 Filesize:  260.64 KB
 Viewed:  8008 Time(s)

render.jpg



mixedup.jpg
 Description:
 Filesize:  269.36 KB
 Viewed:  8008 Time(s)

mixedup.jpg



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


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Mon Jul 06, 2015 1:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hmm... the bottom one is in-game?

I don't think you can rely on anything other than the game when it comes to this tiling.
I mean my suggestions are based off of some experience, so are the CNC-Map-Render's logics.

_________________


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
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Mon Jul 06, 2015 1:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

Sorry for not clarifying the main issue...

FA2 has always displayed large random tiles in this chaotic fashion & there is nothing you can do to fix it. It has no effect ingame tho & is limited to only the bridges (as LKO pointed out) & new custom made tile sets like the one you have made.

BTW; when you place a tile with multiple versions in FA2 it only places the first tile on the map (fover03), FA2 only emulates the random selection. When the game loads the map it will look to see if there are any other tiles (fover03a, fover03b). & then randomly pick one of them.

Because the alternative random tiles are only read when the map loads it is possible to add or remove them without breaking any existing maps.

_________________



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
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Mon Jul 06, 2015 1:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

Guys look at the second picture, top right, the pink graffiti is shown complete one of three only. The only reason I showed the render is to confirm what FA2 is showing, which is mixed up tiles.

Mig: Explain how FA2 is not placing the alternates on the map when you can save and reload the same ones? Yes the game recalculates them, but as far as FA2 is concerned, the map contains the alternates as placed...

Anyway, it looks like the short answer is that any piece with multiple tiles is susceptible to being mixed.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

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


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Mon Jul 06, 2015 1:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

It could be that FA2 actually saves the transition/randomized tiles.
The game could see the tiles as normal and recalculate the actual variation.

As said, you could continue with the single tile art, then it should work.

_________________


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
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Mon Jul 06, 2015 2:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
Mig: Explain how FA2 is not placing the alternates on the map when you can save and reload the same ones?

Just tested it to confirm; Loaded the same map several times in FA2 & the random tiles were different each time.

_________________



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
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Tue Jul 07, 2015 8:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

Mig Eater wrote:
G-E wrote:
Mig: Explain how FA2 is not placing the alternates on the map when you can save and reload the same ones?

Just tested it to confirm; Loaded the same map several times in FA2 & the random tiles were different each time.

Well that's super... but FA2 still does save them mixed, and the Maps-Renderer reads them mixed up, and so does the game. That means FA2 is writing them a certain way, but that all 3 are also recalculating each time they encounter any of the variations.

This means that regardless of which tiles you end up seeing, you still see them mixed up. I confirmed this comparing multiple renders as well.



redner1.jpg
 Description:
 Filesize:  298.07 KB
 Viewed:  7943 Time(s)

redner1.jpg



render2.jpg
 Description:
 Filesize:  307.27 KB
 Viewed:  7943 Time(s)

render2.jpg



finalalerty.jpg
 Description:
 Filesize:  478.01 KB
 Viewed:  7943 Time(s)

finalalerty.jpg



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


Joined: 09 Feb 2015

PostPosted: Tue Jul 07, 2015 9:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

Now I have discovered a further issue, in that FA2 is a smartass, it somehow knows which of my re-numbered tileset (all unique numbers) are actually alternates.

The above map was done with my tileset overriding the 0095 NEWY*.URB rubble tileset which has 23 tiles.

Now look at what FA2 shows me...



faahhhk.jpg
 Description:
 Filesize:  132.65 KB
 Viewed:  7939 Time(s)

faahhhk.jpg



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


Joined: 09 Feb 2015

PostPosted: Wed Jul 08, 2015 2:24 am    Post subject: Reply with quote  Mark this post and the followings unread

Weird, apparently I hadn't deleted some alternate tiles from the set and FA2 somehow decided which belonged to which but didn't match. Anyway, that issue is resolved, all tiles available Smile

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

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


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Wed Jul 08, 2015 6:58 am    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
I confirmed this comparing multiple renders as well.

That kinda confirms my point as well. The tiles are different in each of them, thus it's not saving a specific tile/cell to the map, only that it should use one of the variations.

You shouldn't re-numbered or override any of the existing tile sets, doing so can break all existing maps. You can add up to 999 tile sets, which is more then anyone will ever need so there is little reason to risk breaking the game.

BTW I noticed that on the one ingame pic you provided you were suffering from the bug I mentioned earlier that the first cell of the tile gets randomised separately from the rest of the tile, that's why it's "wonky/uncertain". To fix this you'll need to move any extra images attached to the first cell to another & then add an extra image to the second cell that covers the first, then ingame you'll see the extra image instead of the random cell beneath.

_________________



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
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Wed Jul 08, 2015 7:38 am    Post subject: Reply with quote  Mark this post and the followings unread

Mig Eater wrote:
G-E wrote:
I confirmed this comparing multiple renders as well.

That kinda confirms my point as well. The tiles are different in each of them, thus it's not saving a specific tile/cell to the map, only that it should use one of the variations.

What appears to be happening is that FA2 writes parts of your multi-tile object, with other tiles written as parts of alternates. So what you may see is the left 2 tiles belong to alternate A, the middle 3 belong to B, and so on. THEN the game reads the first alternate, recalculates for those tiles, bumps into the next tiles using a different alternate, and recalculates that independently. Which means it is recalculating it, but piece by piece.

As a mapper I've used many copy/paste tricks to create things you can't by respecting tileset sizes/shapes, which is more or less the same thing, just without the tiles being recalculated.

Mig Eater wrote:
You shouldn't re-numbered or override any of the existing tile sets, doing so can break all existing maps. You can add up to 999 tile sets, which is more then anyone will ever need so there is little reason to risk breaking the game.

Here I would tend to agree with you, except the RA2 urban theater at least contains tons of unused junk tilesets, you know the ones they scribbled over...

Mig Eater wrote:
BTW I noticed that on the one ingame pic you provided you were suffering from the bug I mentioned earlier that the first cell of the tile gets randomised separately from the rest of the tile, that's why it's "wonky/uncertain". To fix this you'll need to move any extra images attached to the first cell to another & then add an extra image to the second cell that covers the first, then ingame you'll see the extra image instead of the random cell beneath.

You mean one of my corner cliffs? The base tile creating a black triangle even though it's behind the extraimage of another tile, I have to make a complete base tile including part of the other tile's extraimage for that one. Or did you see something else?

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Jul 08, 2015 8:02 am    Post subject: Reply with quote  Mark this post and the followings unread

Mig Eater wrote:
You can add up to 999 tile sets, which is more then anyone will ever need so there is little reason to risk breaking the game.

Doesn't RA2 suffer from the same bug as TS when reaching 255 tilesets and more?
Terrain TileSet0255 Limit Bug

_________________
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
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Wed Jul 08, 2015 8:14 am    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
Or did you see something else?

The bridge sections in the top right here. The first cell + extra image in the left corner is different from the rest of the tile.

@LKO: To my knowledge no one has added more then 255 tile sets to RA2 yet & if they have they haven't reported that bug, so it's unconfirmed but possible.

_________________



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
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Wed Jul 08, 2015 8:47 am    Post subject: Reply with quote  Mark this post and the followings unread

I see no reason to assume RA2 supports more than 256 tilesets, and would likely support 256 pieces per set if it wasn't limited by filename.

Anyone familiar with the mappack can probably elaborate, but each tile should be represented by: tileset number + piece number in tileset + tile number in piece.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Starkku
Cyborg Commando


Joined: 28 Dec 2007
Location: Finland

PostPosted: Wed Jul 08, 2015 9:43 am    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:

Anyone familiar with the mappack can probably elaborate, but each tile should be represented by: tileset number + piece number in tileset + tile number in piece.


Tileset numbers are not referenced in map pack, only tile numbers (starting from 0, every tile in every tileset in the theater is numbered based on order listed with assumption that every tileset has TilesInSet amount of tiles regardless of if the files are present or not) and of course the subtile index in tile/tmp. This is also why changing tileset's TilesInSet value, removing tilesets entirely etc. messes up maps.

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Twitter Channel URL
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Wed Jul 08, 2015 8:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

Starkku wrote:
Tileset numbers are not referenced in map pack, only tile numbers (starting from 0, every tile in every tileset in the theater is numbered based on order listed with assumption that every tileset has TilesInSet amount of tiles regardless of if the files are present or not) and of course the subtile index in tile/tmp. This is also why changing tileset's TilesInSet value, removing tilesets entirely etc. messes up maps.

So you're saying every individual square tile in the tilesets is given a unique incremented number? 32bit integer?

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


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Wed Jul 08, 2015 9:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

There is one big list with all the possible and listed tiles, that's it. 1 list to get all data from.

_________________


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
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Wed Jul 08, 2015 11:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

Just curious, 16bit or 32bit number? 64k squares vs beeelions...

Although it does confirm that each tile has a unique reference, and allows exactly what I was suggesting by writing parts of alternate tiles to the map -- which get recalculated separately after.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
OmegaBolt
President


Joined: 21 Mar 2005
Location: York, England

PostPosted: Thu Jul 09, 2015 12:54 pm    Post subject: Reply with quote  Mark this post and the followings unread

I have been suffering this exact issue recently. I tried adding alternative shore tiles but ingame each cell is randomized separately, rather than the whole tile. However apparently Starkku does have multiple cell tiles that randomize fine, so I'm not sure exactly what the issue is. Part of me thinks perhaps FA2 is somehow reading my tiles wrong and places them as individuals (such as when doing cut n paste) so it is no longer one big tile ingame.

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


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Thu Jul 09, 2015 2:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

Code:
 struct IsoMapPack5Tile {
   __int16 X, Y;
   __int32 TileTypeIndex;
   byte TileSubtypeIndex;
   byte Level;
   byte Unknown;
 }


This is what IsoMapPack5 contains.
It contains location and the exact tile that is in the cell.
FA2 can most likely not mess this up, all tiles are individually saved as shown above.

_________________


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
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Thu Jul 09, 2015 10:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

OmegaBolt wrote:
Part of me thinks perhaps FA2 is somehow reading my tiles wrong and places them as individuals (such as when doing cut n paste) so it is no longer one big tile ingame.

I'm sure this is exactly what happens, it will mix cells from the various alternates. I also confirmed this happens on 2-wide cliff faces as well, so the pieces don't have to be very large at all to manifest this issue.

Now there seems to be some bias towards using the base tile more than alternates when it gets re-calculated by the game, but there doesn't seem to be a way to alleviate the issue entirely. Even confining your variations to individual cells won't fix it because of the extraimage overlap.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [29 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
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

[ Time: 0.2171s ][ Queries: 20 (0.0183s) ][ Debug on ]