Jump to content
Sign in to follow this  
All-a-Mort

Making a unit a medic?

Recommended Posts

Is it possible at all to make a unit a medic when he isn't of that class? (no I'm not using ACE). I ask because some of my favourite modded units don't have a medic class in them which is unfortunate. Is there a way to either add one somehow or use a script or something?

Share this post


Link to post
Share on other sites

You need to add the ability through the config of the addon (you can edit BIS' files as well, but it will get you into problems when playing online). Don't ask me how though, I'm not a coder :p

Share this post


Link to post
Share on other sites

Er ok, so that means I have to unpack the pbo of the addon I want to add a medic to and edit the cfg file and then repack it into a pbo again? Does that sound right? Thing is, am I adding a line to the config (in which case where on earth do you put it?) or just changing a line?

Edited by All-a-Mort

Share this post


Link to post
Share on other sites
Er ok, so that means I have to unpack the pbo of the addon I want to add a medic to and edit the cfg file and then repack it into a pbo again? Does that sound right?

Yes :)

Share this post


Link to post
Share on other sites

Ok, so presuming I am meant to be editing the config.bin file in the pbo of a unit addon, where do I add the attendant line? At the moment I can't even properly read the file (is there a better program to read it in than notepad?), it appears rather garbled with little evidence of any systematic arrangement.

Share this post


Link to post
Share on other sites
Ok, so presuming I am meant to be editing the config.bin file in the pbo of a unit addon, where do I add the attendant line? At the moment I can't even properly read the file (is there a better program to read it in than notepad?), it appears rather garbled with little evidence of any systematic arrangement.

well, if you mean that the file is binarized (.bin extension), you need some tools to convert it to .cpp format which you can read and modify with a text editor :

config files tools

If you mean you don't understand the config file, just find the name of the soldier you're looking for (under : displayname ="blablabla") with a text search, then just add the line i wrote in my previous post under this line for example.

Share this post


Link to post
Share on other sites
well, if you mean that the file is binarized (.bin extension), you need some tools to convert it to .cpp format which you can read and modify with a text editor :

config files tools

If you mean you don't understand the config file, just find the name of the soldier you're looking for (under : displayname ="blablabla") with a text search, then just add the line i wrote in my previous post under this line for example.

Hmmm, been ages since I started this thread and then gave up. But today I was trying to make one of the units in the groovy Multicam SF addon a medic as well (for a PJ) but can't get it to work:

I tried, by using PboView to extract the files, armaunbin to convert the config.bin into a .cpp and after adding the attendant = "true" line to one of the units re-binned it and repacked it using the same programs, but got a series of errors with weapons for the whole multicamsf bunch being missing after a \weapons\ and \tex\ error (seriously that's what it said.). Is there something obvious I did wrong?

Share this post


Link to post
Share on other sites

Maybe share your config with us, makes things much easier. ;)

And this should be in Addon config & scripting.

Share this post


Link to post
Share on other sites
Maybe share your config with us, makes things much easier. ;)

And this should be in Addon config & scripting.

Sorry, my bad :( I posted this originally in the wrong place...just hadn't realised til now and thought it best not to create another thread.

Not much point adding a config to this, as all i did was add the line that ProfTournesol suggested. I probably need to try doing the same for a few different ones to see if the error I get is solely for advarks(sp?) stuff.

Share this post


Link to post
Share on other sites

Just to make this clear, the line must be:

attendant=true;

and not

attendant = "true"

If the error still appears, something else went wrong either while editing the config or converting it. That's why I said post the whole thing so we can debug it.

Share this post


Link to post
Share on other sites

You can use unrap to decompile the config.bin file, and then open up the config.cpp, find the cfgvehicles section, and replace a unit with something like this example that could be put into my multicamsf units:

class SoldierWMedic;

class MultiSF_2: SoldierWMedic

{

model = "\multicamsf\multisf2";

weapons[] = {"M4", "M9", "Throw", "Put", "NVGoggles"};

magazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "HandGrenadeTimed", "HandGrenadeTimed", "HandGrenadeTimed", "HandGrenadeTimed","15Rnd_9x19_M9", "15Rnd_9x19_M9", "15Rnd_9x19_M9", "15Rnd_9x19_M9"};

vehicleClass = "Multi_SOF";

displayName = "SF Medic";

class Wounds

{

tex[] = {};

mat[] = {"ca\characters\data\us_spec_hhl.rvmat","ca\characters\data\us_spec_hhl_wound1.rvmat","ca\characters\data\us_spec_hhl_wound2.rvmat","multicamsf\data\multisf2.rvmat","multicamsf\data\multisf2_wound1.rvmat","multicamsf\data\multisf2_wound2.rvmat"};

};

};

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  

×