Jump to content
Sign in to follow this  
456820

Config soldier

Recommended Posts

Well I've found the config.bin file which houses all the soldiers details and if I remember correctly in OFP there was a section for adding event handlers and an init line for the soldier?

Where as in ArmA I cant find this or the equivalent of it so does anyone know where to find this so I can add an event handler to the soldiers as default?

Secondly if I wanted to make this as a mod folder I would only need the classes that I have edited saved as a config.bin as a .pbo in a mod folder? As the game will load what is in that .pbo after the original game data, correct?

Anyway, any help?

cheers.

Share this post


Link to post
Share on other sites

Not sure about the eventhandler side of your question, but for editing the config.bin I'm fairly certain you'll need the ENTIRE config.bin and not just the edited part(s).

Share this post


Link to post
Share on other sites

There has to be an init line somewhere, because when you are in the mission editor, you can click on a unit and enter a exec command into the init field that way. So it is obviously saved somehow.

Perhaps you can make your own misison; then, place an obvious command in the init field from the editor; then save it; then, examine the config file outside the game and see how it records the info.

Share this post


Link to post
Share on other sites

That info is recorded within the mission.sqm, not the addon's config file, so would be of little to no use for this project. Have you tried the old-fashioned OFP-way of adding eventhandlers? Your original post wasn't clear as to whether you'd tried using the OFP method or not, just that you couldn't find any reference to ArmA's method, so maybe they're the same.

Share this post


Link to post
Share on other sites

Well from what I remember the OFP method was using the init field? I might be a bit or a lot wrong I wasn't a big config editor in OFP.

Share this post


Link to post
Share on other sites

What I meant was something along these lines (excert taken from my weapons pack update, but you can edit it accordingly)

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

            class SJB_TOS_BenelliM3_Shells_Soldier: SoldierWB

            {      

            displayName="Soldier (Benelli M3 Shells)";

            vehicleClass = "SJB_Men_WP_v2";

            weapons[]={"SJB_TOS_BenelliM3","Throw","Put"};

            magazines[]={"SJB_Shotgun_Shells","SJB_Shotgun_Shells","SJB_Shotgun_Shells","SJB_Shotgun_Shells","HandGrenade","HandGrenade","HandGrenade","HandGrenade","HandGrenade","HandGrenade"};

                         class Eventhandlers

                         {

                                      init="_this select 0 exec ""\SJB_ShotgunMisc\scripts\AddNewUnit.sqs""";

                         };

            };

That should work, though I haven't tested it as that was the code from the OFP version. Obviosuly you'll need to edit it where necessary.

Share this post


Link to post
Share on other sites

Thanks a lot. Shall give it a go some time soon.

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  

×