• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

SCASM import

Messages
3
Country
germany
Hi Arno,

I just noticed something strange when using MCX in the latest development release. I tried to import a SCASM file that defines an Object ID via ObjId and LibObj and then, later on, uses an ifvsize conditional jump. It seems that under these conditions, MCX "forgets" the GUID and Name of the object and generates new ones, as you can see in the object list. When I delete the "IfVSize" condition, the GUID and Name is imported correctly. Does this make any sense to you?

Best regards,
Thorsten
 
Hi,

If the guid in the condition? Maybe it's skipped then? Else hard to say without the code.
 
Hi Arno,

the guid is outside the condition. The idea is to provide to different LOD models. I created a very simple file to demonstrate.

Here the version which works, it doesn't use "IfVSize":

Header( 1 N90:00:00.00 S90:00:00.00 W000:00:00.00 W000:00:00.00 )
LatRange( S90:00:00.00 N90:00:00.00 )

ObjID( 00000001 00000002 00000003 00000004 )
LibObj(
PWR 100
SIZE 100
SCALE 0.500
TYPE 0
NAME "TESTOBJ" )

Points( 1
0 0 0
10 0 0
10 0 10
0 0 10
5 5 5)

SurfaceColor( 0f f0 )
PerspectiveCall( :work )
Return

:work
Perspective
Poly( a 2 1 5 )
Poly( a 2 3 5 )
Poly( a 3 4 5 )
Poly( a 1 4 5 )
Return
EndObj


Object name and GUID are imported correctly.

Here the second version which generates the problem. The two different versions (red and green color) are imported correctly as two differend LOD representations, but the Name and GUID aren't imported correctly.


Header( 1 N90:00:00.00 S90:00:00.00 W000:00:00.00 W000:00:00.00 )
LatRange( S90:00:00.00 N90:00:00.00 )

ObjID( 00000001 00000002 00000003 00000004 )
LibObj(
PWR 100
SIZE 100
SCALE 0.500
TYPE 0
NAME "TESTOBJ" )

Points( 1
0 0 0
10 0 0
10 0 10
0 0 10
5 5 5)
IfVSize( :green 3000 1000 )
:red
SurfaceColor( 0f f0 )
PerspectiveCall( :work )
Return
:green
SurfaceColor( 0a f0 )
PerspectiveCall( :work )
Return

:work
Perspective
Poly( a 2 1 5 )
Poly( a 2 3 5 )
Poly( a 3 4 5 )
Poly( a 1 4 5 )
Return
EndObj
 
Thanks for the code, that makes debugging a lot easier. I'll check what goes wrong.
 
Hi,

That was a bug indeed (when creating the levels of detail the code path is slightly different). I have fixed it now, so if you grab the development release tomorrow it will be OK.
 
Back
Top