Jump to content
Sign in to follow this  
The Boot

Adding new overlays

Recommended Posts

Does anyone know how to declare new screen overlays in the description.ext to use in a mission (in the same manner as "binocular" or BIS logos).  The officiel comref says it is possible to declare extra resources like that in the description.ext but it never says how.   I would greatly appreciate any help.

Share this post


Link to post
Share on other sites

Bump.

I'd like to know the answer to this as well. Actually, I'd like to get as much information as possible on everything that can be done in the description.ext file. I'm sure there's a lot you can do with it.

- PlaneShifter -

Share this post


Link to post
Share on other sites
Guest

Actually, I don't think that many people know, I've been running around forums asking it, didn't get any reply. I guess it's a state secret :-) Or maybe the comref is wrong in saying that. I don't know.

Bump :-)

Share this post


Link to post
Share on other sites

I've made a few steps forward (thanks to some help from Sefe on another forum)

I think I'm close... added this to resource.ext

class RscTitles

{

titles[]={"TIM"};

class TIM

{

idd=-1;

movingEnable=0;

duration=4;

name="TIM";

controls[]={"Background"};

class Background

{

text="malden.jpg";

x=0.050000;

y=0.320000;

w=0.300000;

h=0.330000;

};

};

};

But it's not enough... the resource shows up as selectable in the editor (woohoo!  smile.gifbiggrin.gif ;D) but when it's triggered it says "No entry 'Users\Ruvals\missions\testlogo.Intro\description.ext::RscTitles::TIM::Background type'

I know I'm probably skipping a step, just thought I'd let you guys know where I am now.  If you find anything let me know can't work on it today   sad.gif

Share this post


Link to post
Share on other sites

Here's a code snipped that works WOOHOO! Thanks to Earthquake and others who helped me :-)

class RscPicture

{

type=0;

idc=-1;

style=48;

colorBackground[]={0,0,0,0};

colorText[]={1,1,1,1};

font="tahomaB24";

size=0;

};

class RscTitles

{

titles[]={"TIM"};

class TIM

{

idd=-1;

movingEnable=0;

duration=4;

name="TIM";

controls[]={"Background"};

class Background : RscPicture

{

text="malden.jpg";

x=0.050000;

y=0.320000;

w=0.300000;

h=0.330000;

};

};

};

Share this post


Link to post
Share on other sites

you are welcome boot. check opfeditingcenter.com and its forum regularly for more tips and tricks like that ;)

Share this post


Link to post
Share on other sites

so wot does it show?confused.gif??

and is there a way of changing the text color in game play??? could it be done by using

"colorText[]={1,1,1,1};?"

Share this post


Link to post
Share on other sites

rob: this example defines an overlay called "TIM" (that is also listed under Waypoint/Effects/Resources). This overlay consists of only one layer ("called "Background") which is a picture ("malden.jpg"). If your scripts activates this overlay (with cutRsc or titleRsc command), the player sees this picture. You could use alpha-channel to define areas in the overlay (picture) where the player could see the underlying scene.

i dont think it is possible to change the color of the text druing gameplay ... but i never tested that.

PlaneShifter: i quoted myself ;)

Share this post


Link to post
Share on other sites

so ur saying i can make my own jpg and be able to use it in the game?

Share this post


Link to post
Share on other sites

thats pretty d*amn cool. looking throgh the script he has made there r lists of the font and size etc...... can we change these?

Share this post


Link to post
Share on other sites

There are a list of fonts available, each with a fixed size (see the above mentioned thread to learn more). Fonts are defined using bitmaps, so technically it would be no problem to define your own font BUT there is another binary file coming with each font that likely holds all needed information to extract specific characters from the bitmap (like position and size). This file is not decyphered yet, so you may have problems to get your newly created font work in the game.

Share this post


Link to post
Share on other sites

I still haven't been able to get a custom resource to work. What I have is a JPG I want to use as a fullscreen background (a scoreboard background between rounds of an MP mission)--I used the given code example and modified it to use the JPG I have. The resource will not show up or work.

- PlaneShifter -

Share this post


Link to post
Share on other sites

hi planeshifter,

there are the same restrictions for RscPicture-class objects (like your jpg-overlay) and normal textures (size, color-depth). Your picture should be smaller then 256x256 pixel and in some 2^n x 2^k - size (like 64x256 or 128x128 and so forth). If your picture is bigger then that you could easily tile your picture and define new RscPicture-classes for each tile. Using the position-attributes you could resample your picture with these tiles.

if this was not the problem, post your description.ext and jpg here and we could work it out together.

Share this post


Link to post
Share on other sites

Hmm, do I need to put the JPG in a separate folder under my mission, like with sounds?

*was just looking through the mission templates*

- PlaneShifter -

Share this post


Link to post
Share on other sites

d*amn, it is a shame that i cannot post a sample mission here, i thought i did post one in the thread i mentioned above. But anyway, to answer your question: No, you could place your picture everywhere you want in your mission folder as long as you set the path in the "text"-attribute of the RscPicture class you used in your resource.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×