Custom Hangars
Posted: Tue Nov 18, 2014 4:54 pm
Hello,
The XWA's engine uses two hangar models : Hangar.opt and FamilyBase.opt.
If you wanted to use a custom hangar, you had to replace one of them.
Here is an experimental solution that allow you to create/add a custom hangar for potentially each ship or station.
I have hooked the function that load the hangar objects.
Suppose that the player's arrival craft is "FlightModels\Model.opt".
To use a custom hangar made for that model, name it "FlightModels\ModelHangar.opt".
If "FlightModels\ModelHangar.opt" doesn't exist, "FlightModels\Hangar.opt" is used.
To replace the objects, create a "FlightModels\ModelHangarObjects.txt" file.
If "FlightModels\ModelHangarObjects.txt" doesn't exists, "FlightModels\HangarObjects.txt" is used.
If "FlightModels\HangarObjects.txt" doesn't exist, no model is replaced.
To set the position of the camera, create a "FlightModels\ModelHangarCamera.txt".
If "FlightModels\ModelHangarCamera.txt" doesn't exist, "FlightModels\HangarCamera.txt" is used.
If "FlightModels\HangarCamera.txt" doesn't exist, default values are used.
Here is the hook for testing:
EDIT: updated links:
The XWA's engine uses two hangar models : Hangar.opt and FamilyBase.opt.
If you wanted to use a custom hangar, you had to replace one of them.
Here is an experimental solution that allow you to create/add a custom hangar for potentially each ship or station.
I have hooked the function that load the hangar objects.
Suppose that the player's arrival craft is "FlightModels\Model.opt".
To use a custom hangar made for that model, name it "FlightModels\ModelHangar.opt".
If "FlightModels\ModelHangar.opt" doesn't exist, "FlightModels\Hangar.opt" is used.
To replace the objects, create a "FlightModels\ModelHangarObjects.txt" file.
If "FlightModels\ModelHangarObjects.txt" doesn't exists, "FlightModels\HangarObjects.txt" is used.
If "FlightModels\HangarObjects.txt" doesn't exist, no model is replaced.
To set the position of the camera, create a "FlightModels\ModelHangarCamera.txt".
If "FlightModels\ModelHangarCamera.txt" doesn't exist, "FlightModels\HangarCamera.txt" is used.
If "FlightModels\HangarCamera.txt" doesn't exist, default values are used.
Here is the hook for testing:
EDIT: updated links: