Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Crybertrance on October 11, 2011, 06:20:33 am

Title: Flyable Hades!?
Post by: Crybertrance on October 11, 2011, 06:20:33 am
Hi, I'm currently making a mod for Freespace 2, I wanted to know, is it possible to have a flyable GTD Hades?? If so, can someone please give me the code...I'm really sorry, but I am a complete N00b at coding...

Thanks in Advance....
Title: Re: Flyable Hades!?
Post by: The E on October 11, 2011, 08:37:50 am
Yes, flyable capital ships are possible. For an example, check out the mission "The Blade Itself" from Blue Planet: War in Heaven.

One thing you should be aware of is that without careful fredding and maybe a bit of script work, it is not going to ne much fun.
Title: Re: Flyable Hades!?
Post by: Crybertrance on October 11, 2011, 11:27:17 am
Is there a proper guide to add the capital ships? Even a rough one will do..!

EDIT: I checked out "The Blade Itself", I must say that mission is AWESOME! kudos to the entire BP team!! pity there are no missions like that... :(

Thanks
Title: Re: Flyable Hades!?
Post by: StarSlayer on October 11, 2011, 12:01:58 pm
Flyable Hades!

Navigate the treacherous space lanes of the FSU Project!  Utilize his construct special ability to model Terran spacecraft!  Get sweet "Swamp Troll" iconography! 
Title: Re: Flyable Hades!?
Post by: Cyborg17 on October 11, 2011, 12:06:53 pm
lol

Starslayer is talking about a forum member, Hades, who is a well-respected modeler around here.  Just in case you were confused, Cybertrance.
Title: Re: Flyable Hades!?
Post by: BloodFleet on October 12, 2011, 06:15:19 am
a 5 second table edit will get you something like I did here http://www.youtube.com/watch?v=DbKHDa0n3kw

for more than that however, I'm guessing you will need to do a lot of FRED work (and probably other things yeah?)
Title: Re: Flyable Hades!?
Post by: Crybertrance on October 12, 2011, 06:55:43 am
a 5 second table edit will get you something like I did here http://www.youtube.com/watch?v=DbKHDa0n3kw

for more than that however, I'm guessing you will need to do a lot of FRED work (and probably other things yeah?)

AWESOME! Can you please show me an example code?

Thanks
Title: Re: Flyable Hades!?
Post by: headdie on October 12, 2011, 07:13:39 am
Use VPview to open up Blue Planet WiH vp files and extract the mission file for The Blade Itself and the ship related tables and by studying them you should be able to see what the bp team did
Title: Re: Flyable Hades!?
Post by: Crybertrance on October 12, 2011, 07:59:35 am
Use VPview to open up Blue Planet WiH vp files and extract the mission file for The Blade Itself and the ship related tables and by studying them you should be able to see what the bp team did

Thanks, ill do that!
Title: Re: Flyable Hades!?
Post by: bigchunk1 on October 12, 2011, 01:11:52 pm
It's even easier than that:

1. Download vpview32
2. Use vpview32 to open the .vp file titled 'root' in your freespace2 directory
3. Extract the ships.tbl from the root.vp. You should be able to find it in freespace2/data/tables. Save the file outside the .vp in freespace2/data/tables
4. Open the newly created ships.tbl file using notepad and use ctrl+f to find the name of the capital ship you want to fly.
5. Scroll down to $Flags( ) and add the flag "player_ship" in the parenthesis make sure you type this exactly correct!
6. Save the ships.tbl file.
7. Open a mission using fred (you can even extract a mission from the retail root .vp and save it in freespace2/data/missions)
8. Add the ship you just modified under editors -> team loadout. Make sure the box next to the ship's name is checked and save the mission.
9. Play the mission in the tech room, you should be able to pick and play as your capital ship!

Note: When you're done you might want to delete the ships.tbl file you created or move it to a custom titled mod folder since the table you just created is nonstandard. e.g. you will get a warning when you try to play multiplayer games.

Play around with '*' '/' '.' on the number pad to adjust the camera, and if things get boring there's always time compression Shift+> -and- Shift+<
Title: Re: Flyable Hades!?
Post by: BloodFleet on October 12, 2011, 03:48:44 pm
a 5 second table edit will get you something like I did here http://www.youtube.com/watch?v=DbKHDa0n3kw

for more than that however, I'm guessing you will need to do a lot of FRED work (and probably other things yeah?)

AWESOME! Can you please show me an example code?

Thanks
Well all you need to do is add the flags "player_ship" to anything in the ships .tbl and make a mission where you either start in it or can select it in ship selection. The "show ship" flag is optional but for the Ravana works pretty well. Most other ships do not have good camera (at least the ones I've tried) so to change that you would need to edit the eye point of the ship's .pof file (with PCS2).
Title: Re: Flyable Hades!?
Post by: Crybertrance on October 13, 2011, 01:47:50 am
I'll try it out ASAP!!

Thanks a LOT you guys! You'all have been the most helpful...Much more than other forums I have visited..! :)
Title: Re: Flyable Hades!?
Post by: BloodFleet on October 13, 2011, 02:45:17 am
oh and I don't think anyone mentioned it but when you warp out when playing as a capship it will not be like when AI warps out, it will be the same speed as if you are a fighter (like around 40 m/s?) so when you warp out in big ships (destroyer or larger) it will take A LONG TIME...so yeah just a warning lol, idk of a fix, does anyone here know of a fix to that?...besides just not warping out, duh.
Title: Re: Flyable Hades!?
Post by: ssmit132 on October 13, 2011, 03:22:39 am
The Blade Itself ends the mission when the player presses Alt-J.
Title: Re: Flyable Hades!?
Post by: headdie on October 13, 2011, 03:23:08 am
$Warpout Speed:
FS2 Open 3.6.10:
- Sets the speed at which the ship warps out for default warpout effect
- Sets the time that the ships warp out (not the animation itself) takes for BTRL type warpout effects[/li][/list]
FS2 Open, 3.6.13:
- Sets the minimum speed required for the ship to warp out for hyperspace type warpout effects
FS2 Open 3.6.10:
Syntax: Float, meters per second or milliseconds
Title: Re: Flyable Hades!?
Post by: BloodFleet on October 13, 2011, 02:43:53 pm
well that kinda fixes it, still takes a long time to "warm up" so to speak but when the camera goes to 3rd person/you start actually warping out it is a lot faster.

edit: nvm that was due to the ship's uber slow accel/decel times, making them more like a fighters fixed the slow warm up. Now all that is left for warpout at least is the camera zoom being way too small...but whatever doesnt really matter i guess.
Title: Re: Flyable Hades!?
Post by: Crybertrance on October 15, 2011, 10:25:16 am
Most other ships do not have good camera (at least the ones I've tried) so to change that you would need to edit the eye point of the ship's .pof file (with PCS2).
[/quote]

How do I do that??

Also, I finally got it working...But the beam  cannons on the Hades wont fire! I edited the 'High Noon' (SM3-02) mission from Freespace 2

Thanks
Title: Re: Flyable Hades!?
Post by: General Battuta on October 15, 2011, 10:37:18 am

Most other ships do not have good camera (at least the ones I've tried) so to change that you would need to edit the eye point of the ship's .pof file (with PCS2).

How do I do that??

Thanks
[/quote]

Quote
With PCS2
Title: Re: Flyable Hades!?
Post by: BloodFleet on October 15, 2011, 12:08:31 pm
put a beam-free-all event for ANY player ship in the mission, it will enable beams for any player ship even if you switch to another class in ship selection.

and the eyepoint ya...like I said, PCS2
Title: Re: Flyable Hades!?
Post by: mjn.mixael on October 15, 2011, 12:12:37 pm
You could just set the mission flag "beams freed by default" and lock other ship's beams as/if necessary.
Title: Re: Flyable Hades!?
Post by: Droid803 on October 15, 2011, 12:24:30 pm
IIRC "all ships beam freed by default" doesn't actually beam free the player's ship. At least, that's what I recall from my trial runs.
Title: Re: Flyable Hades!?
Post by: mjn.mixael on October 15, 2011, 12:25:08 pm
IIRC "all ships beam freed by default" doesn't actually beam free the player's ship. At least, that's what I recall from my trial runs.

Really? That's interesting.. and kinda weird...
Title: Re: Flyable Hades!?
Post by: BloodFleet on October 15, 2011, 03:00:40 pm
ya I noticed that when I first did a player capship, the one you set to start as in FRED is fine the beams work but as soon as you switch your cap to another in-game ship selection the beams dont work, a beam free all for the player fixed it
Title: Re: Flyable Hades!?
Post by: bigchunk1 on October 15, 2011, 04:57:48 pm
IIRC "all ships beam freed by default" doesn't actually beam free the player's ship. At least, that's what I recall from my trial runs.

I believe it. I used to have a hard time freeing player capship beams in multiplayer missions especially when they respawn.

This sexp should work. To make a sexp, open your custom mission in fred in the events editor and make a new event that looks like this:
when
  -true
  ->beam-free-all
    <hades>

This is the first sexp 95% of people new to freding learn first. (accuracy not verified)
Title: Re: Flyable Hades!?
Post by: mjn.mixael on October 15, 2011, 05:01:28 pm
IIRC "all ships beam freed by default" doesn't actually beam free the player's ship. At least, that's what I recall from my trial runs.

I believe it. I used to have a hard time freeing player capship beams in multiplayer missions especially when they respawn.

This sexp should work. To make a sexp, open your custom mission in fred in the events editor and make a new event that looks like this:
when
  -true
  ->beam-free-all
    <hades>

This is the first sexp 95% of people new to freding learn first. (accuracy not verified)

I never learned that sexp... do you use trigger count if there are respawns?
Title: Re: Flyable Hades!?
Post by: bigchunk1 on October 15, 2011, 05:04:00 pm
IIRC "all ships beam freed by default" doesn't actually beam free the player's ship. At least, that's what I recall from my trial runs.

I believe it. I used to have a hard time freeing player capship beams in multiplayer missions especially when they respawn.

This sexp should work. To make a sexp, open your custom mission in fred in the events editor and make a new event that looks like this:
when
  -true
  ->beam-free-all
    <hades>

This is the first sexp 95% of people new to freding learn first. (accuracy not verified)

I never learned that sexp... do you use trigger count if there are respawns?

You have to yeah. Since there is no respawn trigger in multiplayer and I was too lazy at the time to find a more elegant way to do it, I just triggered the sexp every 10 seconds.
Title: Re: Flyable Hades!?
Post by: Crybertrance on October 16, 2011, 06:41:42 am
Excuse my n00bness, but how do I edit an eyepoint IN PCS2   :confused:
Title: Re: Flyable Hades!?
Post by: BloodFleet on October 16, 2011, 06:43:30 am
open .pof file, you will have to get it out of the mv_assets.vp (PCS2 is in tools folder, which should be in your main FS2 folder)
go to Eye Points
edit Offset X Y Z values (look at the dot in the model view, it moves as you change the numbers so just keep moving it until you get it where you want it

the Hades is capital05.pof btw in case you didnt know that already
Title: Re: Flyable Hades!?
Post by: Crybertrance on October 16, 2011, 07:25:13 am
open .pof file, you will have to get it out of the mv_assets.vp (PCS2 is in tools folder, which should be in your main FS2 folder)
go to Eye Points
edit Offset X Y Z values (look at the dot in the model view, it moves as you change the numbers so just keep moving it until you get it where you want it

the Hades is capital05.pof btw in case you didnt know that already

Thanks but is there a way to fine tune the Offset Values?

Also, is there a way to remove that red tint across the screen when you get hit by a laser or something??
It makes sense in s fighter, but not i a capship...
Title: Re: Flyable Hades!?
Post by: MatthTheGeek on October 16, 2011, 07:59:21 am
Also, is there a way to remove that red tint across the screen when you get hit by a laser or something??
It makes sense in s fighter, but not i a capship...
"no pain flash" ship flag. (http://www.hard-light.net/wiki/index.php/Ships.tbl#.22no_pain_flash.22)
Title: Re: Flyable Hades!?
Post by: Crybertrance on October 16, 2011, 09:15:19 am
I finally got it working fine in-game (eye-point and all) However the other AI Ships dont fire therie beams at all! And yes I have the "beam-free-all" event with all the ship names below...Its like this...

when
  -true
  ->beam-free-all
    <hades>
    <sobek>
    <Fenris>


The Sobek and the Fenris should attack me with their beams, but the only attack with lasers, missiles, etc...
I have their Initial Orders to Attack "alpha 1"...

EDIT: Also can you have fighter launch from the player CapShip??

Thanks
Title: Re: Flyable Hades!?
Post by: Droid803 on October 16, 2011, 11:10:34 am
No fighter launch is possible from player ships.
Try beam-unprotect'ing "Alpha 1". Sometimes you get randomly beam-protected for some reason.
Title: Re: Flyable Hades!?
Post by: Crybertrance on October 16, 2011, 11:24:03 am
No fighter launch is possible from player ships.
Try beam-unprotect'ing "Alpha 1". Sometimes you get randomly beam-protected for some reason.

Here is a pic from the flags menu...Am i missing something?

[attachment deleted by a basterd]
Title: Re: Flyable Hades!?
Post by: Droid803 on October 16, 2011, 11:47:56 am
via SEXP.
:/ some weird quirk...
Title: Re: Flyable Hades!?
Post by: Crybertrance on October 16, 2011, 12:13:01 pm
via SEXP.
:/ some weird quirk...

so, you mean I have to un'beam-protect by SEXp?
Title: Re: Flyable Hades!?
Post by: Droid803 on October 16, 2011, 12:16:47 pm
I donno, I had to do that, and sometimes the player is still protected. I donno what happens.
Title: Re: Flyable Hades!?
Post by: BloodFleet on October 16, 2011, 05:19:01 pm
wait why beam free all for the other ships? Just go to mission specs and check all ships beam freed by default...and I thought you had to do an event for each ship (at least I had to back in retail before the mission spec addition).

pretty much what I did for that clip where I was in the Ravana. Well that and the beam free all for alpha 1 event.
Title: Re: Flyable Hades!?
Post by: Crybertrance on October 17, 2011, 01:20:08 am
wait why beam free all for the other ships? Just go to mission specs and check all ships beam freed by default...and I thought you had to do an event for each ship (at least I had to back in retail before the mission spec addition).

pretty much what I did for that clip where I was in the Ravana. Well that and the beam free all for alpha 1 event.

Thanks that did the trick!

Also, how do I change the Warpout speed? I am using the "Shadow demonstration" build released by Valhatil... (fs2_open_3_6_13r_INF_SSE2.exe)
Title: Re: Flyable Hades!?
Post by: BloodFleet on October 17, 2011, 02:24:04 am
easy just go to the ship entry and add this BELOW the $Slide decel: line (if you don't know, things in the table files MUST be in a specific order or it will not work) $Player Warpout Speed:   300.0
It does kinda depend on the ship class, if it was a cruiser I would go with 100, corvette like 150-180, destroyer 250-300 and anything bigger than that probably 700-800.

After that, go to the
$Forward accel:
$Forward decel:
lines, and tweak them to something like

$Forward accel:         3.0
$Forward decel:         6.0
thats what I did for the player version of the Ravana and it works quite well.

I don't know of a way to fix the camera when you jump out and it goes to 3rd person, but that doesn't matter as much as the above does.
Title: Re: Flyable Hades!?
Post by: Crybertrance on October 24, 2011, 02:14:32 am
easy just go to the ship entry and add this BELOW the $Slide decel: line (if you don't know, things in the table files MUST be in a specific order or it will not work) $Player Warpout Speed:   300.0
It does kinda depend on the ship class, if it was a cruiser I would go with 100, corvette like 150-180, destroyer 250-300 and anything bigger than that probably 700-800.

After that, go to the
$Forward accel:
$Forward decel:
lines, and tweak them to something like

$Forward accel:         3.0
$Forward decel:         6.0
thats what I did for the player version of the Ravana and it works quite well.

I don't know of a way to fix the camera when you jump out and it goes to 3rd person, but that doesn't matter as much as the above does.

Thanks man! :yes: Now the sip warps out quite realistically, but the subspace tunnel does not close after the ship has warped out! It just remains open for a LONG time and then closes! what am I doing wrong here? :banghead:
Title: Re: Flyable Hades!?
Post by: BloodFleet on October 25, 2011, 06:54:26 am
dunno about that...maybe try adjusting numbers?

like...make warpout speed 600 instead of 300, and forward accel 1.5/decel 3.0 basically half the values and see if it changes anything