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 Thu Apr 18, 2024 3:21 am
All times are UTC + 0
Strange palette/vpl results...
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [13 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Tue Nov 15, 2016 1:57 am    Post subject:  Strange palette/vpl results... Reply with quote  Mark this post and the followings unread

So as most of you probably realized, I made a new palette and vpl to go with it, I then made a new cscheme and converted my civilian voxels to test with, though since my Soviet units use grayscale almost entirely and I've retained the blues for Allies, neither of which was altered, I figured this would be a fast test regime. Didn't work out that way though.

I'll skip describing the mix issues and whatnot troubles I had, and focus on the the core issues, since I'm still not 100% certain of what the results told me.

So first things, including the vpl does change things, still not figured out the bestest way to make the vpl achieve what I would like, but since I never hated RA2 lighting, I was more interested in making new shades work anyway. Short answer is vpl loads fine.

Secondly, the new palettes do not. My initial tests were to include my new unittem.pal with the vpl and see what happens on my test maps. One of the colour ranges I added (burgundy) sits in one of the snowy blue ranges on unitsno.pal and thus I figured there was no issue with accessibility, unlike the weird results I had with the 4 colours just after the 4 reds on the originals. When I tested a unit using these burgundys on a snow map, I ended up with light blue, which is when I first realized it must be at least loading unitsno, though at the time I still assumed it would use unittem for urban, yet I still didn't get to see _my_ palette on other theaters. Naturally the easiest troubleshooting option was to duplicate my new palette for every theater as a test, to which the game immediately crashes.

After more tests, I realized that if I removed unitsno.pal from my mix, the game wouldn't crash anymore. I tried adding the original WW palettes to it, which again crashed, and the crash is immediate a split second after the load screen. Rolling with it I decided to do tests using a replacement unittem and uniturb only. This resulted in garbled colours, with or without my vpl, the result was unusable. Next I tried the WW palettes again, and saaaame result! It seems for some odd reason, the game refuses to decode my replacement palettes correctly from those embedded in cache.mix...????

PS. I'm beginning to wonder if the erroneous decoding is also responsible for the crash with unitsno...



convertedunits.jpg
 Description:
 Filesize:  131.58 KB
 Viewed:  2747 Time(s)

convertedunits.jpg



vplnopal.jpg
 Description:
 Filesize:  195.9 KB
 Viewed:  2747 Time(s)

vplnopal.jpg



vplplustem.jpg
 Description:
 Filesize:  367.38 KB
 Viewed:  2747 Time(s)

vplplustem.jpg



vplplusurb.jpg
 Description:
 Filesize:  181.6 KB
 Viewed:  2747 Time(s)

vplplusurb.jpg



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

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Tue Nov 15, 2016 11:51 am    Post subject: Reply with quote  Mark this post and the followings unread

I stored unittem replacements in expandmds successfully in YR, and I never seen issues like this. I never messed with cache.mix though.

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

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


Joined: 09 Feb 2015

PostPosted: Tue Nov 15, 2016 12:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

It almost seems like it is loading the palettes to a pre-defined compressed memory space, that the alternative colours either don't fit, or cross boundaries it doesn't expect. Though I have trouble believing this would be the case, the resulting numbers might be out of range then.

Alternatively I'm wondering since it seems to bork on snow palettes, maybe those are loaded first for some kind of housekeeping check, if so it's possible this could be disabled with exe patch by someone familiar with tracing this stuff ... any volunteers?

Keep in mind this is RA2, before they may have unlocked or changed the code for handling the palettes for the YR expansion. I'm also pretty sure that even though the theater inis allow huge numbers of tilesets, RA2 is limited to 128 per, although I suspect 126 or 127 because of the number shift, something again changed for YR since NewUrban uses more.

Anyway figuring there might be some critical importance attached to some palettes, and others are deemed uncritical, I decided to quickly test what happens if I add others to my expand99.mix. As you can see below, I added all the temperate ones, the original WW versions for all, but still get messed up units, however the terrain renders just fine? I then tried adding isosno.pal which promptly crashes at loadscreen. I repeated the test with anim.pal, same thing, crash. Ignore any fears about corrupt mixes from the Mix Editor, I used Mixer for early tests with no difference in behaviour.

Since I'm getting contradictory results, I was wondering if my other palette copies were even loading, and therefore made a copy of my unittem named isotem, the result is everything messed up, see #3.



tempers.jpg
 Description:
 Filesize:  58.01 KB
 Viewed:  2712 Time(s)

tempers.jpg



stillno.jpg
 Description:
 Filesize:  283.64 KB
 Viewed:  2712 Time(s)

stillno.jpg



shmoo.jpg
 Description:
 Filesize:  284.95 KB
 Viewed:  2712 Time(s)

shmoo.jpg



_________________
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: Tue Nov 15, 2016 12:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

I would not under any circumstances use XCC Mix Editor over XCC Mixer. The former has some problems that sometimes result in corrupted mix files.

Not that this necessarily relates to your issue at hand but it's something to consider.

EDIT: I can confirm that vanilla Red Alert 2 appears to behave differently in respect to loading palettes. Only way I was able to make it read custom unit palettes properly was to place them in cache.mix with all other game palettes and place it as loose file in the game directory (thus overriding ra2.mix one). I was not able to reproduce your weird color distortion issue though.

_________________

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: Tue Nov 15, 2016 1:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

It isn't, I specifically included that very topic, because I knew someone would bring it up. I've always had good success using it as long as my mixes were below 6mb, anything above that and I could get corrupted objects, which can cause fatal crashes, at increasing percentages. This isn't the case for a tiny little file with palettes.

Sooo I had a great idea, I set one of my buildings to Palette=lib, just to see if it would load that palette correctly. I tried both removing the lib* palettes from my mix, and copying uniturb->liburb and trying again. In the case of no palette, it appears to be rendered correctly to the liberty palette since it turns a strong biege which that one is skewed to, but when using my unit-cum-lib palette, it also renders incorrectly as when the building has no =lib setting. This shows it is loading the lib* from my mix, but it won't load the unit* faithfully.

Very weird.

Both my updated and the original unit palettes load correctly as per Pal Editor, VXLSE and MadHQ's vpl tool.... if there's a problem with the pal file itself, I can't see one?

Update #1: Made a new all-greenish palette, copied it as liburb/uniturb/isourb, as you can see the terrain changes fine, the trees become invisible, but the objects using uniturb are still messed up. For even more confusion, my =lib building is also just as messed rather than green.

Any thoughts?



allgreen.jpg
 Description:
 Filesize:  79.01 KB
 Viewed:  2681 Time(s)

allgreen.jpg



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

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Wed Nov 16, 2016 12:09 am    Post subject: Reply with quote  Mark this post and the followings unread

Maybe replace the palette in the VPL as well?ű

I always got corrupted mix every time I clicked on the Compact button on Mix Editor (saving alone worked reliably only), regardless of filesize.

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

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


Joined: 09 Feb 2015

PostPosted: Wed Nov 16, 2016 1:42 am    Post subject: Reply with quote  Mark this post and the followings unread

I don't know how you expect me to replace the palette inside it, I've saved my vpl using both Starkku's tool and MadHQ's tool at various points with no effect on the garbling. More to the point the buildings are equally screwed up which don't use vpl.

I can even verify that both their tools read the other's output correctly, the same way they all read the palette I give them.

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

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


Joined: 09 Feb 2015

PostPosted: Wed Nov 16, 2016 1:52 am    Post subject: Reply with quote  Mark this post and the followings unread

Starkku wrote:
EDIT: I can confirm that vanilla Red Alert 2 appears to behave differently in respect to loading palettes. Only way I was able to make it read custom unit palettes properly was to place them in cache.mix with all other game palettes and place it as loose file in the game directory (thus overriding ra2.mix one). I was not able to reproduce your weird color distortion issue though.

Missed you there...

So I had tried making my own cache.mix which had the same crashing behaviour earlier, but after hearing you, I decided to extract the original cache.mix and retain all its existing contents including key. That allows the game to load, but now crashes at map loading approximately where it does for a corrupted voxel mix.

Any tips? What did you do precisely?

*edit* Well I wasn't expecting that, but somehow my civilian building mix is causing it to crash, if I rename it and load the game, no crash now... we're learning a lot today.



newpally.jpg
 Description:
 Filesize:  213.08 KB
 Viewed:  2636 Time(s)

newpally.jpg



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

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


Joined: 09 Feb 2015

PostPosted: Thu Nov 17, 2016 12:51 am    Post subject: Reply with quote  Mark this post and the followings unread

Ok, so some conclusions:

1. RA2 (unlike YR) needs replacement palettes placed in cache.mix
1A. ...except iso*.pal which will load from ecacheXX.mix
2. RA2 will supplant the internal cache.mix when using external cache.mix
2A. ...and will crash if content isn't entirely duplicated in the new mix
3. VPL needs to be placed in expandXX.mix

_________________
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: Thu Nov 17, 2016 7:35 am    Post subject: Reply with quote  Mark this post and the followings unread

Isotem can be placed in expandXX too.

Don't use Mix Editor, it creates corrupt header even with less than 6mb. Create
new empty mix files using XCC Mixer and drag and drop files into it.

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


Joined: 09 Feb 2015

PostPosted: Thu Nov 17, 2016 9:14 am    Post subject: Reply with quote  Mark this post and the followings unread

Please I probably have more experience than any of you using Mix Editor, because prior to last year, that's all I ever used... on 3 different computers no less.

I can even tell you that RA2 will not load my mod if packed with ccmix either, though it is possible ccmix makes them correctly for YR and newer engines, which is unfortunate because I would have liked to create a kind of "build world" batch file.

Apparently the quirks of RA2 are not well known....

_________________
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: Thu Nov 17, 2016 9:41 am    Post subject: Reply with quote  Mark this post and the followings unread

I too have used Mix Editor for all my early years (atleast 5), never had problem
until I switched to Win7 from XP. When I saw the difference in the header of mix
created from empty mix file using Mix Editor and XCC Mixer, and game crashed
from the one created with Mix Editor, I changed to XCC Mixer.

If you don't understand how to put content into mix files using XCC Mixer, then
ask for it. But if you don't want to change from Mix Editor, then it is up to you.

I didn't mention ccmix, though mix file format is same for TS to RA2 to YR. Only
XCC introduced a 1 byte marker to differentiate between TS and RA2YR, which
probably is never used.

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


Joined: 09 Feb 2015

PostPosted: Thu Nov 17, 2016 10:19 am    Post subject: Reply with quote  Mark this post and the followings unread

Since you must keep harping on about it, yes I primarily use Mixer to do it too, and the palette troubles I was having were not related to one or the other as I experimented with both. So please stop!

PS. Mixer can create errors too, it just happens less often, and it would be nice to know why.... but I believe it is some rarely occurring sequence since sometimes one of my assets has to be added early or late to avoid creating that repeatable condition.

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

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [13 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.1777s ][ Queries: 22 (0.0204s) ][ Debug on ]