Mobile Shipyard

Trials and Tribulations

Spent the last 45 min or so trying to whip up a mobile shipyard by playing with the things the carrier produces. Essentially, I want to make a semi-self-replicating carrier (I was thinking about making it make Kol battleships, but a free, build time 1 carrier that builds itself was too funny to pass up)

The fundamental problem is that I haven't figured out how to do so, and I've tried a bunch of different things.

The three ways I approached the problem are the following:

1. ideal solution is to just have it produce the ship itself by substituting squadtypeentitydef variable from squadtechbomber to frigatetechcarrier. I didn't have much faith in this working as it seemed this required a entitytype squad to work, but I tried it anyway. didn't work.

2. set up a dummy squad file that has a total of 1 ship, and references frigatetechcarrier, similar to how the squads now reference fightertechcombat, etc. this didn't work, core dump as usual.

2.5. copy the squad file and make it reference a new file called fightertechfrigate, with the contents copypasted from frigatetechcarrier. I later realized this was the exact same thing as #2 except with a new file, but oh well. this didn't work anyway.

3. gave the carrier a entity type of the planet module shipyard. i didn't have much faith in this working either - and it didn't, as it was missing half the variables used in the shipyard data type.

So, dear modders, has anyone figured out to solve this problem? I think the way to do it is really #2(.5), but every time I make a squad file based off the bomber and reference the carrier, it still doesn't work!
27,651 views 49 replies
Reply #1 Top
Oh, and since there's no edit link on the first post of threads for some reason, here's the little log I wrote as I did the above:

1. Changed everything to free (carrier, military lab) and build time to 0
Observation: do not set build time to 0 in future, indefinite build

2. Fixed, core dump on build
(?) Need to set up SQUAD file for building carriers?

3. Set up dummy SQUAD file for carrier
(?) Doesn't work, core dump

4. Change entity type of carrier
(?) Doesn't work. Looks like entitytype is a ADT with a few specific parameters and does
not accept the standard "hi I move" variables and parameters

5. Make carrier build a third ship, keep bomber squad file (rename), but change actual ship
file
(!) Copied SquadBomber file, renamed, repeated process with fighter file itself,
copy/pasted frigate info into this file, changed type to build frigate, made the
carrier build this squad type too
(?) TextFileArchive (.\GameInfo\FrigateTechCarrier.entity) missing Label:
'maxNumCommandPoints', WTF i didn't change this!
(!) Removed new carrier build (restore of FrigateTechCarrier)
(?) Boots
(!) Changed bomber build to frigate squad build
(?) Boots
(?) Core dump upon finished building, damn. This means squad file works, just not
individual ship file
Reply #2 Top
I believe that bombers / fighters depend on the squad and the entity files -- I'm not much of a modder, but I'd be willing to bet that the entity files carry the information for the individual units, while the squad file carries the data for the entire squad.

Does that help?
Reply #3 Top
While i am not exactly sure how the squads work, i am assuming like ron lugge said the carrier entity will have a squad reference, and what type it builds (IE: fighter/bomber). I dont know if that can be changed, or if it is hardcoded. In any case the carrier entity is the 1st place you want to look. Judging from the logs you wrote you are way ahead of us as far as figuring this out. (BTW for future reference you can edit your posts to add info insted of creating new posts )

You could possibly try this... create a new squad entity (name it squad2, or something like that) and have the carrier reference that as its buildable.
Reply #4 Top
I did in fact already try creating a dummy SQUAD file for the carrier then referencing the individual carrier file and pointing the carrier build to that. Doesn't work.

[quote](BTW for future reference you can edit your posts to add info insted of creating new posts )/quote]

Not the thread creation post - oddly enough there is no edit button.
Reply #5 Top
actually there is, under tools.
Reply #6 Top
Oh Oh I know, lets strap a cannon to it too.

I wants a cannon!!
Reply #7 Top

Not the thread creation post - oddly enough there is no edit button.


Look at the top of the initial post, under "tools".
Reply #8 Top
Do you specifically want to use the squad mechanism, i.e. for free auto respawn?

You might have more luck with the SpawnFrigate buff type, as with the Sova's missile turret and the mobile space mines in my Kin of the Stars mod. Set the expiration time to something insanely long (or try -1 for the expiration time, that might work for infinite lifetime), and you can essentially build ships out of antimatter.
Reply #9 Top

Do you specifically want to use the squad mechanism, i.e. for free auto respawn?

You might have more luck with the SpawnFrigate buff type, as with the Sova's missile turret and the mobile space mines in my Kin of the Stars mod. Set the expiration time to something insanely long (or try -1 for the expiration time, that might work for infinite lifetime), and you can essentially build ships out of antimatter.


Hmm, this sounds like the best solution. The ideal would be essentially the same as a shipyard module that moves and builds ships out of the normal credits/metal/fuel but I quickly realized that's unworkable.
Reply #10 Top
It shouldn't be unworkable though, Sins needs to be plenty more moddable by release, imo. With some decent scripting like LUA.
Reply #11 Top
The way it is now is just fine. They tried LUA in HW2, and look at how moddable that game was (you need to be a rocket scientist, and a brain surgeon to figure out how things work in HW2). It took over 3 years for a decent mod to come out for HW2 (warlords). The way scripting is now it is similar to HW1/Cataclysm. We can change many things now. Plus we are still learning what does what. We didnt have that luxury in HW2.
Reply #12 Top
Sins won't use LUA (it was ripped out a while ago), but will be highly moddable after we release the Forge Tools.
Reply #13 Top
HW was so easy to mod, even I could do it, crudly though.
Reply #14 Top
Very important and good to know we will get the tools we need. Thx Yarlen.
Reply #15 Top
Sins won't use LUA (it was ripped out a while ago), but will be highly moddable after we release the Forge Tools.

make SURE the ability to spawn ships is included, if nothing else!



I really desperately want to create a Bentusi styled shipyard   
Reply #16 Top
a bentusi ship in sins would be awsome...


only played HW1, so I don't know what type of ships bentusi have in cata or HW2.


I GOT IT!!!!!!!!

HW style mod!!!!!!

*everyone stares blankly at Evil*
Reply #17 Top
*blinks twice*

...

YAY!!!
Reply #18 Top
so I don't know what type of ships bentusi have in cata or HW2.


They had one ship in HW2, and it was big and puuurdy. You missed out on a lot with HW2, there's a ton of cool stuff there. But I'm getting carried away
Reply #19 Top
for all you who missed out:

Bentus! in a really small box.
Reply #20 Top
Let me boil this down:

"We want the ability in a Buff entity to add/subtract from the player's current resource storage (credits, metal, crystal). An ability also needs the ability to check for (credits, metal, crystal) as prerequisites to activate the ability, as well as the antimatter level of the ship itself."

That, plus the existing SpawnShip action, should give you what you want. Anything I'm missing?
Reply #21 Top
That, plus the existing SpawnShip action, should give you what you want. Anything I'm missing?


Fleet points, as well.
Reply #22 Top
Oh screw it.... Dev's just add in a "Build mod for me" button
Reply #23 Top
speaking of which I like what sucom does with mods, that is a frankly brilliant idea.
Reply #24 Top
I imagine the Vasari might have a mobile shipyard, considering they don't colonize planets.
Reply #25 Top

I imagine the Vasari might have a mobile shipyard, considering they don't colonize planets.


... good point!