Jump to content
Sign in to follow this  
d3nn16

general mission template

Recommended Posts

Hi,

I'm working on a general mission template for myself (and the community). I want to add (among other stuff) the basic dialog controls someone would need : button, text, edit box, list, combo list, etc.

First of all does anything like a general mission template (for Arma2) already exist ? or at least a guide listing all controls with working examples ? (I know the BIS Wiki but I haven't found working examples for what I want there - the example for a controls group there throws an error). I also checked the config.bin for an example for the controls group but it doesn't work.

So I'm stuck with dialog controls like activetext, controls group, listbox scrollbar color/texture. Couldn't make activetext control to show up, the structured text in my controls group doesn't show up either and I can't setup textures for the scrollbar in the combo listbox definition.

Code :

		class CTRLG_INFO : OPT_TEMPL_CONTROLSGROUP
	{
		x = _BODY_X_;
		y = _BODY_Y_ + 21 * _W_;
		w = _BODY_W_;
		h = 2 * _H_ - _DH_;

		class Controls
		{
			class TXT_INFO : OPT_TEMPL_STRUCT
			{
				idc = 59;
				x = 0;//_BODY_X_;
				y = 0;//_BODY_Y_ + 21 * _H_;
				w = _BODY_W_;
				h = 2 * _H_ - _DH_;
			};
		};
	};

class TEMPL_COMBOBOX
{
idc = -1;
type = _CT_COMBO_;
style = _ST_MULTI_;
x = 0;
y = 0;
w = 0;
h = 0;

text = "";
sizeEx = 0.02;
font = "Zeppelin32";
colorText[] = {0, 0, 0, 1};
colorBackground[] = {1, 1, 1, 1};
rowHeight = 0.021;
wholeHeight = 5 * 0.021;
maxHistoryDelay = 1.0;
arrowEmpty = "\ca\ui\data\ui_arrow_combo_ca.paa";
arrowFull = "\ca\ui\data\ui_arrow_combo_active_ca.paa";
color[] = {0, 0, 0, 1};
colorSelect[] = {1, 1, 1, 1};
colorSelectBackground[] = {1, 0, 0, 1};
colorScrollbar[] = {1, 1, 1, 1};
soundSelect[] = {"\ca\ui\data\sound\new1", 0.09, 1};
soundExpand[] = {"\ca\ui\data\sound\new1", 0.09, 1};
soundCollapse[] = {"\ca\ui\data\sound\new1", 0.09, 1};

class ScrollBar
{
	color[] = {1, 1, 1, 0.6};
	colorActive[] = {1, 1, 1, 1};
	colorDisabled[] = {1, 1, 1, 0.3};
	thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa";
	arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa";
	arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa";
	border = "\ca\ui\data\ui_border_scroll_ca.paa";
};
};

Share this post


Link to post
Share on other sites
First of all does anything like a general mission template (for Arma2) already exist ?

Hi d3nn16, have you had a chance to look at F2 yet? It's a mission framework for ArmA2 (that also supports ACE2), and includes many different components. Check out the link in my sig below to find out more. Hope that's useful.

Share this post


Link to post
Share on other sites

I fixed some of the problems : I can have a textured scrollbar in my listbox / combobox (problem was style not set to 16), and I managed to have a controls group with horizontal and a vertical scrollbars showing up.

The (dirty) code for working controls group :

There are still error messages when I open the dialog because I haven't added some color attributes but when I aded them the scrollbars disapeared... I'll check what the reason is

		class C04_1_CTRLGRP
	{
		type = 15;
		style = 16;
		idc = _IDC_04_1_CTRLGRP_;
		x = _BODY_X_;
		y = _BODY_Y_ + _H_;
		w = _SLOT_W_;
		h = 3 * _H_ - _DH_;
		shadow = false;

		class VScrollbar {
			width = 0.021;
			autoScrollSpeed = -1;
			autoScrollDelay = 5;
			autoScrollRewind = 0;
			shadow = false;
		};

		class HScrollbar {
			height = 0.028;
			shadow = false;
		};

		class ScrollBar {
			color[] = {1, 1, 1, 0.6};
			colorActive[] = {1, 1, 1, 1};
			colorDisabled[] = {1, 1, 1, 0.3};
			thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa";
			arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa";
			arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa";
			border = "\ca\ui\data\ui_border_scroll_ca.paa";
		};

		class Controls
		{
			class C04_1_STXT
			{
				idc = _IDC_04_1_STXT_;
				type = _CT_STRUCTURED_TEXT_;
				style = _ST_SINGLE_;
				x = 0;
				y = 0;
				w = 2 * _W_ - _DW_;
				h = 5 * _H_ - _DH_;
				text = "";
				size = 0.04;
				colorBackground[] = _COLHPP_BLUE_;

				class Attributes
				{
					font = "TahomaB";
					color = "#ffffff";
					size = 1;
					align = "left";
					valign = "middle";
					shadow = "true";
					shadowOffset = 0.1;
					shadowColor = "#000000";
					underline = "true";
				};
			};
		};
	};

Edited by d3nn16

Share this post


Link to post
Share on other sites

Hey fer you know I have seen that F2 and forgotten to go back to it and read it now that I have it looks quite good I have player flashpoint and Arma since the begining and run my own servers for awhile however I have been a return to school adult and my time is not what it was so the mission maker which I love I have never gotten solid time around.

This F2 looks like a good way to go and I wanted to get back into things with understanding each component one at a time not popping on and whipping out missions that are just not thought out or dont work right because I don't understand the basics.

So I do have a question or two in regards to the different versions ACE I have never run and it seems wonderful in terms of the things it does it also looks like it has quite a good following however I am not sure about that I really want to keep myself where most of the community is in terms of what versions of the game they are running.

I also like the Shaqtactical things I have read seems like a very solid group as well and when I make missions to use their markers is that consdered an addon or something that can be downloaded to a player through the mission?

Im just curious as to where you think the basic mission maker should start the folk layout or is shaq ok? or go with ACE they have the largest part of the community by far? I really have no idea as I am again back and kind of new yet again

Thanks in advance

Share this post


Link to post
Share on other sites
So I do have a question or two in regards to the different versions ACE I have never run and it seems wonderful in terms of the things it does it also looks like it has quite a good following however I am not sure about that I really want to keep myself where most of the community is in terms of what versions of the game they are running.

It depends entirely on who you want to play your missions / who you play with. ACE2 certainly adds lots of neat features to the game, but you can make perfectly enjoyable missions using vanilla ArmA2 or ArmA2:OA.

I also like the Shaqtactical things I have read seems like a very solid group as well and when I make missions to use their markers is that consdered an addon or something that can be downloaded to a player through the mission?

The ShackTactical markers are not an addon - they use icons already available in ArmA2 / ArmA2:OA - so you can use them safely in any mission. Same for the Folk markers.

Im just curious as to where you think the basic mission maker should start the folk layout or is shaq ok? or go with ACE they have the largest part of the community by far? I really have no idea as I am again back and kind of new yet again

The ShackTactical and Folk platoons both use the basic building block of 4-man fireteams, and in practice they are quite similar. You'd only really notice the difference if you were writing missions for 50+ players, in which case you should use the ShackTactical platoons.

The key difference right now is that the Folk builds of F2 do not require ACE2 - only vanilla copies of ArmA2 or ArmA2:OA. For the beginner, I would probably start with a Folk build until you decide to make the leap to ACE2.

Ultimately, good mission making should not be about being dependent on any addons: if your idea is good, you should be able to execute it with vanilla ArmA2 or ArmA2:OA. Establish a solid foundation, and then look to add complexity (like ACE2 etc.) later on. Hope that helps.

:)

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  

×