How do you add units to the pirates?

I've junked up a Kol Battleship's entity and want to make the pirates build it from time to time, what do I need to edit for it to be randomly built by the pirates? Is it as simple as adding the entities name somewhere or do I have to edit the actual AI or something?

17,523 views 13 replies
Reply #1 Top

do you mean for pirate raids or at the pirate homeworld?

 

for them to be used in pirate raids- you need to play around in the gameplay.entity file and mess with the pirate raid def

for them to be used at the pirate bases- you need to use galaxy forge and edit the pirate base template 

Reply #2 Top

If you were to add to a raid, you need to add a similar template to the gameplay.entity

pirateRaidComposition:4
            requiredShipCount 2
            requiredShip
                type "CAPITALSHIP_PIRATEBATTLESHIP"
                minCount 1
                maxCount 1
            requiredShip
                type "CAPITALSHIP_PIRATECARRIER"
                minCount 1
                maxCount 1
            randomShipCount 5
            randomShip
                type "FrigatePirateMedium"
                weight 6
            randomShip
                type "FrigatePirateHeavy"
                weight 7
            randomShip
                type "FrigatePirateAntiFighter"
                weight 3
            randomShip
                type "CAPITALSHIP_PIRATESUPPORT"
                weight 1
            randomShip
                type "CAPITALSHIP_PIRATESIEGE"
                weight 1

as for the base:

item "Pirate:CapitalShip:Battleship" -> would add the Capital_piratebattleship.entity

in the galaxyscenariodef file under

planetItemsTemplate
    templateName "Template:PirateBase"
(use the find feature to search for it), look until you see the section that list the ships

+1 Loading…
Reply #4 Top

The game keeps giving me undefined entity ref if I add anything to the galaxyscenariodef file, I decided to add one extra guass defense (and updated the count) to the pirate base to make sure, the game just gives me that undefined error through the dev exe and on load, the extra gauss defense gun that I added isnt there.


Also if I make a new entity, the game just crashes on start saying it can't find a ref even though I added it to the player and entity manifest, why isn't this working for me when it does for everyone else? what could I possibly be doing wrong?

Edited, because i'm not crashing when adding anymore, i'm now only crashing when trying to make new things.

Reply #5 Top

how very strange. ill think about it and get back to you on that one. are you sure you havent made any other changes to the game that is causing it to crash?

Reply #6 Top

Nope, i've tried doing the most basic things now such as making a mod with unmodded entity manifest, an unmodded galaxyscenariodef in the gameinfo folder and a new entity named "capitalship_techtestbattleship", I then added that new entity to the entity manifest and the test battleship to the "normal start" of tech in the galaxyscenariodef file but the game will just crash when loading the mod again.

Reply #7 Top

For some reason it's started working correctly now. >_>

 

One more thing, how do you add a build limit to a unit that the player can build?

Reply #8 Top

No sure if there is a mech for that, probably the only way is to increase the number of supplies used.

Reply #9 Top

yeah i agree with mooster. the only way i can see doing that is by using the supply limit or cap ship limit. or slots of its a building

Reply #10 Top

:)  Mooster,   Thank you for the wonderful detail on adding Caps to the game file.  :)  I hadn't tried it, but it looks wonderful!!!  :)

-Teal

 

 

Reply #11 Top

its nothing, i just took it from the distant stars mod

Reply #12 Top

You have to make sure your new ship entity is defined in "Player Pirates".  As well as defined in "gameplay entity". If you added a new ship entity file the game wont see it untill you add it to the factions player entity file.

Reply #13 Top

Ture that.

thanks for the correction major

and to general, it is the same method you would do for the other factions as well