Is it possible to build other races' ships from captured production ship/mothership?

(Make them capturable at first is another topic but I guess it would be easier than this)
Like Command & Conquer, when you capture, say, Vaygr carrier, you are able to build Vaygr strike crafts and frigates.

I don’t think HWRM operates any differently, so I’ll explain how I think it’d work in HW2 classic:

The easiest way would be to add special ship and build families to the ships you want to be able to take control of. (Balancing would require all families of each race be added to all others.)

A more advanced way would be to use a scripted function to enable the building of the captured ship’s parent race’s ships. Not entirely sure that’s possible as I’ve not done a ton of scripting for any HW game, but I reckon it is. Take a look at SiliconWorm’s mod for HW2 classic. He’s put in a ton of scripts, some of which share similar functionality.

EDIT: Rather than copy-paste every individual ship just to have them in the build menu, you might can also change the CanBuildShips families in-game via scripting, overriding anything loaded from the ship file data.

Thanks for the tips, but unfortunately I have zero knowledge about scripting, need to resort to the easy, dumb, but time-consuming method while learning how to script

If there are other methods, someone else will have to point them out. Those are just two off the top of my head. If you’re not big on scripting, the families method is the next best. I advise using Regex for a mass-replace. Command-line would probably work best if you can deal with CLI. Scripting a mass replace for contents of multiple files isn’t terribly difficult. If you know any JavaScript, there are libs on GitHub (and elsewhere) for Regex libraries. For Batch, I use JREPL. Python has its own libs, as well.

Basically, all you (should) need to do is append your familyName to canBuildShips, for example let’s say “vgrFighterCaptured”, just before the last quote in each capturable ship’s data file. For the vgr_Carrier, iirc it would look something like this:

newShipType.canBuildShips() = {“vgr_Fighter”, “vgr_Corvette”, “vgr_Frigate”, “vgr_FighterCaptured”};

Then add the custom families’ definitions to familylist.lua. Again, syntax may not be right in that. I’m typing all from memory.

Scripting the game would be way easier because it would really only require one small function to enable the build menu of captured axis ships. That is unless there’s some hard coded barricade preventing fleets from constructing axis units from captured ships. (Maybe more complex than just that, I don’t have much specific knowledge in HW2 scripting either.)

Haven’t been active here since 2015, and by the looks of it most of the people who spoon fed me back then (pre-2015, when the original Karos Graveyard was a thing on RelicNews) don’t appear terribly active nowadays. I reckon some are still lurking around.

That’s actually a really good idea! If I’m playing with some computer buddies, and they’re unfortunate enough to capture a carrier that isn’t their race, I usually do them the favor of nuking it so it doesn’t take up one of their unit cap spots! =D

I think the easiest way to do this would be to copy over all of the ships out of the def_build.lua files. (i.e. "gameroot\scripts\races\kushan\scripts\def_build.lua"There’s one for each race, and this determines which ships are visible in the build menus. I’m pretty sure the production facilities all have race-specific names, so you probably don’t need to change the X.ship files at all.

So:
1- copy all the ship entries into one big def_build.lua so that each race has the same file which contains ALL buildable ships.
2- make sure each ship entry has a unique “DisplayPriority” number
3- you should leave all of he other fields as they are except for ‘RequiredResearch’ which you can either leave empty or replace with the closest research from the player’s race.

And I think that would do it!

I think the idea is totally good! I kinda thought the same thing a few times, but never thought about implementing it for some reason. I guess it doesn’t happen enough.

Or how about this? If you have a build ship from another race, and you build their research module, you can totally start researching ALL of their crap? It’d be like changing races mid-game! If you were actually trying to win a close game, I’m not too sure why you’d want to do this because of all the doubled (or quadrupled!) research, but it might be fun for a gag, or if the game was too easy anyway.

AH - I just thought about this: what I wrote before would work for people, but you’d also have to update all of the AI stuff for the CPU to build ships from other races, which would be a LOT of work to get working right because the AI scripts are very touchy.