Are these possible? Or do I need to generate the derivative graphics prior and include them in the mod's files? Is there a way to automate, if not using weidu, the swapping of palettes? Ideally, there would be some finesse to this, like the selective swapping of only certain palette colors. Not a wholesale swap.
palette swaps via weidu?
#1 -agris-
Posted 30 September 2013 - 09:57 AM
#2
Posted 30 September 2013 - 10:48 AM
You might get more out of your question by an example... say which animation you wish to use. Though you are unlikely to be able to resign the animation a new palette... unless you use the old BG1 animations.
Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit).
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.
#3
Posted 30 September 2013 - 10:50 AM
I can write a (windows-only) program to do this pretty handily as I already have most of the code necessary that I wrote for other projects I'm working on. If you are wanting to do this as part of the mod installation (e.g. to cut down on download size) then WeiDU is your best bet. I'm sure it can be done, but that is out of my realm of expertise...
"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"
--<CHARNAME> to Portalbendarwinden
--------------------
___________Old pen and paper modules of the 70s and 80s.___________
#4 -agris-
Posted 30 September 2013 - 12:37 PM
Hey @Sam. and @The Imp,
I'm at the project planning stage, and visual distinction is going to be on one of the queues the player gets that a monster they're fighting has been 'upgraded'. My current goal is to use David's ssl and a host of pre-defined (by me) rules combined with player selection (via WeiDu prompts) to generate derivative .cre files. I don't know enough about the animation system in BG2 / BG1:EE to know if the CRE file type is capable of modifying a creature's paletted colors or not. If that info IS contained in the file, I would assume WeiDU can modify it.
To: The Imp-
For example, take a gibbering. However a gibbering's CRE file is defined, is there a section allowing for the modification of the palette / primary / secondary colors used by it? I don't need much finesse, just some soft-coding of _any_ color distinction (short of assigning no drop items w/ effects, though I suppose that's an option..) would be suffice.. being able to change hair / body / trunk / whatever color.
#5 -agris-
Posted 30 September 2013 - 12:38 PM
ahhh, not having an account. replace "queues" (my face is reddening) with "cues".
#6
Posted 01 October 2013 - 07:45 AM
http://iesdp.gibberl...mats/bam_v1.htm
I've never done anything like this but...
something like this?
COPY_EXISTING ~some.bam~ ~override~ READ_LONG 0x10 palette_offset WRITE_ASCIIE ( palette_offset) ~%new_palette%~ (1024)
with a few curve balls maybe... compressed bams...
think of the best way to load the new palette colors into var "new_palette" .... etc.
If you only want to replace select colors ... read in the bam palette then INNER_PATCH and run INDEX_BUFFER over it ( regex )
which of course brings the complication of building a binary regex string ... so instead you could just use a FOR loop or w/e
edit: I may have missed the boat... how is a cre file associated with a bam file?
http://iesdp.gibberl...mats/cre_v1.htm
change hair / body / trunk / whatever color.
try editing those fields and see what happens
Edited by aqrit, 01 October 2013 - 08:01 AM.
#7
Posted 01 October 2013 - 10:08 AM
I've never done anything like this but...
something like this?COPY_EXISTING ~some.bam~ ~override~ READ_LONG 0x10 palette_offset WRITE_ASCIIE ( palette_offset) ~%new_palette%~ (1024)
That wouldn't work because the though is to use the same animation, but different colors in different .cre files. This replaces the palette to all creatures... unless you wish to make another .bam file which needs to be patched to the BGMain.exe to get the animation.2da association.
with a few curve balls maybe... compressed bams...
think of the best way to load the new palette colors into var "new_palette" .... etc.
Erhm, if you actually read the .bam format info you got there, you actually see the compressed .bam's are regular ones only with a few transparent frames in them to save space.
try editing those fields and see what happens
Erhm, that might be the right approach... just remembering that most of the .cre's don't have a paletted animation files meaning that the body parts are likely to be disassociated from the variables, meaning that one body part can dictate the whole .cre's animation colors*... or something.
This has been done in:
///////////////////////////////// // Distinctive creature coloring ///////////////////////////////// BEGIN @310 DESIGNATED 310 // Distinctive creature coloring GROUP @3 // Cosmetic tweaks REQUIRE_PREDICATE ENGINE_IS ~bg2 tob~ @92 INCLUDE "atweaks/lib/310-creature_colouring.tpa" //todo: make this file nicer
The .tpa code is too large and too complicated for me to understand really, but the results look nice:
I notice that it relies on effects applied to the edited .cre file, it removes the affects that recolor the .cre's and then grants the .cre file immunity to the recolor effects via(op#101), and then it changes the major color of the .cre .
Edited by The Imp, 01 October 2013 - 10:13 AM.
Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit).
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.
#8
Posted 03 October 2013 - 04:31 PM
Thanks guys. I think The Imp gets a prize though. Example code is always appreciated, and yes, those results do look nice. I thought this has been done, but it's been too long since I did a MM play..
#9
Posted 12 January 2014 - 03:11 PM
I can write a (windows-only) program to do this pretty handily as I already have most of the code necessary that I wrote for other projects I'm working on. If you are wanting to do this as part of the mod installation (e.g. to cut down on download size) then WeiDU is your best bet. I'm sure it can be done, but that is out of my realm of expertise...
Hi Sam.
I am interested into your windows program !
I have ported a new animation using the dragon format : 7x81 bam files.
Now, I want to apply them 3 other palettes. If it could be done automatically, I wouldn't waste many hours with changing them manually...
Let's say folder A contains 567 files, all of them having the same palette.
Let's say fileR, fileP, fileB, fileG contains the red, purple, blue and green palettes, whatever their format (act, pal, bmp, bam). The palettes have been tested with the raw frames and work well.
I want to read the 256 colors of fileP and apply them at the same index for each file of folder A. id with fileR, fileB and fileG.
Do you really think it is possible ?
If yes, you would save my time, and my mental health !
CARPE DIEM ....
In progress : Menace sur le Royaume de Diamant Éternel there.
#10
Posted 12 January 2014 - 04:19 PM
I added mass-repaletting to BAM Batcher a while back but I guess I probably never released it. You'll have to add the code to the tp2 manually until I get around to updating it properly (might be a while). This is right before the Moinesse's BAM section in my local copy:
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle
#11
Posted 12 January 2014 - 06:51 PM
"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"
--<CHARNAME> to Portalbendarwinden
--------------------
___________Old pen and paper modules of the 70s and 80s.___________
#12
Posted 13 January 2014 - 06:45 AM
Thanks Miloch !
I will test it this evening (Paris hour) - and finally answer your PM, sorry I had a bad flue till yesterday.
I remembered you mentionned a couple of times Bam batcher for this kind of job, but as I didn't see anything related to repaletting in the tp2...
I understand why now.
I will keep in touch and let you know the results...
Edited by Gwendolyne, 13 January 2014 - 09:42 AM.
CARPE DIEM ....
In progress : Menace sur le Royaume de Diamant Éternel there.
#13
Posted 13 January 2014 - 09:45 AM
Great job Miloch : your tp2 allowed me to repalette 567 files in less than 30 s !
Working with the format dragon, I was just obliged to create several palettes renamed with the same prefix than the files : MDR1[1-5]1 to MDR1[1-5]9. Otherwise, WeiDU responded that bmp files were missing.
But with a batch file, it was pretty easy and the time spared with your process was phenomenal.
CARPE DIEM ....
In progress : Menace sur le Royaume de Diamant Éternel there.
#14
Posted 13 January 2014 - 09:56 AM
Great job Miloch : your tp2 allowed me to repalette 567 files in less than 30 s !
Time to take in game pictures...
Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit).
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.
#16
Posted 05 February 2014 - 10:22 AM
The job has been done.
Here is the "original" creature :
The same in blue, using the new Bam batcher component.
In red :
A great thanks for all the people who had helped me and made it possible. They will be all credited in the readme.
CARPE DIEM ....
In progress : Menace sur le Royaume de Diamant Éternel there.
#17
Posted 05 February 2014 - 10:24 AM
"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"
--<CHARNAME> to Portalbendarwinden
--------------------
___________Old pen and paper modules of the 70s and 80s.___________
#18
Posted 05 February 2014 - 10:52 AM
@Gwendolyne Is it tarrasque that I'm seeing or do my eyes just playing tricks on me?
Splendid work
#19
Posted 05 February 2014 - 11:24 AM
Very cool!
Yep. As in; I got nothing to add.
Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit).
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.
#20
Posted 05 February 2014 - 11:37 AM
Yes, it is a Tarasque!
The last monster that my mod missed... Except a medusa, but that's another story...
And as far as I know, the first I.A. animation using the dragon slot. An horrible pain to work with (567 bam files)...
But now I know how to handle with it...
Thanks for your comments.
Let's roll for the quest coding !
CARPE DIEM ....
In progress : Menace sur le Royaume de Diamant Éternel there.