Topic: Adding shuttles to custom races  (Read 2344 times)

0 Members and 1 Guest are viewing this topic.

Offline Gulli

  • Lt. Junior Grade
  • *
  • Posts: 22
Adding shuttles to custom races
« on: March 26, 2010, 11:33:22 pm »
Hi all, I've been doing some modding lately and it was going pretty well. I've added the Dominion and the Cardassians and expanded the Ferengi. But when I give them shuttles something strange happens: all Ferengi, Cardassian and Dominion ships will use the Federation shuttle, even in fleet pick. I've given the pirates the Ferengi shuttle and they use it, but the Ferengi ships won't. When I make a fleet pick scenario with me piloting shuttles they work just fine so there's nothing wrong with their stats or models but somehow Cardassian, Ferengi and Dominion ships will only use the Federation shuttle.

I know there are tons of mods out there that have Cardassians using CARDASSIAN shuttles proving that custom shuttles for custom races are possible, so what did I overlook?

Any help would be appreciated

Offline -E

  • Lt. Junior Grade
  • *
  • Posts: 11
Re: Adding shuttles to custom races
« Reply #1 on: March 27, 2010, 07:25:30 am »
Converted shuttles (i.e. wild weasels, drone, suicide, etc) are hard-coded to use the original shuttle for that race.  To get new shuttles to show up in those instances, you have to replace the original race's shuttles' actual models (naming the new shuttle model the same as the original).

If your problem concerns (straight) admin shuttles, perhaps a typo somewhere for each race you're having problems with?

Offline Gulli

  • Lt. Junior Grade
  • *
  • Posts: 22
Re: Adding shuttles to custom races
« Reply #2 on: March 27, 2010, 08:45:40 am »
Thank you. Maybe I should have clarified that I'm modding SFC3 so there are only standard shuttles, I've gotten the Cardassian shuttle to work now (still don't know how) but still no joy with the Ferengi and Dominion. Again, they do show up when I force the as ships on the map in fleet pick and I've gotten the Pirates to use the Ferengi shuttle.

BTW: I noticed the same problem occurs with weapons platforms: the Cardassians will use their own but the Dominion and Ferengi will use those of the Federation. Aside from shuttles and weapons platforms everything works though, all other bases, planets and ships work and are of the right race.

Offline Gulli

  • Lt. Junior Grade
  • *
  • Posts: 22
Re: Adding shuttles to custom races
« Reply #3 on: March 28, 2010, 06:42:55 pm »
I've done some more testing and it seems shuttles are somewhat hardcoded: races that are not the Klingons, Romulans, Pirates, Rakellians, Borg or Cardassians will always use whatever object is called "Federation Shuttle" in the defaultloadout file and if there isn't an object called "Federation Shuttle" then the Federation and your custom races will have no shuttles. Shuttle names are hardcoded: the Federation won't work with anything else than "Federation Shuttle", the Rakellians need "Rakellian Shuttle", the Cardassians need "Cardassian Shuttle" and so on... I guess the same thing holds true for weapons platforms.

I think it's really lame they hardcoded something like this and it probably means the Dominion and Ferengi are stuck with Federation shuttles. I could swap one of those races with the Rakellians, but, not both and it may screw up the singleplayer campaign for all I know.

That's the conclusion I've arrived at, I hope someone will show me wrong...

Offline JanB

  • Lt. Junior Grade
  • *
  • Posts: 103
Re: Adding shuttles to custom races
« Reply #4 on: January 16, 2015, 10:26:35 am »
After working many hours with a hex editor and a disassembler I've cracked the hardcoding and now every race, from Federation to Neutral now has its own shuttle, they'll look for the following objects in the defaultloadout file:

Federation: Federation Shuttle
Klingon: Klingon Shuttle
Romulan: Romulan Shuttle
Borg: Borg Shuttle
Species 8472: Species 8472 Shuttle
Cardassian: Cardassian Shuttle
Ferengi: Ferengi Shuttle
Rakellian: Rakellian Shuttle
Pirate: Pirate Shuttle
Neutral: Neutral Shuttle

You can change these names by opening the attached SFC3exe with a hex editor and searching for the right string. For example say you have a mod with the Dominion instead of Species 8472: you open SFC3exe with a hex editor, search for the string "Species 8472 Shuttle" (without the parentheses) and when you find it you replace it with "Dominion Shuttle....", where the dots (make sure they are represented as 00) are used as padding to make sure everything in the exe file stays in the right place.

I've attached the new SFC3exe, as a bonus it also sets the default game points limit in skirmish from 65000 to 999999.

Have fun!

P.S. Always make back ups before messing with the game and make sure to credit me (JanB) if you use thise modified exe in your mod.

Offline d4v1ks

  • D.Net VIP
  • Lt.
  • *
  • Posts: 682
  • Gender: Male
Re: Adding shuttles to custom races
« Reply #5 on: March 16, 2016, 12:22:52 pm »
I think you just need to dowload the sfc3.exe linked above.
JanB changed it in way that now it will look for the appropriated shuttle for its race.

But if you want to continue to run the HD patch, you will have to use the latest version made from JanB.
He made a update recently.
Check the link below...

http://www.dynaverse.net/forum/index.php/topic,163394157.msg1123053112.html#msg1123053112
"But he isn't wearing anything at all!" (The Emperor's New Clothes)

Offline JanB

  • Lt. Junior Grade
  • *
  • Posts: 103
Re: Adding shuttles to custom races
« Reply #6 on: March 16, 2016, 03:28:57 pm »
Yeah, that's right. Just compare the .exe posted above with a standard 534b .exe to find the changes I made. If you want to change the names of the shuttles you have to be careful: replacing a name by a shorter name means you have to replace the "lost" characters by periods, replacing a name by a longer name means you have to remove periods and when you run out of periods you have reached the maximum length.

Offline JanB

  • Lt. Junior Grade
  • *
  • Posts: 103
Re: Adding shuttles to custom races
« Reply #7 on: March 17, 2016, 05:22:38 am »
Ah, I see. Well, I think the only thing I did besides editing the .exe was add the shuttles to the defaultcore and defaultloadout files (with Class set to "SH" in the defaultcore file), like you would for any other ship, just make sure their names match the names hardcoded in the .exe (or change the names in the .exe).

You need my mod to get all the 9 races working with the ships and stations I gave them. But you could easily make different ones and you can change the full empire names in the RaceNames.gf file (most of the game's files only use the short empire names). What's more difficult is setting up a conquest campaign with extra races. You need to run a copy of Windows XP (a virtual XP copy works as well) and create a new map. You also need to create new scripts for the scenarios. This too only works with Windows XP (you need Visual Studio 6, modern versions won't work, and have C/C++ programming experience, which I did, but I still barely understand the basics of the structure of the scripts so don't even go there if you don't have programming experience), though you might get a lot done by simply editing the names of ships and stations in the scripts I put in my mod (open them with a hex editor or maybe even notepad and look for the names). I spent a godawful amount of time making this mod and its patches (it's a miracle I didn't lose my job or my girlfriend), I'm still proud of the result but I wouldn't recommend starting from scratch unless you're gonna be stuck on a deserted island for at least six months, but like I said you might get pretty far by just changing shipnames, textures, etc... in my mod, for which you have my permission as long as you credit me in the readme of the end result.

Offline AlDaja

  • Lt. Junior Grade
  • *
  • Posts: 40
  • Gender: Male
  • SFC:III Troubleshooter
    • Star Trek: Starfleet Command III - Sra'xa'diin Shipyards
Re: Adding shuttles to custom races
« Reply #8 on: July 04, 2017, 07:14:55 pm »
This mod works perfectly.  We have applied and tested JanB's shuttle fix with a full 9-race map and the AI will launch assigned shuttles.  Great mod!
Don't try to be a great man. Just be a man, and let history make its own judgments.