Freebie 10 Posted May 23, 2013 Hi guys I tried in troubleshooting but haven't even even had 1 bite so since this is also to do with editing and scripting I'm trying here.. I noticed the problem yesterday when I finished making a mission (that has init, desc, BTC revive and other scripts) and saved it as a MP mission. Basically what I noticed was the scripts not working properly in the mission when I was doing a last test as a playable unit. Before you ask... Yes the mission folder in my docs does have all the other files in there besides the mission.sqm file. What I found out was that the .pbo file was much smaller than it should be. In fact it's only the same size as what the mission folder is in my docs which is 117kb. I'm pretty new to mission making but I've noticed that once saved as a .pbo the files are usually well over 1mb. So basically somethings going wrong when I save it from the editor to a MP mission. Could somebody PLEASE try saving a mission that they have in their my docs folder to MP and tell me whether you get the same problem of the .pbo file being a much smaller size than it should be? That way I at least know whether it's me or an alpha problem. Thanks in advance. Share this post Link to post Share on other sites
wuush 10 Posted May 23, 2013 I dont think the size is a problem. A pbo file is just a compiled mission file. for example one of my mission has 5 tasks and about 40 placed enemies + site module, and a loadscreen picture. the size is 154kb and it works fine in multiplayer. make sure you use -showscripterrors and use scripts that work in multiplayer. Share this post Link to post Share on other sites
mindstorm 8 Posted May 23, 2013 I think we will need more to go on. What is not working? Everything? Or just specific values? Can you host the mission which doesn't work? Can you show your init? The more stuff you post the easier it will be to help you. Also keep in mind that a lot of things work different in MP then in SP. Share this post Link to post Share on other sites
killzone_kid 1331 Posted May 23, 2013 I don't think saving as MP mission will copy all your added scripts from folder to folder. Just copy paste all your files to MP mission and pbo them. Share this post Link to post Share on other sites
509 10 Posted May 23, 2013 Like others said, we need a bit more information. But one possibility is that you changed the mission name when you exported the mission. When you export an MP mission from the editor, the mission name must match the name of the directory in which all your scripts are, sans the .Stratis suffix. Otherwise the editor will create a new directory based on the mission name you gave and only save the mission.sqm in that directory (and not your scripts). You'll end up with a small PBO that only holds the mission.sqm. Share this post Link to post Share on other sites
Freebie 10 Posted May 23, 2013 Thanks for the answers guys, I'm killing myself trying to figure out why this is happening as I'm doing nothing different from before when all was fine. I haven't checked this mission for errors but this is a mission that I made a couple of weeks ago and when I exported it to MP it was around a 1.6mb .pbo Today when I loaded the exact same mission in the editor, still with all the same scripts, init, desc etc as before and still all in the folder along with the same mission.sqm file and then exported it to MP it created a 117kb .pbo file If you open the .pbo's (I just did it with notepad) you can see there's a heap of stuff in the save I did a couple of weeks ago and much less content in the one I saved today. I've zipped up the mission folder that's in my docs that I'm loading and saving in the editor along with the before and after .pbo files for comparison. May I ask someone else to copy the mission folder to their my docs mission folder and then load it in the editor and try saving it as a MP mission. I'd really like to know whether it saves as a ~ 1.6mb .pbo like it did for me a couple of weeks ago or saves as a much smaller .pbo like it and every other mission I have atm is doing. Heres the zip file.... http://members.westnet.com.au/scott_k/not%20much/Op_Lumberjack.Stratis.zip Thanks Share this post Link to post Share on other sites
mindstorm 8 Posted May 23, 2013 Your mission folder is only 168KB so there is not way it will get 1.6 MB once it becmomes a .PBO. Either you removed some sound files (or really large script files) or you had stuff inside your mission which did not get used? I checked your mission files. It seems the only script you are using a.t.m. is scripts\ammo_west.sqf (called from a init inside the mission.sqm), =BTC=_revive\=BTC=_revive_init.sqf and scripts\briefing.sqf. All the other scripts in the /scripts folder are never called (at least as far as I can see). Share this post Link to post Share on other sites
Freebie 10 Posted May 23, 2013 Your mission folder is only 168KB so there is not way it will get 1.6 MB once it becmomes a .PBO.Either you removed some sound files (or really large script files) or you had stuff inside your mission which did not get used? Thank you for looking mindstorm and you are correct, between then and now I've removed a large script file which explains the difference in size. I only just remembered and I apologize to you and others who have posted as I'm an idiot for forgetting. :( So basically onto the actual script trouble I'm having is with the kit loadouts where as players are spawning at the start of the MP mission with most of the correct gear but some small variants in contents and numbers of items ie having a FAK which isn't even in the playable units loadout script or the incorrect number of magazines for their weapon. Here is an example of the loadout script I'm using for an AT rifleman //RIFLEMAN & AT //place in init line of unit:- null0 = this execVM "Scripts\U6_kit.sqf"; removeAllWeapons _this; removeAllItems _this; _this unassignItem "NVGoggles"; _this removeItem "NVGoggles"; removeUniform _this; removeBackPack _this; _this adduniform "U_B_CombatUniform_mcam_vest"; _this addBackpack "B_Kitbag_Base"; //ADD WEAPON & AMMO _this addmagazines ["30Rnd_65x39_caseless_mag",8]; _this addweapon "arifle_MX_F"; //_this addWeapon "arifle_MXC_F"; //_this addMagazines ["30Rnd_65x39_case_mag",6]; //_this addWeapon "arifle_TRG20_F"; //_this addWeapon "arifle_TRG21_F"; _this addMagazines ["NLAW_F",1]; _this addWeapon "launch_NLAW_F"; //ADD WEAPON ATTACHMENTS //_this addPrimaryWeaponItem "optic_Arco"; _this addPrimaryWeaponItem "optic_Hamr"; //_this addPrimaryWeaponItem "muzzle_snds_H"; //_this addPrimaryWeaponItem "acc_pointer_IR"; _this addPrimaryWeaponItem "acc_flashlight"; //ADD EQUIPMENT //_this addItem "ItemGPS"; _this addWeapon "Binocular"; //FOR NVG's DELETE FROM REMOVE LIST AT TOP //ADD ORDNANCE - SMOKE - FLARES //_this addMagazines ["DemoCharge_Remote_Mag",1]; //_this addMagazines ["SatchelCharge_Remote_Mag",1]; _this addMagazines ["HandGrenade",2]; //_this addmagazines ["SmokeShellRed",1]; I've tested it 5 times now by spawning as ^ this playable unit at the MP mission start and twice I've had the correct loadout as above but 3 times I've had small variants as I mentioned earlier like with a first aid kit and 5 main weapon magazines instead of 8. Am I missing something from the loadout script that makes it more compatable with MP? Or is there something wrong with my init or description files? I'm new to mission making and am learning but there's much that I don't know yet. One thing that came to mind is is the mission starting too quickly and there's not enough time for all the scripts to load up properly? (this is just a guess). Here is my init file.... //Mission parameters skiptime (paramsArray select 0); sleep 5; // Wait for player object to initialise before processing init.sqf for JIP) if (!isServer && (player != player)) then { waitUntil {player == player}; waitUntil {time > 10}; }; call compile preprocessFile "=BTC=_revive\=BTC=_revive_init.sqf"; enableRadio false; enableSentences false; setViewDistance 2500; execVM "scripts\briefing.sqf"; And here is my description file.... onLoadIntroTime=false; onLoadMissionTime=false; disabledAI=1; debriefing=1; showGPS=1; Respawn = 3; RespawnDelay = 4; RespawnDialog = 0; class Header { gameType = COOP; minPlayers = 1; maxPlayers = 6; }; #include "=BTC=_revive\=BTC=_respawn.h" Share this post Link to post Share on other sites
mindstorm 8 Posted May 23, 2013 If you are sure you are adding the equipment for the AT rifleman in the players INIT it should work. You could try putting a sleep between these two lines: _this addBackpack "B_Kitbag_Base"; sleep 0.2; //ADD WEAPON & AMMO _this addmagazines ["30Rnd_65x39_caseless_mag",8]; Share this post Link to post Share on other sites
k0rd 3 Posted May 23, 2013 you are missing class Params in description.ext, but skipping time based on the paramsarray. Not sure if this would cause your init to stop processing or not, but worth a look. Share this post Link to post Share on other sites
Freebie 10 Posted May 24, 2013 If you are sure you are adding the equipment for the AT rifleman in the players INIT it should work.You could try putting a sleep between these two lines: _this addBackpack "B_Kitbag_Base"; sleep 0.2; //ADD WEAPON & AMMO _this addmagazines ["30Rnd_65x39_caseless_mag",8]; Hi mate I tried that but no go. Still loading varying amounts of ammo and small items >.< you are missing class Params in description.ext, but skipping time based on the paramsarray. Not sure if this would cause your init to stop processing or not, but worth a look. Hi k0rd, because I'm a newb, the stuff in the init and desc files I just copied and pasted from other files that I saw as I thought they must be needed but tbh I don't know what they do. Would you happen to know what I should actually have in there to make them work correctly? Sorry to be a pain. Share this post Link to post Share on other sites
galzohar 31 Posted May 24, 2013 private ["_bGiveWeapons", "_aClassSide", "_i"]; _bGiveWeapons = _this select 0; _aClassSide = nextAttackerSide; if (_bGiveWeapons) then { _aClassSide = attackerSide; }; currentClass = currentDClass; if (_aClassSide == sidePlayer) then { currentClass = currentAClass; }; if (!_bGiveWeapons) then { hint ((format [localize "STR_SelectedClass", currentClass select 0]) + " " + (localize "STR_WeaponsWillBeGiven")); }; removeAllWeapons player; removeUniform player; removeBackPack player; removeVest player; removeHeadGear player; removeAllAssignedItems player; player addWeapon "ItemMap"; player addWeapon "ItemCompass"; player addWeapon "ItemWatch"; player addWeapon "ItemGPS"; [_bGiveWeapons] call compile preprocessFileLineNumbers "addradio.sqf"; player addUniform (currentClass select 1); player setVariable ["currentUniform", (currentClass select 1), true]; if ((currentClass select 2) != "") then { player addVest (currentClass select 2); }; if ((currentClass select 3) != "") then { player addBackpack (currentClass select 3); }; if ((currentClass select 4) != "") then { if (hasMitsnefet && (_aClassSide == sidePlayer)) then { player addHeadgear mitsnefetHelmet; } else { player addHeadgear (currentClass select 4); }; }; if ((currentClass select 5) != "") then { player addItem (currentClass select 5); player assignItem (currentClass select 5); }; if (_bGiveWeapons) then { // Add magazines { for "_i" from 1 to (_x select 1) do { player addMagazine (_x select 0); }; } forEach (currentClass select 7); // Add weapons { player addWeapon _x; } forEach (currentClass select 6); _primaryWeapon = primaryWeapon player; if (_primaryWeapon!="") then { player selectweapon _primaryWeapon; // Fix for weapons with grenade launcher _muzzles = getArray(configFile>>"cfgWeapons" >> _primaryWeapon >> "muzzles"); player selectWeapon (_muzzles select 0); }; { player addPrimaryWeaponItem _x; } forEach (currentClass select 9); }; // Add items { for "_i" from 1 to (_x select 1) do { player addItem (_x select 0); }; } forEach (currentClass select 8); if ((!(_bGiveWeapons)) && (nightVision >= 0)) then { player additem "NVGoggles"; player assignItem "NVGoggles"; } else { if ((nightVision > 0) && (_aClassSide == sidePlayer)) then { player additem "NVGoggles"; player assignItem "NVGoggles"; } else { if (nightVision > 1) then { player additem "NVGoggles"; player assignItem "NVGoggles"; }; }; }; player addWeapon "Binocular"; This is an example of a gear script, using gear from an extrenal array and variables that were defined in other scripts. This replaces absolutely everything, including uniform, but uniform are only a setVariable which is then used by another script to work around a bug with the addUniform command (still need to test if latest patch fixed that bug so that you can just removeUniform and addUniform like you do with the rest of the equipment). Share this post Link to post Share on other sites
Freebie 10 Posted May 24, 2013 Hi galzohar, So is that what I copy that to my description.ext? Share this post Link to post Share on other sites
k0rd 3 Posted May 24, 2013 Hi k0rd, because I'm a newb, the stuff in the init and desc files I just copied and pasted from other files that I saw as I thought they must be needed but tbh I don't know what they do. Would you happen to know what I should actually have in there to make them work correctly? Sorry to be a pain. Sure, I would suggest the following changes - it allows the person starting the mission to be able to set the time using "parameters" at the role select screen, which it looks like is what the script is trying to do with skipTime. first, I would change //Mission parameters skiptime (paramsArray select 0); sleep 5; to _time = (paramsarray select 0); if (isserver) then { setDate [2035, 7, 6, _time, 0]; }; //no need for a sleep in init.sqf Then add the following to description.ext: class Params { class paramZero { title = "Start the mission at the following time :"; values[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}; texts[] = {"00:00", "01:00", "02:00", "03:00", "04:00", "05:00", "06:00", "07:00", "08:00", "09:00", "10:00", "11:00", "12:00 (Default)", "13:00", "14:00", "15:00", "16:00", "17:00", "18:00", "19:00", "20:00", "21:00", "22:00", "23:00"}; default = 12; //high noon }; } The alternative is to just remove the skipTime line from your init.sqf, if you don't want the mission host to be able to control the start time. Share this post Link to post Share on other sites
galzohar 31 Posted May 24, 2013 No. It's a script I call from other places. You should just look at the commands and then at the scripts you are trying to fix, and add the missing ones (for example, if the other script doesn't add/remove/save vests, add the vest addition/removal/save command). If you don't know how to modify scripts like that and understand what commands do, I'm afraid you'll have a very hard time to do anything that works, especially when it comes to modify large and complicated script packs like revive scripts. Share this post Link to post Share on other sites
Freebie 10 Posted May 25, 2013 Hi kord, I took the timeskip out of my init as you suggested as I'm not trying to control it at mission start. Thank you. Hi galzohar, being a newbie, your script is too far above my head for me to grasp but thanks anyway mate. On the bright side I dug around the interwebs more & found a fix to make my player loadout scripts work in MP... waituntil {time>0}; ^that little line is all it took to make it all work properly. How bout that. Share this post Link to post Share on other sites