Jump to content
Sign in to follow this  
Ringo

Chosen gear reset on mission start

Recommended Posts

Hi

I got this problem whenever I'm hosting a game. No matter if it's on my dedicated server or on my gaming rig itself.

What happens is that me and my team mates choose our gear in the mission setup. When we then start the game, everything is back to the default loadout again. If we play on the dedicated it happens to all of us.

If I host the game I get to keep my equipment most of the time I think, but everyone else is back to default.

I've copied my game dir to the server to host that, so all files should be more or less identical (except config files). Sitting behind a router, but gameplay is fine on all other aspects so ports should be opened properly as well.

Hope that made sense...

Grateful for any ideas that could solve this issue. Really boring to be stuck with default loadouts all the time.

Edited by Ringo

Share this post


Link to post
Share on other sites

What mission are you guys playing? and did you build it yourself or is it a mission that comes with the game?

Saving your weapons is mission specific, unless you have a script in a mission that you are playing (hosting)

that has a script that allows you to keep your gear then youll get what your getting.

Makes no difference where the files are, if the mission dont have like I said above your gear wont be saved.

If you want your gear to be saved then edit your mission and add this script to it:

;[b]Universal Weapons Respawn Script[/b] v1.04 (March 31, 2003) revised (February 1, 2007)
;Required Version: ArmA
;original by toadlife revised by norrin for ArmA
;toadlife@toadlife.net
;intialize like this: ["unitname",0] exec "weapons_respawn.sqs"
;            Or this: ["unitname",1] exec "weapons_respawn.sqs"
;
; * "unitname" = The name of the player the script runs on (must be enclosed by quotes!)
; * 0/1 = method of repleneshing weapons
;  **if method is 0, the player gets the same weapons he started out with every time
;  **if method is 1, the player gets the same weapons he had when he died
;
; Advanced example method of initializing script - put the following lines in your init.sqs,
; and replce the unit names with your own:
;_units = ["w1","w2","w3","w4","w5","w6","w7","w8","w9","w10","w11","w12","w13","w14","w15","w16","w17","w18"]
;{[_x,0] exec "weapons_respawn.sqs"} foreach _units
;
;

~(random 0.3)
_name = _this select 0
_method = _this select 1
_hasrifle = false
_unit = call compile format["%1",_name]
?(_method == 0):_return = "checklocal";goto "guncheck"

#checklocal
_unit = call compile format["%1",_name]
?(local _unit):goto "respawnloop"
~(1 + (random 3))
goto "checklocal"

#respawnloop
@!alive _unit
#checkmethod
?(_method == 1):_return = "waitforlife";goto "guncheck"

#waitforlife
@alive call compile format["%1",_name]
_unit = call compile format["%1",_name]
removeAllWeapons _unit
?_hasrifle:_guns = _guns - [_prigun];_guncount = count _guns
_c = 0
while {_c <= (_magcount - 1)} do {_unit addmagazine (_mags select _c); _c = _c + 1}
_c = 0
while {_c <= (_guncount - 1)} do {_unit addweapon (_guns select _c); _c = _c + 1}
?_hasrifle:_unit addweapon _prigun;_gun = _guns + [_prigun]
;//If unit has a rifle select it
?_hasrifle:goto "selectrifle"

;//No rifle - if unit has a pistol, select it
?_unit hasweapon ((weapons _unit - [secondaryweapon _unit,"Binocular","NVGoggles"]) select 0):_unit selectweapon ((weapons _unit - [secondaryweapon _unit,"Binocular","NVGoggles"]) select 0);goto "respawnloop"

;//No rifle or pistol, select secondary weapon
_unit selectweapon secondaryweapon _unit
goto "respawnloop"

#selectrifle
;// BUG WORKAROUND! - Added to compensate for selectweapon bug 
;// Any gun with more than one muzzle (grenadelaunchers) cannot be selected with selectweapon!
;// Default Grenadelaunchers supported - Add your own types if you need to.
_unit selectweapon _prigun
?_prigun == "M16A2GL":_unit selectweapon "M16Muzzle"
?_prigun == "M16A4GL":_unit selectweapon "M16Muzzle"
?_prigun == "M16A4_ACG_GL":_unit selectweapon "M16Muzzle"
?_prigun == "M4GL":_unit selectweapon "M4Muzzle"
?_prigun == "M4A1GL":_unit selectweapon "M4Muzzle"
?_prigun == "AK74GL":_unit selectweapon "AK74Muzzle"

goto "respawnloop"


#guncheck
_guns = weapons _unit
_mags = magazines _unit
~(random 0.5)
_guncount = count _guns
_magcount = count _mags
?_unit hasweapon (primaryweapon _unit):_hasrifle = true;_prigun = primaryweapon _unit;goto _return
_hasrifle = false
goto _return

After you have this script then move it to the folder of your mission which should be in your users mpmissions folder.

You will need Arma edit to create this script:

http://www.armaholic.com/page.php?id=1455&highlight=ARMAEDIT

install that run it and then create a new: SQS

after you do that copy the code above and put it into the armaedit and save the script as weapons_respawn

then go ingame (editor) and give each player that is playable a name of lets say w1.

so for example your name would be w1, then the next guys name w2, then the next guy is w3.

now once you got that then in the init field of your charachter your going to play put this code:

["w1",0] exec "weapons_respawn.sqs"

Or this:

["w1",1] exec "weapons_respawn.sqs"

"unitname" = The name of the player the script runs on (must be enclosed by quotes!)

if method is 0, the player gets the same weapons he started out with every time

if method is 1, the player gets the same weapons he had when he died

So for each guy that has a name, lets say w2 is the next guy his code will look like this:

["w1",1] exec "weapons_respawn.sqs"

["w2",1] exec "weapons_respawn.sqs"

["w3",1] exec "weapons_respawn.sqs"

["w4",1] exec "weapons_respawn.sqs"

understand?

Did what I post here help your situation or are you guys playing a mission that you did not edit?

Edited by Gnter Severloh

Share this post


Link to post
Share on other sites

First, thanks for the very thourough reply. I probably should've explained a bit more in detail.

The problem is as follows:

* We load a mission on the dedicated server.

* We choose our gear in the gear list.

* We start the mission.

* No one get what they selected, they get what that default class has.

This goes for all missions as far as I've found. I mostly download missions and they are pretty well made as far as I've seen, so I believe they should work.

If I host the same missions on my own machine instead of the dedicated server. I get to keep whatever gear I choose, but not people who have connected, they get default gear.

We do not play missions with respawning. So this is a related to the first mission insertion only. I understand if you wanna keep gear after respawning that's a whole other deal.

Hope that clarifies the problem a bit.

Share this post


Link to post
Share on other sites

Ok,

Well heres your problem:

We do not play missions with respawning.

Sounds like your only playing singleplayer missions or coop missions without respawn.

Like I said before unless the mission has it scripted where you can keep your gear like I mentioned the script in my last post,

then you probably wont get the weapons you were using before.

As far as I know respawning is the only way to get your gear of course you need a script for that. Im sure there are other

ways that I may not know of on how to get your gear after you died maybe with some codes implemented idk,

but MP missions run best on a dedicated server vs sp in my opinion as they are made for mp.

* We choose our gear in the gear list.

What mission are you playing?

Share this post


Link to post
Share on other sites

What mission are you playing?

I believe he means he selects his weapons at the briefing screen, which is an option made available by editing the description.ext (adding weapons and ammo) of the mission.

As far as keeping your weapons though you pick that way, it's been hit and miss for me as well.

I just stick with the crate at spawn option, and a respawn script as Gunter said if I use respawns, or if it's an ACE mission they have a module for it.

But sorry, I know that doesn't help with your original question.

Share this post


Link to post
Share on other sites
I believe he means he selects his weapons at the briefing screen, which is an option made available

by editing the description.ext (adding weapons and ammo) of the mission.

Ah I see, ya Ive seen that before but personally I think you would have alot less trouble if you stick with

MP edited missions or missions made for mp that have respawning.

In SP I can undestand the need for realism like not want to respawn cuz its not realistic, but seriously if your playing mp,

just dont get yourself killed, you can treat it the same way as sp.

what mission are you playing specifcally are you guys having trouble with, or I should really ask what mission is

allowing you to choose your weapons, and did you build it yourself?

Share this post


Link to post
Share on other sites

That's the problem I'm referring to LoneStar. Thanks for pointing it out. Registered and voted it up!

Gunther, I really don't like respawning. I'd rather they implemented a proper spectating system for coop, like some of the scripts seen out there. Unfortunately not many use these when they make their missions. Who want's to spectate as a bird in the middle of the night anyway? :) (Are there any addons that alter this?)

Anyway, that's my question answered. Guess we'll have to play these missions by hosting ourselves or go with standard equipment on the dedicated server.

Thanks to all of you for your time and answers!

Share this post


Link to post
Share on other sites

Glad you had the question answered, as for your other question:

(Are there any addons that alter this?)

I dont believe there are any addons for a spectating type thing your looking for, however there has been

varies types of spectating scripts in missions that I have seen.

Using a script though you would have to edit the mission either by init, or description.ext, or another

way in the mission itself via the editor, really all depends on what you want to do.

Share this post


Link to post
Share on other sites

ACE has a very nice spectator script, or you can use Keygety's spectator script which is not much worse (ACE script is based on it AFAIK) and isn't hard to implement either.

But yeah, description.ext weapons bug quite a lot outside of single player missions.

Share this post


Link to post
Share on other sites

As our dear BIS yet have to solve this problem, the best way to avoid it is to add a crate at start with missionmakers weapons of choice (which, in OFP, he added in briefing screen).

As versatile ArmA2 is, there is room for many types of games, I guess everyone have his or hers favorite (mine is coop) and it would be even better if everything works (refeering to as in OFP)

Share this post


Link to post
Share on other sites

There are workarounds, though. Start the players off in some remove location surrounded by walls and inside place and ammo box with all the stuff you wanted to be available in the briefing, and then give them (or their leader) the option to teleport to the actual mission starting location in order to start the mission. This isn't very hard to implement.

Though of course a fix from BIS would be nice because some people actually make missions with this non-functioning functionality...

Share this post


Link to post
Share on other sites
the option to teleport to the actual mission starting location

Teleport, he dont want to respawn but teleporting is realistic its almost no different?

why not just have an scripted ammo box and start where it is, then fly to where the mission is, that would be more realistic then anything.

Something tells me that they are not playing missions they built.

Share this post


Link to post
Share on other sites

Starting at point X and teleporting to point X is equally unrealistic IMO. But yeah if you can't edit the mission there's nothing you can do about it. In that case I recommend playing missions that were actually tested by the mission maker on a dedicated server.

Share this post


Link to post
Share on other sites
Something tells me that they are not playing missions they built.

No, we don't make our own missions. Up until now I didn't know this was a confirmed bug, so I just assumed the problem was on my server. I've tried making my own missions a couple of times but usually gotten bored or stuck on some feature I wanted. I just don't have the patience I guess. Also, to play your own mission wouldn't be as dramatic. I just download missions that seem promising.

Editing already built missions seems like a task that would require time and effort. It rarely states when I'm downloading a mission wether or not the maker implemeted gear selection in the menu or as ammo-boxes. At least from now on I know not to bother with selecting gear in the briefing screen.

Share this post


Link to post
Share on other sites

Building missions does take some time and effort, but the basics of the editor are fairly simple, not to hard to learn.

However once you have the idea of the basics, and you can build your own missions fairly well, or at least functional then

it really just comes down to your imagination.

You can make missions anyway you wish, and if you want them dramatic then implementing scripts, and commands,

and other various things can help.

I have built many a mpmissions that were unpredictable. You would be partrolling along and all of a sudden out of no where

you run into an enemy patrol flanking you, and that isn't linear, or scripted, you just happedned to be at the wrong place at the wrong time :D

Patience does help, but like I said when you have an excitment towards building a type of mission then your creativity will be there.

Not like you cannot ask questions, provided you search, theres plenty of folks on BIS forums here that can help,

some are more advanced then others.

All I would suggest for your mission/s if you wish if you are not going to respawn is as an idea is add an ammo crate that has

all your weapons and ammo in already, pick your stuff and go from there.

But theres definately plently of missions to choose from out there, all from the creative minds of our Arma community!:rolleyes:

Share this post


Link to post
Share on other sites

I've recently got back into playing a bit of MP and came across this "weapons selection made at the briefing/map screen stage not sticking once you enter the mission" bug too...

I didn't realise it was a recognised bug either, so I fooled around with different combinations of stuff and I think I've figured out a (generally) reliable way around it (not sure about hosted games - we use a small dedi server usually).....

At the briefing screen, if there's gear selection available - make your selection, then - do nothing! - don't press "continue" to actually start the mission... once everyones ready, if there's an admin logged in - let him be the one who presses "continue".... For some unknown reason this seems to work most of the time...

We use a spare computer as a small dedi for 2 or 3 players... usually I login as admin to keep an eye on server fps, etc... in this situation we've found that as long as its me who hits "continue" at the briefing screen, everything's fine..... The individual players can still select their own gear, it just seems to be a matter of - who hits that "continue" button.....

Edited by Bushlurker

Share this post


Link to post
Share on other sites

Ok we tested this a bit on yesterdays Coop night and it seems to work!

After some more testing i'll try to come up with a good repro and submit it to the CIT.

Share this post


Link to post
Share on other sites

Good initiative rundll.exe!

With a good repro, the problem will most likely be fixed.

Share this post


Link to post
Share on other sites

I always thought it was easier to just pick your gear from an ammo box and be done with it,

as you still have to script a gear choice dialog of some sort for a mission if you want to have the option of choosing your gear before the mission starts.

Only Mp I have played for CO is on my own server with my own custom built missions for me and my buddies,

other then that I may at a loss of to what you guys are really discussing, relative to general MP.

So let me get this straight you can chose your gear in a mission before the mission on any mission,

and its a feature that isn't missions specific?

Someone clear this up for me.

Share this post


Link to post
Share on other sites
I've recently got back into playing a bit of MP and came across this "weapons selection made at the briefing/map screen stage not sticking once you enter the mission" bug too...

I didn't realise it was a recognised bug either, so I fooled around with different combinations of stuff and I think I've figured out a (generally) reliable way around it (not sure about hosted games - we use a small dedi server usually).....

At the briefing screen, if there's gear selection available - make your selection, then - do nothing! - don't press "continue" to actually start the mission... once everyones ready, if there's an admin logged in - let him be the one who presses "continue".... For some unknown reason this seems to work most of the time...

We use a spare computer as a small dedi for 2 or 3 players... usually I login as admin to keep an eye on server fps, etc... in this situation we've found that as long as its me who hits "continue" at the briefing screen, everything's fine..... The individual players can still select their own gear, it just seems to be a matter of - who hits that "continue" button.....

With 6 people, as long as only the Admin hit continue, this worked on the 2 or 3 missions we tried it on.

Thanks for the tip. Will continue to test.

I always thought it was easier to just pick your gear from an ammo box and be done with it,

as you still have to script a gear choice dialog of some sort for a mission if you want to have the option of choosing your gear before the mission starts.

Only Mp I have played for CO is on my own server with my own custom built missions for me and my buddies,

other then that I may at a loss of to what you guys are really discussing, relative to general MP.

So let me get this straight you can chose your gear in a mission before the mission on any mission,

and its a feature that isn't missions specific?

Someone clear this up for me.

It's mission specific.

EDIT - forgot to add this for you Gunter, add this to your description.ext, with your weapons of choice

class Weapons 
{
class M14_EP1 {count = 5;};
class SMAW {count = 5;};
};

class Magazines 
{
class 30Rnd_556x45_Stanag {count = 10;};
class SMAW_HEAA {count = 10;};
};

Edited by Mosh

Share this post


Link to post
Share on other sites
At the briefing screen, if there's gear selection available - make your selection, then - do nothing! - don't press "continue" to actually start the mission... once everyones ready, if there's an admin logged in - let him be the one who presses "continue".... For some unknown reason this seems to work most of the time...

We use a spare computer as a small dedi for 2 or 3 players... usually I login as admin to keep an eye on server fps, etc... in this situation we've found that as long as its me who hits "continue" at the briefing screen, everything's fine..... The individual players can still select their own gear, it just seems to be a matter of - who hits that "continue" button.....

We had the "lost gear bug" on some of the missions we were playing the other night. However after adopting this voodoo ritual the problem disappeared.

Hardly conclusive or scientific but it worked for us.

-k

Share this post


Link to post
Share on other sites
It's mission specific.

EDIT - forgot to add this for you Gunter, add this to your description.ext, with your weapons of choice

Code:

class Weapons

{

class M14_EP1 {count = 5;};

class SMAW {count = 5;};

};

class Magazines

{

class 30Rnd_556x45_Stanag {count = 10;};

class SMAW_HEAA {count = 10;};

};

Thanks Mosh.

I think I knew it was mission specific, I just thought I was missing on something in OA MP as I dont play public MP.

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  

×