PDA

View Full Version : Theres a lot of gotchas to encounter when you start messin with CFS2.



simonu
September 23rd, 2010, 16:57
Lets see if I can remember them

Usually this starts as soon as you start adding stuff,

missing gauges,
missing weapons
screwy scenery
screwy flight models

you name it,
most of this is trivial ;
in that,
you can still fly some thing and shoot something some place, so stress can be relieved.

Come and ask the gang at SOH and things will get sorted out eventually, usually in the proccess you learn something to.

But what happens when CFS2 is so stuffed that it won't start , or runs in player mode but Mission Builder is gone or refuses to load.

The usual recourse for fixing major software issues is the old uninstall- - reinstall routine..
It works with loads of programs, usually the uninstaller takes out all the registry keys and deletes all the original files , leaving behind all the addons and mods.

DO NOT DO THIS WITH CFS2

The uninstaller will take out ALL the config *.CFG files it finds in the \..\Combat Flight Simulator 2\ folder...

This will kill all your addon ships and planes and mods.

Not only this, it will not remove the damage profile *.DP files for your addons and mods, (which by the way are the most likely culprits for causing trouble.

So when you reinstall CFS2, it is even more stuffed than it was before.All your addons gone and Mission Builder still refuses to load.

If you don't come and ask advice at this stage, or don't open up when you do and tell us all the gory details of your FU, or you don't want to learn how to use windows explorer.Then the only way you will get CFS2 to work again is put it on a new computer or wipe the entire OS.
(by OS I mean widows itself folks)

simonu
September 23rd, 2010, 17:43
So how best to deal with non functioning install of CFS2?
First thing is to get yourself a nice clean install that works.
Open up C:\Program Files\Microsoft Games\
Rename the the Combat Flight Simulator 2 folder call it CFS2_FU
Now you can perform a fresh install,... rename this new Combat Flight Simulator 2 folder. call it CFS2_default. do not add to this, keep it clean, If you dont have a massive hard drive, copy it to DVD or a USB stick and put it in a cool dark place. Now you can create a new copy of your CFS2_default for messing with.
If you plan to go down the multiple install route, you would save your self some work later if you make a stripped down CFS2_Basic install

alpha_1
September 23rd, 2010, 17:52
Good advice, Simon.......ya gotta hope some people heed it, eh?

Take53084
September 23rd, 2010, 17:59
Good advice, Simon.......ya gotta hope some people heed it, eh?

I did! Simonu's advices are always pretty enlightening. :mixedsmi:

But now I will go to bed.

simonu
September 24th, 2010, 00:02
So how do you prepare a base install of CFS2 on which to build your different theatres of opperations?
Take one fresh virgin CFS2 and copy it rename it CFS2_Base or something.



I’m going to build a modding platform for developing CFS2



This would also be a great base install on which to build alternative installs for different theatres of Ops or different eras of combat.



So first off I’m going to strip out all of the



Pacific Theatre.



The scenery



Here I will remove the stock PTO detailed scenery



From \...\SCENEDB\world\scenery



16 files *9.bgl the Lod9 mesh



12 files pac????m.bgl the land/water masks



82 files pac????p.bgl the vector textured polygons (beach lines rivers and tracks)



Move the files to an other folder; rename them; or delete them.




Now I’m adding all of Richard rhumbaflappy Ludowise’s DEM lod 5 7 and 8



Lod 5 and 7 are global but lod 8 only covers ETO and PTO (so far)



I am going to put it all into



\..\SCENEDB\world\scenery



NB



Tried installing LOD8 to a separate folder



As Rami suggests, but seems to take slightly longer to reload scenery!



24 files of lod 5 mesh



6*4 lod 5 squares



looks like 8 for the eastern hemisphere



and 16 for the western hemisphere



91 files of lod 7 mesh cover the entire world except 4 squares of open ocean



12*8 lod 7 squares cover the globe



97 files of lod 8 mesh covering



areas of significance in WW2



4 lod 8 squares to each lod 7



In addition to Dicks global mesh I am adding his new water masks



They are Lod 8 and follow the same naming convention.



These too go into



\..\SCENEDB\world\scenery



In \..\scenery I replace dem4km.bgl with Dick’s version




Get rid of the stock GSL



Now I will create an empty GSL file to remove the default infrastructure



Simply create a copy of \..\GSL\cfs2.gsl



Now use Martin Wrights GSLMan to open the copy and remove the gobs, now the original cfs2.gsl will be empty. Rename the copy to something meaning full, it’s a tiny file so no point in deleting it.



Clear Out The Stock planes



First



Open up the mdlnames.txt file in word pad



Scroll down until you find the entries for the stock planes,



Comment them out by inserting a / stroke in front of each like this

/"A6M2_Zero"=Mitsubishi A6M2 "Zero"
/"A6M5_Zero"=Mitsubishi A6M5 "Zero"
/"N1K2J_George"=Kawanishi N1K2-J "George"
/"F4F4_Wildcat"=Grumman F4F-4 Wildcat
/"F6F3_Hellcat"=Grumman F6F-3 Hellcat
/"F4U1A_Corsair"=Vought F4U-1A Corsair
/"P38F_Lightning"=Lockheed P-38F Lightning
/"Ki43iib_Oscar"=Nakajima Ki-43-IIb "Oscar"
/"B5N2_Kate"=Nakajima B5N2 "Kate"
/"D3A1_Val"=Aichi D3A1 "Val"
/"G4M2_Betty"=Mitsubishi G4M2 "Betty"
/"P39D_Airacobra"=Bell P-39D Airacobra
/"SBD2_Dauntless"=Douglas SBD-2 Dauntless
/"TBD1_Devastator"=Douglas TBD-1 Devastator
/"TBF_Avenger"=Grumman TBF-1 Avenger
/"C47_Dakota"=Douglas C-47 Skytrain
/"B25D_Mitchell"=North American B-25D Mitchell
/"B24D_Liberator"=Consolidated B-24D Liberator


Once that is done you could go ahead and delete all the plane folders, but this is not necessarily a good idea. Lots of addon planes use sound and panel folders of the stock planes by a system known as aliasing, if a plane uses a sound folder that can’t be found then the plane will not show up in CFS2.



If you plan to keep a virgin install of CFS2 on your hard drive you can edit the addon planes to use sound and panels there, so go ahead and delete the aircraft folders you don’t want.



If you don’t want to keep a Default PTO install of CFS2 on your hard drive you can remove from each plane all the files and folders except Panel and Sound.
Finally theres no point in keeping all the stock missions, campaigns and lessons they won't work now you have removed your planes.



The land class and ground textures.





The stock ground textures are fine for the PTO but do not look so good else where in the world


The file \..\scenery\worldlc.bgl is the global land class file


It is different from the equivalent files in fs8 and fs9.


Land class can be augmented with additional files.


Local areas can be created with alternative texture sets


But to make it all work smoothly a global texture set needs to be in \..\texture.

What we need to do is move all the ground textures into the main Texture folder, The simplest way is


go to \..\SCENEDB\WORLD\ Cut the Texture folder and then go up two levels so that you are in the main CFS2 folder and Paste allow the Texture folder to overwrite.








You will now have a suitable base install that can be used to test add-ons or create installs for alternative theatres of operation.

I have not mentioned UIRES screens yet I am still working on replacing the PTO uires,
I would not advise deleting them because I havent tried it yet.

MaskRider
September 24th, 2010, 06:27
Great thread Simonu! Keep going! I am going to give a bunch of these suggestions a try. Got to get my messy install squared away, Its getting where even I can't remember whats what and wheresdat and whazzit!

simonu
September 24th, 2010, 07:58
More on Ground textures,
There are a lot of options.
I made my own set from FS9 stock ground textures.
Some prefer a set derived from CFS1 or FS2k
Its a matter of personal taste really

The CFS2 landclass system divides the globe into two areas; the PTO and everywhere else.
So it's impossible to come up with one set suitable for all areas.
It is possible to use more than one set in the same install however. But you must decide on a base set to go in your main texture folder. If in doubt stick with the originals. Area specific sets can be added as new scenery layers later.

mariereid
September 24th, 2010, 08:24
Very interesting and useful stuff, I better try to print this info. I am starting to think I need to keep a record of what textures I have installed where.

simonu
September 24th, 2010, 08:25
You will have noticed maybe that the /settings/scenery library you cannot disable the stock layers.
This behavier can be changed by editing the scenery.cfg
Use wordpad to open it up
All but the Default scenery layer can be deactivated and CFS2 will still load and run after a fashion.
This allows us to do clever stuff like keep separate folders for objects that use the same DPs but different models or textures
like vehical or building librarys that have theatre specific paint schemes.
Make stock scenery layers switchable by changing Required= to FALSE thus.19722

For the reason I just mentioned about the default scenery layer being the only one that is essential! I avoid using this for addon scenery.

When you add new stuff it would be really good to know just what it is, and be able to unadd it if you dont like it
When it comes to scenery files, there are all sorts of different types.

There is mesh like The rhumbaflappy set up above is pretty good. the lod 7 mesh is pretty good on its own, the LOD 8 mesh is just as good as any LOD 9 that Ive seen.
Whooaa whats LOD ? Level of Detail LOD 8 is more detailed than LOD 5.
LOD 5 files cover bigger areas.
The levels kind of super impose on each other the higher LODs filling in the between the low LOD data points,
so it is important to have a matching set.
If you try mix and match with the various meshes available you will encounter combinations that produce strange artefacts like deep holes or immense spires.
LandClass is the base layer of ground texture that gets supper imposed on the mesh, WaterClass is pretty much the same.
There is a landclass and a waterclass layer for the entire world, The lines that define the edges between are called LWM (land water mask) we can layer the masks to produce coast lines, islands and lakes.

To help soften the edges between land and sea we use another layer called VTP (vector texture polygons).
We use these to create the beaches and roads. They can also be used to "burn" custom textures into the mesh to create back grounds for our air bases and target areas.
All these scenery layers fit together and are highly efficient.

But if you have a VTP scenery that calls a texture to be burned into the mesh which is missing. CFS can't load the background landclass for that cell and will show a default fall back colour instead. Similarly if landclass calls a texture that cannot be found a fallback colour will be shown.
When CFS2 scenery loads textures it always looks in the local texture folder first, if the texture is not there CFS works up through the directory layers, the last place it looks is the texture folder in the main CFS2 folder.

the list of airbases you chose to take off from in free flight and QC are generated by a different type of scenery file these are called AFD scenerys. AFD can be just the data required for the start position in the list but it can include ILS and VOR and visual elements like runways and refuel boxes.

there are not many flat places in mesh to build our airbases. For tis we use another type of scenery known as Area16 flattens the can be used to define the shape and altitude of flat areas.
They should be made to fit in the mesh you are using. if you mix and match mesh with airbase scenery that includes Area16 flattens. Dont be surprized to see your airbase ontop of a mesa or at the bottom of holes.

AFD and Area16 are very small files that can be easily adjusted as long as you keep track of were they are.

simonu
September 24th, 2010, 13:06
object librarys
the following folders in SCENEDB are object librarys

FS2KPROP contains propellers for old addon planes and CFS1 and FS2k stock planes
inf all the CFS2 PTO buildings
library all the CFS1 ETO runways vehicles buildings and ships
runways all the CFS2 PTO runways
ships low poly versions of the PTO ships
veh CFS2 PTO vehicles
weapons the rockets bombs torps pylons and external tanks

In CFS2 all the objects you see at the stock airbases are library objects. They are placed in the sim by a kind of mission that runs in the background, We call it the GSL for groovy scenery layer. It is this layer that explodes when you shoot it.
This is because the objects have DP files. That s Damage Profile, it explains to the sim how the object takes damage. If the library is coded for CFS2 it will display a separate damaged model when the DP system deems it destroyed.
DPs for the old CFS1 objects are pretty simple, The CFS2 ones are more complex.

Some odd stuff here
in the library called library
A default install of CFS2 is missing a DP for the famous "Broad leaf tree2" there are a number of other CFS1 objects in here that have no DP files in CFS2
the library named ships contains low LOD versions of the CFS2 PTO ships. Ships and objects have the same names.The DPs are in the Ships folders. I dont think these objects get used in the GSL or mission layers. Maybe they are for other addon scenery.

The Runways library contains to scenery bgl files. One is a small libray of visual runways , the other is known as a placement scenery. This file places scenery objects much like GSL.
There are two primary differences.
GSL is loaded as the sim enters small areas we call gobs, this means objects like runways, large enough to be seen from outside the gob area will suddenly "pop" into existance in a very unconvincing way. For this reason the large objects are called by placement scenery, it is loaded at a deeper level and so appears from much further away. FS2000 and
FS2K2 uses this placement type scenery for landmarks citys and airport eyecandy.
Objects placed in this level do not need DPs but they will not blow up even if they have them.

As I said scenery placed objects are visible from further away, conversly this has an unconvincing effect with small objects.

On the subject of FS2k2 scenery there is another type of scenery known as procedural scenery.
This scenery also displays objects but these are not librarys. The model is coded straight into the location. Addon scenery for FS2k2 uses this type. It works in CFS2 but is not efficient and when the model is detailed it hits frame rates badly. There are lots of addons made for FS2k that are supposed to work in CFS2 that use this type of scenery. The earlier stuff is better on frame rates because it looks crude.

tobob
September 24th, 2010, 15:15
First



Open up the mdlnames.txt file in word pad



Scroll down until you find the entries for the stock planes,








Don't forget to remove those planes from the QC file also. Then add in plane(s) of your choice.

simonu
September 24th, 2010, 15:45
yes Good call Tobob. I havent touched the QC file yet

more on object librarys

Object librarys do not have to be in the scenedb folder. In fact any scenery can be run from anywhere or your system or even network if your LAN is good.

There is no correct way to organise object librarys in CFS2, but its not a good idea to put em all in the same folder as so often happens with weapons.

The important thing to understand is that every object must have a unique name and GUID number,

You cannot easily tell whats inside the scenery bgl files cos its all in hex.

The object names follow all kinds of conventions, the GUID numbers should be randomly generated, not made up,
It is ok to generate one random number for each library and make a byte sequence for each object in the library
like this
|---------------------------GUID-----------------|-scale-|type|Name
09797FC57h,08A930060h,011D14AC5h,0A028DC9Ah, 1.0 513 0 AirFld1
09797FC57h,08A930060h,011D14AC5h,0A028DC9Bh, 1.0 513 0 AirFld2
09797FC57h,08A930060h,011D14AC5h,0A028DC9Ch, 1.0 513 0 AirFld3
09797FC57h,08A930060h,011D14AC5h,0A028DBB3h, 0.1 1024 0 AM75MM
09797FC57h,08A930060h,011D14AC5h,0A028DBB4h, 0.1 1024 0 AmAmb

There is no record of all the object names and GUIDs that are in common usage,
It has been up to developers to ensure they are not duplicating things, you wouldn't think it'd so bad with big random numbers,names is tricky, but the trouble is, back in the day developers were just making up GUIDs so a lot aren't random, you can see the problem.
If an object is duplicated in two different files it's gotta give CFS2 a logicFU

The point here is you gotta organise your addons, test them carefully, dont assume all the addon planes will come with compatible weps packs, payware self installers are no exception.

MaskRider
September 24th, 2010, 16:00
Great stuff, Simonu! You're on a roll, boy! Go! Go!

Devildog73
September 24th, 2010, 16:32
simonu, GREAT STUFF!

Man, just when I think I am getting my ten installs all up to snuff, you come along and unkowingly issue me a challenge to make it better!

No Sir, I am not falling into your trap! I am going to finish Bong and McGuire BEFORE I embark upon your journey!

mariereid
September 25th, 2010, 02:22
Jeez, just when I thought I was getting an idea on how to run this sim........ I think I will install an "experimental install" and try these ideas out. I had no idea that you could do a lot of this stuff, and not screw everything up. Now don't get too fancy, I know for a fact that at least one pc moron is trying to follow this! :salute::ernae:

miamieagle
September 25th, 2010, 05:07
Thank you!

This is indeed great information!

erufle
September 25th, 2010, 05:23
Good stuff. I'm saving it all to a permanent file so I can read it when I get a chance. There seems to be a few answers to some questions I've been needing answered. :jump:

simonu
September 25th, 2010, 08:39
quick recap of what I got so far.

0 Be sure you understand what you are doing and why. QUESTION THE INTENSION

1 Create an unmoddified master copy of cfs2, keep it safe in case you need to take out some frustration.

2 Start working on a copy of your master.


3 make a base install by taking out all the PTO stuff, add rhumbas global mesh and water masks. Try out some texture sets and select one to keep.

add your favorite steed to check that all looks hunky-dory , remember tis is a base install theres no roads no beach lines no airbases.

All is ready to start adding stuff back in but wait.

It might be a good idea to create a back up of your base install and put it away.

I have a plan that new installs for specific areas need not be entire copys of the base install, since they can draw on the scenery in the base install there is no need to duplicate all those files. I am testing the principle today. how ever in these days of terrabyte drives we needn't be so concerned about disk space.

Devildog73
September 27th, 2010, 10:55
Simonu,
It works like a charm! I have a SCENERY folder in Microsoft Games folder.
In that folder are folders for each of my installs; i.e.: ATO, ETO, MTO, PTO.
In each of those folders are the specifics to that theater; i.e.: all of MaskRider's stuff is in PTO; all of Sander de Cocque's stuff is in ETO and MTO. ATO has all the Africa stuff.

In the main SCENERY folder is the stuff that works for all theaters.
I fire up the sim and map each to the appropriate folder in SCENERY.
Since PTO USN and PTO USAAC use the same exact scenery files, I did as you advised and put rhumba's stuff in the main cfs2\scenedb\world\scenery. Put PACTEX in main cfs2\scenedb\world\texture. put MRs stuff in the main cfs2\scenery folder and activated it in main menu.

I wish there was a way to do all library objects into one set of objects_dp and inf\scenery folder for all installs to use.

I am having some difficulty keeping access to MB and freeflight, but think that has more to do with something else. I have gone from a straight to CTD to the error about data files being corrupted or missing, but I am getting closer to resolving it.

simonu
September 28th, 2010, 15:13
I wish there was a way to do all library objects into one set of objects_dp and inf\scenery folder for all installs to use.

You can have each install access a single scenedb\inf\scenery

I thought you were paying attention laddy

you have to edit scenery.cfg by hand for example

[Area.010]
Title=Buildings
Local=Scenedb\inf
Active=TRUE
Layer=10
Required=TRUE <<<<<<<<<<<Change this to FALSE
Remote=

Now you can use the options/settings/scenery library to point CFS2 to the folder you want it to use. You can arrange your CFS2 installs how you like;
side by side in C:\Program Files\Microsoft Games
in which case

[Area.010]
Title=Buildings
Local=..\CFS2_Base\Scenedb\inf
Active=TRUE
Layer=10
Required=FALSE
Remote=

or nested like

C:\Program Files\Microsoft Games\Combat Flight Simulator 2\CFS2-TEST

in which case

[Area.010]
Title=Buildings
Local=..\Scenedb\inf
Active=TRUE
Layer=10
Required=FALSE
Remote=

but you can keep your scenery data base on an entirely seperate disk if you want;
example

[Area.010]
Title=Buildings
Local=
Active=TRUE
Layer=10
Required=FALSE
Remote=F:\Workshop\FS2K2 Object Library\scenedb\Generic\generic

simonu
September 28th, 2010, 15:28
BTW, Objects_DP files are very small, yes theres lots, and yes one or two bad ones can cause serious FU.
Each install will have to have its own Objects_DP folder
this is where keeping a base install with the essential objects_dps for copying out comes in

I have tried nesting CFS2 to see if I can get it to share the Root directory scenery and texture folders, It works but not perfectly.
CFS2.EXE must have a local scenery folder which must contain the following 8 files

dem4km.bgl
lclookup.bgl
magdec.bgl
seasons.bgl
timezone.bgl
world.vis
worldlc.bgl
worldwc.bgl

Its coded to look for them
You can however edit scenery.cfg and make it actually load the scenery from another location

alpha_1
October 2nd, 2010, 08:46
I've done a non dedicated base install with using it for future installs in mind, Simon.....I've saved it elsewhere and now want to use it for a dedicated install so......let me get this straight....after I copy it over I can rename the install to whatever I choose, right? What about the .exe file? Same applies there or.......? (i.e. 'cfs2_std.exe' to say, 'cfs2_whatever.exe')

Cheers:bump:

simonu
October 2nd, 2010, 09:54
Alpha you have tried that?

I think that might work, you would have to name the .cfg the same.
If it does work it might open up more modding possibilities please try it and report back.

If it dont work this is what I do
Take my copy of base install
rename the "root folder" (you know, the one that holds it all together) what ever you like say "CFS2_Global_War"
pop the folder open and right click on cfs2.exe
select create shortcut or send to desktop (which creates a short cut on your desktop)
you can then rename the shortcut, to suit.
You can then clone the shortcut by copy and paste and edit the target line in this second shortcut to create a missionbuilder for that install.
Got it?

simonu
October 2nd, 2010, 10:22
couldn't resist with that one.. Yes you can rename the executable, the exe as long as it gets a matching .cfg.
This means you can run two or different configurations from the same install. Now I'll have to dig out all the info on cfs2.cfg!

alpha_1
October 2nd, 2010, 11:31
I shall attempt to fall on my sword, as gracefully as possible and go ahead with this. But, of course I'll report back before it's too late!:bump:

alpha_1
October 2nd, 2010, 11:53
Worked perfectly! Copied over the base install (cfs2_std), renamed it to cfs2_Aleutians, renamed and shortcut-ed the .exe file accordingly, also renamed the .cfg file accordingly, took a bird for a spin.......everything is Roger!

Thanks m'man!:salute:

Finn
October 3rd, 2010, 10:12
Oh wise man - this is one of the very important threads since it learns us lesser beings about the innards of CFS-2. But having been here for some years, I know that this thread will dissappear in the wealth of new threads. Please great guru, make the contents of this thread a real file, like Rami's How-To's and make it downloadable for eternaty, lest we forget your wise words. It may be called Simonou's advices and tricks manual. Thank you for sharing your knowledge. It IS outstanding. And it is VERY rare to find a man who BOTH knows how to do something AND tell about it in an understandable way, so please, please do collect all this important knowledge and upload it.:jump:
Finn

alpha_1
October 3rd, 2010, 10:45
I heartily second that request, Simonu.......do it m'man.......we'll ALL be richer for it. Thank you!:salute:

simonu
October 3rd, 2010, 12:43
this is one of many pots simmering on the back burner.
I have been posting here draft notes and ramblings, I am keeping them for compilation into some sort of unofficial SDK. posting this stuff here gets me some instant feed back which helps access what is relevent.

The problem is there are many ways of achieving the same results.
To make a "do it like this guide" was not really my intention, because one way of doing something is not going to be right for everone.

What I would rather is kind of broader map.

voyager
October 4th, 2010, 10:37
simonu,

Even though it is a "standard" game out of the box everyone eventually modifies and personalizes it to the point that there is no "one size fits all" solution. Your broad map approach gives an excellent starting point and direction to go in resolving problems.

voyager

skylane
October 7th, 2010, 23:40
Simonu,

thank you very much for this interesting and valuable information! I have copied it to a text so it doesn´t get lost.