Custom Hangars

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

Moderator: JeremyaFr

Post Reply

Re: Custom Hangars

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

Post by Bman » Sun Feb 26, 2017 6:01 am

Thank you Jeremy! Great job. Two more questions about this...

1) Does this update allow for elevation adjustments if the player uses other craft without S-Foil (RotaryWing) meshes ?
For example, if using the StormtrooperTransport, and Assault Transport as flyable, (assume cockpits were created).

2) Can the player's craft be manually elevated so it can start high above (or even below) the hangar floor and return to the same position
when the mission is over ? This could have huge implications for designing types of hangar bays and layouts of objects. :D
W-I-P: ISD-II, XQ-1 Platform1, (Imp) Escort Carrier, Misc, & TFTC.

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

Post by JeremyaFr » Mon Feb 27, 2017 1:41 pm

Hello,

1) yes
2) I think yes

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

Post by JeremyaFr » Mon Nov 06, 2017 2:14 pm

Hello,
Here is a tool to edit *HangarMap.txt files:
XwaHangarMapEditor.jpg
XwaHangarMapEditor.zip
You do not have the required permissions to view the files attached to this post.
Last edited by JeremyaFr on Sat Feb 03, 2018 8:07 pm, edited 1 time in total.

User avatar
Marcos_Edson
XWAU Member
Posts: 2153
Joined: Fri Jan 14, 2000 12:01 am
Contact:

Post by Marcos_Edson » Fri Nov 10, 2017 12:59 pm

Wow! Great job, you are a Legend!!! :shock:
SETI
"There can be only one..."
"I'm an otaku! Have a problem with that?"

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

Post by Driftwood » Sat Nov 11, 2017 3:57 am

OMFG EPIC!

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

Post by Bman » Sat Nov 11, 2017 9:14 pm

Well done Jeremy. Thank you, thank you, thank you!!!! :-)
W-I-P: ISD-II, XQ-1 Platform1, (Imp) Escort Carrier, Misc, & TFTC.

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

Post by Driftwood » Mon Jan 22, 2018 12:35 am

So I've created appropriate txt files to correspond with the opt in question.
Platform2HangarCamera.txt
Platform2HangarMap.txt
Platform2HangarObjects.txt

Also edited the Platform2.opt to have the appropriate hardpoints related to the hangar functions. (Looked at Hangar/PirateShipyardHangar)
Deleted unneeded hardpoints
Saved as Platform2Hangar.opt

I've also scaled it up in blender to be as large (and re-positioned relative to the hangar.opt in blender) as the hangar.opt to avoid the player craft and shuttle clipping through the back wall. Otherwise the player craft clips through the back of the hangar and the animated shuttle is below deck.
I've also deleted the main station body and the other two pylons and associated meshes since they are not visible from the hangar.

And of course if I don't modify the model the clipping issue occurs, and I don't remember how to fix it via Txt file. At one point I could have sworn that one could do that using text file coordinate positioning so the desired hangar model itself didn't have to be modified. That said I haven't worked on hangars for ages, so my memory may be entirely offbase.

Another issue I ran into was after extracting to Obj and muddling around in blender, then re-importing into the opting tool, the textures (without converting back into 8bit) were not visible and appeared black ingame. I was under the impression that the 32 bit patch was enabled by default now, so I'm curious as to why I had to do this to be able to have the textures appear correctly.

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

Post by JeremyaFr » Sat Jan 27, 2018 4:32 pm

Corrann Horn wrote:Another issue I ran into was after extracting to Obj and muddling around in blender, then re-importing into the opting tool, the textures (without converting back into 8bit) were not visible and appeared black ingame. I was under the impression that the 32 bit patch was enabled by default now, so I'm curious as to why I had to do this to be able to have the textures appear correctly.
Hello,
I've updated XwaOptEditor (XwaOptEditor-1.0.15). Now, when a 8-bit texture is imported, it will remain in 8-bit instead of being converted to 32-bit.

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

Post by JeremyaFr » Sat Feb 03, 2018 5:39 pm

UPDATE
Hello,
You can now define which crafts appear in the craft selection menu. Instead of hard coded values, the crafts list can be read from a txt file.

To define the list of crafts that appear in the hangar crafts selection menu, create the following files (next to XWingAlliance.exe):
- "CraftSelectionTransports.txt"
- "CraftSelectionFighters.txt"
- "CraftSelectionCrafts.txt"
If the files don't exist, default values are used.
CraftSelectionTransports define the crafts that appear when the mission player craft is a transport.
CraftSelectionFighters define the crafts that appear when the mission player craft is a fighter.
CraftSelectionCrafts define the crafts that appear in the Proving Ground.

Please redownload xwa_hook_hangars.zip

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

Post by Driftwood » Sat Feb 03, 2018 6:02 pm

Yay! I presume this can be used on a per-mission basis?

Oh, and Jeremya I was wondering if it would be possible to update your hangar editor with the following functions:

1) When you change/add an opt position in the editor it doesn't reset the camera view to the default view
) As is, the view resets in the current version every time you make a change and gets super aggravating when you have to reset the camera view constantly to pick up where you left off with your change in the same loaded scene, even for a minor change. I've been designing hangars for a bit now, and honestly this is one of the biggest issues I have with the editor as I have to zoom back in every single time and re-adjust for every single change.

2) Can you add the ability to edit the coordinate parameters using keybinds of a selected opt within the scene?
) IE, X+L/R/U/D arrow rotates selected opt along the X axis
) IE, Y+L/R/U/D arrow rotates selected opt along the Y axis
) IE, Z+L/R/U/D arrow rotates selected opt along the Z axis

3) An option to rotate a given object by X number of degrees.
) That way you don't have to guess (at least I do since I don't know how the numbers define orientation) regarding rotation/movement of an object along whichever desired axis. I haven't figured out how 350355 indicates 90 degrees to the right (not a real number FYI), or how
) Somehow simplify the numbers down to like 0, 45, 90, 180, 270, 360 +/-

4) Within the hangar editor there are some opts with names, then there are large chunks that either are blank like say after MineC 221, which is a blank line with the opt indice 222, or after blank line 232 there's one that is named 4000, 0 233. Is it possible to have the editor pull the opt name from the flight model's folder? And/or what are these listed, but un-loadable objects?
) I am having the hangar editor pull from the entire flight model's folder for my available opts, which I presume is a default function, but it's not showing custom opts that aren't "installed" via either MXvTED, or DSCUP for example.
)Can the editor somehow load "uninstalled" opts that are within the flightmodels folder and be able to utilize them without having to use the text files to replace say a similarly sized opt for placement purposes, and then overriding it with the "uninstalled" opt? This would be especially useful in the event you wanted to use both in a hangar simultaneously.

And, unrelated to Jeremy's editor itself. I can not figure out where the rebel soldier is being generated from in the flightmodels folder for some reason. But for the civ/imperial hangars I'm working on where rebel soldiers don't make sense, or ones that you don't want people standing around it, it'd be nice to be able to replace it thematically in the text files. It's driving me nuts, I've opened every single opt related to the rebel hangar and I can't freaking find it.

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

Post by JeremyaFr » Sat Feb 03, 2018 8:12 pm

UPDATE
Hello,
I've updated XwaHangarMapEditor.
Now the camera is not reset when the map is modified.

User avatar
XDragon
Cadet 1st Class
Posts: 118
Joined: Tue Jan 29, 2008 12:01 am
Contact:

Post by XDragon » Tue Mar 20, 2018 9:18 pm

I'm a terrible Opt person...honestly never tried....since I lack artistic skill

How hard is it to make custom hangers for say a Strike Cruiser or other Imperial ships?
Founder of Z3R0 (Zero Command)
https://xdragon2688.wixsite.com/z3ro/

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

Post by Driftwood » Tue Mar 20, 2018 10:17 pm

If you modify the hangar from an existing model, it's not, you just have to match it up with the Calamari hangar xyz coordinate and add hard points, add props with the hangar editor, other relevant text files.

User avatar
XDragon
Cadet 1st Class
Posts: 118
Joined: Tue Jan 29, 2008 12:01 am
Contact:

Post by XDragon » Tue Mar 20, 2018 10:32 pm

So since the strike cruiser already has a hanger built into the exterior opt.. i assume I need to edit a mon cal hanger... or is it possible to copy assets from one hanger (ISD for example) to another?
Founder of Z3R0 (Zero Command)
https://xdragon2688.wixsite.com/z3ro/

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

Post by Driftwood » Thu Mar 22, 2018 3:03 am

1 No.
2 Yes, and no.

I'll explain when I have time this weekend the process I use to make hangars.

User avatar
XDragon
Cadet 1st Class
Posts: 118
Joined: Tue Jan 29, 2008 12:01 am
Contact:

Post by XDragon » Sat Mar 24, 2018 12:40 am

Sounds great Drift (aka Corran)
Founder of Z3R0 (Zero Command)
https://xdragon2688.wixsite.com/z3ro/

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

Post by Driftwood » Sat Mar 24, 2018 8:59 pm

Things you'll need if nobody else is putting out content, to paraphrase something DS has said time and time again over the years, "Want something done learn how to do it yourself!"

1. 3d modelling software. It's expensive, for example 3ds max is something like 189 bucks a month for a subscription. Not realistic as it does not pertain to my job.
I recommend Blender, it gets updated frequently. While not intuitive in the least, and I myself have spent years trying to get even a basic grasp of it, it is powerful, modifiable, covers many 3d formats, and is best of all, free.

2. Photo editing software. Adobe Photoshop is one of the best, but again, like 3ds max is super expensive and I can't afford it. One cheaper program I opted for was CorelPaintShop Pro x5 (they're up to x8+ now), as it was only 50-60 bucks on sale at the time. Alternatively there is always GIMP, like Blender, it's not super intiutive, and the older versions I've used the floating undocked windows are a huge pain and not very intuitive. But like blender it's free, updated frequently, and can do most if not all the more expensive programs can do.

3. Optech, or Jeremy's XWA opt editor. I personally prefer the latter as I have had zero luck historically with Optech, for whatever reason.

4. Patience and either a surplus of time to get good fast, or spend the better part of a decade figuring out how these programs work, and how an opt goes together. (I still maintain I barely know how myself)

Okay. So realistically my modelling skills are poop. I'm a novice. Scratch building has never been my forte in any medium, but using various existing components of other things, I have been able to make new things. Legos have always yielded good results for me historically, and I've found I am better at modifying existing assets than creating from scratch when it comes to computer based art or code work. That said, I'm branching more into scratch modelling and texturing as I gain familiarity with the tools, and my latest project that have yielded results has both increased my familiarity with the Opt creation related tools, a very basic understanding of how a 3d model goes together, and what limitations are involved in the process.\

Point of reference, my first "opt" was the Z98 "Corsair" I mashed together in Optech accidentally by loading both ships into the same file. Then DTM for some reason actually liked the concept, and made a better version using my concept as inspiration. Incidentally, the similarity to it and the ARC-170 is kind of hillarious, but I don't recall if ATOTC was out at that point.

Disclaimer aside on my abilities, I'm going to jump into things.

This is my process.

1. Decide what hangar to make. This usually is spawned by either boredom, or incidental to a mission arc I'll likely never finish, let alone start.

We'll use the Strike Cruiser for this example. Technically you could probably get away with cloning the Calamari Hangar since it's similar, but I just noticed that it is in fact significantly more different now that I actually examine it.

2. Ensure that the Original optname.opt is in a folder within whatever your project folder hierarchy is. IE Blender Working files > (Optname) Hangar > Optname.opt.
2a. Load up XWA opt editor, import the opt, and then immediately export it as an .obj file.
2c. All your textures and the new .obj and .mtl file should be in that folder you set up.
Note: if you fail to isolate your files you will conflict with any other projects you are working on by either overwriting files each extract, or simply have no sense of organization.

3. Now that that is done, load up Blender.
3a. Import your optname.obj file.
3b. Find out what is visible from inside the hangar, and what you would expect from the out looking in camera angle.
3c. Delete all non-visible meshes from the original opt.

4. Go through step 2 with the CalamariHangar opt, ie Hangar.opt

5. Import the Hangar.opt into your blender instance that has your modified opt open.
5a. check to ensure that the opt you are modifying has the relevant parts of the model, such as hangar opening if relevant, and especially the floor and back wall aligned roughly with the calamari hangar you've imported.
Note: This may require resizing, or relocating your model relative to the calamari hangar; do not relocate the calamari hangar relative to your modified opt, it won't go well for you when your player craft is behind the wall.
Screenshot 2018-03-24 13.41.16.png
Also note that it isn't necessarily relevant to have the hangar opt be identical to the parent ship dimensions since you only ever see it in an isolated environment. My general rule of thumb, is that it has to look good and have no clipping. Depending on the size of the ship though you will have to take into consideration what kind of ships you intend to put in there, and whether or not it would make sense for those to be in the hangar of a smaller than capable ship of containing them in the first place.

6. Once everything is set up the way you like it relative to the calamari hangar. Delete the calmari hangar meshes.
Screenshot 2018-03-24 13.41.05.png
7. Save and then export your modified hangar opt as an .obj file

8. Reload it into XWA Opt editor. If you did everything right it should load up fine. If not, go find out what you broke. I find that it's usually an incompatible texture format like .tga or .dds I missed somewhere in the event that I'm using a model from another game format. However, if you're modifying an existing opt, this should never be a problem.

9. Set the meshes to whatever relevant type they need to be, and assign hardpoints for Hangar in/out and Accel start/end points.

10. Load up hangar in Jeremy's Hangar Editor and customize what interior items you want to see.
Screenshot 2018-03-24 13.52.13.png
11. Play the game with your new hangar(s)

It's a really quick and dirty tutorial I did up in about 5 minutes, and as I already had this particular hangar finished, I merely staged the screenshots in blender, in case you are wondering why it looks a little exaggerated, and I did not post as many screenshots as I was planning on it due to only being able to load up 3 attachments per post. But I figured it's a simple illustration. I can make this a multi-post if you need more clarification.
You do not have the required permissions to view the files attached to this post.

User avatar
ual002
XWAU Member
Posts: 842
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Wed Apr 18, 2018 3:53 am

Is there any potential to allow the hook to look at the mother ship's (the one associated with the hangar) IFF code? If so, there is potential for say the asteroid hangar to have both imperial and rebel or even pirate static shipsets based on what the mothership's IFF is.
Image Image Image Image Image

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

Post by JeremyaFr » Wed Apr 18, 2018 7:52 pm

Hello,
I think it would be possible.

User avatar
ual002
XWAU Member
Posts: 842
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Wed Apr 18, 2018 9:23 pm

My second question... less likely plausible. Even still I'd imagine the following might conflict with Justagai's MP hook, but is there any way the hook can somehow influence a difference between the players arrival and departure mother-ship to have two separate hangars?
Image Image Image Image Image

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

Post by Bman » Thu Apr 19, 2018 3:22 am

Ual002, I don't think it's possible to dynamically map to a secondary hangar. For example, if your mothership was a CRS cruiser and it was destroyed or hypers away, and your only alternative choice was to depart via a nearby platform station, the hangar shown when you land would still show as a CRS cruiser hangar. Hope I'm wrong.
W-I-P: ISD-II, XQ-1 Platform1, (Imp) Escort Carrier, Misc, & TFTC.

User avatar
Mark_Farlander
Rebel Alliance
Posts: 577
Joined: Tue Jan 16, 2018 10:47 pm

Post by Mark_Farlander » Tue Apr 24, 2018 1:11 am

You are right, Bman.
I've just tried to land on an added Azzameen Station in Battle 1, Mission 1 and it still shows the Calamari cruiser hangar, but from a different distance.

Of course I've also tried the other thing: landing on an added C/CRS Defiance in Battle 0, Mission 3 and it shows the Azzameen Station hangar.
I don't judge tactics. The Battle is the best and only Judge.

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

Post by JeremyaFr » Fri May 25, 2018 1:50 pm

Hello,

I've published the source code of XwaHangarMapEditor:
https://github.com/JeremyAnsel/XwaOptEd ... rMapEditor

XwaHangarMapEditor is now part of XwaOptEditor.

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

Post by Driftwood » Fri May 25, 2018 2:54 pm

I haven't had any time to test the new versions thoroughly yet, however, one thing I've noticed with all the versions of hangar editor I've used, it never remembers the XWA directory and it has to be selected every single time you open the program. Can that be changed to remember the XWA directory once it's initially selected?

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

Post by JeremyaFr » Fri May 25, 2018 4:02 pm

UPDATE
I've updated XwaHangarMapEditor. The selected folder is now remenbered.

Post Reply