Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Mission Wizard Question (Scripting)

  1. #1

    Mission Wizard Question (Scripting)

    I have searched the forums and GOOGLE for the answers to the following question, however I found an answer but it seems to be incorrect or have a lack of sufficient info for a noob to scripting to understand.

    Question: What is the exact script to allow me to change the playable unit in Combat (SECOPS) from KSK to Say Delta Force , or US Army?

    Answer Given below throws errors every time I use it:

    class Units
    {
    class PlayerUnits
    {
    group=0;
    type="Group.West.BIS_US.Infantry.US_DeltaForceTeam ";
    count=1;
    class Positions
    {


    So what is going on here, am I doing something wrong or is the format incorrect, any help is greatly appreciated as this is my stepping stone into scripting in the "main" editor for CO Domination maps.

  2. #2
    Code:
    class Units;
    	{
    	class PlayerUnits;
    	{
    	group=0;
    	type="Group.West.BIS_US.Infantry.US_DeltaForceTeam";
    	count=1;
    	class Positions;
    	};
    };
    See if that works. You made mistakes with the brackets and if this is a .SQF you need to have a semicolon after EVERY LINE

    -Bigshot

  3. #3
    Thanks for the quick response, I'm editing an ARMA2OAMISSIONWIZARD File with notepad, I get an error message from ArmA 2 stating error on Line 21: '.':'{' encountered instead of '='

    Here is the ENTIRE MISSION FILE EDITED AS OF NOW (TEST FILE WITH NO MODS)

    template="ca\missions_e\Templates\SecOps.West";
    noCopy=1;
    owner="ca_missions_e";
    island="fallujah";
    weather=0.5;
    weatherForecast=0.5;
    fog=0;
    fogForecast=0;
    year=1995;
    month=5;
    day=10;
    hour=7;
    minute=30;
    class Params
    {
    PatrolLength=60;
    ACMIntensity=1;
    CivilianLife=1;
    };
    class Units;
    {
    class PlayerUnits;
    {
    group=0;
    type="Group.West.BIS_US.Infantry.US_DeltaForceTeam ";
    count=1;
    class Positions;
    };
    };
    {
    Insertion[]={5224.7998,0,8114.0098};
    };
    addons[]={};

  4. #4
    @ Spartan0536

    Don't let yourself get confused by bigshotking. What he suggested is not correct.

    ---

    You either need to edit the unit classes in the mission.sqm.

    Code:
    				class Item0
    				{
    					position[]={@_Insertion_X,@_Insertion_Y,@_Insertion_Z - 1000};
    					id=0;
    					side="WEST";
    					vehicle="FR_TL";//<-----------------
    					player="PLAYER COMMANDER";
    					leader=1;
    					rank="LIEUTENANT";
    					skill=1.000000;
    					synchronizations[]={6,7};
    					init=@"format [""BIS_patrolLength = %1"", _PatrolLength]";
    				};
    Or you define different units to select from in the params.desc. However that one is quite tricky.

    First you need to define them like this:
    Code:
    class Units
    {
    	class players_west//for SP: class PlayerUnits
    	{
    		name = "WEST";
    		group = 0;
    		default = units_rifleman;
    		class units_rifleman
    		{
    		 	name = $STR_DN_RIFLEMAN;
    		 	file = units_west_rifleman.unit;
    		};
    		class units_camo
    		{
    		 	name = $STR_DN_SPOTTER;
    		 	file = units_west_camo.unit;
    		};
    		class units_sf
    		{
    		 	name = $STR_DN_FR_DR1;
    		 	file = units_west_SF.unit;
    		};
    	};
    units_west_rifleman.unit looks like this for example:

    Code:
    				class Item0
    				{
    					position[]=
    					{
    						@"_WIZVAR_west_X",
    						@"_WIZVAR_west_Y",
    						@"_WIZVAR_west_Z"
    					};
    					placement=10;
    					special="NONE";
    					id=0;
    					side="GUER";
    					vehicle="USMC_Soldier_SL";
    					player="PLAYER COMMANDER";
    					leader=1;
    					skill=0.600000;
    					text="ap_w_0";
    				};
    				class Item1
    				{
    					position[]=
    					{
    						@"_WIZVAR_west_X",
    						@"_WIZVAR_west_Y",
    						@"_WIZVAR_west_Z"
    					};
    					placement=10;
    					special="NONE";
    					id=1;
    					side="GUER";
    					vehicle="USMC_Soldier_SL";
    					player="PLAY CDG";
    					leader=1;
    					skill=0.600000;
    					text="ap_w_1";
    				};
    				class Item2
    				{
    					position[]=
    					{
    						@"_WIZVAR_west_X",
    						@"_WIZVAR_west_Y",
    						@"_WIZVAR_west_Z"
    					};
    					placement=10;
    					special="NONE";
    					id=2;
    					side="GUER";
    					vehicle="USMC_Soldier_SL";
    					player="PLAY CDG";
    					leader=1;
    					skill=0.600000;
    					text="ap_w_2";
    				};
    				class Item3
    				{
    					position[]=
    					{
    						@"_WIZVAR_west_X",
    						@"_WIZVAR_west_Y",
    						@"_WIZVAR_west_Z"
    					};
    					placement=10;
    					special="NONE";
    					id=3;
    					side="GUER";
    					vehicle="USMC_Soldier_SL";
    					player="PLAY CDG";
    					leader=1;
    					skill=0.600000;
    					text="ap_w_3";
    				};
    				class Item4
    				{
    					position[]=
    					{
    						@"_WIZVAR_west_X",
    						@"_WIZVAR_west_Y",
    						@"_WIZVAR_west_Z"
    					};
    					placement=10;
    					special="NONE";
    					id=4;
    					side="GUER";
    					vehicle="USMC_Soldier_SL";
    					player="PLAY CDG";
    					leader=1;
    					skill=0.600000;
    					text="ap_w_4";
    				};
    				class Item5
    				{
    					position[]=
    					{
    						@"_WIZVAR_west_X",
    						@"_WIZVAR_west_Y",
    						@"_WIZVAR_west_Z"
    					};
    					placement=10;
    					special="NONE";
    					id=5;
    					side="GUER";
    					vehicle="USMC_Soldier_SL";
    					player="PLAY CDG";
    					leader=1;
    					skill=0.600000;
    					text="ap_w_5";
    				};
    				class Item6
    				{
    					position[]=
    					{
    						@"_WIZVAR_west_X",
    						@"_WIZVAR_west_Y",
    						@"_WIZVAR_west_Z"
    					};
    					placement=10;
    					special="NONE";
    					id=6;
    					side="GUER";
    					vehicle="USMC_Soldier_SL";
    					player="PLAY CDG";
    					leader=1;
    					skill=0.600000;
    					text="ap_w_6";
    				};
    				class Item7
    				{
    					position[]=
    					{
    						@"_WIZVAR_west_X",
    						@"_WIZVAR_west_Y",
    						@"_WIZVAR_west_Z"
    					};
    					placement=10;
    					special="NONE";
    					id=7;
    					side="GUER";
    					vehicle="USMC_Soldier_SL";
    					player="PLAY CDG";
    					leader=1;
    					skill=0.600000;
    					text="ap_w_7";
    				};
    				class Item8
    				{
    					position[]=
    					{
    						@"_WIZVAR_west_X",
    						@"_WIZVAR_west_Y",
    						@"_WIZVAR_west_Z"
    					};
    					placement=10;
    					special="NONE";
    					id=8;
    					side="GUER";
    					vehicle="USMC_Soldier_SL";
    					player="PLAY CDG";
    					leader=1;
    					skill=0.600000;
    					text="ap_w_8";
    				};
    				class Item9
    				{
    					position[]=
    					{
    						@"_WIZVAR_west_X",
    						@"_WIZVAR_west_Y",
    						@"_WIZVAR_west_Z"
    					};
    					placement=10;
    					special="NONE";
    					id=9;
    					side="GUER";
    					vehicle="USMC_Soldier_SL";
    					player="PLAY CDG";
    					leader=1;
    					skill=0.600000;
    					text="ap_w_9";
    				};
    				class Item10
    				{
    					position[]=
    					{
    						@"_WIZVAR_west_X",
    						@"_WIZVAR_west_Y",
    						@"_WIZVAR_west_Z"
    					};
    					placement=10;
    					special="NONE";
    					id=10;
    					side="GUER";
    					vehicle="USMC_Soldier_SL";
    					player="PLAY CDG";
    					leader=1;
    					skill=0.600000;
    					text="ap_w_10";
    				};
    				class Item11
    				{
    					position[]=
    					{
    						@"_WIZVAR_west_X",
    						@"_WIZVAR_west_Y",
    						@"_WIZVAR_west_Z"
    					};
    					placement=10;
    					special="NONE";
    					id=11;
    					side="GUER";
    					vehicle="USMC_Soldier_SL";
    					player="PLAY CDG";
    					leader=1;
    					skill=0.600000;
    					text="ap_w_11";
    				};
    				class Item12
    				{
    					position[]=
    					{
    						@"_WIZVAR_west_X",
    						@"_WIZVAR_west_Y",
    						@"_WIZVAR_west_Z"
    					};
    					placement=10;
    					special="NONE";
    					id=12;
    					side="GUER";
    					vehicle="USMC_Soldier_SL";
    					player="PLAY CDG";
    					leader=1;
    					skill=0.600000;
    					text="ap_w_12";
    				};
    				class Item13
    				{
    					position[]=
    					{
    						@"_WIZVAR_west_X",
    						@"_WIZVAR_west_Y",
    						@"_WIZVAR_west_Z"
    					};
    					placement=10;
    					special="NONE";
    					id=13;
    					side="GUER";
    					vehicle="USMC_Soldier_SL";
    					player="PLAY CDG";
    					leader=1;
    					skill=0.600000;
    					text="ap_w_13";
    				};
    				class Item14
    				{
    					position[]=
    					{
    						@"_WIZVAR_west_X",
    						@"_WIZVAR_west_Y",
    						@"_WIZVAR_west_Z"
    					};
    					placement=10;
    					special="NONE";
    					id=14;
    					side="GUER";
    					vehicle="USMC_Soldier_SL";
    					player="PLAY CDG";
    					leader=1;
    					skill=0.600000;
    					text="ap_w_14";
    				};
    				class Item15
    				{
    					position[]=
    					{
    						@"_WIZVAR_west_X",
    						@"_WIZVAR_west_Y",
    						@"_WIZVAR_west_Z"
    					};
    					placement=10;
    					special="NONE";
    					id=15;
    					side="GUER";
    					vehicle="USMC_Soldier_SL";
    					player="PLAY CDG";
    					leader=1;
    					skill=0.600000;
    					text="ap_w_15";
    				};
    However it means you need to edit the mission.sqm too, to add the parameters into the given unit.

    ---

    Ontop of that you need define it as new SP template in a config.

    ---

    Overall doable - but why not use a replacement config instead to use the infantry you want?
    Or go for the direct mission.sqm edit.
    Last edited by .kju [PvPscene]; May 27 2011 at 06:08.

  5. #5
    Sorry if I gave you incorrect info, I Did was I thought was correct but obviously not....

  6. #6
    I figured it out with some patience and Windows 7 compare view (love that feature), turns out I had a ; after class positions causing a terminal fault. your code bigshotking was correct it was my error after, Now I just need ot figure out how to set units in my squad to certain classes, because as it stands I have no medic and its a 4 man team (player included) and I want a 5 Man Team with dedicated roles as follows:
    Player - Team Leader/FAC
    AI 1 - Marksman
    AI 2 - Automatic Rifleman
    AI 3 - Medic
    AI 4 - Demolitions

    and a huge thanks again for the rapid responses hopefully this will help someone else down the road who is looking to learn editing like I am. I prefer the actual full editor as it is easier to work with, but for pre-set missions and have a bit of fun in under 20 minutes of work the Wizard is a great feature, and a great learning tool.

    Code:
    template="ca\missions_e\Templates\SecOps.West";
    noCopy=1;
    owner="ca_missions_e";
    island="fallujah";
    weather=0.5;
    weatherForecast=0.5;
    fog=0;
    fogForecast=0;
    year=1995;
    month=5;
    day=10;
    hour=7;
    minute=30;
    class Params
    {
    	PatrolLength=60;
    	ACMIntensity=1;
    	CivilianLife=1;
    };
    class Units
    {
    	class PlayerUnits
    	{
    	group=0;
    	type="Group.West.BIS_US.Infantry.US_DeltaForceTeam";
    	count=1;
    	};
    };
    class Positions
    {
    	Insertion[]={5224.7998,0,8114.0098};
    };
    addons[]={};

  7. #7
    Now I understand what you did. The right approach actually.

    You saved your mission based on a template and modified the mission rather than the template.
    That said you are working within some strict limits there obviously.

  8. #8
    Quote Originally Posted by PvPscene View Post
    Now I understand what you did. The right approach actually.

    You saved your mission based on a template and modified the mission rather than the template.
    That said you are working within some strict limits there obviously.
    yeah I don't like the limitations considering I have spent some time in OFP's Editor before and now in ArmA 2's main editor. What I am "practicing" for is a "hack" of taking the random mission generator from 04 Combat and putting it into the Editor on Fallujah Island. From there I plan on adding in certain elements from Insurgency mode and Domination, this will be using the AI tactics from Insurgency, and a mixed style of play from Domination and Insurgency making it so that you really feel like you are fighting in Fallujah against an armed hated insurgency. This will work for both Singleplayer with AI and CO-OP with up to 32 players. I have A LOT of work ahead but most of the code for what I am looking for has already been written and tested so this project looks very promising. Only problem being that Fallujah is a VERY VERY DEMANDING Island, but if you get it setup right it is nothing short of perfection.

  9. #9
    Sergeant Major ])rStrangelove's Avatar
    Join Date
    Jan 24 2002
    Location
    Rainy, foggy, begins with G
    Posts
    1,760
    Quote Originally Posted by Spartan0536 View Post
    Only problem being that Fallujah is a VERY VERY DEMANDING Island, but if you get it setup right it is nothing short of perfection.
    Sounds very promising!

    Personally i find Fallujah to be one of the best performing islands atm, a lot better than Zargabad.

    Spoiler:

  10. #10
    Im sure you guys already know about pressing ALT-E at the main menu to get the 3d editor, but I just found this out, HOLY CRAP THIS IS AWESOME!, Advanced editing features and then I can use the Wizard to make a SP version of my more complex MP Gamemode. I LOVE THIS BIS, NEVER GET RID OF IT!!!

    Oh and Fallujah from Ground Level to High Altitude is almost EXACTLY like the real deal, its simply amazing. Now back to work and once I get the base template from the map down in 3D editor, it will be time to test out SP, then go to scripting for MP, then v 1.0 release. I'm expecting V1.0 to release NO LATER than August.

    ---------- Post added at 03:41 PM ---------- Previous post was at 03:19 PM ----------

    OK i need some more help, this is not really script related because im doing it in 3d not 2d, using the in game 3D editor to make a base map layout, how do I invert objects, not rotate using shift, invert as in upside down for overhead lights?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •