Custom palettes for animations.

Bug #895647 reported by Starkku
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ares
Fix Released
Wishlist
DCoder DCoder

Bug Description

Ares, as of 0.1, has custom palettes for SHP units/structures. This feature however, apparently does not enable custom palettes for animations. Therefore I propose either extension to the already existing custom palette function, or entirely independent way of using custom palettes for animations such as projectiles and explosions.

##### ADDITIONAL INFORMATION #####
For sake of convenience, custom animation palettes shouldn't require six theater specific palettes unlike the already existing Palette= feature. For that reason, this would probably require distinction from the aforementioned Palette= function.

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

I thought this already worked.
Support!

Revision history for this message
Starkku (starkku) wrote :

I tried this multiple times with no success. Additionally, manual bears no mention towards there being support for custom animation palettes. However, if for whatever reason I have missed something and this really already works, then just close this.

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

Code related to this issue has just been checked in!
Author: DCoder
Location: trunk, r938
Commit contains DLL: Yes
Revision comment:
Fixed issue #1037 - ;artmd.ini
[Animation1]
CustomPalette=abcd.pal ; always use abcd.pal

[Animation2]
CustomPalette=lib~~~.pal ; use libtem.pal, libsno.pal, etc. "~~~" is replaced with the theater's three-letter tag you should already be familiar with

Note that as a convenience, the ~~~ is now supported in other contexts where Ares' Palette reader is used, that is, on TechnoType/SW cameos. It's not supported for TechnoTypes themselves, as that would require a lot more clusterfucking to handle remapping colours and whatnot.

TODO: store palettes in a hash of some kind to avoid loading the same palette file N times.
Related to issue 1037 .
SVN: http://svn.renegadeprojects.com/Ares/938

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

Code related to this issue has just been checked in!
Author: DCoder
Location: trunk, r939
Commit contains DLL: Yes
Revision comment:
Eclipse SVN integration sucks hairy redneck gimp balls. Fixed DLL for latest revision.
Related to issue 1037 .
SVN: http://svn.renegadeprojects.com/Ares/939

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

Just tried this.

If its CustomPalette=unittem.pal, then it use unittem.pal
If its CustomPalette=plltw.pal, it use plltw.pal(thas a custom pal in my mix)
If nonthing is set, it use anim.pal

This works fine. I also tried with Translucent=yes and it worked(you never know what buggs that can appear)

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

Another confirmation. This works correctly.

Tested both generic and per-theatre versions.

Revision history for this message
mevitar (mevitar) wrote :

Also confirming. However, when testing an infantry spawning animation, I noticed that it doesn't get remapped when using a custom palette.

Personally, I'm fine with leaving it the way it is and just make a note of it in the documentation, since it would be hard to say if the modder uses remap colours in the palette (unless colors #15-#32 from the custom palette will be forced to be remappable when used on infantry spawning animations).

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

Yeah, making this work with remappable palettes would be a bitch, which is why I didn't try to do it... Thanks for testing though!

Revision history for this message
Rogan (pdrogan) wrote :

I've uploaded a picture with 3 different palettes, including a custom one, and an non-existant palette applied to a nuke animation.

Do I need to say anything else?

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

Sweet! It seems to work right.

One thing I just thought of - can someone test if the map lighting affects the appearance of the animation? (Think how certain indices in the palette are always at full bright and look silly in dark maps.)

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

Nor SW nor map lighting affects the animation... if I did the test correctly by attaching an-all white palette to one.

Revision history for this message
modder666 (modder666) wrote :

Map lighting affects the custom palette animations by brightening/darkening the anim based on the map's lighting values.

I'd say this issue can be closed, we have seem to checked into every aspect and provided positive, working feedback for it.

Revision history for this message
Starkku (starkku) wrote :

There is one, albeit definitely a minor flaw in this system. It does not work with projectile images, i.e any artmd.ini animation entry called from rulesmd.ini projectile Image=. It always draws it in palette.pal, anim.pal or unit*.pal depending on whether or not you have AnimPalette=yes and/or AltPalette=yes set and seems to completely ignore any custom palettes assigned.

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

Code related to this issue has just been checked in!
Author: DCoder
Location: trunk, r941
Commit contains DLL: Yes
Revision comment:
Related to issue #1037 - I have not tested this, but projectile anim palettes should work now.
Related to issue 1037 .
SVN: http://svn.renegadeprojects.com/Ares/941

Revision history for this message
Starkku (starkku) wrote :

Does not seem to work actually. Still apparently ignores CustomPalette= all together when used with projectiles.

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

Confirming that it doesn't work.

Even tried combining CustomPalette= with AnimPalette=yes... no result.

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

I am not following here Starkku.
Custom palette works fine for projectiles for me. Did I miss something?

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

Can you show your code and weapon?

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

What Graion said - the easier it is to reproduce the problem, the faster we can try to fix it ;)

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

Rules:

[Animations]
xxx=newproj

[105mm]
Damage=65
ROF=60
Range=5
Projectile=CannonNumber
Speed=40
Warhead=AP
Report=GrizzlyTankAttack
Anim=GUNFIRE
Bright=yes

[CannonNumber]
Image=newproj
Arcing=true
SubjectToCliffs=yes
SubjectToElevation=yes
SubjectToWalls=yes

Art:

[newproj]
CustomPalette=testel.pal

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

Wait a second, you have added it to the Animations list? Because the original projectiles aren't featured on the Animations list.

However, with listing there indeed works... which didn't happen in rev. 940, as I tested.

Should this be considered fixed, then?

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

in NPatch documention, it is written that if custom palette is used on animation, it must also be listed in [Animations], and I figured it was the same here.

Revision history for this message
cranium (cranium) wrote :

For me it works correctly with .shp projectiles, but dont seem to work with .vxl projectiles (even adding it to the [Animations] List)
But I dont think vxl's can have Custom Palettes anyway.

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

Cranium is correct, voxel projectiles don't work.

I forgot that they also can be used there.

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

Custom pal for any voxel type isn´t supose to work I think....

Revision history for this message
Renegade (renegade) wrote :

Since the description talks about expanding the existing custom palettes for SHP units/structures, I'd say voxels are out of scope for this one.

Revision history for this message
Rogan (pdrogan) wrote :

I've uploaded the results for when an animation is played with map lighting.

Revision history for this message
modder666 (modder666) wrote :

Voxels cannot have custom palettes as of now due to the interactions of voxels and the voxels.vpl file. Any attempts to change voxel palettes in the past have often yielded no success, where any changes were often pink in color. There isn't enough understanding of the voxels.vpl file to know how to change voxel palettes.

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

Correct, this will work on projectiles only if the image is added to the [Animations] list, and will not work on VXLs at all.

Revision history for this message
modder666 (modder666) wrote :

Gonna confirm this one, I'm noticing that when I use the CustomPalette= on a projectile with an [Animations] entry it works as intended.

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

Going to close this as fixed unless someone (Starkku?) can find more problems in the next six hours.

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

Aaaaand closed.

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.