Page MenuHomeFeedback Tracker

Add a way to get rid of colors\details randomization on vehicles (Offroad currently)
Closed, ResolvedPublic

Description

I suggest to implement a way to disable all color and details randomization on vehicles in the mission, for instance Offroads run "\A3\soft_F\Offroad\scripts\randomize.sqf" script on their initialization which randomly picks texture and removes back door. This feature is very useful, however in more advanced missions, mission designer might want to control all this by himself and having a non-removable initialization script creates additional difficulties and requires special code that will undo all these random changes. The problem will grow bigger and bigger by the time as more vehicles will be introduced into the game and lots of them will probably have similar randomizations. My suggested solution is just a matter of wrapping all color\details randomization code into something like

if(isNil{BIS_disableVehicleRandomization}) then {

//Randomization code here

};

Any definition of BIS_disableVehicleRandomization somewhere in init line of some logic object we will get rid of said randomization.

UPDATE

I would really prefer to see disabled vehicle color randomization by vehicle classes like suggested in "Additional Information", also it would be better if check would be made on "init" event hander rather than in randomize script itself so it wouldn't even start another script thread with execVM.

C_Offroad_01_F >> EventHandlers:

init = '(_this select 0) execVM "\A3\soft_F\Offroad_01\scripts\randomize.sqf"';

change to

   init = 'if(({(_this select 0) isKindOf _x} count (missionNamespace getVariable ["BIS_noVehicleRandomization", []])) == 0) then {(_this select 0) execVM "\A3\soft_F\Offroad_01\scripts\randomize.sqf";};';
UPDATE

Also would be great to be able to get rid of random hats for civilians in the same way

Randomization script causes newly joined players to set hat back to randomized one: http://www.youtube.com/watch?v=FhUmIEFXlsQ

Details

Legacy ID
1520056810
Severity
Feature
Resolution
Fixed
Reproducibility
N/A
Category
Feature Request
Additional Information

Going further I have a bit more advanced solution in mind that will let us disable randomization for specific vehicle classes only.

Mission designer will define something like:
BIS_noVehicleRandomization = ["Offroad_Base"];

And all current and future init randomization scripts have to be wrapped with

if(({_this isKindOf _x} count (missionNamespace getVariable ["BIS_noVehicleRandomization", []])) == 0) then {

//Randomization code here

};

This way vehicles of Offroad_Base class will not get any kind of color or details randomization while other will.

Event Timeline

SaMatra edited Steps To Reproduce. (Show Details)Apr 27 2013, 3:18 AM
SaMatra edited Additional Information. (Show Details)
SaMatra set Category to Feature Request.
SaMatra set Reproducibility to N/A.
SaMatra set Severity to Feature.
SaMatra set Resolution to Fixed.
SaMatra set Legacy ID to 1520056810.May 7 2016, 1:52 PM
Unknown Object (User) added a subscriber: Unknown Object (User).May 7 2016, 1:52 PM
Unknown Object (User) added a comment.Apr 27 2013, 4:55 AM

i cant vote 1 million times yes on this ticket, but i want to, i really hate to see that the same vehicle will spawn with a different color every time i restart the game

SaMatra added a subscriber: SaMatra.May 7 2016, 1:52 PM

I would really prefer to see disabled vehicle color randomization by vehicle classes like suggested in "Additional Information", also it would be better if check would be made on "init" event hander rather than in randomize script itself so it wouldn't even start another script thread with execVM.

C_Offroad_01_F >> EventHandlers:

init = '(_this select 0) execVM "\A3\soft_F\Offroad_01\scripts\randomize.sqf"';

change to

init = 'if(({(_this select 0) isKindOf _x} count (missionNamespace getVariable ["BIS_noVehicleRandomization", []])) == 0) then {(_this select 0) execVM "\A3\soft_F\Offroad_01\scripts\randomize.sqf";};';

Please for god's sake sort this out!!!! :))

Here is the summary http://killzonekid.com/arma-annoyances-say-no-to-randomize/

Ack that stuff like this is excellent for those who want to drop and play with vehicles/civvies/etc that aren't clones, but this is incredibly frustrating for mission authors.

I recall getting equally pissed off with the randomisation for the PMC DLC in ArmA 2. I'm irritated to see that this is now of a greater scale in ArmA 3, still without a way to nip it in the bud without running another script to override it.

while i understand why the FIA are having offroads without doors or rear view mirrors, there are some instances were i would like to be able to control that permanently for a mission

Nimrod added a subscriber: Nimrod.May 7 2016, 1:52 PM

Definitely a step in the right direction. However there needs to be a way to disable the setTexture functionality of a vehicles altogether (exit the script).

This change is barely useful as you still cannot change vehicle texture right away.

_vehicle = createVehicle ["C_Offroad_01_F", getPos player, [], 0, ""]; _vehicle setObjectTexture [0, ""];

Will not remove first texture. Issue is not solved.

SaMatra is right (of course), since setVehicleInit was removed, there is no way to script a properly textured vehicle.

Iceman added a subscriber: Iceman.May 7 2016, 1:52 PM
Iceman added a comment.May 6 2014, 3:51 PM

Ok guys, reopening the issue. Since there is a feedback needed, could you please specify what exactly your proposes are so our Encoding master pettka has easier job to do?
Thank you very much!

Well, I think he would have to extend setObjectTextureGlobal/setObjectTexture to work with the built-in textures.

The setVariable workaround is not an option for vehicles created by script (i.e. createVehicle).

Another way would be to extend createVehicle (array) by a new, optional parameter to include a texture index of built-in textures.

Well looking at the randomize scripts, you probably need a delay when you execute setObjectTexture[Global] after the creation.

Or are you SaMatra saying this doesn't work, or that setting an "empty texture" does not work?

You might still run into a JIP problem with the above depending on the execution order. Make sure to double check this.

Well looking at the randomize scripts, you probably need a delay when you execute setObjectTexture[Global] after the creation.

This is exactly the problem, at the moment I have to spawn scheduled threads that sleep for a second and only then apply needed texture. Before it was even worse with execVM as it sometimes executed randomization script after my scheduled thread overwriting my texture changes.

My suggestion is following: Let us handle randomization ourselves, give us a choice to disable BIS randomization scripts all together, no default texture setting, no nothing, just don't execute anything and let us handle this ourselves. I already provided an easy solution in the ticket. Wrap all inits that have randomization scripts with following code:

init = 'if(({(_this select 0) isKindOf _x} count (missionNamespace getVariable ["BIS_noVehicleRandomization", []])) == 0) then {(_this select 0) execVM "\A3\soft_F\Offroad_01\scripts\randomize.sqf";};';

That's it. If mission designer will need to disable randomization for all Offroads they will just add:

BIS_noVehicleRandomization = ["Offroad_01_base_F"];

This is assumed to be added somewhere on mission init and not during the mission.

Alternatively this can be moved into description.ext and read with getArray(missionConfigFile >> "noVehicleRandomization")

pettka added a comment.Sep 1 2015, 4:43 PM

The new vehicle customization should be all over the game, feel free to provide feedback at https://forums.bistudio.com/topic/179469-vhc-vehicle-customization-dev-branch/
If it suits You well, close the issue, please. Thanks a lot for the valuable feedback that made us to do the whole feature.