I'm kind of addicted to giving units custom loadouts, and also sometimes adding the units to vehicles, too.
Let's say for example, I want to arm a Independent unit with a 'US Soldier' loadout, so I put this in the Int line;
removeAllWeapons this; this addMagazine "HandGrenade_West"; this addMagazine "HandGrenade_West"; this addMagazine "HandGrenade_West"; this addMagazine "HandGrenade_West"; this addMagazine "30Rnd_556x45_Stanag"; this addMagazine "30Rnd_556x45_Stanag"; this addMagazine "30Rnd_556x45_Stanag"; this addMagazine "30Rnd_556x45_Stanag"; this addMagazine "30Rnd_556x45_Stanag"; this addMagazine "30Rnd_556x45_Stanag"; this addMagazine "30Rnd_556x45_Stanag"; this addMagazine "30Rnd_556x45_Stanag"; this addWeapon "RH_M16A4aim"; this addWeapon "NVGoggles"; this addWeapon "SLX_OKC3S_Bayonet_Knife_Item"; this addWeapon "ItemMap"; this addWeapon "ItemCompass"; this addWeapon "ItemWatch"; this addWeapon "ItemRadio"; this setVariable ['ACE_Ruckmagazines', []];
And then, to place him into a A10 (We'll name the Unit "MAN" and the A10 "PLANE");
MAN moveindriver PLANE
However, it gets pretty tiring and repetitive add these scripts to units partaking a large-scale battle.
So some questions:
1. Is it possible to create some sort of addon/file that arms my units with their custom loadout by default (with no scripting on my end)?
2. Would it also to be possible to further that at all, so that the said units are also loaded into vehicles?
3. Is it possible to 'cross-over' with factions?
Again, recap: I want to know if it is possible to create a file that will allow two things (or one; whichever are possible):
1. A Units with a custom loadout by default when place in the editor
2. Place a custom fitted Unit in a vehicle.
Example: Independent Unit (w/ custom loadout) in an OPFOR Tank without causing any Faction issues, when Independents are flagged as 'unfriendly' to the OPFOR.
In other words, despite being in a Enemy faction tank, the driver and his vehicle will be treated as a friendly unit and not a enemy.
Thanks in advance for your help guys, sorry if this is a bit hard to follow, and also sorry about me spamming Question Threads-I'm just seriously interested in creating ARMA MODS, is all.
This post was edited by CaptainSergeantTrain (2012-01-14 00:05, ago)
OK, now this file would be saved in notepad as kitout.sqf (save as 'all file types'
You are going to have to read as much as you can on classlists to get the weapons you want, but looks like you know about that already.
Most sqf, if written by kind people, have the instructions included if you open it up in notepad.
As this one does, you just put null = [this, "ally"] call compile preprocessFile "kitout.sqf" in your unit's init line, changing "ALLY" to "AXIS1" or whichever you want.
for a weapon crate just put this in the crates init line. null = [this] call compile preprocessFile "WeaponCrate.sqf"
But of course this is all scripting, and doesn't really belong in the editing section.
Just take your time and read as much of the FAQ's and SEARCH for solutions
(for god sake please do SEAERCH though, this has been dealt with too many times to count, thank you )
Have you read Mr Murrays Editing Guide?
Give the loadout to your GUER man and put him in an EMPTY OPFOR tank. BLUFOR will not see him as enemy. Simples.
In his init.
unitname assignasDriver tankname;unitname moveinDriver tankname;
Thank you for your reply, palyarmerc.
I'll scan around the forums and also look at replacement .pbos to see If I can educate myself.
Update:
Ok, a bit of a quick update, It seems like I may have run into a bit of issue.
First, I downloaded Arma Pbo View, to open up a .pbo file, however, it turned them into .bin files.
Next, I downloaded ArmaAUnbin in hopes that I could open/edit those files.
However, rather then allow me to edit the .bin files, it again turned them into a different file type; .cpp files.
Ok, could I get a point in the right direction here? Am I doing things right? Wrong?
I'm simply trying to (and/or find a program that will let me) open a .pbo, edit it, then save the new (edited) version.
Upadte II:
Ok, managed to find programs that fits my needs. However most of them don't seem to work, and the 'fixes' either cannot be accessed and are not newbie friendly at all.
I'll try using the official BIS editing tools and see where that gets me.
Added 1 hour 46 minutes later:
Okay, I managed to get everything underway!
Of course, for the actual replacement itself in game, things are going less than smooth; obviously still some 'ironing' I need to do (Everything can't be easy, right?), so I'll need some help with that.
I'll update tomorrow with a New Thread of my current progress, issues, ect.
To any Moderators and/or Administrators, feel free to properly relocate this if need be.
This post was edited by CaptainSergeantTrain (2012-01-14 03:56, ago)
Sounds like you have over-complicated things.
You should only be opening mission pbo's at this stage (no offense)
If you cannot achieve everything in the editor (and most stuff you can) then you need first, to start playing with the mission folder scripts in your
Users/username/MyDocuments/Arma2/MPMissions/yourmissionfolder
Start with the basics - Description.ext, init.sqf, briefing.sqf
I recommend...
-- Reading Mr Murrays Editing Guide Deluxe
-- Reading the FAQ's
-- Reading The forum posts (Searching)
(when we say Reading we mean stuff that is relevant -- no need to read a telephone directory)
and finally, play some usermade missions, find stuff you like in them, dePbo them into
Users/username/MyDocuments/Arma2/MPMissions/yourmissionfolders
and then copy how they did it.
I have been following the advice you've been giving me.
But, the Tutorials seem to be lacking the specific information I need, or are no longer working/available.
I'll keep trying with all the help you gave me.
If I could just get someone to give me a step by step, that would be alot easier than trying to educate myself at this state.
Added 3 hours 11 minutes later:
Okay, here's a the script of what I'm trying to do:
What I'm trying to do here is replace the default BIS US Army rifles, with Robert Hammer's M16A4's.
Let me know if you see an issue anywhere.
Added 25 minutes later:
When I run this in the game. things get really weird.
Squad/Team leaders loadouts do not change, and regular Infantry (Riflemen, Asst. Gunners) are given Robert Hammers M16A2 with Grenade Launcher, loaded with 8 smoke grenades.
What is going on?
This post was edited by Foxhound (2012-01-15 00:44, ago)
#palyarmerc :
If you cannot achieve everything in the editor (and most stuff you can) then you need first, to start playing with the mission folder scripts in your
Users/username/MyDocuments/Arma2/MPMissions/yourmissionfolder
#CaptainSergeantTrain :
If I could just get someone to give me a step by step, that would be alot easier than trying to educate myself at this state.
Sorry, but you HAVE to educate yourself. But why do all this??Just use a kit loadout script.
If you do not like the example I gave you (and I use it and think it's the best) then search for another type - Opening and editing module pbo's is way too advanced for you.
#palyarmerc :
But why do all this??Just use a kit loadout script.
(I'm really sorry for any grief, I don't want to cause trouble.
I have been reading and following your advice. I'll start working with something easier now.)
Okay, okay, I got it. By loadout script, do you mean something like the one I posted in my original post?
And .sqf files need to be placed in pre-existing missions to work right? Just double checking on that one.
Exactly ! You were making it difficult for yourself.
Everything you wanted to do can be done with scripts.
The editor isn't limited to doing it either, but learning how to code will be easier.
The code is really very simple once you get used to it. Lots of example everywhere.
loads of fun to be had
NOTE: You should know this bit by now of course...but just in case... Make a mission in the editor, name it, save:export as MPMission (or SP) but MP is singleplayer capable so I don't bother with SP. Now you have a folder in which to add scripts.
equally, you'd de-pbo mission.pbos to this MPMissions folder
Okay, last question:
Is it possible to copy and/or merge the custom loadout init.sqf from one mission to another?
For example, If I create a Mission called 'Templates' that contains units using custom loadout init.sqf, and then say I want to merge or copy/paste them into a new mission.
This mission (Which I'll call 'GroundWar' for example purposes) will have it featuring 100 units on both BLUFOR and OPFOR sides.
Now, If I simply copy/paste or 'merge' the 'Templates' mission (complete with the custom loadout init.sqf), with my new 'GroundWar' mission via the Editor, will the changes carry over too?
Or will I have to create a new init.sqf for all the new units and their custom loadouts?