Home   Help Search Login Register  

Author Topic: Custom Resource Overlay, how?  (Read 2432 times)

0 Members and 1 Guest are viewing this topic.

aurek

  • Guest
Custom Resource Overlay, how?
« on: 04 Apr 2003, 12:44:56 »
Ok does anyone know how to add a custom resource overlay to a mission?

Like the titles used in the Opflash and Resistance campaign or the BAS missions?

Thanks :)

Offline Igor Drukov

  • Contributing Member
  • **
  • Conscientious Subjector
Re:Custom Resource Overlay, how?
« Reply #1 on: 04 Apr 2003, 14:35:53 »
Funny, that's what I'm working on these days...
It is more or less something like that that you have to add in your Description file :

class RscTitles  
{  
 titles[]={"igor"};  
 class igor
 {  
  idd=-1;  
  movingEnable=0;  
  duration=9;  
  fadein=2;  
  name="igor";  
  controls[]={"cont"};  
   
  class cont  
  {  
   type=0;  
   idc=-1;  
   style=2;  
   
   colorBackground[]={0,0,0,0 };  
   colorText[]={1,1,1,1};  
   
   font="garamond64";  
   size=1;  
   text="Igor Drukov presents";  
   
   x=0.2;  
   y=0.2;  
   w=0.6;  
   h=0.9;  
  };
};
igor is the name that you will find at the bottom of the resource list in the trigger which, when activated, will display the text "Igor Drukov presents", with the defined coordinates. Very classy.
Note that the "titles[]={"igor"};" part is not necessary (I think). If you want to add other resources, just add the name of your resource each time igor appears and modify the parameters; you can use the name "cont" for the control of all you resources, but it has to be copied each time. I hope this is clear enough... If not, let me know.
Now, I too have a question : what are the different font that can be used ? Does anyone know that ? ???

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Custom Resource Overlay, how?
« Reply #2 on: 04 Apr 2003, 16:51:47 »
There's a fonts tute in the Ed Depot.  Can't remember where, but it has some recent Comments so if you look up Comments from the lhs of the screen you'll find it.
Plenty of reviewed ArmA missions for you to play

Offline Igor Drukov

  • Contributing Member
  • **
  • Conscientious Subjector
Re:Custom Resource Overlay, how?
« Reply #3 on: 04 Apr 2003, 17:12:30 »
My mistake, there are TWO Tuts :"Fxy" (Font) File Format by OFP Internals, and Font/Text-tutorial by xenofanes...
Gee, what is there NOT on this site, and what does macguba not know ? ::)
So the answer to my question is : audreyshandb48, audreyshandi48, couriernewb64, steelfishb64, steelfishb64ce, steelfishb128 (steelfish= default fonts...), tahomab24, tahomab48. The numbers stand for the size of the letters.

« Last Edit: 04 Apr 2003, 17:36:02 by Igor Drukov »

aurek

  • Guest
Re:Custom Resource Overlay, how?
« Reply #4 on: 04 Apr 2003, 20:23:51 »
Excellent, thanks :)
Now, what about a resource image as opposed to text??

Oh and how do you call a resource from a script?
:)
« Last Edit: 04 Apr 2003, 20:35:13 by aurek »

Offline Igor Drukov

  • Contributing Member
  • **
  • Conscientious Subjector
Re:Custom Resource Overlay, how?
« Reply #5 on: 05 Apr 2003, 16:07:10 »
I don't know about image resources.
To call a resource from a script, do something like this :
Create a variable, say "resource", and put "resource=false" in your init.sqs file.
In the condition field of the resource trigger, put "resource".
In your script, put "resource=true".
That way, the resource will be activated by the script.
If you want to call it several times, switch your trigger from "once" to "repeatedly", and put "resource=false" at the end of your script.

aurek

  • Guest
Re:Custom Resource Overlay, how?
« Reply #6 on: 05 Apr 2003, 17:59:18 »
Ok thanks, Ill try that (although the whole variable=0 variable=1) thing has never worked for me before :)

thanks for the help! :)

Loc-Dog

  • Guest
Re:Custom Resource Overlay, how?
« Reply #7 on: 05 Apr 2003, 19:16:49 »
To call a resource from a script.
Code: [Select]
TitleRsc ["myresource","plain"]

Offline Igor Drukov

  • Contributing Member
  • **
  • Conscientious Subjector
Re:Custom Resource Overlay, how?
« Reply #8 on: 05 Apr 2003, 20:39:47 »
Cool tip, cheers  :D.

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:Custom Resource Overlay, how?
« Reply #9 on: 09 Apr 2003, 04:31:48 »
If you've stumbled upon Kegetys' spectator script, you've seen these:
Quote
#define FontS "tahomaB24"
#define FontM "tahomaB36"
#define FontHTML "courierNewB64"
#define FontHTMLBold "courierNewB64"
#define FontMAP "courierNewB64"
#define FontMAIN "SteelfishB64"
#define FontMAINCZ "SteelfishB64CE"
#define FontTITLE "SteelfishB128"
#define FontTITLEHalf "SteelfishB64"
#define FontBOOK "garamond64"
#define FontNOTES "AudreysHandI48"
and use those with: font = FontNOTES;

for a pic u must define the type and style:
Quote
#define CT_STATIC      0
#define ST_LEFT      0

then the pic class itself
Quote
class RscPicture
{
   type = CT_STATIC;
   idc = -1;
   style = ST_PICTURE;
   colorBackground[] = {0, 0, 0, 0};
   colorText[] = {1, 1, 1, 1};
   font = FontS;
   size = 0;
};

...and finally the resource:
Quote
class RscTitles
{
   class Scuba
   {
      name = "Scubalens";
      duration = 5;
      idd = -1;
      movingEnable = false;
      controls[]={Scuba};
      
      class Scuba: RscPicture
      {
         text="Scuba.paa";
         x=0; y=0; w=1; h=1;
      };
   };
};
called with: titleRsc ["Scuba","PLAIN"]. x=0;y=0; means it'll start from those pixels (upper left corner), w=1; h=1; mean it'll span across the whole screen. You need to convert a image first to 24 or 32 bit TGA format (can't remember which), and then in texView to .paa.
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

MorMel

  • Guest
Re:Custom Resource Overlay, how?
« Reply #10 on: 16 Apr 2003, 17:26:51 »
Damn...! I can't have the resource overlay working... :'( Is it OPFv1 what's torturing me? I did just like it's explained in this thread but i cannot find any new resources at Effects/Titles on the editor... Also CutRsc or TitleRsc can't find my resource, the game just ends abruptly and gives me a message: "Couldn't find 'MyTilte' at CfgTitles..." [or somethig like that]

Could anybody help me?

Offline Igor Drukov

  • Contributing Member
  • **
  • Conscientious Subjector
Re:Custom Resource Overlay, how?
« Reply #11 on: 18 Apr 2003, 18:59:01 »
Well that is weird. To be sure that your resources have been correctly defined, you should be able to find them at the very bottom of the resource list in the effect/title menu of a trigger. If you can't find them, then it's your description that's wrong.

MorMel

  • Guest
Re:Custom Resource Overlay, how?
« Reply #12 on: 19 Apr 2003, 12:44:17 »
I did just like you guys say! I copied each paramter as its shown in this thread... It did not work. Then I tried again by changing a few lines of description... Nothing. ???

I already have a picture to be loaded by the rsc (eventhough, I think that doesn't intefer with the rsc setting)

Is it a problem of OFP version?
Is there a specific order of isues in Description.ext? (like Init-Radio-Sounds-...)

I'd apreciate your help, guys!!!

Gameer_77

  • Guest
Re:Custom Resource Overlay, how?
« Reply #13 on: 19 Apr 2003, 15:43:32 »
I did just like you guys say! I copied each paramter as its shown in this thread... It did not work. Then I tried again by changing a few lines of description... Nothing. ???

I already have a picture to be loaded by the rsc (eventhough, I think that doesn't intefer with the rsc setting)

Is it a problem of OFP version?
Is there a specific order of isues in Description.ext? (like Init-Radio-Sounds-...)

I'd apreciate your help, guys!!!

Can you post your description.ext?

Vektor Boson made a very good Dialog Tutorial - http://home.arcor.de/vektorboson/downloads/dialoge.zip

Gameer

MorMel

  • Guest
Re:Custom Resource Overlay, how?
« Reply #14 on: 25 Apr 2003, 17:34:38 »
Thanks man!!! I don't need to post my description.ext as it's exactly the same as the post by Igor Drukov...

Thanks for the link !!! ;)

MorMel

  • Guest
Re:Custom Resource Overlay, how?
« Reply #15 on: 30 Apr 2003, 11:08:46 »
Doubt solved. My answer was very simple: Resources cannot be customed in OFPv1.00. Now that i've got 1.85, i realized it was a version problem...

Thanks anyway. This topic is very usefull!