Jump to content
Sign in to follow this  
bennie1983nl

How to make markers for in the editor

Recommended Posts

Hi to all

How do i create markers for on the map?

like some called ctimarkers.

kaart2gr1.th.jpg

Kind Regards Bennie1983nl

Share this post


Link to post
Share on other sites

quick example :

I create a 64*64 sized tga.

Then i paint the alpha channel with my image app (your image application must support alpha channels and tga, so if you only have microsoft paint, you can already forget about this) and obtain something like this :

clipboard02az3.jpg

I save this 64*64 tga file with its alpha channel and name it for my example n2.tga

Now i open the tga file in TexView (strangely i have been unable to get a working paa ingame of this marker with paatool, that i usually only work with) , i see this :

clipboard03va2.jpg

I click on Mipmap and select Generate (not sure this step is needed for markers, but do it anyways).

Once done, i click File -> save As and i name it n2.paa

I get my n2.paa and put it my own testmark folder , where there is another marker n1.paa i made previously.

In the testmark folder i have a config.cpp that look exactly like this :

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// some basic defines

#define TEast 0

#define TWest 1

#define TGuerrila 2

#define TCivilian 3

#define TSideUnknown 4

#define TEnemy 5

#define TFriendly 6

#define TLogic 7

#define true 1

#define false 0

// type scope

#define private 0

#define protected 1

#define public 2

#define WeaponNoSlot 0// dummy weapons

#define WeaponSlotPrimary 1// primary weapons

#define WeaponSlotSecondary 16// secondary weapons

#define WeaponSlotItem 256// items

#define WeaponSlotBinocular 4096// binocular

#define WeaponHardMounted 65536

class CfgPatches

{

class SANC_testmarkers

{

units[] = {};

weapons[] = {};

requiredVersion = 1.96;

};

};

class CfgMarkers

{

class stupidmarker1

{

name="StupidMarker 1";

icon="\testmark\n1.paa";

color[]={0.100000,0.100000,0.900000,0.800000};

size=32;

};

class stupidmarker2

{

name="StupidMarker 2";

icon="\testmark\n2.paa";

color[]={0.100000,0.100000,0.900000,0.800000};

size=32;

};

};

I transform this testmark folder into a testmark.pbo , using any kind of pbo tool , it isnot important which one, use your favorite.

Result ingame :

clipboard01lf2.jpg

Now it is up to you to create as many marker you want, and modifiy the example config.cpp quoted with your own tag and classes.

It is that easy, the only difficulty comes from having an image app capable of allowing you to paint the alpha channels with tga support (most image app should be able to do that anyways).

Share this post


Link to post
Share on other sites

Heej Sanctuary

i need to put the file into a Addons-folder?

I use ArcSoft PhotoStudio 2000.

will try it out soon.

Share this post


Link to post
Share on other sites

I have no idea what "ArcSoft PhotoStudio 2000" can or can't do, so i can't help really on your problem, but from google it seems to support TGA as a format, so there is a chance you can use it for your makers.

Is your image application allow you to paint a "selection" on a blank 64*64 picture ?

If yes, paint your selection (like what i did in my screenshot) on a newly created 64*64 picture, then save what you did as a .TGA file, and when you save the file, see if you have an option allowing you to save the alpha channel with your TGA.

If there is one, your painted selection on your 64*64 will be saved as the alpha channel of the TGA. If there is not, let's hope your image app save the alpha channel automatically or find documentation for your program to see if there is a way to save the alpha channel with a TGA.

Share this post


Link to post
Share on other sites

Hi

my paint-program  ArcSoft PhotoStudio 2000 doesn't suport alpha channel....

pity...

Sombody interrested in a job, for the IOH-mod?

Share this post


Link to post
Share on other sites

The Gimp, a totally free image software very often highly recommended when you don't have photoshop or paintshop pro, support tga alpha channels

Quote[/b] ]The GIMP

1. Select the parts of the image you want to be visible. (Or select what you want to be transparent, and do Select -> Invert.)

2. Do Layer->Mask->Add Layer Mask

1. In the dialog, set Initialize Layer Mark to 'Selection'

3. You can make further changes by painting directly on the layer mask. The layermask is just a grayscale image; black means fully transparent and white fully opaque.

4. The new mask is selected in the layer list. Before you save, click on the original layer to select it. (Otherwise, saving will only export the grayscale mask.)

5. When saving as TGA, the export procedure will tell you it needs to "Apply layer mask". Click 'Export'.

Another way to do is it right click on the layer and select "Add alpha channel" and use the Erase tool or Edit->Clear to erase the parts you want transparent.

As i never used The Gimp, i can't help more.

Share this post


Link to post
Share on other sites
Hi

my paint-program ArcSoft PhotoStudio 2000 doesn't suport alpha channel....

pity...

Sombody interrested in a job, for the IOH-mod?

Well, I don't believe that your program does not support alpha channel.

I don't know about the terminology in your image-editor, but try this:

Create from your layer (or object) containing the marker a 'mask' (or selection) and save a TGA (perhaps you are asked for 24 or 32 bits, go for 32, or RGBA). Then try to convert it and look whether it has an alpha channel.

(if you didn't use layers, then you must create the mask manually, perhaps with the magic wand tool)

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  

×