Blitzen88 18 Posted February 23, 2022 Im having a hard time implementing RHS units into the SpawnAI Module. Im using this post as a guide but its still not working. Here is my group.cfg: Quote class CfgGroups { class west { class RHS_Blufor_Army_W { //----------------------------------------------------- // I) Infantry //----------------------------------------------------- class Infantry { class RHS_Blufor_Army_RifleSquad_W { Name = "Army Rifle Squad (W)"; Icon = "\A3\ui_f\data\map\markers\nato\b_inf.paa"; class unit0 { vehicle = "rhsusf_army_ocp_squadleader"; side = 1; rank = "SERGEANT"; position[] = { 0, 0, 0 }; }; class unit1 { vehicle = "rhsusf_army_ocp_teamleader"; side = 1; rank = "CORPORAL"; position[] = { 5, -5, 0 }; }; class unit2 { vehicle = "rhsusf_army_ocp_grenadier"; side = 1; rank = "PRIVATE"; position[] = { -5, -5, 0 }; }; class unit3 { vehicle = "rhsusf_army_ocp_maaws"; side = 1; rank = "PRIVATE"; position[] = { 10, -10, 0 }; }; class unit4 { vehicle = "rhsusf_army_ocp_autorifleman"; side = 1; rank = "PRIVATE"; position[] = { -10, -10, 0 }; }; class unit5 { vehicle = "rhsusf_army_ocp_medic"; side = 1; rank = "PRIVATE"; position[] = { 15, -15, 0 }; }; class unit6 { vehicle = "rhsusf_army_ocp_riflemanat"; side = 1; rank = "PRIVATE"; position[] = { -15, -15, 0 }; }; class unit7 { vehicle = "rhsusf_army_ocp_rifleman"; side = 1; rank = "PRIVATE"; position[] = { 20, -20, 0 }; }; }; class RHS_Blufor_Army_WeaponsSquad_W { Name = "Army Weapon Squad (W)"; Icon = "\A3\ui_f\data\map\markers\nato\b_inf.paa"; class unit0 { vehicle = "rhsusf_army_ocp_squadleader"; side = 1; rank = "SERGEANT"; position[] = { 0, 0, 0 }; }; class unit1 { vehicle = "rhsusf_army_ocp_teamleader"; side = 1; rank = "CORPORAL"; position[] = { 5, -5, 0 }; }; class unit2 { vehicle = "rhsusf_army_ocp_grenadier"; side = 1; rank = "PRIVATE"; position[] = { -5, -5, 0 }; }; class unit3 { vehicle = "rhsusf_army_ocp_maaws"; side = 1; rank = "PRIVATE"; position[] = { 10, -10, 0 }; }; class unit4 { vehicle = "rhsusf_army_ocp_machinegunner"; side = 1; rank = "PRIVATE"; position[] = { -10, -10, 0 }; }; class unit5 { vehicle = "rhsusf_army_ocp_medic"; side = 1; rank = "PRIVATE"; position[] = { 15, -15, 0 }; }; class unit6 { vehicle = "rhsusf_army_ocp_machinegunnera"; side = 1; rank = "PRIVATE"; position[] = { -15, -15, 0 }; }; class unit7 { vehicle = "rhsusf_army_ocp_riflemanat"; side = 1; rank = "PRIVATE"; position[] = { 20, -20, 0 }; }; }; }; //----------------------------------------------------- // II) Motorized //----------------------------------------------------- class Motorized {}; //----------------------------------------------------- // III) Mechanized //----------------------------------------------------- class Mechanized {}; //----------------------------------------------------- // IV) Armored //----------------------------------------------------- class Armored {}; }; //End Custom Faction }; //End West };//End CFG Groups Im getting a side “west” and faction name not compatible…? Share this post Link to post Share on other sites
Harzach 2516 Posted February 23, 2022 Works fine here. Please us code blocks when pasting code, as copy/pasting from/to quote blocks tends to create corrupted characters (I had to clean several out of your code above.) Description.ext: class CfgGroups { class west { class RHS_Blufor_Army_W { class Infantry { class RHS_Blufor_Army_RifleSquad_W { Name = "Army Rifle Squad (W)"; Icon = "\A3\ui_f\data\map\markers\nato\b_inf.paa"; class unit0 { vehicle = "rhsusf_army_ocp_squadleader"; side = 1; rank = "SERGEANT"; position[] = { 0, 0, 0 }; }; class unit1 { vehicle = "rhsusf_army_ocp_teamleader"; side = 1; rank = "CORPORAL"; position[] = { 5, -5, 0 }; }; class unit2 { vehicle = "rhsusf_army_ocp_grenadier"; side = 1; rank = "PRIVATE"; position[] = { -5, -5, 0 }; }; class unit3 { vehicle = "rhsusf_army_ocp_maaws"; side = 1; rank = "PRIVATE"; position[] = { 10, -10, 0 }; }; class unit4 { vehicle = "rhsusf_army_ocp_autorifleman"; side = 1; rank = "PRIVATE"; position[] = { -10, -10, 0 }; }; class unit5 { vehicle = "rhsusf_army_ocp_medic"; side = 1; rank = "PRIVATE"; position[] = { 15, -15, 0 }; }; class unit6 { vehicle = "rhsusf_army_ocp_riflemanat"; side = 1; rank = "PRIVATE"; position[] = { -15, -15, 0 }; }; class unit7 { vehicle = "rhsusf_army_ocp_rifleman"; side = 1; rank = "PRIVATE"; position[] = { 20, -20, 0 }; }; }; class RHS_Blufor_Army_WeaponsSquad_W { Name = "Army Weapon Squad (W)"; Icon = "\A3\ui_f\data\map\markers\nato\b_inf.paa"; class unit0 { vehicle = "rhsusf_army_ocp_squadleader"; side = 1; rank = "SERGEANT"; position[] = { 0, 0, 0 }; }; class unit1 { vehicle = "rhsusf_army_ocp_teamleader"; side = 1; rank = "CORPORAL"; position[] = { 5, -5, 0 }; }; class unit2 { vehicle = "rhsusf_army_ocp_grenadier"; side = 1; rank = "PRIVATE"; position[] = { -5, -5, 0 }; }; class unit3 { vehicle = "rhsusf_army_ocp_maaws"; side = 1; rank = "PRIVATE"; position[] = { 10, -10, 0 }; }; class unit4 { vehicle = "rhsusf_army_ocp_machinegunner"; side = 1; rank = "PRIVATE"; position[] = { -10, -10, 0 }; }; class unit5 { vehicle = "rhsusf_army_ocp_medic"; side = 1; rank = "PRIVATE"; position[] = { 15, -15, 0 }; }; class unit6 { vehicle = "rhsusf_army_ocp_machinegunnera"; side = 1; rank = "PRIVATE"; position[] = { -15, -15, 0 }; }; class unit7 { vehicle = "rhsusf_army_ocp_riflemanat"; side = 1; rank = "PRIVATE"; position[] = { 20, -20, 0 }; }; }; }; class Motorized {}; class Mechanized {}; class Armored {}; }; }; }; Init field of Spawn AI module: this setVariable[ "side", "West", true ]; this setVariable[ "faction", "RHS_Blufor_Army_W", true ]; 1 Share this post Link to post Share on other sites
Blitzen88 18 Posted February 23, 2022 14 hours ago, Harzach said: Works fine here. Please us code blocks when pasting code, as copy/pasting from/to quote blocks tends to create corrupted characters (I had to clean several out of your code above.Init field of Spawn AI module: Weirs that it works for you and not me. What did you have to fix? Share this post Link to post Share on other sites
Blitzen88 18 Posted February 23, 2022 19 hours ago, Harzach said: Works fine here. Please us code blocks when pasting code, as copy/pasting from/to quote blocks tends to create corrupted characters (I had to clean several out of your code above.) Okay, I literally just copy and pasted the cfg groups and the module init lines and it didnt work. FML Share this post Link to post Share on other sites
Harzach 2516 Posted February 24, 2022 In what way is it not working? Are you getting any error messages? Are units not spawning? Here's a simple repro mission: https://www.dropbox.com/sh/8x3gypqipkh2e51/AAB5xQRazLej4RLBu755I6vba?dl=0 1 Share this post Link to post Share on other sites
Blitzen88 18 Posted February 24, 2022 9 hours ago, Harzach said: In what way is it not working? Are you getting any error messages? Are units not spawning? Here's a simple repro mission: https://www.dropbox.com/sh/8x3gypqipkh2e51/AAB5xQRazLej4RLBu755I6vba?dl=0 I figured it out although I have no idea (at the moment) as to why. Here is my entire Description.ext file: /*=========================================================================================== Arma III Description.Ext ===========================================================================================*/ #include "RHS_Blufor_Army_W.hpp" //----------------------------------------------------- // I) CfgFunctions //----------------------------------------------------- class CfgFunctions { #include "gaia\cfgFunctions.hpp" #include "jebus\cfgFunctions.hpp" } //----------------------------------------------------- // II) Corpse/Wreck Manager //----------------------------------------------------- MinPlayerDistance = 50; // A) Corpse Manager //--------------------------- CorpseManagerMode = 1; CorpseLimit = 15; CorpseRemovalMinTime = 10; CorpseRemovalMaxTime = 3600; // B) Wreck Manager //--------------------------- WreckManagerMode = 1; WreckLimit = 8; WreckRemovalMinTime = 10; WreckRemovalMaxTime = 3600; For whatever reason, putting the CfgGroups snippet at the bottom of the file was causing an error message (side and faction not compatible). I tried a blank Description.ext with just the CfgGroups snippet and it worked. Placed the CfgGroups snippet at the top of the Description.ext (#include "RHS_Blufor_Army_W.hpp") and it works fine now. I guess CfgGroups needs to exec before CfgFunctions?? Share this post Link to post Share on other sites
Harzach 2516 Posted February 24, 2022 12 hours ago, Blitzen88 said: I guess CfgGroups needs to exec before CfgFunctions?? Works fine here. Share this post Link to post Share on other sites
Blitzen88 18 Posted February 26, 2022 On 2/24/2022 at 6:52 PM, Harzach said: Works fine here. Any idea why this: class Armored { class RHS_Blufor_Army_Abrams_W { Name = "Abrams (W)"; Icon = "\A3\ui_f\data\map\markers\nato\b_armor_inf.paa"; class unit0 { vehicle = "rhsusf_m1a2sep1tuskiiwd_usarmy"; side = 1; rank = "SERGEANT"; position[] = { 0, 0, 0 }; }; }; }; Spawns an Abrams tank plus two dismounted crew members (total group size of 6)? Share this post Link to post Share on other sites
Harzach 2516 Posted February 27, 2022 1 hour ago, Blitzen88 said: Any idea None! Using BIS_fnc_spawnVehicle it spawns with the correct four crewmen. It seems that the module is spawning RHS tanks with too many crewmen (1 or 2, depending on class), but I can't figure out why. Share this post Link to post Share on other sites