Jump to content
Spermatogenesis

Trying to use faction config file in editor mission

Recommended Posts

Hello everyone! I've run into a bit of a problem. Using the ORBAT tool from ALIVE, I created a faction for a scenario I was building. Unfortunately, the game crashed when I went back into the editor (thus the faction did not save). Luckily I had copied the factions config file before it crashed.

 

Now my question is, how do I use the config to bring the faction back into the mission? I know it has to do with pbos, but I'm not too well-versed on them, so any help is appreciated.

 

I have no idea if the config file is needed, but I'll include it anyway. It makes use of the IFA3_AIO_LITE and WW2_units_mas mods.

https://pastebin.com/9vssZnfU

Share this post


Link to post
Share on other sites

Did you edit the load out of the units?  If not, you should be able to just copy the config into your mission's description.ext file and run the mission with IFA, Massi's WWII units, and ALIVE.  If you did edit the load (or want to create the addon for fun), you can follow this tutorial to create the addon.  I'd recommend Pbo Manager or Eliteness to pack it into a pbo file.

Share this post


Link to post
Share on other sites

I followed that tutorial (I did edit the loadouts), but when I tried to boot up Arma I received this message:

File us_101ad\addons\test\autogen.hpp, line 230:
/CfgVehicles/B_US101AD_Rifleman_Light_01.EventHandlers: Undefined
base class 'EventHandlers'

The Rifleman_Light is the first unit in the code, and I assume the same "undefined base class" thing happens with the rest of the units as well.

 

This is the line of code for the Rifleman:

    class B_US101AD_Rifleman_Light_01 : B_mas_ww2_Soldier_lite_F_us_hd {
        author = "Spermatogenesis";
        scope = 2;
        scopeCurator = 2;
        displayName = "Rifleman (Light)";
        side = 1;
        faction = "US_101AD";
        identityTypes[] = { "Head_NATO" , "LanguageENG_F" };

        class EventHandlers : EventHandlers {
            class CBA_Extended_EventHandlers : CBA_Extended_EventHandlers_base {};
            class ALiVE_orbatCreator {
                init = "if (local (_this select 0)) then {_unit = _this select 0;_onSpawn = {_unit = _this select 0;_unit setUnitLoadout [['LIB_M1_Garand','','','',['LIB_8Rnd_762x63',8],[],''],[],[],['U_mas_ww2_B_CombatUniform_us',[['FirstAidKit',1],['LIB_8Rnd_762x63',10,8],['LIB_US_Mk_2',1,1]]],['V_mas_ww2_vest_USB',[['LIB_8Rnd_762x63',6,8]]],[],'H_mas_ww2_helmet_usn_B','',[],['','','','','','']];reload _unit;};[_unit] call _onSpawn;_unit addMPEventHandler ['MPRespawn', _onSpawn];};";
            };
        };
        // custom attributes (do not delete)
        ALiVE_orbatCreator_owned = 1;
    };

I'm not sure what the problem is. Isn't the lines from "class CBA_Extended_EventHandlers" down to "['MPRespawn', _onSpawn];};";" the EventHandler? If so, how is it undefined? I feel like it doesn't have any reason to not work.

Share this post


Link to post
Share on other sites
26 minutes ago, Savage_Donkey said:

Did you run CBA along with all the other mods?

Yes, I also started it up with only the mods I needed to see if any others I was using may have been interfering, same thing happened.

Share this post


Link to post
Share on other sites
22 hours ago, Savage_Donkey said:

I've looked at the CBA EEH guide and made some changes.  It does not throw up any errors, but I do not have the mods and cannot verify that it works 100%.

 

Posting the config in c++ on pastebin would be a massive help for anyone trying to help out.

 

Also what would have worked was defining the class that was missing. Aka eventhandlers

Which would look like. 

class cfgVehicles
 {
  class eventhandlers;
  
  ........
 };

 

Share this post


Link to post
Share on other sites
9 hours ago, BroBeans. said:

Install the mods and try it then? 

 

Also, please please please post the bloody config in c++ syntax.

 

And again, also, what was the need to change the config at all? and you didn't have to go read about CBA EEH, all you had to do was define the base class.. 

Which would look like. 


class cfgVehicles
 {
  class eventhandlers;
  
  ........
 };

 

Well I'm sorry I have shit internet...   Look mate, I was trying to help, even though I'm new to things around here.  Anyways, thanks for the info.

Share this post


Link to post
Share on other sites

I think you're being a bit too harsh BroBeans, the change Donkey made to my config file worked as intended. So thank you Donkey

Share this post


Link to post
Share on other sites
12 hours ago, Savage_Donkey said:

Well I'm sorry I have shit internet...   Look mate, I was trying to help, even though I'm new to things around here.  Anyways, thanks for the info.

 

Sorry mate, thought you were OP, makes sense why you didn't test it aha :) 

 

3 hours ago, Spermatogenesis said:

I think you're being a bit too harsh BroBeans, the change Donkey made to my config file worked as intended. So thank you Donkey

 

Yeah sorry lads, was a late night the other day. 

So you've got it working in-game?

Share this post


Link to post
Share on other sites

gotta love posts that just end, with no answers.

I am having this exact same issue, and cannot figure out anything.  The alive forums are a dead end.  

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

×