Page 1 of 1

scenario_object*_block spawning

Posted: Thu Aug 21, 2014 1:01 pm
by JacksonCougar
Alright so while staring at the layout of these tags after they are converted from h2v I noticed all the values align properly except for a single integer32 value that appears directly after the object_datum_struct field in the parent block. A cursory inspection seems to show that it is a counter or index for the block elements. It goes up by one for each subsequent element.

Just throwing this out that it might be part of the issue as to why the scenario placement chunk-cloning sometimes results in freezes.

The value in question appears here:
  • public ShortBlockIndex1 type;
    public ShortBlockIndex1 name;
    public PlacementFlags placementFlags;
    public Vector3 position;
    public Vector3 rotation;
    public float scale;
    public TransformFlags transformFlags;
    public BlockFlags16 manualBSPFlags;
    public ScenarioObjectIdStruct objectID;
    public BSPPolicy bSPPolicy;
    private byte padding;
    public ShortBlockIndex1 editorFolder;
    public int COUNTER_VALUE
Which is usually at offset 52 (it's marked as unused in my plugins for entity)

Re: scenario_object*_block spawning

Posted: Thu Aug 21, 2014 1:23 pm
by CaptainPoopface
Neodos found an integer that uniquely identifies spawned objects for system link. Duplicating a mach or bloc would result in either the original or duped object spawning off host, whereas setting the integer to any unique value would fix it. An auto-increment int would have the desired behavior for that purpose. That's my best guess, straight out of my butt, like most of my ideas.

Re: scenario_object*_block spawning

Posted: Thu Aug 21, 2014 2:21 pm
by XZodia
I believe the value cpf is refering to is the objectid, cant say about the unused fairly sure its always 0

Re: scenario_object*_block spawning

Posted: Thu Aug 21, 2014 11:17 pm
by JacksonCougar
On the Xbox it goes up from 0 to chunkcount - 1

Re: scenario_object*_block spawning

Posted: Fri Aug 22, 2014 8:45 am
by troymac1ure
For me they are all 0 on Zanzibar, except in Light Volumes where they are all -1 (FF FF FF FF).
I did notice that "Scenery" has an "unused" value at offset 88 that changes (almost counts with some out of order).