Jump to content
dr. hladik

New command createObject for decorative objects

Recommended Posts

since 134151 there is a new command in dev. version - createObject

(will not yet be part of next patch)

 

what is it good for:

 - will create object, that is based only on shape (no config needed)

 - object is not simulated, so it will save some performance (no physx, no sounds, not a interesting target for AI,....)

 - unlike whole vehicle, it needs very little information to synchronize in MP

 - if you need decorative object that would normally need simulation (vehicles, tables, buckets)

 

what is it not good for:

 - cannot handle whole animated soldier with uniform and weapon

 - will not help with objects, that already have very limited simulation (walls)

 - it cannot destroyed

 

how to use it:

decorativeTank = createObject ["a3\armor_f_beta\apc_tracked_01\apc_tracked_01_rcws_f.p3d", position]

decorativeTank hideAnimationSelection["zasleh", true];
decorativeTank hideAnimationSelection["zasleh2", true]
decorativeTank hideAnimationSelection["clan", true];
 
decorativeTank animate ["Wheel_podkoloL3", 1 , true];
decorativeTank animate ["Wheel_podkoloL6", 1 , true];

Where do I get full shape name?

 - through getModelInfo command

 

What is hideAnimationSelection* (new command) good for?

 - object is not simulated, therefore some parts needs to be hidden manualy

 

Where do I get list of sections, that can be hidden?

 - there is a new command - objectAnimationSelectionNames*

 

Can it be hidden automatically?

 - no, as there is no config involved

 

Why is "animate ["Wheel_podkoloL3", 1 , true]" needed?

 - object is not simulated, so you have to adjust dampers manually.

 

Where do I get list things I can animate?

 - there is a new command - objectAnimationsNames*

 

How to delete it?

 - deleteVehicle will work

 

*WARNING - script command names might yet change

  • Like 16

Share this post


Link to post
Share on other sites

Thanks for the info there Doctor, will give this a go over the weekend/when it's in the build   :)

Share this post


Link to post
Share on other sites

Kinda curious whats the purpose for this command ?
This would be useful for including models in missionfile

But with the new Offical Arma3 Launcher supporting auto-downloading mods off steam workshop around the corner.

People could just upload an addon to steamworkshop with all the config entries defined for the model.

 

Edit:
Or those this object have less network updates versus a normal createVehicle with disabled simulation ?

Share this post


Link to post
Share on other sites

Sounds great, is the eden editor going to be able to use this feature as well?

Share this post


Link to post
Share on other sites

Kinda curious whats the purpose for this command ?

This would be useful for including models in missionfile

But with the new Offical Arma3 Launcher supporting auto-downloading mods off steam workshop around the corner.

People could just upload an addon to steamworkshop with all the config entries defined for the model.

 

Edit:

Or those this object have less network updates versus a normal createVehicle with disabled simulation ?

 

If you have a scene of 20 tanks standing and doing nothing somewhere in the background, where the players usually shouldn't be, then you can use this script command instead of placing real simulated tanks. In theory this should then save you precious performance.

 

First thing coming to my mind where I'd use this: A truckton of ships on open water.

Share this post


Link to post
Share on other sites

Yes, it is primarily about the performance and MP traffic.

Yes, some support in 3Den is being considered.. (rev 134174, there should be a parameter in object attributes)

 

Also rev 134176

 

renamed

objectAnimationsNames >> animationNames

objectAnimationSelectionNames >> animationSelectionNames
 

Share this post


Link to post
Share on other sites

Very good news!

 

This means that now we can finally have more interiors inside buildings, without need to worry about caching.

The fact that those interior objects can`t be destroyed is not a problem, as players will not attempt to do it anyway,

it is there just as "eye candy".

Share this post


Link to post
Share on other sites

> without need to worry about caching.

It is cheaper, not free :).

Share this post


Link to post
Share on other sites

Ahh i missed the part were there is less info to sync in MP.

Any rough numbers in how much network traffic reduction from a createObject  versus (createVehicle with disabled simulation)
Really curious about that thanks

Share this post


Link to post
Share on other sites

Is it possible to create a vehicle wreckage? (if yes, Where can I find the path to them?)

edit: found in the PBO (eg: "APC_Tracked_01_wreck_F"), not sure about where to find in the config (or should I just put a "wreck" into the model name?)

Also:
Is it possible to include custom objects (within PBO mission file) this way?

Share this post


Link to post
Share on other sites

Should be renamed imo, new SQF scripters might try to use it when they really want createVehicle etc.

Maybe 

 

createDecorativeObject

Share this post


Link to post
Share on other sites

First thing coming to my mind where I'd use this: A truckton of ships on open water.

 

No simulation =  No bobbing with the waves so sometimes will be submerged or above the wave height etc.

Share this post


Link to post
Share on other sites

Is it possible to include custom objects (within PBO mission file) this way?

 

Would be pretty awesome if it is

Share this post


Link to post
Share on other sites

Kinda curious whats the purpose for this command ?

This would be useful for including models in missionfile

But with the new Offical Arma3 Launcher supporting auto-downloading mods off steam workshop around the corner.

People could just upload an addon to steamworkshop with all the config entries defined for the model.

 

Edit:

Or those this object have less network updates versus a normal createVehicle with disabled simulation ?

A quick play with new command:

* You can create trees and bushes

* You can create bridges

* Object created has basic collision but cannot be destroyed

Share this post


Link to post
Share on other sites

Amazing stuff, I've been wanting this for a long-long time! Would I also would love to see:

1) Command to create such objects locally so we can have even more optimizations when creating local effects using these simple entities

2) Command to hide map-placed shape objects, preferably locally, so we can get rid of bushes and rocks where we want so we can place mission scenery or locations without having bushes or rocks sticking out though mission-placed buildings and walls.

Share this post


Link to post
Share on other sites

YES! The object can be created from file in mission folder. For this the path needs to use mission root, in the same way as playSound3D uses path. This means one can include custom objects in missions without the need for full modding. This is definitely one of the game changers!

  • Like 6

Share this post


Link to post
Share on other sites

YES! The object can be created from file in mission folder. For this the path needs to use mission root, in the same way as playSound3D uses path. This means one can include custom objects in missions without the need for full modding. This is definitely one of the game changers!

OMG, this is awesome. (inb4: disabled because security :D )

Share this post


Link to post
Share on other sites

What is the difference between a vehicle of simulation type house and this? Only, that it cannot take damage and that you can load a p3d directly? We can already do this today. Please tell me :) Does it have any advantage for the consumer?

Share this post


Link to post
Share on other sites

What is the difference between a vehicle of simulation type house and this? Only, that it cannot take damage and that you can load a p3d directly? We can already do this today. Please tell me :) Does it have any advantage for the consumer?

You could not load p3d directly until today, only in 3d type of control or as particle, both not the same thing.

Share this post


Link to post
Share on other sites

Questions:

1) This command has local or global effect? Say, if run this command on server - will object sync to clients? or has to be executed on every client?

2) Will commands like SetVectorDirandUP be applicable to such objects?

3) will they be attachable by AttachTo command?

4) if model has shadow lod - will it be processed?

Share this post


Link to post
Share on other sites

Questions:

1) This command has local or global effect? Say, if run this command on server - will object sync to clients? or has to be executed on every client?

2) Will commands like SetVectorDirandUP be applicable to such objects?

3) will they be attachable by AttachTo command?

The command is on todays DEV if you dont want to wait for the answer.

Share this post


Link to post
Share on other sites

You could not load p3d directly until today, only in 3d type of control or as particle, both not the same thing.

 

All the freedom in configs. This is only an advantage for mission makers. What about mods? What is the real advantage of this? If it is not better for performance, then I really do not see a use of this for mods.

Share this post


Link to post
Share on other sites

All the freedom in configs. This is only an advantage for mission makers. What about mods? What is the real advantage of this? If it is not better for performance, then I really do not see a use of this for mods.

It is better for performance. .There's the advantage. 

Share this post


Link to post
Share on other sites

It is better for performance. .There's the advantage. 

 

How do you know? He clearly states there is no difference from a wall just standing there and this.

Share this post


Link to post
Share on other sites

Here are some numbers to start with.

 

See screens under spoiler

3k_objects_SP_create_Object.jpg

 

3k_objects_SP_create_Vihicle.jpg

 

6k_objects_SP_create_Object.jpg

 

6k_objects_SP_create_Vihicle.jpg

 

Numbers as text

3k objects SP createObject - 14 FPS

3k objects SP createVihicle - 20 FPS

 

6k objects SP createObject - 7 FPS

6k objects SP createVihicle - 10 FPS

 

And some side notes

1)
in order to place objects with createObject one must
use "A3\Structures_F\Dominants\Lighthouse\LightHouse_F.p3d"
not "\A3\Structures_F\Dominants\Lighthouse\LightHouse_F.p3d"
As it will display "not found object error"
 
2) 
Height of objects placed with createObject have to be manually adjusted,
otherwise they end up half under ground. Tested with "Land_LightHouse_F"
 
3)
for Each screenshot there were several attempts to measure FPS.
Ranged in about +-1 FPS. Middle value shown on screens.
  • Like 1

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

×