• 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.

Another seasonal question

Messages
109
Apologies for another seasonal post, but I can't get a very simple scenery item to work. It consists of two modified box structures designed to look like bunkers, with only a summer grass and hard winter texture applied. Summer texture (013b2su1.bmp) is used between Jun 19-Sep 19. The rest of the year uses the corresponding winter texture (013b2hw1.bmp). Have checked the wiki articles on asm tweaking and the seasonal textures asm tweak from the same source. I opened the temp_0.asm file (created using FSDS 3.5.1) and added code that hopefully tells the texture to switch over at the proper time. Problem is, upon saving the changes, then dragging & dropping this .asm file onto MakeMdl, an error code displays and nothing compiles. Same happens even when the original .asm (untweaked) is used. Lastly, I tried mdl_tweaker_II and it seems to make changes OK, however the saved "tweaked" file cannot be opened as an error is encountered. Am attaching both the original & modified .asm files in case anyone might want to take a look - as always, any help is greatly appreciated.

(Edit - Scenery is for FS9, also hoping it may be possible to use the same files in FSX)
 

Attachments

Last edited:
Hi,

You got three problems. The first is that the label to jump to after the first texture has been set is always tex_continue in your code. This label needs to be unique as well. Also you need to make sure each check jumps to the right label.

The second problem is that you tweaked the SET_MATERIAL command wrong. The second argument is the texture used, not the first one (that is the material/colour).

The third problem is that your days can not be used with the minimum value bigger than the maximum as you did for the winter. Instead I would use the code like this:

Code:
IFIN1 tex_01, 038Ah, 167, 259
MATERIAL 0,1 ;  summer
JUMP tex_continue
tex_01 label word
MATERIAL 0,0 ; winter
tex_continue label word

If the first check fails (it is not summer), than it must always be winter. So there is no reason to check the days again. Just assign the right texture.
 
Hmm...still not working, I must be blind or something as the problem isn't obvious. The two hill parts have been joined so the project displays only one part total, there now being only one part to edit. Hope it's OK to continue posting bits here as I am not that savvy with this type of scenery design, and again greatly appreciate the help here.

_temp_WORLD__FRM_1 label BGLCODE
BGL_FTAG "Box", 0.00 ; Node 2

; Node 2 - Box transform:

BGL_SET_MATRIX_INDIRECT 0
IFIN1 tex_01, 038Ah, 167, 259
MATERIAL 0,1 ; summer
JUMP 01 tex_continue01
tex_01 label word
MATERIAL 0,0 ; winter
tex_02 label word
DRAW_TRI_BEGIN 0, 40
DRAW_TRI 29, 34, 31 ; poly=1 part=2
DRAW_TRI 29, 31, 26 ; poly=2 part=2
DRAW_TRI 2, 7, 4 ; poly=3 part=2
DRAW_TRI 2, 4, 0 ; poly=4 part=2
DRAW_TRI 17, 15, 12 ; poly=5 part=2
DRAW_TRI 17, 12, 19 ; poly=6 part=2
DRAW_TRI 16, 1, 5 ; poly=7 part=2
DRAW_TRI 16, 5, 13 ; poly=8 part=2
DRAW_TRI 3, 18, 10 ; poly=9 part=2
DRAW_TRI 3, 10, 8 ; poly=10 part=2
DRAW_TRI 6, 9, 11 ; poly=11 part=2
DRAW_TRI 6, 11, 14 ; poly=12 part=2
DRAW_TRI 38, 33, 28 ; poly=13 part=2
DRAW_TRI 38, 28, 23 ; poly=14 part=2
DRAW_TRI 21, 25, 30 ; poly=15 part=2
DRAW_TRI 21, 30, 36 ; poly=16 part=2
DRAW_TRI 20, 22, 27 ; poly=17 part=2
DRAW_TRI 20, 27, 24 ; poly=18 part=2
DRAW_TRI 39, 37, 32 ; poly=19 part=2
DRAW_TRI 39, 32, 35 ; poly=20 part=2
DRAW_TRI_END
BGL_RETURN
 
Hi,

It seems you are missing the "continue" label. I would expect something like this:

Code:
IFIN1 tex_01, 038Ah, 167, 259
MATERIAL 0,1 ; summer
JUMP tex_continue01
tex_01 label word
MATERIAL 0,0 ; winter
tex_continue01 label word

And then for the second group of triangles you want to condition it would become:

Code:
IFIN1 tex_02, 038Ah, 167, 259
MATERIAL 0,1 ; summer
JUMP tex_continue02
tex_02 label word
MATERIAL 0,0 ; winter
tex_continue02 label word

etc...
 
Thanks again,

Everything is fine now, it makes sense as well seeing it laid out in that way. Much appreciated.
 
Glad to hear it is working now :).
 
Apologies for having to reopen this...

The .asm file did compile and I thought everything was working. Upon testing it in FS2004, once this new .bgl file is added, it crashes the sim (an fe.dll error displaying on the error screen). I tried modifying some of the entries to match what has been posted in related threads where the scenery eventually got to work properly, without success. I hope it's not asking too much to once again attach the file in case someone would like to take a look and see what the problem might be - it's beyond me as everything appears to now be numbered correctly, etc. (and it does compile using BGLC_9.exe). Many thanks once again.
 

Attachments

Hi,

I can't spot the error directly now (but that can also be due to the jetlag I still have :)). I'll try to take another look later.
 
Back
Top