Tankbuster 1746 Posted July 21, 2017 In my MP mission, the cars are spawned server side, and they appear to have different colours for different clients. Two different players looking at the same car 1 Share this post Link to post Share on other sites
Tankbuster 1746 Posted July 21, 2017 Although I've only pictured an offroad, it happened with all the civvy cars in the mission Share this post Link to post Share on other sites
pierremgi 4865 Posted July 21, 2017 You need to stop this f...g randomization: _veh setVariable ["BIS_enableRandomization", false]; ... For each vehicles, if I'm right. 3 Share this post Link to post Share on other sites
Tankbuster 1746 Posted July 21, 2017 But... but..... These are spawned on the server, so their colour is set at random there. Why would they show differently for clients? Share this post Link to post Share on other sites
pierremgi 4865 Posted July 21, 2017 I don't know exactly. I guess it's probably for skipping some accessory synchronization. You pass object, position, direction but not appearance. Share this post Link to post Share on other sites
Tankbuster 1746 Posted July 22, 2017 _vec setVariable ["BIS_enableRandomization", false]; Seems to have no effect, for c_hatchback_01_f at least. All players see different colours. I removed the enablerandomization line and used [_vec, true, true] call BIS_fnc_initVehicle; This makes the cars all the same colour, but it does, at least, mean all players see the same. There's two different classes of hatchback, the normal and the sport, so it's possible to have at least some variation. Share this post Link to post Share on other sites
Tankbuster 1746 Posted July 22, 2017 disableRandomization[] = {"AllVehicles"}; In description.ext claims to turn it all off, but it doesn't. Players see different colour cars, vans and pickups. *sigh* 1 Share this post Link to post Share on other sites
pierremgi 4865 Posted July 23, 2017 At least, for edited cars, you can choose sometimes the appearance. This seems to be sync on clients. For respawning a car with the same appearance, you need to script. 1 Share this post Link to post Share on other sites
Tankbuster 1746 Posted July 23, 2017 Yes, that's what I'm doing. Old civcars array (that scripts randomly pick from when populating towns) civcars =["C_Offroad_01_F","C_Offroad_luxe_F", "C_Offroad_01_sand_F", "C_Offroad_stripped_F", "C_Hatchback_01_F", "C_Hatchback_01_sport_F", "C_Van_01_transport_F", "C_Van_01_box_F", "C_Van_01_fuel_F","C_Offroad_02_unarmed_F", "C_SUV_01_F", "C_Truck_02_transport_F", "C_Truck_02_covered_F"]; New civcars array civcars = [ "C_Offroad_01_red_F","C_Offroad_luxe_F", "C_Offroad_01_sand_F", "C_Offroad_stripped_F", "C_Offroad_01_white_F","C_Offroad_01_blue_F","C_Offroad_01_darkred_F", "C_Offroad_01_bluecustom_F", "C_Hatchback_01_grey_F", "C_Hatchback_01_green_F", "C_Hatchback_01_blue_F", "C_Hatchback_01_bluecustom_F", "C_Hatchback_01_beigecustom_F", "C_Hatchback_01_yellow_F", "C_Hatchback_01_white_F", "C_Hatchback_01_black_F", "C_Hatchback_01_dark_F", "C_Hatchback_01_sport_red_F", "C_Hatchback_01_sport_blue_F", "C_Hatchback_01_sport_orange_F", "C_Hatchback_01_sport_white_F", "C_Hatchback_01_sport_grey_F", "C_Hatchback_01_sport_green_F", "SUV_01_base_red_F", "SUV_01_base_black_F", "SUV_01_base_grey_F", "SUV_01_base_orange_F", "C_Van_01_transport_white_F", "C_Van_01_transport_red_F", "C_Van_01_box_white_F", "C_Van_01_box_red_F", "C_Van_01_fuel_white_F", "C_Van_01_fuel_red_F", "C_Van_01_fuel_white_v2_F", "C_Van_01_fuel_red_v2_F", "C_Offroad_02_unarmed_black_F", "C_Offroad_02_unarmed_blue_F", "C_Offroad_02_unarmed_green_F", "C_Offroad_02_unarmed_orange_F", "C_Offroad_02_unarmed_red_F", "C_Offroad_02_unarmed_white_F", "C_Truck_02_transport_F", "C_Truck_02_covered_F", "C_Quadbike_01_black_F", "C_Quadbike_01_blue_F", "C_Quadbike_01_red_F", "C_Quadbike_01_white_F" ]; I'm not the first person to say this and I won't be the last; "Dear BI. This 'feature' you just introduced has just made the game worse" Share this post Link to post Share on other sites
Tankbuster 1746 Posted September 7, 2017 And this still happens with IDAP vehicles. In multiplayer, serverside spawning of multiple "C_Van_02_vehicle_F" results in players seeing different skins on all of them. At least, give us the classnames of the vehicles in their different skins. Share this post Link to post Share on other sites
Tankbuster 1746 Posted September 7, 2017 Ah, I get it.... [_vehicle, "", []] call BIS_fnc_initvehicle; Am I right? Share this post Link to post Share on other sites
Tom_48_97 523 Posted September 8, 2017 On 7/23/2017 at 9:25 AM, Tankbuster said: Yes, that's what I'm doing. Old civcars array (that scripts randomly pick from when populating towns) civcars =["C_Offroad_01_F","C_Offroad_luxe_F", "C_Offroad_01_sand_F", "C_Offroad_stripped_F", "C_Hatchback_01_F", "C_Hatchback_01_sport_F", "C_Van_01_transport_F", "C_Van_01_box_F", "C_Van_01_fuel_F","C_Offroad_02_unarmed_F", "C_SUV_01_F", "C_Truck_02_transport_F", "C_Truck_02_covered_F"]; New civcars array civcars = [ "C_Offroad_01_red_F","C_Offroad_luxe_F", "C_Offroad_01_sand_F", "C_Offroad_stripped_F", "C_Offroad_01_white_F","C_Offroad_01_blue_F","C_Offroad_01_darkred_F", "C_Offroad_01_bluecustom_F", "C_Hatchback_01_grey_F", "C_Hatchback_01_green_F", "C_Hatchback_01_blue_F", "C_Hatchback_01_bluecustom_F", "C_Hatchback_01_beigecustom_F", "C_Hatchback_01_yellow_F", "C_Hatchback_01_white_F", "C_Hatchback_01_black_F", "C_Hatchback_01_dark_F", "C_Hatchback_01_sport_red_F", "C_Hatchback_01_sport_blue_F", "C_Hatchback_01_sport_orange_F", "C_Hatchback_01_sport_white_F", "C_Hatchback_01_sport_grey_F", "C_Hatchback_01_sport_green_F", "SUV_01_base_red_F", "SUV_01_base_black_F", "SUV_01_base_grey_F", "SUV_01_base_orange_F", "C_Van_01_transport_white_F", "C_Van_01_transport_red_F", "C_Van_01_box_white_F", "C_Van_01_box_red_F", "C_Van_01_fuel_white_F", "C_Van_01_fuel_red_F", "C_Van_01_fuel_white_v2_F", "C_Van_01_fuel_red_v2_F", "C_Offroad_02_unarmed_black_F", "C_Offroad_02_unarmed_blue_F", "C_Offroad_02_unarmed_green_F", "C_Offroad_02_unarmed_orange_F", "C_Offroad_02_unarmed_red_F", "C_Offroad_02_unarmed_white_F", "C_Truck_02_transport_F", "C_Truck_02_covered_F", "C_Quadbike_01_black_F", "C_Quadbike_01_blue_F", "C_Quadbike_01_red_F", "C_Quadbike_01_white_F" ]; I'm not the first person to say this and I won't be the last; "Dear BI. This 'feature' you just introduced has just made the game worse" Well, something must have changed because this feature isn't really new. I will test on my side and see what's happening there. In short, the system is triggered from the init event handler of the given vehicle, then it picks a variant according to the config (class TextureSources via the array TextureList) and eventually applies it. Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted September 10, 2017 On 9/9/2017 at 0:06 AM, Tom_48_97 ☠ said: Well, something must have changed because this feature isn't really new. I will test on my side and see what's happening there. In short, the system is triggered from the init event handler of the given vehicle, then it picks a variant according to the config (class TextureSources via the array TextureList) and eventually applies it. the problem is the randomization is done in an init event handler script, which is executed globally. stick a local check in there and if MP then setobjecttextureglobal instead of setobjecttexture. it happens 100% of the time with zeus-spawned vehicles, for easy repro. its been around for awhile, not new 1 1 Share this post Link to post Share on other sites
Tankbuster 1746 Posted November 7, 2017 _blah = [_mycar, "", []] call BIS_fnc_initvehicle; Isn't quite what I'm after, it seems. :( Apologies for venting my frustrations here, but I'm right at the edge of my abilities making this mission doing stuff that I'm hoping no-one has seen before, yet the elementary and most basic stuff seems to evade me. I've fixed up the 'clients seeing different colour cars' issue. Yey, go me, only for it to become painfully obvious that something still isn't quite right. All the offroads are red, all the hatchbacks are white, all the offroad_2_unarmed are black and all the sport hatches are pink, and all the van_02_transports are white. I've been pouring over the documentation AGAIN, trying to figure this out. Any guidance would be greatly appreciated. Share this post Link to post Share on other sites
Tankbuster 1746 Posted November 10, 2017 // send me an object and I will randomise its texture and global it params ["_obj"]; private ["_textures","_mytexturelist","_texturesources"]; switch (true) do { case (_obj isKindOf "Van_02_transport_base_F"):// custom choice because we can't choose from all the available minibus texs { _textures = ["\a3\Soft_F_Orange\Van_02\Data\van_body_Syndikat_CO.paa","\a3\Soft_F_Orange\Van_02\Data\van_body_Vrana_CO.paa","\a3\Soft_F_Orange\Van_02\Data\van_body_bluepearl_CO.paa","\a3\Soft_F_Orange\Van_02\Data\van_body_fuel_CO.paa","\a3\Soft_F_Orange\Van_02\Data\van_body_green_CO.paa","\a3\Soft_F_Orange\Van_02\Data\van_body_black_CO.paa","\a3\Soft_F_Orange\Van_02\Data\van_body_red_CO.paa", "\a3\Soft_F_Orange\Van_02\Data\van_body_blue_CO.paa","\a3\Soft_F_Orange\Van_02\Data\van_body_orange_CO.paa","\a3\Soft_F_Orange\Van_02\Data\van_body_white_CO.paa"]; _obj setObjectTextureGlobal [0, (selectRandom _textures)]; }; case (_obj isKindOf "Heli_Transport_02_base_F"): // custom choice because not all of the texs are good, plus there's 3 texs to be applied { if ((random 1) > 0.5 ) then { _obj setObjectTextureGlobal [0,"a3\air_f_beta\Heli_Transport_02\Data\Skins\heli_transport_02_1_dahoman_co.paa"]; _obj setObjectTextureGlobal [1,"a3\air_f_beta\Heli_Transport_02\Data\Skins\heli_transport_02_2_dahoman_co.paa"]; _obj setObjectTextureGlobal [2,"a3\air_f_beta\Heli_Transport_02\Data\Skins\heli_transport_02_3_dahoman_co.paa"]; } else { _obj setObjectTextureGlobal [0,"a3\air_f_beta\Heli_Transport_02\Data\Skins\heli_transport_02_1_ion_co.paa"]; _obj setObjectTextureGlobal [1,"a3\air_f_beta\Heli_Transport_02\Data\Skins\heli_transport_02_2_ion_co.paa"]; _obj setObjectTextureGlobal [2,"a3\air_f_beta\Heli_Transport_02\Data\Skins\heli_transport_02_3_ion_co.paa"]; }; }; default// everything else, grab all the available texs and choose one at random { _mytexturelist = (getArray (configFile/"CfgVehicles"/typeOf _obj/"texturelist")) select {typeName _x isEqualTo "STRING"};// array also contains numbers, remove them _texturesources = []; if (not (_mytexturelist isEqualTo [])) then { { _texturesources pushback ((getArray (configFile/"CfgVehicles"/typeOf _obj/"texturesources"/_x/"textures")) select 0); }foreach _mytexturelist; if (not (isnil "_texturesources")) then { _obj setObjectTextureGlobal [0,selectRandom _texturesources]; }; }; }; }; I will waive my normal consultancy fee for fixing (read: making it work in multiplayer) your stuff, BI. Share this post Link to post Share on other sites
pierremgi 4865 Posted November 10, 2017 On 08/09/2017 at 4:06 AM, Tom_48_97 said: Well, something must have changed because this feature isn't really new. I will test on my side and see what's happening there. In short, the system is triggered from the init event handler of the given vehicle, then it picks a variant according to the config (class TextureSources via the array TextureList) and eventually applies it. Did you have time for tests? It seems better to remoteExec setObjectTexture rather than apply setObjectTextureGlobal. Linked problem for custom insignia ? You can't display a custom insignia with description.ext, only with config.cpp in a common addon. I can't image why it's easier to apply a custom texture on a car than on an insignia... Thanks 1 Share this post Link to post Share on other sites
Tankbuster 1746 Posted November 10, 2017 A scene from the same mission with my own initvehicle function, updated code 2 posts above this. (vehicles placed dynamically by my own carpark fill script) 1 Share this post Link to post Share on other sites
dlegion 98 Posted April 29, 2018 hello guys! i readed this forum and i'm quite amazed how the problem was solved, and before use this solution i wish to ask your opinion, because i've actually the inverse problem since tank DLC update. i explain: before tanks DLC, all civilians, vehicles ecc were "randomized" not only in skin, but also in gadgets, and that was really good for me (even if the colour bug was there). now all offroads are red, all hatchbacks are white, all truck are white with black rear ecc.. and all civilians wear same dress with same gadgets! how can i turn back on the randomizer? beware...in editor MP all is randomized, just on dedicated it is no longer randomized! thanks ! Share this post Link to post Share on other sites
Larrow 2821 Posted July 20, 2018 @Tankbuster Well I know this thread is 6 months old but after seeing your recent posts in the Developer Forum linking to this post I thought I would test it out. I do not see anything wrong. Using the description.ext property disableRandomization[] = { "AllVehicles" }; disables all randomisation for me of vehicles either editor placed or spawned on the fly. Spawning vehicles on the server and using BI's own function (BIS_fnc_initVehicle) to customise them... TAG_fnc_spawnVehicle = { params[ "_position", "_direction" ]; _civCars = [ "C_Offroad_01_red_F","C_Offroad_luxe_F", "C_Offroad_01_sand_F", "C_Offroad_stripped_F", "C_Offroad_01_white_F","C_Offroad_01_blue_F","C_Offroad_01_darkred_F", "C_Offroad_01_bluecustom_F", "C_Hatchback_01_grey_F", "C_Hatchback_01_green_F", "C_Hatchback_01_blue_F", "C_Hatchback_01_bluecustom_F", "C_Hatchback_01_beigecustom_F", "C_Hatchback_01_yellow_F", "C_Hatchback_01_white_F", "C_Hatchback_01_black_F", "C_Hatchback_01_dark_F", "C_Hatchback_01_sport_red_F", "C_Hatchback_01_sport_blue_F", "C_Hatchback_01_sport_orange_F", "C_Hatchback_01_sport_white_F", "C_Hatchback_01_sport_grey_F", "C_Hatchback_01_sport_green_F", "SUV_01_base_red_F", "SUV_01_base_black_F", "SUV_01_base_grey_F", "SUV_01_base_orange_F", "C_Van_01_transport_white_F", "C_Van_01_transport_red_F", "C_Van_01_box_white_F", "C_Van_01_box_red_F", "C_Van_01_fuel_white_F", "C_Van_01_fuel_red_F", "C_Van_01_fuel_white_v2_F", "C_Van_01_fuel_red_v2_F", "C_Offroad_02_unarmed_black_F", "C_Offroad_02_unarmed_blue_F", "C_Offroad_02_unarmed_green_F", "C_Offroad_02_unarmed_orange_F", "C_Offroad_02_unarmed_red_F", "C_Offroad_02_unarmed_white_F", "C_Truck_02_transport_F", "C_Truck_02_covered_F", "C_Quadbike_01_black_F", "C_Quadbike_01_blue_F", "C_Quadbike_01_red_F", "C_Quadbike_01_white_F" ]; _vehType = selectRandom _civCars; _veh = createVehicle [ _vehType, _position, [], 0, "CAN_COLLIDE" ]; _veh setDir _direction; _randomTexture = configName( selectRandom ( "true"configClasses( configFile >> "CfgVehicles" >> _vehType >> "TextureSources" ))); _randomSources = []; { //animtation phase is random 0 or 1 _randomSources append [ configName _x, [ 0, 1 ] select ( random 1 >= 0.5 ) ]; }forEach ( "getText( _x >> 'source' ) == 'user'"configClasses( configFile >> "CfgVehicles" >> _vehType >> "animationSources" )); [ _veh, _randomTexture, _randomSources, true ] call BIS_fnc_initVehicle; }; ...the vehicle look the same for all clients both texture and animation sources. I have tested on a dedicated including JIP. Am I missing something? TEST_MISSION 1 1 Share this post Link to post Share on other sites