View previous topic :: View next topic |
Author |
Message |
DragonBlood
Joined: 07 Apr 2008 Posts: 83 Location: Prattville, AL
|
Posted: Fri May 02, 2008 6:41 pm Post subject: I need some general help. |
|
|
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 |
|
 |
JSH357

Joined: 02 Feb 2003 Posts: 1705
|
Posted: Fri May 02, 2008 7:04 pm Post subject: |
|
|
Those values (-120) are probably way too high.
I normally use -15 for nighttime scenes. Try smaller numbers. |
|
Back to top |
|
 |
Newbie_Power

Joined: 04 Sep 2006 Posts: 1762
|
Posted: Fri May 02, 2008 7:06 pm Post subject: |
|
|
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 |
|
 |
DragonBlood
Joined: 07 Apr 2008 Posts: 83 Location: Prattville, AL
|
Posted: Fri May 02, 2008 7:09 pm Post subject: |
|
|
Ah, I see.
Thanks. |
|
Back to top |
|
 |
DragonBlood
Joined: 07 Apr 2008 Posts: 83 Location: Prattville, AL
|
Posted: Fri May 02, 2008 7:30 pm Post subject: |
|
|
Is it possible to achieve a colored transition from the greyscale effect? |
|
Back to top |
|
 |
Newbie_Power

Joined: 04 Sep 2006 Posts: 1762
|
Posted: Fri May 02, 2008 7:34 pm Post subject: |
|
|
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 |
|
 |
DragonBlood
Joined: 07 Apr 2008 Posts: 83 Location: Prattville, AL
|
Posted: Fri May 02, 2008 7:39 pm Post subject: |
|
|
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 |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Fri May 02, 2008 10:08 pm Post subject: |
|
|
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 |
|
 |
DragonBlood
Joined: 07 Apr 2008 Posts: 83 Location: Prattville, AL
|
Posted: Fri May 02, 2008 10:32 pm Post subject: |
|
|
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 |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat May 03, 2008 10:54 pm Post subject: |
|
|
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 |
|
 |
DragonBlood
Joined: 07 Apr 2008 Posts: 83 Location: Prattville, AL
|
Posted: Sun May 04, 2008 9:32 am Post subject: |
|
|
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 |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Mon May 05, 2008 7:19 am Post subject: |
|
|
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 |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Mon May 05, 2008 8:16 am Post subject: |
|
|
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 |
|
 |
DragonBlood
Joined: 07 Apr 2008 Posts: 83 Location: Prattville, AL
|
Posted: Mon May 05, 2008 11:02 am Post subject: |
|
|
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 |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Tue May 06, 2008 3:00 am Post subject: |
|
|
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 |
|
 |
|