Search the archive:
YaBB - Yet another Bulletin Board
 
   
 
Page Index Toggle Pages: 1
Send Topic Print
CFS1. Changing bitmap names in a .bgl with bglanal (Read 335 times)
Jul 15th, 2004 at 11:53am

J_M_C_123   Offline
Colonel

Posts: 30
*****
 
CFS1. Changing bitmap names in a .bgl with bglanalyse and scasm?

I am absolutely new to scenery design. I have bglanalyse3.1 and scasm2.91 (and airport2.6 build122). These programs apparently assume the user is already somewhat versed; I am not. (Ie bear with me.)

I want to change the names of 4 bitmap (texture tiles) that a cfs1 bgl file calls for...

I open the bgl file with bglanalyse and turn it in to a sca file. I open that with wordpad and I see the 4 bitmaps I want to change.

-Do I just change the names or do I have to change a couple of things there to have the new names 'take'?

-And can I change these bitmaps names to anything or do they have to fit it certain protocol? Eg they are called now "A5A100sA", "B", "C", "D". Can I call them simply "A5A100sAx", "Bx", "Cx", "Dx"? Can I name them what I want?

The next steps, after changing the bitmap names, probably are simply save the sca file then compile it with Scasm.

-But how do I work scasm? (I am absolutely new to DOS. The scasm html files don't help me at all.)

++++++++
Also I get a scasm error message in the top section of a freshly created sca file. It looks like this:


mif( [$Version < 285] )
  Error( You need at least SCASM version 2.85 to compile this code )
mifend


-Why?

+++++++
(Oh BTW, I was screwing with the DOSprompt --because I very often try to figure this stuff out for myself before coming to boards-- and I changed the MSprompt to full screen, with the button in the MSprompt toolbar, and now I can undo it [because there's no button in the fullscreen dos window :-) --oops!].

-Please, how do I put the MS prompt back to its default screen size?)


Thanks.
 
IP Logged
 
Reply #1 - Jul 15th, 2004 at 12:38pm

Hagar   Offline
Colonel
My Spitfire Girl
Costa Geriatrica

Posts: 33159
*****
 
I'm not sure why you wish to change the texture names. The only SCASM editing I've done is with MDL files & this was some time ago. The process seems to be similar to the one you're using. I don't know about any protocol involved with the texture file names so you would have to try it & see if it does what you want. If I remember correctly, dragging the edited .sca file into scasm.exe converts it into a MDL file. There should be no need to use the DOS prompt or write any code. To change the DOS window back to Windows mode try ALT+ENTER as in CFS.

From the error message, you might need a later version of SCASM. Download SCASM 2.91 here & try it. http://www.scasm.de/txt/download.htm
 

...

Founder & Sole Member - Grumpy's Over the Hill Club for Veteran Virtual Aviators
Member of the Fox Four Group

Need help? Try Grumpy's Lair

My photo gallery
IP Logged
 
Reply #2 - Jul 15th, 2004 at 2:36pm

J_M_C_123   Offline
Colonel

Posts: 30
*****
 
>I'm not sure why you wish to change the texture names.

I downloaded a scenery that has four bitmap tiles overwriting some already installed scenery bitmaps. I want to keep that new scenery and the old one too. The guy who did the new scenery might not be available to change his scenery bgl (so I'll do it myself for my own install).

>If I remember correctly, dragging the edited .sca file into scasm.exe converts it into a MDL file. There should be no need to use the DOS prompt or write any code.

Does that method create scenery bgl from .sca files though?

>To change the DOS window back to Windows mode try ALT+ENTER as in CFS.

Oh, duh. That worked nice, thanks.

>From the error message, you might need a later version of SCASM.

That's what I mean: I already downloaded the latest version.

Maybe one has to put the new scasm.exe in the folder where the bgls are that bglanalyse is looking for.

Thanks for the help Hagar.
 
IP Logged
 
Reply #3 - Jul 15th, 2004 at 3:37pm

Hagar   Offline
Colonel
My Spitfire Girl
Costa Geriatrica

Posts: 33159
*****
 
[quote author=J_M_C_123  link=1089906831/0#2 date=1089916576]I downloaded a scenery that has four bitmap tiles overwriting some already installed scenery bitmaps. I want to keep that new scenery and the old one too. The guy who did the new scenery might not be available to change his scenery bgl (so I'll do it myself for my own install).
[/quote]
I haven't tried it but think this might be a lot easier with a hex editor. Try Frhed here. [url]http://www.simviation.com/fsdesign_utilities.htm[/url]

[quote]Does that method create scenery bgl from .sca files though?[/quote]
I'm sure it will. Why not try it & see?

PS. If you install each of these sceneries as separate areas & activate them via the Scenery Library they shouldn't conflict. This would save you all the bother.
[url]http://www.simviation.com/lair/CFSsc.htm[/url]
 

...

Founder & Sole Member - Grumpy's Over the Hill Club for Veteran Virtual Aviators
Member of the Fox Four Group

Need help? Try Grumpy's Lair

My photo gallery
IP Logged
 
Reply #4 - Jul 15th, 2004 at 9:14pm

J_M_C_123   Offline
Colonel

Posts: 30
*****
 
>>Does that method create scenery bgl from .sca files though? 

>I'm sure it will. Why not try it & see?

Yep, you're right.

Earlier on I heard that one way to do it was a DOSprompt so I was fishing for that solution.

(It would still be interesting--though unnecessary-- to learn the dos prompt way. I think, from the half bits of info I heard here and there, that the way is: one types in--at the "C:\WINDOWS>_" prompt-- the url to the folder where the scasm and .sca file are, along with a typed "switch" which is the name of the sca file and the name you want the bgl file to be; or alternately that second name can be left out and the program will automatically make the bgl the same name as the orig .sca. But don't quote me.)

>PS. If you install each of these sceneries as separate areas & activate them via the Scenery Library they shouldn't conflict. This would save you all the bother.

Unfortunately, the two conflicting sceneries are both in the same local region (NW Germany) and therefore I ideally want them both to be active at the same time.

(I arrange my scenery bgl folders according to nation, local region and date. Eg Germany= "03north" or "03central west" or "03central east" or "...south" with Austria being "03b...". The stock nation add-ons start with "0" numbers (ie England is "01...", France is "02...", the 'low countries' are "2b..." and German and Austria are "03 and 03b" respectively, with Suisseland being "04..."); the add-on regions --Spain, NAfrica, Italy, Greece, Eastern Euro, Denmark, Norway and Scotland --being regular numbers: "1..." for Spain stuff, "2..." for NAfrica, "3..." for Italy, to "6..." for Scotland stuff. The date-arrangment folders are for plane/vehicles types and nationality occupations. This dated-folder scheme is a big job and not nearly done. It entails making separate bgls containing just plane/vehicle types and nationalities-- each entire-region-just-plane/veh types-and-nationality bgl being in its own date-folder; the user could then activate/deactivate as desired. Also, ideally in my world, search lights, flak and other movements etc need to be in their own dilineated folders.)

-------
To whom it may concern, Martin (Wright, I believe) answered my original post...

1 Texture etc names need to be "8.3 style" (ie no more than 8 characters plus no more than 3 for the extension). Other than that they can be anything you like.

2 Drag your SCA file and drop it on the scasm.exe icon. This should create a bgl file with the same name as your sca file in the same folder. (as Hagar here said.)

3 The scasm error test is created by bglanalyse. This is to allow for the fact that the code may contain some commands only understood by 2.85 or newer. When compiling, scasm will interpret this bit of code as "if I am less than version 2.85 then print the error message".
If you have the latest scasm then don`t worry. If you are using an old scasm version (pre 2.85) to compile cfs1 bgls then delete those 3 lines from the SCA (because CFS1 scenery won`t contain any "new" commands in it anyway)

-----

Thanks Hagar and thanks for the scenery link.
 
IP Logged
 
Reply #5 - Jul 16th, 2004 at 3:00am

Hagar   Offline
Colonel
My Spitfire Girl
Costa Geriatrica

Posts: 33159
*****
 
OK. I can't be certain without trying it but unless both sceneries display at the same time I don't think the textures would conflict. The ones in the Texture subfolder with the particular scenery area are easiest for CFS to locate so it will use them even if they're duplicated elsewhere. I think you're complicating matters & making things difficult for yourself.

I searched my HD for the texture names you mention in your original topic. Nothing showed up so they're not default files. They don't look like any texture names I've ever seen. I would have thought they would have an R8 or BMP file extension. These would be much easier to change by hex editing the BGL rather than SCASM editing.

Recompiling the BGL by dragging the edited .sca file into scasm.exe could not be easier or more convenient. If you're determined to try it the "proper" way by using DOS commands I suggest placing the Scasm folder on your desktop or C:\ drive. This would directly contain scasm.exe & its associated files - including the .sca file you wish to convert. Then the path is short & easy to remember. The DOS prompt defaults to C:\WINDOWS > when you run it so a short path makes it easier to locate. Use short file names as DOS can only handle up to 8 digits.

PS. Here's a little tip. Once you figure out the correct path & command line save it to a text file. Then copy/paste it after the DOS prompt the next time you wish to use it. Specific file names can be changed to suit.

PPS. I'm familiar with Win98Hagar & it might be different in WinXP. DOS utilities like SCASM can be run by typing (or pasting) the path & command line in the Windows Start/Run box. There's no need to use the MS-DOS prompt at all.
« Last Edit: Jul 16th, 2004 at 6:44am by Hagar »  

...

Founder & Sole Member - Grumpy's Over the Hill Club for Veteran Virtual Aviators
Member of the Fox Four Group

Need help? Try Grumpy's Lair

My photo gallery
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print