Jump to content
Leopard20

Accessing config properties of terrain objects with empty type? (typeOf _obj == "")

Recommended Posts

Hello everyone.

As you may have noticed, some objects (which are typically part of the terrain itself, such as most rocks on Stratis and Altis) do not have a type (typeOf _x == ""), which means you can't read their config properties.

I was wondering if it's possible to somehow read their config properties (such as 'cfgVehicles' properties, e.g. "epeImpulseDamageCoef")

Share this post


Link to post
Share on other sites
3 hours ago, Leopard20 said:

if it's possible to somehow read their config properties

They don't have a config.

Share this post


Link to post
Share on other sites
6 minutes ago, Dedmen said:

They don't have a config.

Then how does the engine 'process' them?! For example, how does the engine know that a wall with empty type can be 'destroyed' when a vehicle hits it?

Share this post


Link to post
Share on other sites
3 minutes ago, Leopard20 said:

Then how does the engine 'process' them?! For example, how does the engine know that a wall with empty type can be 'destroyed' when a vehicle hits it?

They are terrain objects. Info in the p3d's, model config, terrain.

Some might also have a config class, but the game doesn't know/care anymore.

  • Thanks 1

Share this post


Link to post
Share on other sites

There is a low level configuration embedded in objects through Named Properties. This handles the low fidelity simulation required for high object counts of the same type. Typically trees and rocks do not have config classes, hence why you cannot read them.

  • Thanks 2

Share this post


Link to post
Share on other sites

a sqf command to access the named properties would be handy 

  • Like 1

Share this post


Link to post
Share on other sites

Actually, I did make a similar request like a couple of months ago:
https://feedback.bistudio.com/T150103

 

Not even a single comment on it! 🙄
I gave up on posting feature requests a while ago. It doesn't seem like anyone cares about new features anymore.

  • Like 1

Share this post


Link to post
Share on other sites

Instead of typeOf, use (getModelInfo _x#0) and filter for an array of strings (.p3d names). It's the best workaround I've found so far, but keep in mind that nearestTerrainObjects is heavy over longer distances and getModelInfo is heavier than typeOf.

  • Like 1

Share this post


Link to post
Share on other sites
11 hours ago, phronk said:

Instead of typeOf, use (getModelInfo _x#0) and filter for an array of strings (.p3d names). It's the best workaround I've found so far, but keep in mind that nearestTerrainObjects is heavy over longer distances and getModelInfo is heavier than typeOf.

Thanks for the reply.

It can indeed be used as a good alternative for typeOf (when terrain objs have no type)

But the following problems remain:
1. Model (p3d) names are not always the same as the config names (typeOf).
2. Even if they were identical I still wouldn't be able to use it to read any properties.

@Dedmen
Another interesting thing I noticed is that you can't use 'setVariable' on these objects either. That means they don't have a 'variable space':
https://community.bistudio.com/wiki/setVariable
 

Yet another interesting thing is the object IDs:
object with no type:

250680: wall_tin_4.p3d

Object with type:

e2f5420100# 252339: slum_03_f.p3d

 

Share this post


Link to post
Share on other sites
5 hours ago, Leopard20 said:

Another interesting thing I noticed is that you can't use 'setVariable' on these objects either. That means they don't have a 'variable space':

Some terrain objects do, but they get streamed in/out so the variables might mysteriously disappear.

Share this post


Link to post
Share on other sites
On 6/17/2020 at 10:13 PM, Leopard20 said:

I think these objects are Super Simple Objects, right?

Something like that yeah.

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

×