Custom Hangars

A Forum dedicated to the Suggestion, Creation and Editing of XWA Dynamic Link Library Files

Moderator: JeremyaFr

Post Reply

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Mon Nov 24, 2014 5:45 am

.
Last edited by Bman on Tue Dec 23, 2014 8:32 am, edited 3 times in total.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Mon Nov 24, 2014 6:32 am

Jeremy, what happened to the empty "ModelNameHangar.txt" and "Mission_ModelNameHangar.txt" text files? Are they not needed anymore?
Also, how does "custom hangar based on mission file" now relate to mission file ? Do we still need to append mission number to the end of "ModelNameHangarObjects" and "Mission_ModelNameHangarObjects" before the .txt extension ? Not sure what you mean.

Also, relating to my above post ... is it possible inside the configuration text files "to point to" any given model name.opt file that does not match the existing model.opt filename convention ? So you could have a "one to many" relationship?

For example: the default starship Dreadnaught.opt exists in \Flightmodels\ folder along with its DreadnaughtHangar.opt file and all it's applicable *.txt config files.

In the \Missions\ folder, it has a different textured custom hangar, called "Missions_DreadnaughtHangar.opt" with all it's own applicable *.txt config files.

In the same \Missions\ folder, is it possible "to point to" unlimited hangar models for the Dreadnaught so each might represent a different flightcolor etc. ? So maybe something like....

Missions_DreadnaughtHangar_B.opt, and applicable .txt files
Missions_DreadnaughtHangar_C.opt, and it's applicable .txt files
......
Missions_DreadnaughtHangar_Z.opt etc.

That's more clutter. It would be more ideal for opt creators to make FlightGroup colors on the opting side as we do now. But there's just no way to access Flightgroup textures of "hangars" in AlliED.

And finally.... a question related to above idea.... the "one to many" concept, can any of the text files reference non-existing .opt filename conventions in general ? In other words, can filenames be completely different than traditional model names specified by SpaceCraft0.lst and Equipment0.lst files ?
For example, in the "ModelNameHangarObjects.txt" or "Missions_ModelNameHangarObjects.txt"
==================================================
\Flightmodels\Ywing.opt = MyWhateverNameIChoose.opt
\Flightmodels\Xwing.opt = MyWhateverNameIChoose2.opt
\Flightmodels\Awing.opt = NewCustomStarfighterCraft.opt
=================================================

I assume no, we are limited to referencing to existing pool of opt file names. If yes, then that's a way to get around the "limited craft slots" issue at least inside any hangar as new decoration. :-) So you could have unlimited opt models like AT-AT walkers, smaller starships models, hangar crew figures, troops, droids, etc. sitting in the hangar.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
Driftwood
Admiral (Moderator)
Posts: 2174
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Mon Nov 24, 2014 12:34 pm

You can have essentially an unlimited amount of opts to choose from for your hangars without being limited to what is actually in the ship slots, provided of course the opt exists in the flightmodels folder.

IE, I have Rebeltrooper, and Stormtrooper in my opt file. I can call them for their respective hangars independently. In theory you could also have the Shrike fighter substituted for the Shuttle in the hangar, even if it's not in the shiplist to be flyable.

Another update? Wheeee!
To set the position of the camera, create a file named "FlightModels\ModelHangarCamera.txt" or "MissionDir\Mission_HangarCamera.txt".
The dll searches a "HangarCamera.txt" file in this order (from first to last):
- "MissionDir\Mission_HangarCamera.txt"
- "FlightModels\ModelHangarCamera.txt"
- "FlightModels\HangarCamera.txt"
If a "HangarCamera.txt" file doesn't exist, default values are used.
Only the position for keys 1,2,3,6,9 can be set.
Okay, so key 8 is set to the crane camera, but what is key 7 set to, and why are these uneditable exactly?

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Mon Nov 24, 2014 3:09 pm

Hi Bman,

I don't think you've ever needed a ModelHangar.txt file, correct me if I'm wrong

The only files you need are as so

DreadnaughtHangar.opt = ModelHangar.opt
DreadnaughtHangarObjects.txt = ModelHangarObjects.txt
DreadnaughtHangarCamera.txt = ModelHangarCamera.txt (Optional)
DreadnaughtHangarMap.txt = ModelHangarMap.txt (Optional)

If the DreadnaughtHangarObjects.txt doesn't exit it defaults to HangarObjects.txt, if this does exist, it will just use default vaules.
Same goes for the other text files.
DreadnaughtHangarCamera.txt doesn't exit it defaults to HangarCamera.txt, if this does exist it will just use default settings
DreadnaughtHangarMap.txt doesn't exit it defaults to HangarMap.txt, if this does exist it will just use default settings

Ok the way Jeremy explains it is

Suppose that the arrival craft is "FlightModels\Dreadnaught.opt".
Suppose that the mission is "Missions\1B1M1tftc.tie".

I'm assuming MissionsDir = Missions and that you don't have to create a new Folder called MissionDir?????

To use a custom hangar, name it "FlightModels\DreanaughtHangar.opt" or "Missions\1B1M1tftc_Hangar.opt".
The dll searches a "Hangar.opt" file in this order (from first to last):
- "Missions\1B1M1tftc_Hangar.opt"
- "FlightModels\DreanaughtHangar.opt"
- "FlightModels\Hangar.opt"

To replace the objects, create a file named "FlightModels\DreanaughtHangarObjects.txt" or "Missions\1B1M1tftc_HangarObjects.txt".
The dll searches a "HangarObjects.txt" file in this order (from first to last):
- "Missions\1B1M1tftc_HangarObjects.txt"
- "FlightModels\DreadnaughtHangarObjects.txt"
- "FlightModels\HangarObjects.txt"
If a "HangarObjects.txt" file doesn't exist, no model is replaced.
The format is a line per object: "FlightModels\ObjectA = FlightModels\NewObjA"
To remove an object, use an empty invisible opt.

To set the position of the camera, create a file named "FlightModels\DreanaughtHangarCamera.txt" or "Missions\1B1M1tftc_HangarCamera.txt".
The dll searches a "HangarCamera.txt" file in this order (from first to last):
- "Missions\1B1M1tftc_HangarCamera.txt"
- "FlightModels\DreanaughtHangarCamera.txt"
- "FlightModels\HangarCamera.txt"
If a "HangarCamera.txt" file doesn't exist, default values are used.
Only the position for keys 1,2,3,6,9 can be set.

To set the hangar map, create a "FlightModels\DreanaughtlHangarMap.txt" or "Missions\1B1M1tftc_HangarMap.txt".
The dll searches a "HangarMap.txt" file in this order (from first to last):
- "Missions\1B1M1tftc_HangarMap.txt"
- "FlightModels\DreanaughtHangarMap.txt"
- "FlightModels\HangarMap.txt"
If a "HangarMap.txt" file doesn't exist, default values are used.
The file must contain at least 4 object line.
The format is : model index, position X, position Y, position Z, heading XY, heading Z.
The numbers can be written in decimal or hexadecimal (0x) notation.
When position Z is set to 0x7FFFFFFF, this means that the object stands at the ground.

So your folders should look like this

The Dinput.Dll first searches

Missions Folder
---------------------
1B1M1tftc_Hangar.opt
1B1M1tftc_HangarObjects.txt
1B1M1tftc_HangarCamera.txt (Optional)
1B1M1tftc_HangarMap.txt (Optional)

If those can't be found it then searches

FlightModels Folder
---------------------------
DreadnaughtHangar.opt
DreadnaughtHangarObjects.txt
DreadnaughtHangarCamera.txt (Optional)
DreadnaughtHangarMap.txt (Optional)

If those can't be found it then searches

FlightModels Folder
---------------------------
Hangar.opt
HangarObjects.txt
HangarCamera.txt (Optional)
HangarMap.txt (Optional)

Of course if the Dinput.Dll can't find any of the text file it will load the default values.

And Yes you can have any Opt in your hangar, your not limited to whats in your spacecraft0.lst, Equipment0.lst basically if the opt exists you can now have it in your hangar.

Question to Jeremy

If your Mission_HangarObjects.txt is in your Missions folder, can the items written in the Mission_HangarObjects.txt still point to FlightModels/ywing.opt = Flightmodels/Preybird.opt

or do the opts have to also be placed in you missions folder, and written in the Mission_HangarObjects.txt like so Mission/Ywing.opt = Missions/Preybird.opt ?????

Another thing that is bugging me, the Pilot Proving Grounds, uses the Hangar.opt so theoretically you have
HangarObject.txt
HangarCamera.txt
HangarMap.txt

Right?

Not sure about HangarCamera.txt or HangarMap.txt but if you try and change the HangarObject.txt like so

FlightModels\Awing.opt = FlightModels\Blank.opt
FlightModels\Ywing.opt = FlightModels\TieInterceptorExterior.opt
FlightModels\Xwing.opt = FlightModels\TieBomberExterior.opt
FlightModels\HangarCrane.opt = FlightModels\HangarCraneATST.opt
FlightModels\CargoCanister.opt = FlightModels\Blank.opt

Awing is still the Awing, it should have been the blank.opt
Xwing is still the Xwing, should have been replaced with the Tie Bomber
Cargo Canister is still a Cargo Cannister, it should be replaced with a Blank.opt

The only things to change was the Hangar Crane for the ATST and the Ywing got replaced with the Tie Interceptor

Is this because the actual Hangar doesn't have an assigned Arrival/departure craft?

I've also noticed in other missions I've tried to test hangars, some of the craft remain the standard Rebel Craft and you don't seem to be able to change them to anything else, could you possibly give an explanation why it does this please????

Last thing, the HangarCamera.txt, why is it only Keys 1,2,3,6,9 can be set, I can understand you can't edit keys 4,5,8, due to them being attached to the roof crane or either of the droids, But Key 7 the only Key I would like to edit, there isn't an option, when it seems to be a static key, why is this???

Thanks, and sorry if I'm stepping on any ones toes
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

User avatar
JeremyaFr
XWAU Member
Posts: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Nov 24, 2014 4:43 pm

OK, maybe my explainations were not clear.

Suppose that the mission is "Missions\1B4M2B.tie".
Suppose that the arrival craft is "FlightModels\Dreadnaught.opt".

The possible involved files are:
  • "Missions\1B4M2B_Hangar.opt"
  • "Missions\1B4M2B_HangarObjects.txt"
  • "Missions\1B4M2B_HangarCamera.txt"
  • "Missions\1B4M2B_HangarMap.txt"
  • "FlightModels\DreadnaughtHangar.opt"
  • "FlightModels\DreadnaughtHangarObjects.txt"
  • "FlightModels\DreadnaughtHangarCamera.txt"
  • "FlightModels\DreadnaughtHangarMap.txt"
  • "FlightModels\Hangar.opt"
  • "FlightModels\HangarObjects.txt"
  • "FlightModels\HangarCamera.txt"
  • "FlightModels\HangarMap.txt"
Except the default "FlightModels\Hangar.opt" file, all other files are optional.
The per mission files can be be used with any .tie file, those wich are in the "missions" folder or those which are in the "melee" folder.
All the paths are relative to the base XWA folder. For instance, if in "Missions\1B4M2B_HangarObjects.txt" you indicate "FlightModels\DreadnaughtHangar.opt", this opt is in the "FlightModels" folder. If you indicate "Missions\DreadnaughtHangar.opt", this opt is in the "Missions" folder. You can also create an other folder if you want.
You can uses any .opt file you want. They do not need to be listed in "SPACECRAFT0.LST" or "EQUIPMENT0.LST".

Replacing objects with a "HangarObjects.txt" file seems to not work when the replaced opt has already been loaded.
It is for instance:
  • the player craft
  • CargoCanister
  • EscapePod
  • EscapePodA
  • RebelPilot
  • ImperialPilot
  • CivilianPilot
For HangarCamera:
Key 0 is the cockpit view
Key 1,2,3,6,9 are fixed views.
Keys 4 and 5 are related to the hangar droids.
Key 8 is related to the hangar roof crane.
Key 7 is either the same as key 3, either related to the player model.
In the exe, the key 7 is not a totally fixed view. But I can make it editable.

User avatar
JeremyaFr
XWAU Member
Posts: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Nov 24, 2014 6:56 pm

UPDATE:
added:
  • set camera position for key 7 (related to player craft)
# To call the hook that set the hangar camera:

Code: Select all

...
At offset 5F15F, replace 8B0D08BC68 with E91AFFFFFF.
Suppose that the player craft is "FlightModels\Player.opt".
To set the position of the camera for key 7, create a file named "FlightModels\PlayerCamera.txt".
If a such file file doesn't exist for a model, default values are used.
The format is:
"X = value"
"Y = value"
"Z = value"

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Tue Nov 25, 2014 1:23 am

Brilliant, I'll be abale to fix the Millennium Falcon and Corellian Transport now

Thanks Jeremy
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Tue Nov 25, 2014 2:16 am

Thanks for clarifying guys. Appreciate it. :-) Great.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sat Nov 29, 2014 4:34 pm

Hi Jeremy, while in the family base hangar the camera positions are mapped differently from the Calamari Hangar camera positions plus keys have a different mapping to the keyboard keys.

Key 1 your looking into the cockpit from a distance
Key 5 a closer look and the cockpit

But with the rescaled YT1300 the camera positions are messed up so I would like to fix those

The HangarCamera.txt renamed to FamilyBaseHangarCamera.txt doesn't seem to work and you can't change the position of the camera

I wouldn't be bothered about the other 7 keys but is it possible to find the offsets for family base keys 1 & 5 for missions 1b0m1 to 1b0m9

Oh I'm using Patcher B (Hangar or FamilyBase: B) To use Hangar (or custom hangar) or FamilyBase, based on model index)

Thanks :D
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

User avatar
JeremyaFr
XWAU Member
Posts: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Nov 29, 2014 8:21 pm

Hi,

For Hangar:
  • Key 0 is the cockpit view.
  • Keys 1,2,3,6,9 are fixed views.
  • Keys 4 and 5 are related to the hangar droids.
  • Key 7 is related to the player model.
  • Key 8 is related to the hangar roof crane.
For FamilyBase:
  • Key 0 is the cockpit view.
  • Keys 1,2,3,6,7,8,9 are fixed views.
  • Key 4 is related to the work droid 1.
  • Key 5 is related to the player model.
I will make the fixed views and the view related to player index editable.

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sat Nov 29, 2014 8:34 pm

Thanks :)
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

User avatar
JeremyaFr
XWAU Member
Posts: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Nov 29, 2014 11:31 pm

UPDATE:
added:
  • set the camera position for family base
modified:
  • exe patch: To call the hook that set the hangar camera
Suppose that the mission is "MissionDir\Mission.tie".
Suppose that the arrival craft is "FlightModels\Model.opt".
Suppose that the player craft is "FlightModels\Player.opt".

Apply to hangar:
To set the position of the camera, create a file named "FlightModels\ModelHangarCamera.txt" or "MissionDir\Mission_HangarCamera.txt".
The dll searches a "HangarCamera.txt" file in this order (from first to last):
- "MissionDir\Mission_HangarCamera.txt"
- "FlightModels\ModelHangarCamera.txt"
- "FlightModels\HangarCamera.txt"
If a "HangarCamera.txt" file doesn't exist, default values are used.
Only the position for keys 1,2,3,6,9 can be set with a "HangarCamera.txt" file.
The format is:
"Key1_X = value"
"Key1_Y = value"
"Key1_Z = value"

Apply to family base:
To set the position of the camera, create a file named "FlightModels\ModelFamHangarCamera.txt" or "MissionDir\Mission_FamHangarCamera.txt".
The dll searches a "FamHangarCamera.txt" file in this order (from first to last):
- "MissionDir\Mission_FamHangarCamera.txt"
- "FlightModels\ModelFamHangarCamera.txt"
- "FlightModels\FamHangarCamera.txt"
If a "FamHangarCamera.txt" file doesn't exist, default values are used.
Only the position for keys 1,2,3,6,7,8,9 can be set with a "FamHangarCamera.txt" file.
The format is:
"FamKey1_X = value"
"FamKey1_Y = value"
"FamKey1_Z = value"

To set the position of the camera for key 7 (hangar) or key 5 (family base), create a file named "FlightModels\PlayerCamera.txt".
If a such file file doesn't exist for a model, default values are used.
The format is:
"X = value"
"Y = value"
"Z = value"

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sun Nov 30, 2014 9:41 am

Cheers Jeremy that was really fast, thanks :)
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

User avatar
Spyder
XWAU Member
Posts: 103
Joined: Sat Feb 18, 2012 11:29 am

Post by Spyder » Tue Dec 09, 2014 6:20 pm

I can replace every ship exept for the X-wing. Nothing happends to it. What am I doing wrong? :?

User avatar
JeremyaFr
XWAU Member
Posts: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Dec 14, 2014 12:35 am

Hello,
As said above, a few objects can't be replaced.

User avatar
Spyder
XWAU Member
Posts: 103
Joined: Sat Feb 18, 2012 11:29 am

Post by Spyder » Sun Dec 14, 2014 7:17 pm

OK. managed to change it with the HangarMap.txt. Only problem now is the departing shuttle, can't replace it in the ModelHangar.txt only in the Hangar.txt. Also it starts from under the floor, how do I fix this? Sorry if this has already been answered, I didn't understand every thing, my english is not so good. :/

User avatar
DTM
Fleet Admiral (Administrator)
Posts: 2119
Joined: Tue Apr 22, 2003 11:01 pm
Contact:

Post by DTM » Mon Dec 22, 2014 7:30 am

Great work Jeremya! I'm having lot of fun thanks to your ideas!

Question:
You successed by replacing an OPT in the hangar with a custom OPT, calling an hook commanded by a TXT file in the MISSION folder. The custom OPT does not need to be present in the game's engine slot, because it's only a FlightModel replace. Using this brilliant trick, it's possible to use an endless choice of OPTs, overtaking the slot limitations. It's like a mask for the craft present inside the Hangar.

Would it be possible to use an hoock to replace an OPT inside a mission, using a txt file? That would be very usefull to add static objects in the mission without using game's slots... :?

User avatar
JeremyaFr
XWAU Member
Posts: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Dec 23, 2014 1:11 am

Hello,
By placing a hook before a mission is loaded, it could be possible to replace the slots for that mission.

:idea: BTW, by placing a hook after a skirmish mission is generated, it could be possible to add the starfield backdrops.

User avatar
DTM
Fleet Admiral (Administrator)
Posts: 2119
Joined: Tue Apr 22, 2003 11:01 pm
Contact:

Post by DTM » Tue Dec 23, 2014 8:03 am

OFF TOPIC

Backdrops in skirmish missions are generated automatically by the game's engine using a mission.tie file. This file rules the skirmish stats of the backdrops (position, size, brightness and color of the light). Even if it could be possible to hook a craft with a backdrop, you need to regulate exactly the other parameters...is it possible?

Speaking about the possibility to hook an opt before a campaign mission.
Athmosferic missions need different opts to create the landscape. More detailed landscape needs different opts. As example, Naboo requires a minimal number of 4 different opts. It means that 4 slots must be reserved only to have Naboo. If you want to create a campaign with athmosperic mission, you need to edit the slots to add the objects. If you want to have Naboo, Hoth and Mustafar, you need a minimal number of 6 slots reserved for the landscape; adding buildings requires more slots...ergo, too many slots reserved only to have landscape mission. That's discouraging!!!
If it could be possible to hook the landscape opts to existing slots, than would be easy to create a custom mission without editing the slots and to use as many opts are required to create a detailed landscape. I think that a number of 10 hooks (10 containers or stations that can be replaced) could be sufficient to have a very good landscape.

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Tue Dec 23, 2014 9:26 am

DTM, that's great idea... temporarily using new opt files to inherit the craft slots and their attributes for any given mission. Multiple instances of a class objects. :-)
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Thu Dec 25, 2014 8:06 pm

* Edit: Post now outdated and removed.
Last edited by Bman on Sat Feb 14, 2015 7:47 am, edited 1 time in total.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

baggy101
Cadet 2nd Class
Posts: 72
Joined: Mon Feb 02, 2015 9:32 am

Post by baggy101 » Mon Feb 02, 2015 10:33 am

Hi everybody, does anyone else get the underside of a star destroyer appear outside the hanger, and the azzermeen base hanger




I've sorted it no worries

User avatar
JeremyaFr
XWAU Member
Posts: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Feb 08, 2015 11:23 pm

UPDATE
I have split the hook into several dlls.

There is now:
  • dinput.dll
  • hook_hangars.dll
dinput.dll is the dll called by the exe modifications. It will call the hook_*.dll.
The list of the hook dlls is defined in dinput_hooks.lst.

hook_hangars.dll contains the hooks for the hangar.

To make it easier to apply patches, the zip contains a new GUI tool:
XwaExePatcher_Hangar.png
You do not have the required permissions to view the files attached to this post.
Last edited by JeremyaFr on Tue Feb 10, 2015 9:15 pm, edited 1 time in total.

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Mon Feb 09, 2015 2:11 am

Excellent! :-)
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
JeremyaFr
XWAU Member
Posts: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Feb 13, 2015 11:52 pm

UPDATE
  • Add FamHangarMap.txt
  • Add hook_hangars.cfg
  • Modify 'Hangar or FamilyBase' modifications
- FamHangarMap

Suppose that the mission is "MissionDir\Mission.tie".
Suppose that the arrival craft is "FlightModels\Model.opt".

Apply to family base:
To set the family hangar map, create a file named "FlightModels\ModelFamHangarMap.txt" or "MissionDir\Mission_FamHangarMap.txt".
The dll searches a "FamHangarMap.txt" file in this order (from first to last):
- "MissionDir\Mission_FamHangarMap.txt"
- "FlightModels\ModelFamHangarMap.txt"
- "FlightModels\FamHangarMap.txt"
If a "FamHangarMap.txt" file doesn't exist, default values are used.
The file must contain at least 4 object line.
The format is : model index, position X, position Y, position Z, heading XY, heading Z.
The numbers can be written in decimal or hexadecimal (0x) notation.
When position Z is set to 0x7FFFFFFF, this means that the object stands at the ground.
See "FamHangarMap.txt".

- Exe Modifications

I have replaced the 'Hangar or FamilyBase' modifications with hooks. You no longer have to choose between A) or B). This choice is now editable in a config file.

Code: Select all

# To call the hook that selects the hangar type
At offset 17DF97, replace 390C858E2AAE000F92C2 with 50E8939F02008AD05890.

# To call the hook that selects the inside animation
At offset 89AF, replace 663D8700740A663D9400 with 50E87BF5190085C05890.

# To call the hook that selects the hangar model index
At offset 5737A, replace 663D8700740F663D9400 with 50E8B00B150085C05890.
- Config file

The SelectionMode option determines how a hangar is selected.
The possible values are:
- ForceHangar
- BasedOnModelIndex
- BasedOnModelIndexAzzameenCampaign

The default value is BasedOnModelIndexAzzameenCampaign

When SelectionMode = ForceHangar:

Code: Select all

hangar = Hangar
When SelectionMode = BasedOnModelIndex:

Code: Select all

if mission type is family
  hangar = FamilyBase
else
  hangar = Hangar
endif
When SelectionMode = BasedOnModelIndexAzzameenCampaign:

Code: Select all

if mission type is family and mission id < 7
  hangar = FamilyBase
else
  hangar = Hangar
endif
Last edited by JeremyaFr on Sat Feb 14, 2015 8:09 pm, edited 1 time in total.

Post Reply