Posted: Thu Feb 22, 2024 10:07 pm Post subject:
How to add custom palette for voxels using Phobos?
I've been experimenting with the palette used for units(voxels). It ended up messing with the palettes for buildings, infantries, and other shps.
I've tried searching if I could give the units(voxels) have their own custom palette and saw this:
https://ppmforums.com/topic-54148/custom-palette-for-voxel/
I stopped messing with palettes for a while and did other things like making new voxels and saw in Phobos website in "Fixed / Improved Logics":
- Both voxel and SHP vehicle units should now correctly respect custom palette set through Palette. (Starkku)
I'm wondering what this meant. I've put Palette=unit.pal first then Palette=unit both in artmd and rulesmd for a unit(voxel) and nothing happened. QUICK_EDIT
Whatever support there is for the palette, remember the VPL controls voxel lighting and it expects certain colours to be where they are, so choosing a different palette for a voxel will probably look like hot garbage. _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
I'm pretty sure the default logic of Palette=blah.pal is that it looks for blahtem.pal, blahsno.pal, etc.
I've changed the names to blahtem.pal, blahsno.pal, etc. Still nothing happened. Tried it on both artmd.ini and rulesmd.ini.
G-E wrote:
Whatever support there is for the palette, remember the VPL controls voxel lighting and it expects certain colours to be where they are, so choosing a different palette for a voxel will probably look like hot garbage.
I've already change the VPL a long time ago so it stays closer to what it looks like in the VXLSE. The reason why I needed to know how to add custom palette is more for the buildings.
For example, the green in the Nuclear Reactor animation when it glows uses the unittem.pal palette so if I change it, it will also change the color of the glow of the Nuclear Reactor into that color as well as other buildings that uses the unittem.pal palette QUICK_EDIT
Well that wasn't the question, you asked about voxels specifically, and if you change the VPL you just change unit*.pal with it, no special code required.
But to answer the simplest way to use a new unit*.pal with voxels while using the old version for buildings is to replace the lib*.pal files with the old unit equivalents, and just add Palette=lib to every building art entry. Thus you can instantly use existing art with correct colours.
The question was to add custom palette to voxels and the reason was because I have a problem with the buildings using the unit*.pal,
so I plan to just change the units palette since I might have custom colors for each faction to use.
Another thing is that putting palette=lib didn't work. Just so anyone could test, I'll give some files and an image of what my Nuclear Reactor looks.
Please show me the code you used for artmd.ini for both unit and buildings if you were able to use custom palette for them both. Just add this to artmd.ini and use Image=MORG to your unit in rulesmd.ini:
(MORG has a different color originally. I just changed it so it would look noticeably different using the unused section of the palette)
Palette=lib in the art.ini entry for the building, it works because I use it in my mod, but like I say you have to copy the old unit pals to lib pals to override the original lib pals.
I'm doing exactly what you're trying to do, I have new unit pals, and a new VPL, all the voxels are converted to the new palette, and all the buildings that need the old one have Palette=lib. That's it, no magic involved.
I don't know how but it works now. I put the art.ini and put Palette=lib again and it works now. Even deleting art.ini and adding Palette=lib to units and buildings works now. I guess that's kind of magical. After hours of repeatedly putting Palette=lib, Palette=libtem, Palette=lib.pal, Palette=libtem.pal, CustomPalette=lib, CustomPalette=libtem, CustomPalette=lib.pal, CustomPalette=libtem.pal, and now going back to Palette=lib finally worked! I don't know if it had something to do with having art.ini rather than artmd.ini fixed it but it works now even if I delete art.ini. Thanks for the help! Maybe my game might've bugged out or something but it's finally over and I could use custom palettes now! QUICK_EDIT
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