Cockpit models

More
19 years 9 months ago #10887 by Second Chance
Replied by Second Chance on topic Cockpit models
Here's a quick recap of the discussion of using custom cockpit models for each ship as well as my idea for a solution:

Originally posted by MajorTom
I dunno how to change the cockpit for just one of the ships ship without changing all the others.

Originally posted by Roi Danton
I've never finished determining to realize dynamical cockpit in an easy way (by just changing one line like the ini file).
With changing per Flux (mentioned a while ago) I meant to define the cockpit layout with pog and to use the flux.ini as temporary storage (so the player could choose his preferring cockpit and thats stored like a save game).
But because here every ship should have its own cockpit it could be done only by pog I think.

Originally posted by Second Chance
Why can't we just have a folder that holds all the cockpit models, and when the player selects a ship, we swap in the correct cockpit model to replace the original? And anytime a new ship is chosen we swap in the required cockpit model.

Originally posted by MajorTom
The trick I used to place the starfury cockpit as a child sim on the crew null position only works when the cockpit is removed by pressing F1. Otherwise you have the new cockpit on top of the original.

one solution I can think of to switch cockpits would be (simular to SC's suggestion): Somehow create all the ships without a cockpit at all (make a dummy Avatar for the Cockpit?) and then place a ship specific cockpit (or the original) as a child sim on the ship per pog as it is created.

Another possibility might be something like Shane and I did on the Verona freighter: Make the cockpit as the avatar of a class icturret (flipped "up" by 90 degrees). Then we could place the turret per ini file on the crew null. If that works at all (note the if!) we wouldn't have the docking icon flashing but probably won't have any cockpit sway anymore either.

Both solutions are IFy/cludgy as far as I am concerned.

Originally posted by Second Chance
why make it so complicated? I don't think the player can switch ships during play, can he? So just literally swap in the custom model in place of the original. Copy the original cockpit files to a backup folder, than copy the necessary custom cockpit files into the avatars\cockpit\ folder. Then let flux do all the standard cockpit effects; sway, etc.

Originally posted by MajorTom
Because in EOC all ships are hardcoded to have the same cockpit. Thats the one in avatars/cockpit.
None of the setup scenes for the ships have a null object for the/a cockpit. So, there is now way to get the game to use a custom cockpit file even if you have one. (i.e it would use you custom file for all ships in the game)

Originally posted by Second Chance
I see your point about about the cockpits. The real problem is, that we have no way of knowing which cockpit belongs to which ship. Otherwise it would hardly be difficult to say; "Ok, the player selected ship X. So copy ship X's cockpit into the avatar\cockpit\ folder. The game will then automatically use the right cockpit. In fact, why not make it work? But not as a subsim. Why don't we put the custom cockpit for each ship in that ships avatar folder with its other model files, then have flux look in the avatar folder for the cockpit files and copy them into the avatars\cockpit\ folder. Then, anytime we add a new ship to the mod, as long as we put the cockpit in the avatar folder, it will automatically load the correct cockpit. And code it so that if there is no cockpit found, the default is used. Sound reasonable?


I think my last solution is workable. It will just require some coding and modeling conventions. For instance; all cockpit models and textures would have the prefix cockpit_ added them. Then the code just has to look for any files beginning with cockpit_xxx.xxx and load them. I think I'm going to try to use this idea for my personal mod, so i hope you all like it and want to try making it work. It will also make adding new ships with cockpit models relatively easy.

*edit*
Oh well, MajorTom pointed out the fatal flaw in my idea. Flux can't manipulate files. Oh well. [xx(]

Anyone else have any ideas?

mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos (on hold during SW MP mod)
cartoons.sev.com.au/index.php?catid=4
.

Please Log in or Create an account to join the conversation.

More
19 years 9 months ago #10903 by MajorTom
Replied by MajorTom on topic Cockpit models
Well I'll be Darn!

You wont believe this:

I tried the icTurret solution and it works!
It even has cockpit sway!!

I put a completly empty .lws file in StarWarsA1/avatars/cockpit. (That results in all ships having no cockpit.)

Then made a class icTurret.ini and gave it the Starfury cockpit as it's avatar. That is simply placed as a subsim on the crew null like this:

template[27]=ini:/subsims/systems/player/starfury_cockpit
null[27]=crew

An issue is you can see the cockpit from the outside view, and its pretty darn big. About 1/3 the size of the whole B-Wing, and sticks out in front of it.

Maybe we could change that by making the cockpit avatar smaller?

I'll post a couple of pics tomorrow. (gotta sleep now).
SC, I'll send you all the pics per email so you can see what maybe possible to do to make the cockpit fit better.
Maybe you could make little mini-cockpits that are placed right at the crew null




Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.

More
19 years 9 months ago #10904 by Second Chance
Replied by Second Chance on topic Cockpit models
Nice work, MT! Sounds very promising. I look forward to seeing what we can do with it. That would keep it nice and simple too!

Now here's the interesting part: The original cockpit model is so large because the camera uses such a wide FOV. If we made the cockpits actual size, so they fit inside the ships properly, they would be too small and look very far away from the player. I'll check out the FOV problem in MP and see if I can think of a way around it. Either that, or maybe we can Pog the visibility depending on view. Like; the cockpit models of all craft except the player are invisible on each player's machine.

mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos (on hold during SW MP mod)
cartoons.sev.com.au/index.php?catid=4
.

Please Log in or Create an account to join the conversation.

More
19 years 9 months ago #10905 by MajorTom
Replied by MajorTom on topic Cockpit models
You should have the mail with about 10 pics in it by now.
This does look promising!

Lol, I couldn't sleep before I tried out the original cockpit using this method too. It works just as well!
The original cockpit model itself is smaller than the Starfury cockpit, about half size. But, it still covers the whole "pod" of the B-Wing.

Instead of messing with the FOV or trying to hide the subsim with pog, maybe you can just set the crew null further back inside the model? Then make the cockpit model smaller so it is hidden by the models avatar?
Hmmm, if the ships were larger then the problem would be non existant in the first place?

Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.

More
19 years 9 months ago #10907 by Second Chance
Replied by Second Chance on topic Cockpit models

Instead of messing with the FOV or trying to hide the subsim with pog, maybe you can just set the crew null further back inside the model?

This will likely not work with most models. Good thought though.

Then make the cockpit model smaller so it is hidden by the models avatar?

Yes, this is my hope. I would like to make the cockpits actual size (at least relative to the models, whatever size they end up being) and place them in their proper location on the model (as this does affect the POV of the player in relation to the ship).

Hmmm, if the ships were larger then the problem would be non existant in the first place?

Yep, you're probably right there. I guess.

*edit*
Got the pics MT, looks pretty good. This might turn out to be quite a useful little discovery.

mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos (on hold during SW MP mod)
cartoons.sev.com.au/index.php?catid=4
.

Please Log in or Create an account to join the conversation.

More
19 years 9 months ago #10930 by MajorTom
Replied by MajorTom on topic Cockpit models
When trying out the original cockpit using this method it looked a bit flat (had less depth in the perspective).

Of course we can probably compensate for that in the cockpit models we use, but it is perhaps worth noting or explains something we can't grasp yet? I'll send some pics of that later today.

Where do we go from here?

i.e How many cockpit models can you (or Hot4 ?) make how quick? ;)



Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.