How to use the existing models?

This is the place for all questions related to modding Starshatter.
Post Reply
CavemanX
Posts: 20
Joined: Sat Dec 23, 2006 4:19 pm
Contact:

How to use the existing models?

Post by CavemanX »

Is there a way to point to .mag or .pcx files inside the shatter.dat? This way I could add a tweaked version of some ship without extracting and including all the art in a new .dat.
Adonnay
Posts: 101
Joined: Sun May 08, 2005 4:57 pm

RE: How to use the existing models?

Post by Adonnay »

I think it should be possible. Just extract the .def file of an existing craft and edit it to your needs. Place the .def into your Starshatter\Mods\Ships\ folder and start it using the -filesys parameter.
I haven't tested it though.
User avatar
Dragonlead
Posts: 303
Joined: Sun May 16, 2004 6:25 am

RE: How to use the existing models?

Post by Dragonlead »

That will work, but unless you turn it into a dat file and enable it, your changes will not show up if you start the game through the autorun screen. Your changes will only work with the -filesys extension. Also, you must change the name of the vehicle. If you don't, the game will default to the stock version.

V/R
USAF Ret.
CavemanX
Posts: 20
Joined: Sat Dec 23, 2006 4:19 pm
Contact:

RE: How to use the existing models?

Post by CavemanX »

No, it doesn't quite work that way. Let's say I have a newship.def that starts like this:

Code: Select all

 SHIP
 
 name:          Newship
 display_name:  Newship
 class:         Fighter
 abrv:          "Blaah"
 
 hud_icon:      "StormhawkHud.pcx"
 description:   "Description!"
 
 detail_0:   "Storm6_0.mag"
 feature_0:  25
 detail_1:   "Storm6_1.mag"
 feature_1:  1

The new ship shows in tacviewer but clicking it makes the game crash. Error log shows why:

MAG Open Failed:  could not open file 'Storm6_0.mag'
ERROR: Could not load detail 0, model 'Storm6_0.mag'
WARNING - DataLoader could not load buffer 'Mods/Ships/Newship/Storm6_1.mag'

Now, obviously it can't find those pcx or mag files inside the mod directory/dat file. I guess I could try ../../../Ships/Alliance_Fighters/Storm6_1.mag...
Toshiro
Posts: 26
Joined: Sun Dec 24, 2006 2:50 pm

RE: How to use the existing models?

Post by Toshiro »

Hello

There is a way to use a tweaked or different ship.   Extract the ships from the shatter dat, including the ship catalog.def.  Make a folder called Ships in the root directory. Ships catalog def should be inside the ship folder and all extracted ships and textures. You can place a new ship def (with its textures) or tweak existing ship def files in the ship folder.  Make a change to the ship catalog def to point to any new ship def.  By using the filesys extension the game will load up the ships using the ship catalog def. 

The game will show any new names from the def file, but each mission or campaign will still use the default names.
Example:  if you make a new fighter "MK2 Viper", its name will show up in the gameplay.  But It will still show up as Eagle or Stormhawk (or whatever you replaced) in the mission selection screen. 
If you change the Capitalships though I don't think it changes. I had placed a Galactica model in there as a carrier and it still shows up as  name "Archon". 

This is basically a shortcut to insert a different ship without having to change names or ship designs in all the missions or campaign defs.  
Reminds me of the way you used to mod Homeworld.

Also any new ship, with unique weapons. Place weapons defs and textures in a folder called weapons , and that, in mods folder . It will search there for them.

Although you have to be carefull not to upset the game balance.

Cheers
User avatar
Akuma
Posts: 31
Joined: Thu Jan 06, 2005 1:22 pm
Location: Finland

RE: How to use the existing models?

Post by Akuma »

This has troubled me also.

I believe the graphic and sound material included in retail shatter.dat is property of the enterprise and therefore protected by the copyright law. The easiest way would be, indeed, to include/replace all custom stuff into the existing shatter.dat, build a new one and use only it while gaming. But as I said, I guess sharing the stuff in shatter.dat that's not of mod creator's origin is illegal.

Am I right? Can the retail stuff in shatter.dat be used legitimately in own external Starshatter MOD applications?
Starshatter: The Gathering Storm - Freespace MOD project
User avatar
wdboyd
Posts: 628
Joined: Tue Jun 14, 2005 9:52 pm
Location: Ohio U.S.A

RE: How to use the existing models?

Post by wdboyd »

ORIGINAL: Akuma

This has troubled me also.

I believe the graphic and sound material included in retail shatter.dat is property of the enterprise and therefore protected by the copyright law. The easiest way would be, indeed, to include/replace all custom stuff into the existing shatter.dat, build a new one and use only it while gaming. But as I said, I guess sharing the stuff in shatter.dat that's not of mod creator's origin is illegal.

Am I right?

Copyright? Then if we create a mission with the simulations mission editor and then share those missions with other players... we are violating the copyright?

I think not. Most of Starshatters inner workings have been opened to us.

All mods are created using the programs capabilites and data. Even total game conversions use the underlying program.

Just don't try to make any money with your creations and give credit wherever any credit is due out of politeness.

Other than that... have fun and share the fun. [:D]
"Time is a great teacher, but unfortunately it kills all its pupils!"
User avatar
Akuma
Posts: 31
Joined: Thu Jan 06, 2005 1:22 pm
Location: Finland

RE: How to use the existing models?

Post by Akuma »

Excellent. It seems I'm being just plain paranoid me again. This means I'll be stuffing my FSO stuff into the retail shatter.dat, remove from it what I don't need and share the resulting shatter.dat on my website (non-profit, credits to whom they belong) as the FSO MOD.

I hope this modus operandi is "Okeyed" by someone from Matrix Games's behalf as well!

[:D]

Starshatter: The Gathering Storm - Freespace MOD project
User avatar
wdboyd
Posts: 628
Joined: Tue Jun 14, 2005 9:52 pm
Location: Ohio U.S.A

RE: How to use the existing models?

Post by wdboyd »

Akuma

Actually, using the "shatter.dat" file name could create player and game confusion. The shatter.dat file is the simulations base .dat file.

Using its contents for a mod is one thing... but using its actual name could cause players conflict problems. I suggest using your own unique .dat file name instead of shatter.dat.

Personally... I wouldn't and won't use the "shatter.dat" file name for any mod. The files contents... yes... name.. no.

If you simply HAVE to use it... be sure you clearly warn everybody to backup their original "shatter.dat" file before using your mod. Or have them load a completely new copy of Starshatter:TGS into a different directory before loading your mod into it.

In conclusion... don't use the actual "shatter.dat" file name. There is no need to. [:-]

A possible exception would and could be a TOTAL conversion type mod. But in such a case... the simulations models wouldn't be used. A player WARNING would still be applicable.


"Time is a great teacher, but unfortunately it kills all its pupils!"
User avatar
Akuma
Posts: 31
Joined: Thu Jan 06, 2005 1:22 pm
Location: Finland

RE: How to use the existing models?

Post by Akuma »

Yes. I agree with your words completely. I considered to give the main FSO conversion file away labeled as fso.dat with a readme file included in the installation package. This readme file would contain the "installing instructions" that state that to "install" the mod one needs to rename the retail shatter.dat in the main SS:TGS installation directory to i.e. shatter_backup.dat or something, and THEN to rename the fso.dat to shatter.dat and copy it to the main installation directory. Of course, information about how to change back to original SS:TGS is a courteous thing to include in the file as well. But as you said, this idea needs more thinking.

Because pointing to (and using) the files inside the shatter.dat from external mod is next to impossible, it becomes necessary to create external duplicates. But, having to create a duplicate of everything necessary in shatter.dat is to cause intentional waste of resources in the user end, and imho goes against all ethics of good engineering work. However it is also obvious that to "force" the user to host two several hundred megs' shatter.dat files on his hard drive is making of waste resources as well.

Which one is the lesser evil? Absolute or relative efficiency? [:D]

In this light, I agree with you and conclude that it would be wiser indeed to choose the relative one: shatter.dat remains untouched, but fso.dat contains dupes from the shatter.dat.
Starshatter: The Gathering Storm - Freespace MOD project
User avatar
Akuma
Posts: 31
Joined: Thu Jan 06, 2005 1:22 pm
Location: Finland

RE: How to use the existing models?

Post by Akuma »

Oh. Found a thing in that supports the absolute efficiency idea. A good counterweight, so to speak.

It applies, for example, in cases like the galaxy.def. You cannot create a clean galaxy map of your own to an external mod. After several trials I came to a following conclusion: if you have a galaxy.def in both your mod file AND in the shatter.dat, according to the errlog SS:TGS loads them BOTH and there is nothing one can do about it. Believe me, two maps overlapping each other look ugly in the galaxy screen. [:D]

One "glue" solution would be to offset the MOD galaxy center far enough from the main galaxy map, but is an ugly solution as well since I'd like Sol to have coords 0,0,0 instead of 255,0,0.

So. In the left hand, we have the option to ask the user to remove the galaxy.def from shatter.dat by himself using starmod. In the right hand we have an option to give an intact shatter.dat one just needs to copy over the existing one and everything works fine in a matter of seconds.

I think, from the user's perspective, that I'd choose the latter. [:)]
Starshatter: The Gathering Storm - Freespace MOD project
User avatar
wdboyd
Posts: 628
Joined: Tue Jun 14, 2005 9:52 pm
Location: Ohio U.S.A

RE: How to use the existing models?

Post by wdboyd »

Hi,

In any case... keep the prospective player fully and precisely informed about what he or she needs to do.. or not do.
"Time is a great teacher, but unfortunately it kills all its pupils!"
Post Reply

Return to “Starshatter Modding Forum”