Can't improve pirate raids.

I've been tweaking around with the gameplay.constants file, trying to make a mod with more deadly pirates. I want to add new ship types to later game pirate raids, so that I can place capital ships into the forces. But every time it gets to that point, the game crashes.

This is a sample block of data that I've tweaked:
pirateRaidComposition:2
            requiredShipCount 0
            randomShipCount 6
            randomShip
                type "FrigatePirateScout"
                weight 2
            randomShip
                type "FrigatePirateMedium"
                weight 8
            randomShip
                type "FrigatePirateHeavy"
                weight 5
            randomShip
                type "FrigatePirateAntiFighter"
                weight 3
            randomShip
                type "FrigatePirateSiege"
                weight 3
            randomShip
                type "CAPITALSHIP_TECHCOLONY"
                weight 1
End of quote

I have checked the pirate files, and they do have data for using TECH capital ships. From the looks of it they aren't missing anything that the tech race has.

What am I doing wrong here?
7,467 views 8 replies
Reply #1 Top
Though I havent tested it myself, from what i can remember those who have tried this before decided that adding capitalships to pirate raids isn't possible. My guess as to why would be that the Raid can't handle capitalship entities, it would probably work if you created a frigate entity out of the capitalship, though obviously this would remove levelling.
Reply #2 Top
Though I havent tested it myself, from what i can remember those who have tried this before decided that adding capitalships to pirate raids isn't possible. My guess as to why would be that the Raid can't handle capitalship entities, it would probably work if you created a frigate entity out of the capitalship, though obviously this would remove levelling.
End of quote


It's possible.
I've made a pirate MOD before, adding Captialships, all worked well.
Here is a screenshots with Captialships Pirate Raid.



The reason I didn't publish it was another problem.
After these Captialships & Frigates finished raid, they return to the Pirate Base and stay.... so, here is a screenshot of many returned raid groups...it's horrible!!!

There were near 200 Captialships and over 200 seigeships and near 100 LRM and over 100 squadrons and other support ships.
Reply #3 Top
Sorry, I forget poster's question.
Your edit seems well, But I don't know your MAX randomshipcount number, When I've tested before, The number should <10, Or the game easly to minidump.

BTW, I still not sure about the var "weight". I thought it decide the percent in raid group but not sure about amount.
Ex:
randomShip
type "FrigatePirateScout"
weight 2
randomShip
type "FrigatePirateMedium"
weight 8
randomShip
type "FrigatePirateHeavy"
weight 5
randomShip
type "FrigatePirateAntiFighter"
weight 5
Means 10%PirateScout/40%PirateMedium/25%irateHeavy/25%PirateAntiFighter.
If we double the numbers(2/8/5/5--->4/16/10/10), percent should remain, how about amount? anyone knows how it's caculated?
Reply #4 Top
When I've tested before, The number should <10, Or the game easly to minidump.
End of quote

Actually, I noticed the game crash when it got to this piece of code:
pirateRaidComposition:3
requiredShipCount 0
randomShipCount 9
randomShip
type "FrigatePirateMedium"
weight 18
randomShip
type "FrigatePirateHeavy"
weight 21
randomShip
type "FrigatePirateAntiFighter"
weight 9
randomShip
type "FrigatePirateSiege"
weight 9
randomShip
type "CAPITALSHIP_TECHBATTLESHIP"
weight 1
randomShip
type "CAPITALSHIP_TECHCARRIER"
weight 1
randomShip
type "CAPITALSHIP_TECHSUPPORT"
weight 1
randomShip
type "CAPITALSHIP_TECHCOLONY"
weight 2
randomShip
type "CAPITALSHIP_TECHSIEGE"
weight 1
End of quote

I guess I'll have to reduce those weight numbers to make it work. Is it possible to use decimals for the random chances? I really don't want the pirate capitals popping up as every other ship.
Reply #5 Top
decimals? I didn't tried before.
BTW, do you enlarge the "maxSupply"?
And how do you think the meaning of "weight" which i've posted.
Reply #6 Top
I did enlarge the max supply, in fact I tripled it. To counteract this I've reduced the factors that increase pirate strength by one third. Pirate strength appears to be a % value of the supply. I'm not sure if it's a % of the values between the min and max, or if it's only from 1-max.

I'm trying out decimals, to see where I can get with them. On the plus side, it hasn't crashed the game... yet!
Reply #7 Top
Nope. I've been rattling my head on this, and I simply can't make it work! I'm hosting the file to see if anyone can figure out where I went wrong. I don't have any of the randomizing weights over 10, I counted up the randomshipcount properly, and I couldn't find any typos. It SHOULD work, as far as I know, but it keeps crashing at the upper tiers of pirate aggression.

Here's the file link to my gameplay.constants file. It's the only file I changed in the mod. Yes, I do have the rest of the files there, the mod does load and play fine until the endgame pirates.
http://files.filefront.com/Gameplayconstants/;9969106;/fileinfo.html
edit: The pirates seem to make raids against computer raids no problem, although I can't see what's going on. But if they target me it outright crashes. I'm not sure if that's related somehow.
Reply #8 Top
Hi Bobucles, Uzii once told me MaxSupply should be in 300, If bigger than 300 should crash game.
And I'm reworked on my Pirate MOD, Maybe we can work together.

Just as I've said, I've made 5 copies of original PirateShips except Piratescout and a new pirate carrier ship which used TEC-LightCarrier model but retexture.
After I've solved the pirateships ability crash problem, I plan to publish it.
Detail imformation in my string file:
Code: xml
  1. StringInfo
  2. ID "IDS_FRIGATE_PIRATEANTIFIGHTER_B_NAME"
  3. Value "PirateAntiFighter-Basic "
  4. StringInfo
  5. ID "IDS_FRIGATE_PIRATEANTIFIGHTER_I_NAME"
  6. Value "PirateAntiFighter-Improved "
  7. StringInfo
  8. ID "IDS_FRIGATE_PIRATEANTIFIGHTER_A_NAME"
  9. Value "PirateAntiFighter-Advanced "
  10. StringInfo
  11. ID "IDS_FRIGATE_PIRATEANTIFIGHTER_S_NAME"
  12. Value "PirateAntiFighter-Super "
  13. StringInfo
  14. ID "IDS_FRIGATE_PIRATEANTIFIGHTER_U_NAME"
  15. Value "PirateAntiFighter-Ultimate "
  16. StringInfo
  17. ID "IDS_FRIGATE_PIRATEANTIFIGHTER_NEW_DESCRIPTION"
  18. Value "Pirate AntiFighter, good at attack fighters and bombers. Model development sequence: Basic-> Improved-> Advanced-> Super-> Ultimate "
  19. StringInfo
  20. ID "IDS_FRIGATE_PIRATECARRIER_B_NAME"
  21. Value "PirateCarrier-Basic "
  22. StringInfo
  23. ID "IDS_FRIGATE_PIRATECARRIER_I_NAME"
  24. Value "PirateCarrier-Improved "
  25. StringInfo
  26. ID "IDS_FRIGATE_PIRATECARRIER_A_NAME"
  27. Value "PirateCarrier-Advanced "
  28. StringInfo
  29. ID "IDS_FRIGATE_PIRATECARRIER_S_NAME"
  30. Value "PirateCarrier-Super "
  31. StringInfo
  32. ID "IDS_FRIGATE_PIRATECARRIER_U_NAME"
  33. Value "PirateCarrier-Ultimate "
  34. StringInfo
  35. ID "IDS_FRIGATE_PIRATECARRIER_NEW_DESCRIPTION"
  36. Value "PirateCarrier, From Basic model to Ultimate can take Squad from one to five! Model development sequence: Basic-> Improved-> Advanced-> Super-> Ultimate "
  37. StringInfo
  38. ID "IDS_FRIGATE_PIRATEHEAVY_B_NAME"
  39. Value "PirateHeavyCruiser-Basic "
  40. StringInfo
  41. ID "IDS_FRIGATE_PIRATEHEAVY_I_NAME"
  42. Value "PirateHeavyCruiser-Improved "
  43. StringInfo
  44. ID "IDS_FRIGATE_PIRATEHEAVY_A_NAME"
  45. Value "PirateHeavyCruiser-Advanced "
  46. StringInfo
  47. ID "IDS_FRIGATE_PIRATEHEAVY_S_NAME"
  48. Value "PirateHeavyCruiser-Super "
  49. StringInfo
  50. ID "IDS_FRIGATE_PIRATEHEAVY_U_NAME"
  51. Value "PirateHeavyCruiser-Ultimate "
  52. StringInfo
  53. ID "IDS_FRIGATE_PIRATEHEAVY_NEW_DESCRIPTION"
  54. Value "PirateHeavyCruiser, a heavy cruiser, with ability of PirateDomination and RestoreShield! Model development sequence: Basic-> Improved-> Advanced-> Super-> Ultimate "
  55. StringInfo
  56. ID "IDS_FRIGATE_PIRATEMEDIUM_B_NAME"
  57. Value "PirateMediumCruiser-Basic "
  58. StringInfo
  59. ID "IDS_FRIGATE_PIRATEMEDIUM_I_NAME"
  60. Value "PirateMediumCruiser-Improved "
  61. StringInfo
  62. ID "IDS_FRIGATE_PIRATEMEDIUM_A_NAME"
  63. Value "PirateMediumCruiser-Advanced "
  64. StringInfo
  65. ID "IDS_FRIGATE_PIRATEMEDIUM_S_NAME"
  66. Value "PirateMediumCruiser-Super "
  67. StringInfo
  68. ID "IDS_FRIGATE_PIRATEMEDIUM_U_NAME"
  69. Value "PirateMediumCruiser-Ultimate "
  70. StringInfo
  71. ID "IDS_FRIGATE_PIRATEMEDIUM_NEW_DESCRIPTION"
  72. Value "PirateMediumCruiser, a support crusier with ability Repair and StealRescource. Model development sequence: Basic-> Improved-> Advanced-> Super-> Ultimate "
  73. StringInfo
  74. ID "IDS_FRIGATE_PIRATESIEGE_B_NAME"
  75. Value "PirateColonySiege-Basic "
  76. StringInfo
  77. ID "IDS_FRIGATE_PIRATESIEGE_I_NAME"
  78. Value "PirateColonySiege-Improved "
  79. StringInfo
  80. ID "IDS_FRIGATE_PIRATESIEGE_A_NAME"
  81. Value "PirateColonySiege-Advanced "
  82. StringInfo
  83. ID "IDS_FRIGATE_PIRATESIEGE_S_NAME"
  84. Value "PirateColonySiege-Super "
  85. StringInfo
  86. ID "IDS_FRIGATE_PIRATESIEGE_U_NAME"
  87. Value "PirateColonySiege-Ultimate "
  88. StringInfo
  89. ID "IDS_FRIGATE_PIRATESIEGE_NEW_DESCRIPTION"
  90. Value "PirateColonySiege, Can process planet bomb mission, also can colonize it after wipe out the enemy. Model development sequence: Basic-> Improved-> Advanced-> 超级型-> Ultimate "