Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Changing palettes

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
BMR
Aspiring Megalomaniac




Joined: 27 Dec 2008
Posts: 21
Location: The Philippines

PostPosted: Sun Dec 28, 2008 5:27 pm    Post subject: Changing palettes Reply with quote

Greetings everyone.

First off, apologies if this seems a bit uninformed, but I was wondering if there was a way, in-game, to change the master palette? I'm aware that while editing, it is possible to switch the master palette for another, but I was checking if it was possible to do such with plotscripting.

I was attempting to do this in order to cheat a wider range of colour in the overall game. For example, I could have colours 1-128 reserved for hero and walkabout colours, whereas colours 129-255 would be reserved for maptiles. For example, if I have heroes in a cave that is more blue-intensive, I could choose a wider range of blues and leave out the various shades of red.

I am aware but not familiar with the palette tweak command, but I was unsure if such was the ideal or proper means of achieving what I am attempting to do.

Thanks in advance for any assistance that you can provide.

Cheers,

BMR
_________________
Being from the third world, I reserve the right to speak in the third person.
Back to top
View user's profile Send private message Visit poster's website
Calehay
...yeah.
Class B Minstrel



Joined: 07 Jul 2004
Posts: 549

PostPosted: Mon Dec 29, 2008 5:18 am    Post subject: Reply with quote

It's nice to see I'm not the only one with this idea.

You'll need to use this in an autorun script on every map.

Code:
fadescreenout (0,0,0)
load palette (x)  #Where "x" is the correct number of the master palette
fadescreenin


However, if you just stuck this code into different scripts for every map, you'd soon get a ton of scripts to sort through. There might be a smarter way to code this so that you wouldn't have to do so much work in the editor.

If you plan on using each master palette only once, this idea comes to mind. If you correspond the number between the master palette and the map that uses the palette , you could easily just replace the "x" in the previous map with the command "current map," which would then load the palette that corresponds with that particular map. Barring that, you could do a messy switch/case script, but I think this idea is easier.

Then, you can simply use this one script as an autorun script for every map. If you needed other events to happen automatically on a map, you could either create separate scripts for each event prefacing them with this code, or you could use a switch/case or nested if statements inside of this one script that look for the proper conditions for your events.
_________________
Calehay
Back to top
View user's profile Send private message AIM Address
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Tue Dec 30, 2008 7:36 am    Post subject: Reply with quote

The map autorun script runs 1 tick before the screen fades in, and screen fades cause palette changes to take effect, so you should be able to simply use a script like this (but I haven't tested):

Code:
plotscript, bluish palette, begin
  load palette (1)
end


Adding addition screen fading commands would cause a slightly longer fadeout between maps.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
BMR
Aspiring Megalomaniac




Joined: 27 Dec 2008
Posts: 21
Location: The Philippines

PostPosted: Wed Dec 31, 2008 3:54 am    Post subject: Reply with quote

Hmm, sounds good. I'll give it a shot soon as I can.

Cheers,

BMR
_________________
Being from the third world, I reserve the right to speak in the third person.
Back to top
View user's profile Send private message Visit poster's website
Calehay
...yeah.
Class B Minstrel



Joined: 07 Jul 2004
Posts: 549

PostPosted: Wed Dec 31, 2008 1:16 pm    Post subject: Reply with quote

The Mad Cacti wrote:
The map autorun script runs 1 tick before the screen fades in, and screen fades cause palette changes to take effect, so you should be able to simply use a script like this (but I haven't tested):

Code:
plotscript, bluish palette, begin
  load palette (1)
end


Adding addition screen fading commands would cause a slightly longer fadeout between maps.


Was there ever a bug with the load palette command? I remember trying this, but the screen would never fade out and palette wouldn't change. (I assumed that it was due to not having a fade command at the time.) However, now it seems to work.
_________________
Calehay
Back to top
View user's profile Send private message AIM Address
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sun Jan 04, 2009 7:47 pm    Post subject: Reply with quote

I don't remember there ever being a bug, but maybe there was...

loadpalette works just like tweakpalette: you need to fade the screen in or use updatepalette for the changes to become active.

Not having a fade command?
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can 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


Powered by phpBB © 2001, 2005 phpBB Group