Jump to content
Sign in to follow this  
Griffon2-6

Change starting weapons?

Recommended Posts

Look in the common/config/configloadouts

at the bottom of each sides weapons you will see the default weapon types. it'll look something like this for west.

westDefaultWeapons = [westPrimaryWeapons Select AMP_M4A1SD_CQBE_DTYPE]

westDefaultAmmo = [westPrimaryAmmo Select M4A1SDTYPE,westPrimaryAmmo Select M4A1SDTYPE,westPrimaryAmmo Select M4A1SDTYPE,westPrimaryAmmo Select M4A1SDTYPE,westPrimaryAmmo Select M4A1SDTYPE,westPrimaryAmmo Select M4A1SDTYPE,westMiscWeapons Select HANDGRENADETYPE,westMiscWeapons Select HANDGRENADETYPE,westMiscWeapons Select HANDGRENADETYPE,westMiscWeapons Select HANDGRENADETYPE]

I changed mine to AMP_M4A1SD_CQBE_DTYPE, note: you can change it to any primary weapon type you have in the given sides loadout list, if you want it to be an addon weapon you also need to add it to the loadouts.

Share this post


Link to post
Share on other sites

Ah, ok, thanks. So you can't change it for individual starting units? Do you have to change the starting weapon for the whole team?

Share this post


Link to post
Share on other sites

I'm sure you can but I haven't looked in to that yet.

I believe that would entail actually adding script to the loadout.sqs and the client\init\init_client.sqs

this is what it calls in the init_client.sqs:

;Determine Client's ID (1 - 16). This is the slot # they joined the game as. Also determine side ID.

sideJoined = Side player

sideJoinedText = Str sideJoined

sideID = sideJoined Call GetSideID

clientID = player Call GetClientID

sideJoinedShortText = "E"

if (sideJoined == West) then {sideJoinedShortText = "W"};

if (clientID < 1) then {player SideChat("Client_Init.sqs: ERROR OCCURRED! Could not determine clientID.");Exit};

respawnWeapons = Call Compile Format["%1DefaultWeapons",sideJoinedText]

respawnAmmo = Call Compile Format["%1DefaultAmmo",sideJoinedText]

you would have to add something to that so that it would spawn weapons and ammo for the different slots 1-16, Like I said I'm still pretty new to this and not really sure how to go about it yet.

Share this post


Link to post
Share on other sites

In the init field of a unit can you not use:-

removeallweapons this;this addMagazine "2100Rnd_20mm_M168"; this addWeapon "M168"

This being for a javelin,but you get the gist of it!

Share this post


Link to post
Share on other sites

You would, but then you'd have to remove the starting weapon bit in the config_loadouts.sqs that and you'd have to do the load outs for every single unit one at a time (tedious) less tedious way would be to have a script that is executed via init.sqs/

will post an example using a template loadouts later

Share this post


Link to post
Share on other sites

Ok, thanks a lot. What I did was I changed slot 1 to use the officer model from both sides. I want to change their starting weapons to pistols, as COs do not carry rifles when commanding.

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  

×