Black and white stage

Minor

Member
Hi guys,

I'm thinking about a black and white stage, and i have some questions.
What is the best way to do that in your opinion?


-I want all the characters in black and white (so not like the image above)

-I want special hitflash for chars (onomatopeias) Does it mean i must create a new folder entity for each chars?

- What kind of black and white looks similar as a manga board? 16 bits tramed?


Thanks for answers  ;)
 
- Just make then in black and white (grayscale, in fact)

- just create an entity for that and set it on the character header as "flash" of hit flash. Not like in mugen Explod (unless you code it), you can set the direction to always face a specifc direction.

- I don't get it.
 
Thank you O  :)

My english is bad, and it was not clear, my main question was:

- Can we change the palette color of a char between the previous stage from the "black and white stage" or i  must edit all sprites and put something like a setweap for example.
 
my english sucks too, lol.

If I am not wrong, there is a command in drawmethod which can do it. You can use a setweap like you said, but I think it will gave you more work that it should give - because its a duplicate entity just for that.

How much palettes will you char have? If it uses just one, there is a small script which can do the job easily.
 
thanks O!

I will check for the drawmethod, but not sure to understand it all.

I was afraid of the setweap method too.

By the way, i have only the main palette for now (i planned to make others, that's too bad), what is your small script?
 
Don't worry it's easy to use drawmethod command.

Search drawmethod in manual for more info.
http://dcemulation.org/?title=OpenBORManual

drawmethod remap {int}

example:
drawmethod remap 2


For stages they have palette commands too.

Code:
palette {path} {a1} {a2} {a3} {a4} {a5} {a6}

    ~This command loads new palette to be used by script or by 'setpalette' command (see below). However it only works if panels, frontpanels, bglayers and fglayers use same palette as background
    ~{path} is the path to loaded palette in .act format. For instance:

data/bgs/staage1/pal001.act}.

    ~{a1}, {a2}, {a3}, {a4}, {a5} and {a6} are flags that determines usage of respective transparency. a1 means alpha 1 transparency, a2 means alpha 2 and so on.
    ~This transparency feature costs 384kb memory when palette is loaded so use with care.
    ~This command can be declared more than once if more palettes are required.

Code:
setpalette {palette}

    ~Change palette in use to other palette which is loaded by 'palette' (see above).
    ~{palette} correspond to the loaded palette number so if you want to use 2nd palette, set this to 2.
    ~Setting this to 0 or -1, reveerts palette to default palette.
    ~Like other level objects, this command must be followed by 'at' (see above) and also counted by 'group'.

Note what it says , However it only works if panels, frontpanels, bglayers and fglayers use same palette as background


I had planned this for my TMNT mod, I've tested how it will look already.  I'm not ready to implement it properly yet, but I was eventually going to script it so it's not loading extra copies just to change palette.  Basically we will turn a flag on or off at start of the level set to enable black and white mode.  If this is set to 1 then everything spawns with the black and white palette.

But in your game, do you want black and white to be a separate mode? So the whole game will be black and white?

or you just want to be able to enable it for a certain stage?

If it's the latter than it's very easy to do with basic palette commands.
 
Minor said:
- What kind of black and white looks similar as a manga board? 16 bits tramed?

Do you mean this kind?

5MgiWPI.png
 
BeasTie said:

thank you man, but i don't find in the manual:

Drawmethod remap 2
What is the "2"?

- I don't get (understand) everything in the manual, if i understand, drawmethod allows the palette stage to apply it to the characters?

-Setpalette mention an .act palette, it must be a global palette or just the palette of the stage i want in black and white?

-I want just one stage in black and white (kind of comix zone one), but i'm curious for a separate mode if you know...

;)


maxman said:
Do you mean this kind?
Sorry maxman, i was not clear!
It's not the drawn line but only the color.
I explain:
In Xnview there is this option (sorry it's in french):


I just wanted to know which one (4,8,16...of grey) were similar to a manga in your opinion.
:)
 
Drawmethod remap 2
What is the "2"?

it's the number of the remap you want to use, 2 is just an example.

- I don't get (understand) everything in the manual, if i understand, drawmethod allows the palette stage to apply it to the characters?

no drawmethod doesn't do that.
-Setpalette mention an .act palette, it must be a global palette or just the palette of the stage i want in black and white?

It's a palette for that stage only.  There is no need to use global palettes.

Not sure you're understanding some basics of openbor, let's start over....


FOR CHARS:

they have palette/remap settings, these point to image files that contain the palette.

example:

palette data/chars/MYCHAR/palette.png

alternatepal data/chars/MYCHAR/REMAP.png
alternatepal data/chars/MYCHAR/REMAP2.png
alternatepal data/chars/MYCHAR/REMAP3.png
etc.

So one of these remaps will be for BLACK and WHITE mode.  Each char will need this.

FOR STAGES:

You must use a palette file, not an image.  Firstly the images for panels/backgrounds etc. for the normal stage will need to all use the same palette.  Then you will create a black and white version of this palette.

When you want to set black and white mode on, they you just declare in the level to change palette.

IN STAGE'S .TXT


palette data/bgs/stage1/blackwhitepal.act

setpalette 1
at 0
 
Forcing players and stage to use certain palette is easy but not with hitflashes. I am afraid you'll have to use setweap for this black and white mode. With seperate weapon model, you can define specific hitflashes just for this mode
 
maxman said:

Thank you maxman, was very useful, i'll take the good point of this method. But seriously it's a pain in the add method for me  ;D




BeasTie said:

Oh! really thank you for the time you took beastie  :D
Easiest than i thought, my mistakes i was confused at the beginning with this in the manual for drawmethod:
  {remap} is integer value. Will be overridden by {alpha}.

0 = No remap.
1-n = Like a map command in spawn entry, give the entity a colormap.
-1 = Use entity's colormap.

And i mixed up everything. i understand everything now, thanks to you.
I began openbor one mounth ago, still a noob  ;D



Bloodbane said:

the thing i was afraid of  :-[
thank you bloodbane. Hitflashes will be essential for me, so i have no choices i guess.

By the way that's cool, i'm not a great coder, i can counterbalance ( a bit) with work and ideas  ;)
 
Hmm what do your actual hit flashes look like?

There's 'issues' using weapons, they're full of bugs.  And seems like overkill just because of hitflashes.  It shouldn't be hard to make a simple script that will set a flag for black&white mode on/off.  So the anything like hitflashes will check on spawn and change palette. 

EDIT: or what DC said, even simpler and no need for setting vars.

But I  need to ask more about what you actually want to make.


-  What actually is the black and white mode for?

- how many levels do you need this for?

- Will the stage start off black and white?
OR will start as colour and change to black and white at certain parts?

 
Thank you dc. if i understand it would be a script for the hitflash to spawn them where i want in stage?
My hitflash will be in black and white too i think.



I just begin this so i'm open to ideas. What's in my mind for now:



-the stage will be just before the 2nd stage. "10 minutes ago" or something like that.

-the black and white begin off making a "past effect" And a "manga effect"

-only this stage will be like that

-the hitflash would be black and white too, ripped directly from a manga page.

-so everything will be b&w (enemies too) except hud.

-not important but i will make a frontpanel (or something like that) which make all the stage white line. (white line who separate the manga square) kind of "comix zone" stage.
 
Why not just give the hitflash a spawn script that checks the stage? Then if needed it switches itself to a b&w palette. Much simpler that having extra weapon models.

Ah you're right Damon, I just tried that couple minutes ago and it works. I can even change the whole hitflash animation with script in hitflash text  8)

@ Minor : I can show you the script and it's pretty simple but since you ripped hitflashes from manga page, would you prefer to just change palette of hitflash OR change the animation completely for this B/W stage?

-so everything will be b&w (enemies too) except hud.

Ack, one problem gone, another one comes  :-\ .... if you're using scripted HUD this would be cake
 
Ok guys!

Really thank you for all your help.

I thought about this stage and finally, according to my skill set too, i changed my mind.
I decided to make a setweap from my "kof hokuto chars" to "jump ultimate stars".

Kind of like that:


the stage will be drawn in black and white, but all the rest will be in color, so no problem i think. (i'm a faking idler  8) )
But i think it will be easier for me, and visually better imo. i want some platforms too, will be easier with small sprite to begin.


But really thank you for the time you took guys  ;)


 
Ah Cool,so this stage will have all different sprite style too?

EDIT: Ah I understand the image now.  They're page breaks, like a comic book (like comix zone game)  I thought it was platforms layout.
 
By the way, i have only the main palette for now (i planned to make others, that's too bad), what is your small script?

I think it was BloodBane who did the empty entity trick first. Anyway, you need to create a new entity called Empty (and LOAD it at models.txt):

name Empty
health 10
type obstacle
shadow 0


anim idle
delay 100
offset 1 1
frame data/chars/misc/empty.gif


anim fall
delay 100
offset 1 1
frame data/chars/misc/empty.gif

This Empty entity can be used to do a plethora of things! From modyfing objects, to players, to the stage, etc. Its just a placeholder. In OpenBOR, we have way more control of the stages than Mugen (we have more control of many other things, as you will see).

So, spawn the placeholder entity at the very start of the stage (its the first thing I spawn on my stage). In older released, to use a script when any entity was spawned, it was needed to use a SPAWNSCRIPT. But since many releases ago, you can use a spawnscript right when you spawn an entity, take a look:

spawn  empty
@script
void main()
{
    int P1 = getplayerproperty(0, "entity"); // detects the player 1
    int P2 = getplayerproperty(1, "entity"); // detects the player 2
    void self = getlocalvar("self"); // gets the "self". IOW who will be calling the function

    if(P1){ // if the player 1 exists
      changeentityproperty(self, "map", 1); // changes the P1 palette
    }
    if(P2){ // if the player 2 exists
      changeentityproperty(self, "map", 1); // changes the P2 palette
    }
}
@end_script
coords  180 189 // It doesn't matter, in this case
at  0 // but this matters

If I am not wrong, the default map (palette) is "0", so the map "1" is the second (in your case, the B&W one). That code force the players to change their palettes to another one.

You can even use this trick to revert back to the default palette. OpenBOR knows which is the default color of an entity (Kudos to the OpenBOR coders for that!) if you set one.

Take a look:
spawn  empty
@script
void main()
{
    int P1 = getplayerproperty(0, "entity"); // detects the player 1
    int P2 = getplayerproperty(1, "entity"); // detects the player 2
    void self = getlocalvar("self"); // gets the "self". IOW who will be calling the function

    if(P1){ // if the player 1 exists
    int oPal = getentityproperty(self, "mapdefault");
    changeentityproperty(self, "colourmap", oPal); // changes the P1 palette to the default one
    }
    if(P2){ // if the player 2 exists
    int oPal = getentityproperty(self, "mapdefault");
    changeentityproperty(self, "colourmap", oPal); // changes the P2 palette to the default one
    }
}
@end_script
coords  180 189 // It doesn't matter, in this case
at  0 // but this matters

That code will revert the player palette to its default. You can use it on the start of the next level, or inside a script file like ENDLEVEL.C (more advanced) or even use it on the same stage, just change the AT position to another one.

The options are endless. You can simulate many things with that, like players changing their palettes to match the stage illumination, etc.

Another good usage of that spawnscript right on the stage is the option to spawn any entity with a specific animation:

spawn Soldier
@script void main() {
  performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW7"));
} @end_script
coords 360 400
at 50

With that code, I spawn an entity called "Soldier" using the FOLLOW7 animation (he comes flying from the sky). Cool, isn't it? :)
 
Back
Top Bottom