Flags, Textuers and Signs ?

Tai

Member
I was on a server where the local clan had one of those big ass road billboards but with their clan details on it, i would love to know how this is done, also can it be done with flags as well ?
 
use this command
Code:
this setObjectTexture [0,""]
You will need to change this to the object that you're modifying.
To find the object you are looking for you will need to use the find object command
Code:
_objs = (getPosATL player) nearEntities [["OBJECT_NAME_HERE"], 100000];
you can then call a for loop on all the found objects and set their new texture.
Code:
{
_x setObjectTexture [0,"textures\my_texture.paa"]
} forEach _objs;
This is all of the top of my head, will need to check for syntax errors and whatnot, but should give you a rough idea of what's needed to do this.
 
Can this be done without everyone having to download any files manually?
The images can be included in the mission.pbo but file sizes can get quite large very quickly, so for your players sake I wouldn't recommend having to many.
 
Yeah I really just wana change the texture on a single sign not every instance of that sign, but had hoped there would be a simpler way.
 
I have been putting custom "signs" in my server. I just followed the instructions on this video. I haven't tried this technique for any other objects in the game. Just the signs and flags. Once you have the picture you want uploaded with in your PBO, you can use the one image for multiple signs. I have about 6 images, all about 80kb each, so it will add up quick with more...the image seems to load only when someone is within about 10m so there isn't any lag from tons of signs loading in on the server.

http://www.mytoptrailer.com/show.php?vid=5GNo2ALKXnE&play=1

Hope this helps.
 
I have been putting custom "signs" in my server. I just followed the instructions on this video. I haven't tried this technique for any other objects in the game. Just the signs and flags. Once you have the picture you want uploaded with in your PBO, you can use the one image for multiple signs. I have about 6 images, all about 80kb each, so it will add up quick with more...the image seems to load only when someone is within about 10m so there isn't any lag from tons of signs loading in on the server.

http://www.mytoptrailer.com/show.php?vid=5GNo2ALKXnE&play=1

Hope this helps.

Hi there ..

I am on DayZ.st in case I didnt mention that before, and I followed this video, in st we get an import script that parses the bedi file from the editor and exports sql so we can add the new buildings to the database, but I just noticed that the init stuff is not being pulled over.

So I am wondering how I will be able to attach the init code to the objects when I cant insert it via the database, has anyone else done this with dayz, and or dayz.st ?

any help would be amazing thanks.
 
in Mission.SQM
Code:
//trying a sign and an initted texture.
class Item89
{
position[]={5309.96,-58.35,2091};
placement=1;
id=89;
side="EMPTY";
vehicle="SignM_FARP_Winchester_EP1";
text="base_sign";
init="_nul = this setObjectTexture [0, ""signs\cb_sign.jpg""]";
};

getting the positions right or the angle the sign will face is a little annoying but yeah all in all I am happy with it.
hope this helps.
 
Thought I'd give this a whirl - I've found I can add flags via the database easily but I think the syntax or placement of data in mission.sqm is causing the flag to only show it's default image:

so in table "building" ive added id "100" and class_name "FlagCarrierWhite_EP1"
and in instance_building ive added id "212" (next available), building_id "100" and worldspace "[88,[2983.27,15134.1,0.002]]"
This spawns a flag up on a hill near misty peak (where im working).

I created a folder called "flags" in chernarus and inside that is test.jpg. test.jpg is 512 x 512 in size.

I've tried adding

Code:
//sign
				class Item100
				{
					position[]={2983.27,15134.1,0.002};
					placement=88;
					id=212;
					side="EMPTY";
					vehicle="FlagCarrierWhite_EP1";
					text="base_flag";
					init="_nul = this setFlagTexture [0, ""flags\test.jpg""]";
				};

at the bottom of mission.sqm, after the

Code:
class OutroLoose 
{
blahblahblah
}

section. I've tried adding it to the class Groups, Item0, Vehicles, adding 1 to items= and then putting it at the bottom of that class - eg:

Code:
	class Groups
	{
		items=2;
		class Item0
		{
			side="WEST";
			class Vehicles
			{
				items=101;  //had 100 in the first place...
				class Item0
				*snip*
				class Item100
				{
					position[]={2983.27,15134.1,0.002};
					placement=88;
					id=212;
					side="EMPTY";
					vehicle="FlagCarrierWhite_EP1";
					text="base_flag";
					init="_nul = this setFlagTexture [0, ""flags\test.jpg""]";
				};
			};
		};

Neither of these work - I get the white flag from the database.

I just wondered

a) if i need to bother adding the database version at all, as it looks like im adding the flag twice, once in the dbase and once in mission.sqm
b) where you're adding yours
c) if my syntax is right

Thanks in advance for any help and I understand if you don't have the time - I'm probably being derpy :)
 
in Mission.SQM
Code:
//trying a sign and an initted texture.
class Item89
{
position[]={5309.96,-58.35,2091};
placement=1;
id=89;
side="EMPTY";
vehicle="SignM_FARP_Winchester_EP1";
text="base_sign";
init="_nul = this setObjectTexture [0, ""signs\cb_sign.jpg""]";
};

getting the positions right or the angle the sign will face is a little annoying but yeah all in all I am happy with it.
hope this helps.

Can't you use

azimut= blah
 
Here's my latest version...

Code:
					class Groups
	{
		items=2;
		class Item0
		{
			side="WEST";
			class Vehicles
			{
				items=101; //this number is correct
				*snipped out all the other ones...*
				//sign
				class Item100
				{
					position[]={2983.27,15134.1,0.002};
					azimut=-17.0839;
					placement=1; // I used 88 as I wondered if this was for orientation, using azumit as pointed out above
					id=212;
					side="EMPTY";
					vehicle="FlagCarrierWhite_EP1";
					text="base_sign"; //no idea if this is important. tried it as both base_flag and base_sign.
					init="this SetFlagTexture ""test.jpg"""; 
						//got rid of the folder to rule that out.  Tried the format from mission.beibi file.
				};
			};
		};

No dice tho. Anyone have a working version of this?
 
Here's how I do it:

Use 3D Editor to place your sign. Save it as a single player mission and exit. Now open Notepad++ and get your mission.sqm file open. You also want to open the mission.sqf file from the single player mission you just created.

Using this as a template
Code:
class Item##
        {
            position[]={4719.5962,-2.0980,2587.4368};
            placement=1;
            id=18;
            side="EMPTY";
            vehicle="SignM_FARP_Winchester_EP1";
            azimut=-3.1160061;
            text="sign_test";
            init="_nul = this setObjectTexture [0, ""sign.jpg""]";
        };

Your "sign" mission file will show this
Code:
_vehicle_0 = objNull;
if (true) then
{
  _this = createVehicle ["SignM_FARP_Winchester_EP1", [4719.5962, 2587.4368, -2.0980835e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;
  _this setDir -3.1160061;
  _this setPos [4719.5962, 2587.4368, -2.0980835e-005];
};

Hopefully this shows people how to correctly transpose the different values. Just to confirm:

First block of code - DayZ Server mission.sqm file.

Second block of code - Single Player Mission.sqf from the editor.

The sign.spg must be 1024x1024 or 512x512 pixels. Any lower res looked crap for me.

Ensure you update the number of vehicle items at the top of the class_vehicles group.

That's it, your done! Repack, upload and enjoy.

I managed to get the image to under 100kb. It still looked great in game, although i'm sure you could compress it further. Beware adding a few of these, will make your mission.pbo very big, very quickly. Not that it really matters that much :)

Hope i've helped someone.

2013-05-18_00001_zps3b4b21ef.jpg
 
Well I finally got this working - mostly.

For objects to show I need to put them after class Markers, like so:

Code:
	class Markers
	{
		items=7;
		class Item0
		{
			position[]={7839.6055,381.33774,8414.7324};
			name="center";
			type="Empty";
		};
		class Item1
		{
			position[]={-18697.58,379.53012,25815.256};
			name="respawn_west";
			type="Empty";
		};
		class Item2
		{
			position[]={4932.3345,0.39950246,1989.1094};
			name="spawn0";
			type="Empty";
		};
		class Item3
		{
			position[]={2236.0391,0.63119155,1923.3735};
			name="spawn1";
			type="Empty";
		};
		class Item4
		{
			position[]={8738.1328,0.45720705,2122.1082};
			name="spawn2";
			type="Empty";
		};
		class Item5
		{
			position[]={10909.267,0.57597214,2422.3096};
			name="spawn3";
			type="Empty";
		};
		class Item6
		{
			position[]={13510.764,0.44504455,5249.3027};
			name="spawn4";
			type="Empty";
		};
	};
	
	// Additional objects here, flags, signs and so on
	
	class Vehicles
	{
		items=3;
		class Item0
		{
			side="EMPTY";
			id=0;
			position[]={13135.9, 0.12, 10393.3};
			vehicle="Sign_MP_blu";
			azimut=90;
			init="_nul = this setObjectTexture [0, ""flags\test.jpg""]";
		};
		class Item1
		{
			side="EMPTY";
			id=1;
			position[]={13135.9, 0.12, 10399.3};
			vehicle="FlagCarrierChecked";
			azimut=90;
			init="_nul = this setFlagTexture [0, ""flags\test.jpg""]";
		};
		class Item2
		{
			side="EMPTY";
			id=2;
			position[]={13135.9, 0.12, 10408.3};
			vehicle="FlagCarrierChecked";
			azimut=90;
			init="_nul = this setObjectTexture [0, ""flags\test.jpg""]";
		};
	};
	
};
class Intro
{
etc

If I put the block any where else they don't show. Sorted this with mmmyum's help who pointed me at the skalisty island bridge code.

Secondly, my editor doesn't give the right height if I go too far north on the map - I just spits out 0 for height, or a very low number so once I had the flags working, they got buried underground. No idea if this is my problem or a general problem with the system. Much >< was generated.

Thirdly, flags don't work. They do anywhere else, but they don't in dayz. I have no idea why. If you look at the code above, I tried both of those. Both flags show, but with a checkered background. The sign shows just fine. They all use the same test image, a 512x512 pixel jpeg.

*shrugs*
 
Anyone figure out the class name for the big billboards in chernarus?

I found the model in the misc pbo, but can't figure out the class name to make it show up. They would be much better for this as you can use a 1024x512 jpg

This is the election candidate billboard just on the east side of cherno

Bilboard_strana_noveho_radu.p3d

I have tried:
Bilboard_strana_noveho_radu
Land_Bilboard_strana_noveho_radu
Land_Misc_Bilboard_strana_noveho_radu
Misc_Bilboard_strana_noveho_radu
Sign_Bilboard_strana_noveho_radu

All to no success, hopefully someone can figure this out...
 
Yeah it's got those bilboard models on it, but I have yet to figure out what the class name is for them or if you can put them in the standard way...

ca\misc\bilboard_alkohol.p3d
ca\misc\bilboard_beach.p3d
ca\misc\bilboard_bienvenudo.p3d
ca\misc\bilboard_cibulka.p3d
ca\misc\bilboard_cigara_chernomorky.p3d
ca\misc\bilboard_escape.p3d
ca\misc\bilboard_everon.p3d
ca\misc\bilboard_hlinik.p3d
ca\misc\bilboard_likery_bardak.p3d
ca\misc\bilboard_nogova.p3d
ca\misc\bilboard_pizza_presto.p3d
ca\misc\bilboard_riviera.p3d
ca\misc\bilboard_seci_stroje.p3d
ca\misc\bilboard_smadny_maskrnik.p3d
ca\misc\bilboard_strana_noveho_radu.p3d
ca\misc\bilboard_toaletak_armasan.p3d
ca\misc\bilboard_vodka.p3d
ca\misc\bilboard_volte_cernaruske_hnuti.p3d
ca\misc\bilboard_vstup_do_cdf.p3d
ca\misc\bilboard_zlute_zgrynda.p3d
 
Back
Top