Custom Hangars

Need help editing the game? Check for help here!

Moderators: Darksaber, General_Trageton, Forceflow

Re: Custom Hangars

JeremyaFr
Lieutenant JG
XWAU Member
Posts: 624
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.

Bman
Ensign
Posts: 432
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Sat Feb 14, 2015 8:53 am

Great job Jeremy. Thanks for the FamHangarMap Objects solution. We've been stuck on that with just limited objects available.

Regarding the new Config File.... keep in mind, the game engine REQUIRES that the first 7 mission.tie files be globally defined as "Family/Hangar Type" mission, or it would be unplayable when you click on RD2 droid image in the crew cabin. Nothing happen. When you leave the commander briefing screen and go to the sitting hangar, the game engine automatically loaded the contents of "FamilyBase.opt" model regardless of which capitalship or station the player "arrives/departs by" as defined in mission editor like AllIiED.
This applies to third default option: When SelectionMode = BasedOnModelIndexAzzameenCampaign.
The second option: When SelectionMode = BasedOnModelIndex, is the same, but means that any mission file #8 and after is true if it is globally defined as a "family/hangar type" mission. This setting is found in "Missions Parameter" icon screen of AlliED and from the Mission Type / Hangar drop down menu: [ Family (FamilyBase) ].
Last edited by Bman on Sun Jun 21, 2015 2:38 am, edited 1 time in total.

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 9201
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sat Feb 14, 2015 3:15 pm

I discovered a crashing when I installed the new Hangar Hook stuff

I wasn't sure if it was something I had done while installing the UCP, so I started with a vanilla install of XWA from disc, below are the only modifications I've added.

Installed the latest xwa_hook_main, applied the offset with your patcher, start the game enter the mission = No Crash
Installed the lastest xwa_hook_d3dinfos_textures, applied the offsets with your patcher, start the game enter the mission = No Crash
Last but no least
Installed the latest xwa_hook_hangars, applied the offset with your patcher, started the game entered a mission and it crashed :(

I tested all 3 modifications with the same mission B0M1, and just to check tested a few other missions

B0M1
B0M2
B0M3
B0M4
B0M5

Same result Started the mission, lifted off, came to a dead stop, pressed "/" and "*" on the keypad to view the craft from the outside, started moving my joystick around to do a 360 view and it crashes, to be sure all above are family base missions

So I've just test a couple of random missions

B2M3
B3M4
B4M5
B5M2

Same conditions, same result within seconds the game crashed :(

What I have applied with the xwa_hook_hangars patcher is everything, now correct me if I'm wrong, should I have applied every offset?

Also as I understand it, I don't have to add any of the *.txt files in the Flightmodels or Missions folder, everything should revert to default settings, correct?

Here is the crash report

Log Name: Application
Source: Application Error
Date: 14/02/2015 14:32:06
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Description:
Faulting application name: XWingAlliance.exe, version: 2.0.0.2, time stamp: 0x3765a9b7
Faulting module name: XWingAlliance.exe, version: 2.0.0.2, time stamp: 0x3765a9b7
Exception code: 0xc0000005
Fault offset: 0x000a2fba
Faulting process id: 0x1260
Faulting application start time: 0x01d04862eda55e98
Faulting application path: C:Program Files (x86)LucasArtsX-Wing AllianceXWingAlliance.exe
Faulting module path: C:Program Files (x86)LucasArtsX-Wing AllianceXWingAlliance.exe
Report Id: 3f74e14a-b456-11e4-bc91-001d7d002f67
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2015-02-14T14:32:06.000000000Z" />
<EventRecordID>84362</EventRecordID>
<Channel>Application</Channel>
<Computer>DarkW7</Computer>
<Security />
</System>
<EventData>
<Data>XWingAlliance.exe</Data>
<Data>2.0.0.2</Data>
<Data>3765a9b7</Data>
<Data>XWingAlliance.exe</Data>
<Data>2.0.0.2</Data>
<Data>3765a9b7</Data>
<Data>c0000005</Data>
<Data>000a2fba</Data>
<Data>1260</Data>
<Data>01d04862eda55e98</Data>
<Data>C:Program Files (x86)LucasArtsX-Wing AllianceXWingAlliance.exe</Data>
<Data>C:Program Files (x86)LucasArtsX-Wing AllianceXWingAlliance.exe</Data>
<Data>3f74e14a-b456-11e4-bc91-001d7d002f67</Data>
</EventData>
</Event>

Crash report 2

Log Name: Application
Source: Application Error
Date: 14/02/2015 15:13:04
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Description:
Faulting application name: XWingAlliance.exe, version: 2.0.0.2, time stamp: 0x3765a9b7
Faulting module name: XWingAlliance.exe, version: 2.0.0.2, time stamp: 0x3765a9b7
Exception code: 0xc0000005
Fault offset: 0x000a2fba
Faulting process id: 0x11f8
Faulting application start time: 0x01d04868a892f78c
Faulting application path: C:Program Files (x86)LucasArtsX-Wing AllianceXWingAlliance.exe
Faulting module path: C:Program Files (x86)LucasArtsX-Wing AllianceXWingAlliance.exe
Report Id: f8d8feaf-b45b-11e4-bc91-001d7d002f67
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2015-02-14T15:13:04.000000000Z" />
<EventRecordID>84378</EventRecordID>
<Channel>Application</Channel>
<Computer>DarkW7</Computer>
<Security />
</System>
<EventData>
<Data>XWingAlliance.exe</Data>
<Data>2.0.0.2</Data>
<Data>3765a9b7</Data>
<Data>XWingAlliance.exe</Data>
<Data>2.0.0.2</Data>
<Data>3765a9b7</Data>
<Data>c0000005</Data>
<Data>000a2fba</Data>
<Data>11f8</Data>
<Data>01d04868a892f78c</Data>
<Data>C:Program Files (x86)LucasArtsX-Wing AllianceXWingAlliance.exe</Data>
<Data>C:Program Files (x86)LucasArtsX-Wing AllianceXWingAlliance.exe</Data>
<Data>f8d8feaf-b45b-11e4-bc91-001d7d002f67</Data>
</EventData>
</Event>
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

JeremyaFr
Lieutenant JG
XWAU Member
Posts: 624
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Feb 14, 2015 8:08 pm

Thanks for reporting this crash.
I've fixed it.
Please redownload both xwa_hook_main and xwa_hook_hangars.

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 9201
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sat Feb 14, 2015 9:39 pm

Thanks for the fast response
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

Bman
Ensign
Posts: 432
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Sun Feb 15, 2015 6:45 am

Jeremy, it's not quite working ... at least under XP Pro platform. I"m getting a Dinput.dll dialog box at the start that says something like "...hook file not properly initialized or installed ...". I'm pretty sure I have everything in right places. Has any offsets changed compared to prior .dll versions ? Thanks.

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 9201
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sun Feb 15, 2015 9:45 am

Check and double check mate, you've definitely missed something, check your dates with the dll files either 13th or 14th
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

JeremyaFr
Lieutenant JG
XWAU Member
Posts: 624
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Feb 15, 2015 6:36 pm

Bman wrote:Has any offsets changed compared to prior .dll versions ?
Yes. The modifications for dinput and the new hooks have changed. That's why you get the error message.

Bman
Ensign
Posts: 432
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Mon Feb 16, 2015 3:45 am

Working again. Thank you.

rogue518
Lieutenant Commander
Posts: 1974
Joined: Wed Jul 12, 2000 11:01 pm
Contact:

Post by rogue518 » Tue Mar 17, 2015 2:30 pm

Hello Jeremyafr ,Darksaber, Corrann and Bman.... Not everyone is tech savvy as you bunch..... ;) DTM's Super Backdrop no brainer, but custom hangers?, a little more complex. Not that I'm complaining.. :D Can you put this in English ?

Darksaber thanks for the tip regarding Hex Editor Neo

Darksaber wrote:
quite easy to use, when install load the xwingalliance.exe (make a backup first) file menu at the top click Edit the click Go to Offset

it will open a box

look at the readme file,
My advise would be to Ignore A) and start at B) you can't use both sets

you will see that JeremyFr has written At offset 89B3

Now visualise all the offset like so 0x0089B3 type this into the box and click ok it will take you to the correct offset, now edit the values
See I understood that portion... my problem is I kind of need a step- by - step instructions on how to do something.


Bman wrote:

Jeremy, a programming question for you.
Suppose for Battle3 (Rebel type missions), I use a capital starship such as "CalamariReefHome.opt" as the player's "arrival by/depart by"
command ship for most of all mission.tie files of Battle3.
Then, for the "CalamariReefHomeHangarObjects.txt" file say I have following entries saved like this:
==========================================================
Flightmodels\Ywing.opt = Flightmodels\Preybirdfighter.opt
Flightmodels\Xwing.opt = Flightmodels\Twing.opt
Flightmodels\Cargocanister.opt = Flightmodels\StormtrooperTransport.opt
Flightmodels\Shuttle.opt = Flightmodels\EscortShuttle.opt
============================================================
This static text file would remain as is from one mission to the next.

But... what if one wanted to change the display of objects inside this same hangar for any other particular mission without exiting the game and manually editing the text file? Are dynamic text files possible based on (indexed to) say the mission number appended to end of a file name, if used?

Assume Flightmodels\"CalamariReefHomeHangarObjects.txt" is the default arrangement.
Now, here is example of the partial contents of mission.lst file:
See I understood this also, my point I need a reference point to start also, where can I get blank PLT files to start this process from what I saw what Corrann have.

Corrann wrote:

EDIT: HMM
Screenshot of files https://www.dropbox.com/s/b1d331jgiarz4 ... 3.png?dl=0

ImperialStarDestroyer.opt
ImperialStarDestroyerHangar.opt
ImperialStarDestroyerHangar.txt
ImperialStarDestroyerHangarObjects.txt

Loads default hangar...

Am I missing something?

Dropped the DLL into root XWA folder, copied text files into FlightModels folder, and then put in ISD hangar opt, copied and renamed the txt files to the above. Set the ISD to the arrival and departure method for the missileboat I have in my mission, then load up XWA. BAM default hangar.

I have Visual C++ Redistributable Packages for Visual Studio 2013: vcredist_x86.exe And Windows 7.

I also have DSUCP installed prior to adding the dll.

I don't get why this isn't working
User avatar
Corrann Horn Lieutenant Posts: 891Joined: 22 Oct 2003 11:01 pmLocation: Moscow, ID


I understood that also I think you're are getting my point. I know that what you talking about has to do with a lot of coding which is great but a step by step process would be helpful. Within the last few months XWAUP tech members have made fantastic upgrades to the game... thanks.

Also at least I have the guts to ask about something I don't understand, but is willing to learn. You have no idea how many custom missions I have and I have to manually put DTM's awesome Super Backdrop star field in.. until the new Allied wiith updated galaxies, nebula etc.. comes out (if it does) I am happy putting them in. and loving it!! They look AWESOME. But I understand the process. ;)

sincerely, Rogue518
'Stay in Attack formation!' Darth Vader aka: Anakin Skywalker During the 'Battle Of Yavin'

User avatar
DARoot
Cadet 3rd Class
Posts: 38
Joined: Sun May 17, 2009 11:08 pm

Post by DARoot » Tue Mar 17, 2015 9:26 pm

Greetings, Rogue518

I'll try to help, while you are waiting for someone more astute to provide a "step-by-step" explanation.
For now, perhaps some of this info may be of use to you --

1. Download and install JeremyFr's latest "patch" files (using the updated links on the beginning pages of this thread), and install them all, in order. (the two for hangars, and the 1 for "general fixes").
They cannot (right now) be combined, so you must do each "patch" operation on your "XWingAlliance.exe" one at a time, in order ("general fixes," then "hangar_main," then "hangar_custom").

2. READ the READMEs! They will always guide you in the right direction. JeremyFr's will not let you down.

3. You should now have your "XWingAlliance.exe" ready to accept, and properly process, your custom hangar .txt files.
(You get "samples" installed automatically, but YOU must make, and re-name, your own text files, like the ReadMe says).

4. Remember, this Forum Thread is discussing "apples and oranges" -- changing your .exe file manually (via hexediting) AND/OR letting JeremyFr's "patch" programs do that for you automatically.
Since those currently available do work well, it is much, much easier on you, the End-User, to use the "auto-patchers."
The rest of the discussion here is for the computer-savvy (or those, like yourself, who WANT to learn more), to explain WHAT the patchers do, and WHY they work.

5. When everything is working correctly, the big thing to remember is -- "Mission-Specific" custom hangars trump "Craft-Specific" custom hangars, and either trumps "None" (or "Default") hangar parameters.
[I have not played with the "Family Hangar" parameters, yet. But, if you follow the instructions in the ReadMe, you should do OK.]

6. Use DTM's provided "starfield" Flight Group Library to add the new starfield backdrops to your (many) existing custom mission. DTM made it as easy as possible for us, by including that little extra file.

7. The XWA game engine will create a "blank" (e.g., beginner) PLT file for you every time you create a new Pilot.
However, he/she will start off with the Azzameen Family missions at 1B0M1FW.tie.
To access your CUSTOM missions (e.g., in 1B8xx and above), you may need a "ringer" PLT who has already completed the first 7 "Battles."
There are many available, provided with different "shipset" or "total conversion" XWA mods.
Or, you can use a program such as "XWA Piloteer" to edit the stats/"experience" of one of your existing pilots.
(I use one called "AdmiralXpilot.plt" that has never failed me, but I forget where I got it. DTM's "Rebellion 1" shipset includes a good one, and there are others in the single custom mission files "ImpSpecOpsv12", "XWA_pilot21_ing" and
"xwa_semagteaser", all available on Jefe Picaro's site).

Happy Gaming!
:D
DARoot
Be yourself. Everyone else is already taken ...

rogue518
Lieutenant Commander
Posts: 1974
Joined: Wed Jul 12, 2000 11:01 pm
Contact:

Post by rogue518 » Wed Mar 18, 2015 1:47 am

Thanks for answering, ok... what are you saying? I know you mean well... all I am interested in is what process do you do to put in 'custom hangers'. So are you saying I download the xwa_hook_main and xwa_hook_hangers the 'main' is for the fixes and the 'hangar' is for the custom hangars?.

Ok I download both I put what in the 'main' (which consist dinput.dll and dinput_hooks) in the XwaExePatcher?

Then I put in the XwingAlliance.exe in the XwaExePatcher? then do what? :?


Ok now for the xwa_hook_hangars: I download, I add the hook_hangars cfg file and hook_hangar.dll put them in the XwaExePatcher folder add the XwingAlliance.exe then what? XwaExePatcher has all these options will crash the XwingAlliance.exe if I don't know what I am doing. All I am trying to do is have an Imperial hangar for Imperial Starships Thanks for your help.. DaRoot I am not frustrated... this is more a mystery to me.... ;)

Sincerely Rogue518,
'Stay in Attack formation!' Darth Vader aka: Anakin Skywalker During the 'Battle Of Yavin'

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 9201
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Wed Mar 18, 2015 4:10 pm

First DARoot my nickname is and has always been Darksaber not Darth Saber, Dark Saber or Darksabre, OK!

Also you remind me of someone, the older members of this forum my remember who I'm talking about, I don't know if your familiar with the name "BRL" but you remind me a lot of him!

Rogue you've come to the same conclusion I did with DARoots first post, that its a load of gibberish, most of what he wrote you already know, the rest is just utter garbage.

DARoots post above is way too long winded and only applies if you want to start from scratch, so I wouldn't bother reading that either if you want a quick solution.

---------------------------------------------------------------------------------------------------

Ok Rogue, I take it you have either the XWAUCP or DSUCP installed, (if not, why not lol :) ) installing either of these install everything you need, they patch the exe with all of Jeremy's offsets, install all the new dll, cfg and lst files to do with the Hangar stuff, this applies to both Disc and GOG versions

Basically I've done everything you need to get started, so it only leaves creating or editing the text files.

If you look in your flightmodels folder you will see these new *.txt files installed along with a few others

FamHangarCamera-Example.txt
FamHangarMap-Example.txt
HangarCamera-Example.txt
HangarMap-Example.txt
HangarObjects-Example.txt
PlayerCamera-Example.txt

Along with

HangarCamera.txt
HangarMap.txt
HangarObjects.txt

The Example files are Jeremy's original files to get you started

If you have installed the DSUCP, you have 3 options of Hangar to install. The Rebel Hangar, The Imperial Hangar or The Death Star Hangar depending which option you selected will depend on the final look of the hangar.

If you've installed either the Imperial hangar or DS hangar you will see that the rebel fighters have been replaced with the Imperial fighters.
Of course the Rebel hangar remains as rebel with a few tweaks :)

If you read this post it may become clearer

I'll try to put something together regarding the editing of the text files but if you compare the text files with the examples it may just click :)

If you have any question Rogue please PM me :)
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

rogue518
Lieutenant Commander
Posts: 1974
Joined: Wed Jul 12, 2000 11:01 pm
Contact:

Post by rogue518 » Wed Mar 18, 2015 4:56 pm

Thanks.... Darksaber I will.... ;) You Too DaRoot thanks for your help also...... ;) I have to agree with Darksaber... your endless writing do reminding us of an old annoyance..... :curse:


Edit: Thanks Darksaber... I have best of both worlds now (Rebel Hangar and Imperial Hangar) ;)

To be honest I am quite embarrass, I thought is was more complicated than what it was. :blush12: I see what you mean regarding JeremyaFa hangar.txt files... very important!! What I did was copied my Flight Model folder and made a Rebel Flight Model Folder, made a separate Rebel Hangar Folder. Reinstalled XWA using DSCUP 2.2 with Imperial Hangar. Made a Imperial Flight Model Folder and Imperial Hangar Folder. Reinstalled XWA using DSCUP 2.2 using Rebel Hangar... installed Imperial Hangar opts. When I want to use rebel hangar I put in from Rebel Hangar Folder (HangarCamera.txt, HangarMap.txt, and HangarObjects.txt last but not least... Hangar.opt (Rebel).

When I want to have a Imperial hangar, I install Imperial Hangar opts ( ImpHangarCraneATST.opt..etc. in all 8 opts) made a separate Imperial Hangar folder ( (HangarCamera.txt, HangarMap.txt, and HangarObjects.txt and also Hangar.opt (Imperial) Imperial Hangar.opt is different from the rebel hangar.opt. Just switch those 4 files (HangarCamera.txt, HangarMap.txt, and HangarObjects.txt, Hangar.opt) and I have my basic Rebel or Imperial Hangar...Thanks again..... :D Also thank you JeremyaFr!!!!

Update: Darksaber, re-read the page you were referring to... :D now I am able to have a rebel hangar (with rebel craft) or a imperial hangar (with imperial craft) without switching hangars. :D (as shown from Bman's pic's on the first page of this post)

Re-Edit I've done it!!!! I always wanted a Rebel Hangar (for rebel starfighters and craft) and a Imperial Hangar ( for Imperial starfighters and Craft) this is what I did:

The Rebel Hangar(or standard hangar opt the was in the game) is 1,278 kb, but the Imperial hangar is 5,405 kb !
So I had a hunch... what I did was add the Imperial Hangar and called it ImpHangar.opt to my FlightModels folder, changed the standard Hangar.opt (which was just called Hangar.opt or rebel hangar) to ImpHangar.opt which is the Imperial Hangar, for Imperial Starships. Added this line to my ImperialStarDestroyerHangarObjects.txt and ImperialStarDestroyer2HangarObjects.txt, should look like this:

=====================================================================

FlightModels\Hangar.opt = FlightModels\ImpHangar.opt
FlightModels\TieFighter.opt = FlightModels\TieFighterExterior.opt
FlightModels\TieInterceptor.opt = FlightModels\TieInterceptorExterior.opt
FlightModels\Shuttle.opt = FlightModels\EscortShuttle.opt
FlightModels\TieBomber.opt = FlightModels\TieBomberExterior.opt
FlightModels\AssaultGunboat.opt = FlightModels\ImpHangarGunboat.opt
FlightModels\HangarCrane.opt = FlightModels\ImpHangarCraneATST.opt
FlightModels\HangarRoofCrane.opt = FlightModels\ImpHangarRoofCrane.opt
FlightModels\MissileBoat.opt = FlightModels\MissileBoatExterior.opt
FlightModels\SkiprayBlastBoat.opt = FlightModels\ImpHangarSkipray.opt
FlightModels\HangarMonitor.opt = FlightModels\ImpHangarMonitor.opt
FlightModels\HangarWorkStand.opt = FlightModels\ImpHangarWorkStand.opt
FlightModels\HangarDroid2.opt = FlightModels\ImpHangarDroid2Probe.opt
FlightModels\HangarDroid.opt = FlightModels\ImpHangarDroidMouse.opt

=====================================================================

and it worked!! ;) Now I really have Rebel Hangar's (for Rebel Starships) and Imperial Hangar's ( for Imperial Starships)!, without switching files.

Like you said Darksaber... the work was already done for me.. all I had to do was read! ;)

Again.. Thanks Darksaber, JeremyaFr and Bman (because of thoses pics on the first page of this post...)
'Stay in Attack formation!' Darth Vader aka: Anakin Skywalker During the 'Battle Of Yavin'

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 9201
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sun Mar 22, 2015 3:36 pm

You got it mate :) well done, it seems a bit overwhelming at first, but at some point, reading it just clicks and you understand :D
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

rogue518
Lieutenant Commander
Posts: 1974
Joined: Wed Jul 12, 2000 11:01 pm
Contact:

Post by rogue518 » Sun Mar 22, 2015 11:29 pm

Thanks...... Darksaber :D
'Stay in Attack formation!' Darth Vader aka: Anakin Skywalker During the 'Battle Of Yavin'

JeremyaFr
Lieutenant JG
XWAU Member
Posts: 624
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Jun 21, 2015 8:46 pm

Hello,

Here is a few thoughts:
The total number of objects is limited. It may be related to the number of crafts (192).
In the objects table, there is a flag indicating whether an object is reloaded each time a mission is launched. It may cause problems.
When the mission type is family, the loaded hangar is "FamilyBase.opt": you can replace it in "HangarObjects.txt".
Last edited by JeremyaFr on Tue Jun 23, 2015 7:53 pm, edited 1 time in total.

Bman
Ensign
Posts: 432
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Tue Jun 23, 2015 8:16 am

Hi Jeremy, thanks for reply. My findings... I thought for FamilyBase Type missions (1 through 7), the HangarObject.txt file was limited to replacing only the default models listed in FamHangarMap.txt file. And adding existing indexed models to FamHangarMap.txt is fine. Turns out none of that was the problem. I discovered I had a corrupted model that was crashing the game, fixed it, and all runs great now. I removed my above post. Thanks!

JeremyaFr
Lieutenant JG
XWAU Member
Posts: 624
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Jun 23, 2015 7:52 pm

Hi Bman,
Glad to read that the crash was not related to the hangars hook.

"HangarObjects.txt" is applied right before the game engine load an OPT model. So it applied to to default objects as well as objects inserted via "HangarMap.txt" or "FamHangarMap.txt".

JeremyaFr
Lieutenant JG
XWAU Member
Posts: 624
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed Oct 07, 2015 7:31 pm

Hello,

I've published the source code of the hooks:
https://github.com/JeremyAnsel/xwa_hooks

User avatar
Atx
Lieutenant Commander
Posts: 1213
Joined: Mon Feb 11, 2002 12:01 am

Post by Atx » Sat Oct 10, 2015 5:30 pm

Good stuff...again what you are doing is really appeciated and it shows in the enthusiasm on these boards...Good to see the gang giving their inner-man-child a great big XWA hug! :)
The Navbuoy is closed...long live the XWAU!!!

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 9201
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Thu Feb 23, 2017 11:08 pm

Hi Jeremy,

I've got this problem, I'm not sure if this can be solved with the Hangar Hook, it's to do with the Player Craft in the hangar, usually player are close to the ground like this X-wing
svdeck5.jpg
svdeck5.jpg (72.75 KiB) Viewed 2813 times
You see the distance between the bottom of the craft and the hangar floor is a minimal distance but......

When I have the StarViper as a Player craft the distance between the bottom of the craft and the Hangar floor is massive
as you can see
svdeck1.jpg
svdeck1.jpg (84.62 KiB) Viewed 2813 times
svdeck2.jpg
svdeck2.jpg (83.99 KiB) Viewed 2813 times
Normally without the SFoils Hook the StarViper would look like this
svdeck4.jpg
svdeck4.jpg (70.88 KiB) Viewed 2813 times
But with the SFoils Hook thankfully it now looks like this, but the distance between the bottom of the craft and the hangar floor, it just looks wrong :(
svdeck3.jpg
svdeck3.jpg (70.29 KiB) Viewed 2813 times
I don't really want to alter the Opt, what I could do is lower the centre point of the craft so in the hangar it would be lower to the floor, but ingame the centrepoint would be wrong, if viewing the exterior of the craft it would be below the screen which I don't want, I would like the centre of the craft to remain at 0,0,0.

Now I'm not sure if I'm missing something with the Hangar Hook and the HangarMap.txt, it's been a while since I altered them, but if I remember rightly you can't alter the distance of the player craft from the hangar floor, please correct me if I'm wrong. :)

So I was wondering if there is a offset that can be altered for the player craft floor to craft distance.

There must be something, because the B-wing would remain upright in the hangar.

So Jeremy would you please be so kind as to look into this, to see if it's possible please

Like I said it might be something I've missed, not sure

Thanks in advance :)
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

JeremyaFr
Lieutenant JG
XWAU Member
Posts: 624
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Feb 24, 2017 3:20 pm

Hello,

UPDATE
Now, you can set the craft elevation in the hangar.

To set the elevation of the craft with closed S-Foils, create a file named "FlightModels[Player]Size.txt".
If a such file file doesn't exist for a model, default values are used:
if the craft is BWing, elevation = 50, else elevation = model height / 2.
The format is:
"ClosedSFoilsElevation = value"

Example for BWing: BWingSize.txt

Code: Select all

ClosedSFoilsElevation = 50
Exe modifications:

Code: Select all

# To call the hook that sets the craft elevation:
At offset 61A49, replace 83F804740F50E8CC310200 with 50E8E164140083C404C390.
At offset 55183, replace 83F804741C50E892FA0200 with 50E8B7C8000083C404EB1B.
At offset 562F4, replace 83F804741050E821E90200 with 50E846B7000083C404EB0F.
At offset 5AF8C, replace 83F804741650E8899C0200 with 50E8AE6A000083C404EB15.
At offset 5B203, replace 83F804741650E8129A0200 with 50E83768000083C404EB15.
At offset 5B350, replace 83F804741650E8C5980200 with 50E8EA66000083C404EB15.
At offset 5BDA4, replace 83F804741050E8718E0200 with 50E8965C000083C404EB0F.
Please redownload the xwa_hook_hangars.zip from the first post at the top of the first page

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 9201
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Fri Feb 24, 2017 3:31 pm

Wow, I'm really amazed and impressed, in less than 24 hour you've solve our problem, Thank you so much your a legend Jeremy :)

Works brilliantly Thanks
svdeck6.jpg
svdeck6.jpg (52.31 KiB) Viewed 2769 times
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

Rookie_One1
Lieutenant Commander
Rebel Alliance
Posts: 1197
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » Sat Feb 25, 2017 8:29 am

That was fast!
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

Post Reply