Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi Pete, I am a Registered User of FSUIPC and a freeware addon developer.

http://www.fsflyreal.com

I have two requests / questions / Doubts

1) Can I write the G Factor on FS2004

2) Is there any way other than using the menus :) to change a Players Aircraft (Via FSUIPC or other way)

I Need the change the Visual Model while on the simulation for a project

Regards

Pedro Caldeira

Posted

1) Can I write the G Factor on FS2004

Well you probably can but I very much doubt whether it will have any effect. That is going to be a derived value -- i.e. an effect, not a cause.

2) Is there any way other than using the menus :) to change a Players Aircraft (Via FSUIPC or other way)

I Need the change the Visual Model while on the simulation for a project

Only maybe by using the FS "reload user aircraft" control after changing the current aircraft files. I suppose just writing the new model entry in the PANEL.CFG file (via, for instance WritePrivateProfileString API) before issuing the "reload user aircraft" would do it. It won't be instantaneous of course, because FS will reload the aircraft, panel, the works.

Regards,

Pete

Posted

By reload user aircraftyou mean offset 32FC ?

I dont see any function to do that in the FSUIPC Programmers Manual

Because the Programmer's Manual is for programming FSUIPC, not for using FS2004! :)

The "Reload user aircraft" FS control is an FS control. You can find it in the FS2004 Options - Controls - Assignments list, and also in FSUIPC's Keys and Buttons pages, in the drop downs for FS controls.

You can send FS controls through FSUIPC -- see offset 3110.

Regards,

Pete

Posted

The Fs Controls like 'reload user aircraft' have a code ?

for example for 'reload user aircraft' what do i put in FsCmd in the code example below ?

If FSUIPC_Write(&H3110&, 8, VarPtr(FsCmd), dwresult) Then

bmodproc = FSUIPC_Process(dwresult)

End If

What is the File that i have to access to change the User Aircraft ?

a flight file ? I Know that these are Fs Issues but if you can help would be great .

Thanks anyway

Regards

Pedro

Posted
The Fs Controls like 'reload user aircraft' have a code ?

for example for 'reload user aircraft' what do i put in FsCmd in the code example below ?

There's two ways to find out:

1. Program a Key or Button in FSUIPC's Keys or Buttons pages to do this action, then look in the FSUIPC.INI file to see what number it used (it'll be the 5 digit number after the "C" in the appropriate line), or

2. Go get the list of FS controls I made from http://www.schiratti.com/dowson. You should find lists for FS2000, FS2002 and FS2004 there.

What is the File that i have to access to change the User Aircraft ?

a flight file ? I Know that these are Fs Issues but if you can help would be great .

But I though you wanted to change the Model? That indicated to me that you knew all about aircraft modelling. Is this not so?

The Aircraft.CFG file contains pointers to the Panel, the Model, the Sound and the Texture folders. I'm not sure what you want to change, but it will be one of those. You can get a Microsoft SDK which explains all about these "aircraft containers". I would suggest you get this and study it first before you mess around too much. Sorry, I have no link -- somewhere on the vast Microsoft website.

Regards,

Pete

Posted
1. Program a Key or Button in FSUIPC's Keys or Buttons pages to do this action, then look in the FSUIPC.INI file to see what number it used (it'll be the 5 digit number after the "C" in the appropriate line), or

2. Go get the list of FS controls I made from http://www.schiratti.com/dowson. You should find lists for FS2000, FS2002 and FS2004 there.

Thanks for the tip

But I though you wanted to change the Model? That indicated to me that you knew all about aircraft modelling. Is this not so?

Who knows everything about anything :)

The issue is with a flight loaded and running, what is the file to change in order to reload the user's aircraft.

i created a flight with plane X

i mapped the command 'reload user aircraft' to a joystick button

i press that button and it reloads very fast :) great

i opened the flight file and changed the aircraft=plane X to plane Y and saved it.

got Back to FS and pressed the same joy button.

plane X relaods again, not plane Y. Why ?

That is my problem, not the moddeling ;)

Is there a file where fs stores the plane that is currently using.

I can load a flight and change the aircraft after using the menus, then is the last aircraft that reload, not the one saved in the flight.

Regards

Pedro Caldeira

Posted

i mapped the command 'reload user aircraft' to a joystick button

i press that button and it reloads very fast :) great

i opened the flight file and changed the aircraft=plane X to plane Y and saved it.

got Back to FS and pressed the same joy button.

plane X relaods again, not plane Y. Why ?

Because the Flight file is only used when loading a Flight. You seem to have confused yourself somewhat.

The FLIGHT (FLT) files contain complete flight initialisation details, including the aircraft to fly, the place to fly from, and even the state of the engines, radios, and so on. It is nothing to do with loading or reloading an aircraft on its own. For example, if you loaded another aircraft from the Aircraft menu, it wouldn't reload the FLT!

The aircraft is controlled by the AIRCRAFT.CFG file. It is that which the Aircraft menu refers to when you select and aircraft. It provides the aircraft name, characteristics and so on, and also points to the Modelling (MDL), Texture, Sound, and Panel details.

I really do think you should find the Microsoft aircraft container SDK and study that before you mess with all this.

Regards,

Pete

Posted

Wrong Post before.

I was reloadinf the flight instead of reloading user plane.

That was due to having both routines called from a giving routine...

I noticed that the 'reload user aircraft' probably reloads the model from memory and not from the aircraft.cfg, because i loaded a model.

then i replacedaircraft.cfg by a different one, pointing to a different model, texture, airfile ,etc within the same folder.

Original = Model

Copied = Model.1

And the model reloads the same, and very fast to be read from disk.

Any suggestions.

Regards

Pedro

Posted

I noticed that the 'reload user aircraft' probably reloads the model from memory and not from the aircraft.cfg

Any suggestions.

Sorry, no, I have no idea how to deal with that then --- it seems a rather odd of Microsoft to supply a control to reload aircraft if it doesn't actually reload from the files. Maybe it is only relaoding the AIR file or the performance data from the CFG file? Maybe it's for those who design aircraft who need to keep tweaking parameters and re-testing the flight characteristics.

I can only hope that someone who knows about these things can chip in and help. Maybe there's an aircraft designers forum or newsgroup some place? Otherwise, it is looking as if you will have to resort to reloading the flight after all, isn't it?

Regards

Pete

Posted

Good News, I was reading the aircraft Container SDK for Fs2004 and the only way to refresh the model from disk is to set the A.I. Traffic to 0.

That way the cache e cleared because (so they say) our aircraft is also part of the A.I. aircraft. and if A.I. Traffic is active, the models are not update for as long as the cache is not refreshed or flushed.

I am going to test it and let you know if it works.

P.S.: If it work is there any chance via FSUIPC to read the A.I. Settings, then reduced to 0 and after doing my stuff reset it to the original value ?

Regards

Pedro

Posted
P.S.: If it work is there any chance via FSUIPC to read the A.I. Settings, then reduced to 0 and after doing my stuff reset it to the original value ?

FSUIPC already provides a control, which you can program on button or keypress, to set the AI traffic level or toggle it between your setting and 0. This only applies to FS2004.

If you are operating through the IPC interface you can send keystrokes or buttons there too, but obviously you'd need to program the chosen method in FSUIPC's options.

Regards,

Pete

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.