Author Topic: fs2_open_3.4  (Read 17252 times)

0 Members and 1 Guest are viewing this topic.

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
This build is now the official release of fs2_open_3.4.  If you've already downloaded it (before 12/31), download again, because there have been a few slight modifications.  This version also displays v3.4 in the main hall like it's supposed to. :)

http://fs2source.warpcore.org/exes/fs2_open_3.4.zip

EDIT: These links are all dead. :(  A new Windows build has been uploaded at http://scp.indiegames.us/builds/WIN/fs2_open_3_4.zip

The zip file contains fs2_open_3.4, fred2_open_3.4, and the warp.pof file that must be in your models folder for fs2_open to work.  (This is because of a bug: if the model file isn't there, the program should use the original warp code; but it crashes instead.)

Here's a debug build:
http://fs2source.warpcore.org/exes/fs2_open_3.4_debug.zip

If you run into any bugs or problems, post them using Bugzilla.  The interface is a bit quirky, but once you've gotten accustomed to it, it's very easy to use.  Please note: If you've never used fs2_open before, you'll have to create a new pilot - otherwise you'll get crashes.

All the new stuff is optional.  All missions that work in the official FS2 should also work in fs2_open.

Summary of additions:

  • Damage decal support added; details below.  The code is still being optimized -- if you have more than a few decals in a mission, you might experience some slowdown.
  • Ballistic primary support added; details below.
  • Loads of new sexps added; details below.  If you'd like to request a sexp, post in the sexp thread.
  • Transports can now dock with fighters, bombers, & stealth ships.
  • Beam-free-all-by-default mission flag added.  When set, this will automatically beam-free-all every ship in the mission - saving you a bunch of sexps. :)
  • Old bugs fixed (including the player entry delay bug, the beam bug, and the weapons tech room crash); new bugs added. ;)
  • Subcategories added to the FRED2 sexp editor, making sexping much faster.
  • There is now a TBL INFO button present next to initial orders in ship editor.  Pressing this will show the table info for the current selected ship type.

List of new sexps since v3.3:

change-ai-class changes the AI class of a ship or ship subsystem(s) (i.e., gun turrets) in mid-mission

damage-escort-list sets the most damaged ship in a specified list to the first specified priority and all other ships in the list to the second specified priority

damage-escort-list-all reprioritizes the entire escort ship list according to a specified list of priorities, from most damaged to least damaged

distance-ship-subsystem returns the distance of a certain object (a ship, a wing, or a waypoint) from a ship subsystem.  Useful for checking if ships are nearing a fighterbay, if a bomber wing is close enough to attack a subsystem, if the player's fighter is too close to a capital ship's engine (triggering a wingman's "watch out for the engine wash!" message), etc.

end-mission ends a mission immediately, without the warpout sequence

friendly-stealth-visible and friendly-stealth-invisible specify whether a ship will appear on sensors when it has its stealth flag set and a friendly iff

is-ai-class checks to see whether a certain ship or ship subsystem(s) is/are of a certain AI class (works just like is-iff)

is-cargo checks to see whether a certain ship or ship subsystem has the specified cargo

is-friendly-stealth-visible checks to see if a ship will appear on sensors when it has its stealth flag set and a friendly iff

is-ship-stealthy checks to see if a ship's stealth flag is set

primary-ammo-pct is for ballistic primaries what secondary-ammo-pct is for conventional secondaries

primaries-depleted is for ballistic primaries what secondaries-depleted is for conventional secondaries

set-cargo sets a ship's or ship subsystem's cargo without requiring a transfer or swap with some other ship

set-scanned and set-unscanned set a ship or sub subsystem(s) as scanned or unscanned (or cargo known/unknown) without the player actually having to do the scan; set-unscanned is useful to prevent the player from scanning something before he should

ship-stealthy and ship-unstealthy set the stealth flag on ships


List of sexp fixes:

is-iff, is-tagged now work the way they should

rand will now generate more than one random number per mission

training-msg no longer requires Instructor to be present


Fun uses of sexp combinations:

end-mission, in conjunction with distance-ship-subsystem, allows the player ship to depart into a fighter bay.  You may run into problems where the sexp fires before the ship actually enters the bay if you test the distance from the bay itself; in this case, simply triangulate the distance from a couple of other subsystems. :)

rand, set-cargo, and is-cargo can be used to randomize a cargo inspection mission - so that the player doesn't know beforehand which cargo container needs to be scanned/captured, even if he replays the mission


How to enable ballistic primary weapons:

Make the following table changes...

Ships.tbl
--Add "ballistic primaries" to the fighter flags
--Add $Pbank Capacity: ( x, ... ) right after $Default Pbanks (in the same vein as for secondary capacity)

Weapons.tbl
--Add "ballistic" to the weapon flags
--Add $Rearm Rate: x immediately before $Flags (again, just like with secondaries)

Sounds.tbl
--In the Game Sounds section, copy entries 33 and 34 to spaces 165 and 166. These will be the sounds for when the ballistic primaries rearm. You may want to change them, or you may want to leave them the same sounds as for secondaries.

Please note that the ETS slider for weapons does not appear if no weapon uses energy.  If two out of three systems (weapons, shields, engines) do not use the ETS gauge, the entire gauge will be gone.  This is because when your ship has neither shields nor weapon energy storage, there's no point in modifying engine energy when the other two are not present.

You'll also note that the primary weapon ammunition readouts spill over past the left side of their place in the HUD display.  To fix this, download additional HUD graphics from here.  These will take the place of the old graphics in missions that make use of ballistic primaries. :)


How to implement damage decals:

Add this to the bottom of your weapons table entry...
Code: [Select]
$decal:
  +texture: [a texture name]
  +backface texture: [another texture name]
  +radius: [a float]
The textures should all be in PCX format.  Sample screenshot below...




[Inquisitor]

This is offical enough for me, since decals need special table entries.

Everyone say thanks to Goober for building, and thanks to the rest of the team for some damn spiffy stuff in this build.

[/Inquisitor]


Old 3.3 thread
« Last Edit: April 25, 2014, 05:34:29 pm by Goober5000 »

 

Offline Inquisitor

Official release of fs2_open_3.4
I think the only difference between this and the "official" one will be the decal code either optional or commented out.

Goober: I JUST missed you exiting on IRC, sorry about that, I will be on and off all day, entertaining my wifes family :)
No signature.

 

Offline vyper

  • 210
  • The Sexy Scotsman
Official release of fs2_open_3.4
Well, good stuff I'm downloading how. As for the fs2open file - it crashes when a mission is about to load (no loading screen even) but since this is unofficial I'll let u away with it. *calls off angry mob*
"But you live, you learn.  Unless you die.  Then you're ****ed." - aldo14

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
After much head-scratching, I figured it out.  The reason all the EXEs were crashing is that the program couldn't find warp.pof in the model directory.  Even better, I now have FTP access to the SCP directory.  I posted the new download, so check it out in the first post.  Enjoy. :D
« Last Edit: December 30, 2002, 10:16:18 pm by 561 »

 

Offline SKYNET-011

  • 28
  • O_o
Official release of fs2_open_3.4
What are the .TBL limits?
Petrach and a few other escaped in a pod but were covered in watermelon juice....it was horrible :eek2: :shaking: -dan87uk

OMFGWTFAOLBBQBATMAN!!!!!11114111-MicroPsycho

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Official release of fs2_open_3.4
130 ships, but the size can be as big as 1 MB, I think.  Not sure of the exact figures.

 

Offline DTP

  • ImPortant Coder
  • 28
    • http://www.c4-group.dk
Official release of fs2_open_3.4
about 900 kb. but that should be more than enough.
and yes 130 ships, but

128 polygon models, the rest are reserved for something else. may be a left over from old days of fs1.
VBB member; reg aug 1999; total posts 600.
War is a lion, on whos back you fall, never to get up.
Think big. Invade Space.

 

Offline SKYNET-011

  • 28
  • O_o
Still doesn't work for me, FRED crashes at 392-427 KB.

I get an error>

Error parsing 'Ships.tbl'
Error code=1

File=E:\Languages\Visual Studio Projects\Visual C++\Fs2_open\code\ship\ship.cpp
Line:1902

Call stack:
--------------------------------------------------
Fred2_open.exe 006319f1()
Fred2_open.exe 00631a6b()
Fred2_open.exe 0061d3e3()
Fred2_open.exe 0061c3c8()
Kernel32.dll bff63613()
Kernel32.dll bff848f7()
--------------------------------------------------
« Last Edit: December 28, 2002, 05:08:24 pm by 981 »
Petrach and a few other escaped in a pod but were covered in watermelon juice....it was horrible :eek2: :shaking: -dan87uk

OMFGWTFAOLBBQBATMAN!!!!!11114111-MicroPsycho

 

Offline DTP

  • ImPortant Coder
  • 28
    • http://www.c4-group.dk
Quote
Originally posted by SKYNET-011
Still doesn't work for me, FRED crashes at 392-427 KB.

I get an error>

Error parsing 'Ships.tbl'
Error code=1

File=E:\Languages\Visual Studio Projects\Visual C++\Fs2_open\code\ship\ship.cpp
Line:1902

Call stack:
--------------------------------------------------
Fred2_open.exe 006319f1()
Fred2_open.exe 00631a6b()
Fred2_open.exe 0061d3e3()
Fred2_open.exe 0061c3c8()
Kernel32.dll bff63613()
Kernel32.dll bff848f7()
--------------------------------------------------


seems more likely that, you got an error in the TBL file.

Either you got more than 128 ships,
or you forgot something crucial for some ship

Goober5000, maybe you could modify that Error msg to show, what line was parced, line-number and the text maybe, i think it would be quite usefull for people running into TBL trouble.

anyway try this.
take the original TBL file

now make two lines full of semi:colon like this

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

copy paste this until you reach about 800 KBS of size
now run fred

SEMI;COLON is a keyword seperator, and as such is not being parced, meaning if you can run it with this, well then it is your TBL file that is the problem, and let me stress, it usually is.
« Last Edit: December 29, 2002, 05:26:24 pm by 508 »
VBB member; reg aug 1999; total posts 600.
War is a lion, on whos back you fall, never to get up.
Think big. Invade Space.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Official release of fs2_open_3.4
Uh...

Code: [Select]
// Called once at the beginning of the game to parse ships.tbl and stuff the Ship_info[]
// structure
void ship_init()
{
int rval;

if ( !ships_inited ) {

if ((rval = setjmp(parse_abort)) != 0) {
Error(LOCATION, "Error parsing 'ships.tbl'\r\nError code = %i.\r\n", rval);
} else {
parse_shiptbl();
ships_inited = 1;
}

ship_iff_init_colors();
}

ship_level_init(); // needed for FRED
}


I have no idea what's going on here with this setjmp thing.

 

Offline DTP

  • ImPortant Coder
  • 28
    • http://www.c4-group.dk
Official release of fs2_open_3.4
Quote
Originally posted by Goober5000
Uh...

Code: [Select]
// Called once at the beginning of the game to parse ships.tbl and stuff the Ship_info[]
// structure
void ship_init()
{
int rval;

if ( !ships_inited ) {

if ((rval = setjmp(parse_abort)) != 0) {
Error(LOCATION, "Error parsing 'ships.tbl'\r\nError code = %i.\r\n", rval);
} else {
parse_shiptbl();
ships_inited = 1;
}

ship_iff_init_colors();
}

ship_level_init(); // needed for FRED
}


I have no idea what's going on here with this setjmp thing. [/B]


setjmp.h

Laungage support.

Quote: from book
"THE C++ programming language"
by bjarne stroustrup; the creator of C++.


a small part of the standard llibrary is language support:that is, facilities that must be present for a program to run because language features needs them.


look

look in setjmp.h found in compilers include directory.

it has something to do with c-style stack unwinding.
VBB member; reg aug 1999; total posts 600.
War is a lion, on whos back you fall, never to get up.
Think big. Invade Space.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Official release of fs2_open_3.4
Quote
Originally posted by DTP
look in setjmp.h found in compilers include directory.

it has something to do with c-style stack unwinding.


I searched for references, did a Find All on setjmp, glanced at setjmp.h, and couldn't make heads or tails out of it.  Maybe you'd better do it. :)

 

Offline Stunaep

  • Thread Necrotech.... we bring the dead to life!
  • 210
Official release of fs2_open_3.4
I'm sorry, where could I get an overview of exactly what has been done?
"Post-counts are like digital penises. That's why I don't like Shrike playing with mine." - an0n
Bah. You're an admin, you've had practice at this spanking business. - Odyssey

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Official release of fs2_open_3.4
Loads of new sexps - look in Sesquipedalian's thread

Ballistic primary support added

Transports can now dock with fighters, bombers, & stealth ships

Beam-free-all-by-default mission flag added

Old bugs fixed (including player entry delay), new bugs added

Subcategories added to FRED2 sexp editor, making sexping much faster


That's all I can recall off the top of my head.  I probably missed something, though. :)

 

Offline Stunaep

  • Thread Necrotech.... we bring the dead to life!
  • 210
Official release of fs2_open_3.4
you've reorganised the change sexp menu! I LUV IT!

hows the Dx8,1 release coming? Can't wait to put in those cutscenes.
"Post-counts are like digital penises. That's why I don't like Shrike playing with mine." - an0n
Bah. You're an admin, you've had practice at this spanking business. - Odyssey

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Official release of fs2_open_3.4
VC++ 6 does have help files. :)

setjmp
Saves the current state of the program.

int setjmp( jmp_buf env );

Routine Required Header Compatibility
setjmp ANSI, Win 95, Win NT


For additional compatibility information, see Compatibility in the Introduction.

Libraries

LIBC.LIB Single thread static library, retail version
LIBCMT.LIB Multithread static library, retail version
MSVCRT.LIB Import library for MSVCRT.DLL, retail version


Return Value

setjmp returns 0 after saving the stack environment. If setjmp returns as a result of a longjmp call, it returns the value argument of longjmp, or if the value argument of longjmp is 0, setjmp returns 1. There is no error return.

Parameter

env

Variable in which environment is stored

Remarks

The setjmp function saves a stack environment, which you can subsequently restore using longjmp. When used together, setjmp and longjmp provide a way to execute a “non-local goto.” They are typically used to pass execution control to error-handling or recovery code in a previously called routine without using the normal calling or return conventions.

A call to setjmp saves the current stack environment in env. A subsequent call to longjmp restores the saved environment and returns control to the point just after the corresponding setjmp call. All variables (except register variables) accessible to the routine receiving control contain the values they had when longjmp was called.

setjmp and longjmp do not support C++ object semantics. In C++ programs, use the C++ exception-handling mechanism.

See Also   longjmp
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline Anaz

  • 210
Official release of fs2_open_3.4
you have to have the MSDN library installed on your comp to access them tho...
Arrr. I'm a pirate.

AotD, DatDB, TVWP, LM. Ph34r.

You WILL go to warpstorm...

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Official release of fs2_open_3.4
Quote
Originally posted by EdrickV
VC++ 6 does have help files. :)


Yeah, but like I said, I couldn't make heads or tails of setjmp. :) Maybe someone else can take care of this part.

Quote
Originally posted by Stunaep
you've reorganised the change sexp menu! I LUV IT!


Thanks!  A cookie for being the first person to say so. :)

Quote
hows the Dx8,1 release coming? Can't wait to put in those cutscenes.


Well, it's coming - that's all I know.  I think it's progressing fairly well, but I don't know the exact status.

 

Offline Anaz

  • 210
Official release of fs2_open_3.4
aw rats...now fred works, so my excuse for not working on missions just went out the window...

:D

good job on all of the other stuff tho!
Arrr. I'm a pirate.

AotD, DatDB, TVWP, LM. Ph34r.

You WILL go to warpstorm...

 

Offline Anaz

  • 210
Official release of fs2_open_3.4
hmm...I guess I have a new excuse...

I get this error when I try to start fs2 with the DatDB mods...

Error: Could not load in 2_Pop2!
File:E:\Languages\Visual Studio Projects\Visual C++\fs2_open\code\UI\WINDOW.cpp
Line: 257

Call stack:
------------------------------------------------------------------
------------------------------------------------------------------
Arrr. I'm a pirate.

AotD, DatDB, TVWP, LM. Ph34r.

You WILL go to warpstorm...