Allow infinite extra palettes for buildings and infantry.

Bug #894852 reported by pd
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ares
Fix Released
Wishlist
Unassigned

Bug Description

Allow infinite extra palettes for buildings and infantry.

Revision history for this message
pd (pdmail) wrote :
Revision history for this message
Bug Importer (bug-importer) wrote :

Any chance of overlays & terrain getting custom pals too?

Revision history for this message
pd (pdmail) wrote :

I will try to enable any (at least SHP) object to use a custom palette, which would include overlay and terrain.
The hack I'm talking about here was the simple limit which generated the infamous log message "You have violated the limit of having only one extra building palette".

An advanced feature will most definitely follow!

Revision history for this message
DCoder DCoder (dcoder1337) wrote :

This has been fixed for a while, I just never saw this bug to mark it.

Revision history for this message
Bug Importer (bug-importer) wrote :

I dont understand how this works.
How can you have more than on palette on a infantry/building, when SHP builder only allow you to use on at the time

Revision history for this message
MRMIdAS (mrmidas) wrote :

nonono.

you can only use one palette for every building.

Now you can have a different palette for each building.

Revision history for this message
DCoder DCoder (dcoder1337) wrote :

And that is why reading comprehension 101 is important.

Revision history for this message
Nighthawk (nighthawk) wrote :

Thought I'd test a few of the "resolved but not really resolved" issues from the forum topic.
I can't seem to get this one to work.
I have three palettes - foo.pal, bar.pal and woohoo.pal. Tried them both loose in the RA2 directory, and within an expandmd mix file.
Applied Palette=xxxx to ADOG, GI, GGI and GAPOWR (using a different palette on each). No change in game. Tried changing the tags to Palette=xxxx.pal, still no joy.

Revision history for this message
DCoder DCoder (dcoder1337) wrote :

Try [GAPOWR]Palette=foo and footem.pal, foosno.pal, foourb.pal ... But it only works on buildings so far, I still have to add the code for infantry -> reopening.

Revision history for this message
Nighthawk (nighthawk) wrote :

Works... and oddly enough, worked on the GI too (forgot to remove the Palette entry from before).

Revision history for this message
DCoder DCoder (dcoder1337) wrote :

lol, yeah, now that I look at the code it'll work on infantry as well (and SHP vehicles also)... Guess that means this can be closed now.

Revision history for this message
Nighthawk (nighthawk) wrote :

Reopening per discussion in chat, Graion has discovered that the custom palettes logic does not work on SHP VehicleTypes. The manual states that it should work on *all* TechnoTypes.
Graion has tested this with both the public and the latest testing builds, using both the Palette=FOO and Palette=FOO.pal variants (with all necessary files), all with the same results.

Revision history for this message
cranium (cranium) wrote :

Custom palettes work on Vehicles/Infantry/Building .shps just fine.
It requires having the palette in all theaters.

palette.tem
palette.sno
palette.urb
palette.lun
palette.des

Then in artmd.ini add palette=palette "without the theater ext."
and then it will work.

added pic showing vehicle using a custom palette.

Revision history for this message
DCoder DCoder (dcoder1337) wrote :

Which revision are you using, guys? In r946 the code was changed to work like this:

Palette=foo.pal ; palette is loaded as specified
Palette=foo~~~.pal ; ~~~ is replaced with the theater's tag

Edit: no, that will work for animations and stuff. Units, infantry, aircraft and buildings still use WW's old loader which always appends the theater suffix.

Revision history for this message
Graion Dilach (graiondilach) wrote :

Are you sure, Cranium? Because I use the TS Titan with a recolored unittem and even an all-red one. Tested with your idea, YR Modder's suggestion @ PPM, without theaterspecific palettes, with pal specified...

YR Modder's suggestion (mmch2=mmch2lun.pal etc.) worked if I applied it to INIT and YACNST.

Here's my code:

[MMCH2] ;to not interfere with the leftover Titan files
Voxel=no
Remapable=yes
Cameo=MMCHICON
AltCameo=MMCHUICO
Palette=MMCH2
PrimaryFireFLH=0,-50,100
PBarrelLength=250
SBarrelLength=250
TurretOffset=0
WalkFrames=15

[LOLWUT];set Turret=no in rulesmd ini, this is the legs-only to see the diffs
Voxel=no
Remapable=yes
Cameo=MMCHICON
AltCameo=MMCHUICO
;Palette=MMCH
PrimaryFireFLH=0,-50,100
PBarrelLength=250
SBarrelLength=250
TurretOffset=0
WalkFrames=15

[INIT]
Palette=MMCH2

[YACNST]
Palette=MMCH2

Revision history for this message
cranium (cranium) wrote :

yes I'm sure. I wouldnt lie to you. I have made 8 vehicles using cutom palettes and all of them use thier palettes correctly.

I see your using Palette=mmch2, do you have mmch2 in all theaters? you should have, mmch2tem.pal, mmch2sno.pal, mmch2urb.pal, etc, etc.
If you have just plain ol' mmch2.pal in your directory remove it, cause it will still call for it but wont display the palette correctly.

Revision history for this message
Graion Dilach (graiondilach) wrote :

Removed plain mmch2, doesn't worked. I forgot mention that when I hared the code, I added a pic, too.

Revision history for this message
cranium (cranium) wrote :

are you trying to use new palettes on existing stuff? That wont work unless you extract all the images "frames" and and remake it using a custom palette.

remake your mmch2 usimg one of the new mmch2 theater specific palettes. Then try it.

Revision history for this message
Graion Dilach (graiondilach) wrote :

Sincerely, I don't think that's needed, since the INIT was already repaletted with my custom all-red palette.

And the orig mmch.pal was designed solely with the orig Titan in my mind.. also I resaved it in SHP Builder.

Revision history for this message
cranium (cranium) wrote :

Well, I'm not sure where your problem lies at Graion, but rest assured it does work.
Only thing else I can think of is your just opening up a .shp file in shp builder and then trying to resave it with a different palette. It wont work like that if thats what your doing. You have to remake the shp from scratch by exporting the images from shp builder into a folder and then re-import them into shp builder using one of the new palettes.

Revision history for this message
Graion Dilach (graiondilach) wrote :

Tried, no luck.

Also, an interesting thing related to Palettes... Disguise cannot reset the palette. I mean, spies disguised as a custompalleted unit will show the disguise in their own palette.

Revision history for this message
cranium (cranium) wrote :

Hmmm, well I dont know then bro, it works for me. That pic up top of mine isnt a faked photoshop image, it's an actual ingame vehicle shp unit using a custom palette. I dont see why it would work for me and not you. My Ares.dll's arent any different than yours, except for the one I use now that I compiled myself, but I tried this with 0.1P1 and a few others in between up to most recent revision and worked everytime.

Revision history for this message
WoRmINaToR (worminator) wrote :

if you guys have teamviewer, you can hook up with that and graion can watch exactly what you do and see what he's doing wrong... if there is no difference in method then we got a bug. One extremely strange, elusive, and inconsistent bug, but a bug nonetheless.

Revision history for this message
DCoder DCoder (dcoder1337) wrote :

Also, an interesting thing related to Palettes... Disguise cannot reset the palette. I mean, spies disguised as a custompalleted unit will show the disguise in their own palette.
Make a separate bug report for that, I think this will have to wait until after 0.2 .

Revision history for this message
YR M0ddEr (yr-m0dder) wrote :

Graion Dilach can you re explain what the problem is(didnt really get it)? For me, custom palette works fine for buildings, infanftry and vehicles(just tested).

Revision history for this message
Graion Dilach (graiondilach) wrote :

I created a custom palette for the TS Titan and while the game accepts the custompallette on other units, the TS Titan still palletted on unittem.pal.

It shouzldn't been the pallette's problem, since when I thought I'm doing it wrong, I created a custom all-red palette and attached it to the Titan, it still was unittem. I attached the same palette to INIT and YACNST and they were repaletted. (See code and screenshot)

Did you test on VXL or SHP vehicles, YR M0dder?

Revision history for this message
YR M0ddEr (yr-m0dder) wrote :

I tested on shp. Is your Titan a voxel?
Or, if body is SHP, and turret is voxel, then it will fuck up

Revision history for this message
YR M0ddEr (yr-m0dder) wrote :

Oh I found an bug.
About voxel turret and shp boddy, never mind that, I am not sure about that.

But this is tested:
If a SHP vehcile have a SHP turret, Palette tag will be ignored.

Here is how I tested, i used cyclop.shp in this rar:
http://www.ppmsite.com/forum/download.php?id=17267

Used these codes:
Art:
[CYCLOP]
Voxel=no
Remapable=yes
Cameo=CYCLOPICON
PrimaryFireFLH=150,-100,150
PBarrelLength=250
Facings=8
StartWalkFrame=0
WalkFrames=18
SBarrelLength=250
TurretOffset=-16
Palette=ZABB

Rules:
[HTNK]
Image=CYCLOP
Turret=yes

Results, the custom palette wasnt applied, then in rules, I changed Turret= to "no", and the custom palette was applied.

I also tried Palette=
- zabbtem.pal
- zabbtem

Revision history for this message
Renegade (renegade) wrote :

Graion, could you please check which units work with custom palettes and which ones don't?
We need to figure out what exactly prevents the palette from working: Whether it's the SHP-ness, the turret, or something else.

Revision history for this message
Graion Dilach (graiondilach) wrote :

Will do.

Revision history for this message
Graion Dilach (graiondilach) wrote :

Report on Palettes:
Building with animation: Works. Animations also repaletted.
Solely attached to building animations: No. Building and the animations share the palette.
Building with SHP turret (used pd's Flame turret for testing): Works.
Building with VXL turret: Surprise A, the voxel is also repaletted.
Infantry: works
Nonturreted SHP unit: Works.
Turreted SHP units: Not working.
VXL units: Not working.

Attached a screenshot, Terror Drone, Sentry Gun, pd's Flame turret, and 3 versions of the TS Titan, one with SHP turret, VXL barrel, one with solely the SHP turret, one without.

Turret=yes causes the problem.

Revision history for this message
Renegade (renegade) wrote :

Thank you, could you put that in a new bug report with example code for all non-working cases?

Gluk-v48 (gluk-v48)
Changed in ares:
status: New → Incomplete
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.