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

I need some general help.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
DragonBlood




Joined: 07 Apr 2008
Posts: 83
Location: Prattville, AL

PostPosted: Fri May 02, 2008 6:41 pm    Post subject: I need some general help. Reply with quote

The script is supposed to take away about 50% of the paette's color, but instead, it turns the palette completely black.
What am I doing wrong?
Here is my script:

Code:
plotscript, brighten, begin
 reset palette
 wait (5)
 update palette
 wait (5)
 tweak palette (-120, -120, -120)
 wait (5)
 fade screen in
end


In advance, thanks.
Back to top
View user's profile Send private message
JSH357




Joined: 02 Feb 2003
Posts: 1705

PostPosted: Fri May 02, 2008 7:04 pm    Post subject: Reply with quote

Those values (-120) are probably way too high.

I normally use -15 for nighttime scenes. Try smaller numbers.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Newbie_Power




Joined: 04 Sep 2006
Posts: 1762

PostPosted: Fri May 02, 2008 7:06 pm    Post subject: Reply with quote

The numbers go from -63 to 63 (as opposed to -255 to 255 normally), so JSH is right. You have to use -31 or -32 if you want 50%.
_________________

TheGiz> Am I the only one who likes to imagine that Elijah Wood's character in Back to the Future 2, the kid at the Wild Gunman machine in the Cafe 80's, is some future descendant of the AVGN?
Back to top
View user's profile Send private message
DragonBlood




Joined: 07 Apr 2008
Posts: 83
Location: Prattville, AL

PostPosted: Fri May 02, 2008 7:09 pm    Post subject: Reply with quote

Ah, I see.

Thanks.
Back to top
View user's profile Send private message
DragonBlood




Joined: 07 Apr 2008
Posts: 83
Location: Prattville, AL

PostPosted: Fri May 02, 2008 7:30 pm    Post subject: Reply with quote

Is it possible to achieve a colored transition from the greyscale effect?
Back to top
View user's profile Send private message
Newbie_Power




Joined: 04 Sep 2006
Posts: 1762

PostPosted: Fri May 02, 2008 7:34 pm    Post subject: Reply with quote

If you mean an effect where the color slowly fades, you can probably use a for loop to constantly change the color until it reaches your desired coloration.
_________________

TheGiz> Am I the only one who likes to imagine that Elijah Wood's character in Back to the Future 2, the kid at the Wild Gunman machine in the Cafe 80's, is some future descendant of the AVGN?
Back to top
View user's profile Send private message
DragonBlood




Joined: 07 Apr 2008
Posts: 83
Location: Prattville, AL

PostPosted: Fri May 02, 2008 7:39 pm    Post subject: Reply with quote

would the same work for transitioning from greyscale to colored, if so could you explain what it is you mean by using a for loop?
Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Fri May 02, 2008 10:08 pm    Post subject: Reply with quote

Normally you use fadescreenin to fade between two palettes.
Code:
greyscale palette
update palette

wait (10)

#change to some other palette
reset palette

#instead of using 'update palette', 'fade screen in' does a gradual transition
fade screen in


It's possible to use 'plot:Write color' and 'plot:Read color' to do custom fades. You could also use a series of fadein's.

Quote:
Code:
 reset palette
 wait (5)
 update palette

The wait between these two commands is useless. There's no need to wait after reset palette.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
DragonBlood




Joined: 07 Apr 2008
Posts: 83
Location: Prattville, AL

PostPosted: Fri May 02, 2008 10:32 pm    Post subject: Reply with quote

Wow, thanks for all the help, I think that using the "for loop" is more effective
though.

For some reason, the fade in command does NOT do a gradual transition, if it does, it is doing it far too fast for me to notice it... I'm using the latest nightly.

Until I find out why, I guess I'll stick with the for loop.

Code:
plotscript, brighten, begin
 variable (A)
 for (A, 1, 30) do (tweak palette (1,1,1) wait (1) update palette
end
end


Scripting with the OHR is by far the easiest thing I have ever done, scripting/programming wise...
Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat May 03, 2008 10:54 pm    Post subject: Reply with quote

DragonBlood wrote:
Wow, thanks for all the help, I think that using the "for loop" is more effective
though.

For some reason, the fade in command does NOT do a gradual transition, if it does, it is doing it far too fast for me to notice it... I'm using the latest nightly.


That's odd. Could you please post your entire script? What backends are you using: what is the version string printed at the bottom of the screen in the RPG browser in game.exe? Do the fadeins between maps and battles work? If not, what bitdepth are you running at: are you passing "-d 32" on the commandline?

DragonBlood wrote:
Until I find out why, I guess I'll stick with the for loop.

Code:
plotscript, brighten, begin
 variable (A)
 for (A, 1, 30) do (tweak palette (1,1,1) wait (1) update palette
end
end


Scripting with the OHR is by far the easiest thing I have ever done, scripting/programming wise...


I'm afraid you can't write fadeins with tweak palette. (We really need some better palette commands). tweak palette(1,1,1) adds 1 to the red, green and blue components of every palette colour. If you started with a black palette, you'll end up with one where every colour is the same very dark grey. That why you would need to use writecolor instead.

But why not just use fadescreenin (once we get it working)
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
DragonBlood




Joined: 07 Apr 2008
Posts: 83
Location: Prattville, AL

PostPosted: Sun May 04, 2008 9:32 am    Post subject: Reply with quote

Here is my script:

Code:
Include, plotscr.hsd
include, Moonlight.hsi


plotscript, intro, begin
 greyscale palette
 wait  (30)
 update palette
end

######################################################################

plotscript, fogcomes, begin
 variable (A)
 for (A, 1, 30) do (tweak palette (1,1,1) wait (1) update palette
end
end

######################################################################

plotscript, fogclears, begin
 variable (B)
 for (B, 1, 30) do (tweak palette (-1, -1, -1) wait (1) update palette
 show textbox (9)
end
end

######################################################################

plotscript, colorcomes, begin
 reset palette
 fade screen in
end


Quote:
what is the version string printed at the bottom of the screen in the RPG browser in game.exe?


It is: 20080501 fb/sdl

All fade ins work except for those activated via script.
They work just as update palette does.

Hope this info helps.
Back to top
View user's profile Send private message
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Mon May 05, 2008 7:19 am    Post subject: Reply with quote

DragonBlood wrote:

Code:

plotscript, colorcomes, begin
 reset palette
 fade screen in
end



Remove the reset palette command here. Reset palette is like an instantaneous fade screen in
Back to top
View user's profile Send private message Send e-mail Visit poster's website
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Mon May 05, 2008 8:16 am    Post subject: Reply with quote

James Paige wrote:
Remove the reset palette command here. Reset palette is like an instantaneous fade screen in


No, you're thinking of update palette. The script is correct.


I assume you are running intro, and then some time later while the palette is grey, colorcomes runs, right? I just tested it, and it works fine for me. Are you sure you are using the right scripts (the right file)? Did they compile without error? Did you import them? Is the correct script (colorcomes) called? That's my only idea...
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
DragonBlood




Joined: 07 Apr 2008
Posts: 83
Location: Prattville, AL

PostPosted: Mon May 05, 2008 11:02 am    Post subject: Reply with quote

I'm doing everything correctly, I think I have found the problem.

Whenever I put the ohr on fullscreen, that "Colors are messed up bug" messes up the colors, but on rare occasion, that bug doesn't kick in, and the ohr works properly-even the fade screen ins work like they should.
Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Tue May 06, 2008 3:00 am    Post subject: Reply with quote

OK, so the fade in's only bug up sometimes when playing in fullscreen mode then?
_________________
"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
Goto page 1, 2  Next
Page 1 of 2

 
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