Issue with Militia on custom map...

Ok, Having an issue trying to make a "RandomMilitia" template for use on some of the planets on my map.  I finally got the map to where it is colonized by the Militia and has its default force (the group in the template with type set to "Always"), but none of the groups set to ""PlanetOwnerIsMilitiaWithChance" groups every take effect even if I set the param to 0.9.  Look below for an excerpt from my galaxy file:

TXT
versionNumber 4
isBrowsable TRUE
browsePictureName ""
browseName ""
browseDescription "TODO - Add Description Here."
isFirstCapitalShipIsFlagship TRUE
randomizeStartingPositions FALSE
planetArtifactDensity 0.000000
planetBonusDensity 0.750000
normalStartHomePlanetUpgradeLevel:Population 3
normalStartHomePlanetUpgradeLevel:CivilianModules 1
normalStartHomePlanetUpgradeLevel:TacticalModules 0
normalStartHomePlanetUpgradeLevel:Home 1
normalStartHomePlanetUpgradeLevel:ArtifactLevel 10
normalStartHomePlanetUpgradeLevel:Infrastructure 2
quickStartHomePlanetUpgradeLevel:Population 3
quickStartHomePlanetUpgradeLevel:CivilianModules 3
quickStartHomePlanetUpgradeLevel:TacticalModules 3
quickStartHomePlanetUpgradeLevel:Home 1
quickStartHomePlanetUpgradeLevel:ArtifactLevel 10
quickStartHomePlanetUpgradeLevel:Infrastructure 3
recommendedGameTypeCount 0
metersPerGalaxyUnit 50000.000000
pixelsPerGalaxyUnit 2.000000
useRandomGenerator FALSE
galaxyWidth 6298.000000
galaxyHeight 4639.000000
nextStarNameUniqueId 9
nextPlanetNameUniqueId 102
triggerCount 0
starCount 4
star
    designName "Star0"
    inGameName ""
    type "RandomNonGreenStar"
    pos [ 3465 , 2343 ]
    radius 200.000000
    moveAreaRadius 60000.000000
    hyperspaceExitRadius 40000.000000
    planetCount 20

.

.

.

    planet
        designName "Planet3"
        inGameName ""
        type "Desert"
        pos [ 3494 , 2382 ]
        moveAreaRadius 40000.000000
        hyperspaceExitRadius 30000.000000
        owner "RandomMilitia"
        isHomePlanet FALSE
        normalStartUpgradeLevelForPopulation 3
        normalStartUpgradeLevelForCivilianModules 1
        normalStartUpgradeLevelForTacticalModules 0
        normalStartUpgradeLevelForArtifacts 10
        normalStartUpgradeLevelForInfrastructure 2
        quickStartUpgradeLevelForPopulation 4
        quickStartUpgradeLevelForCivilianModules 1
        quickStartUpgradeLevelForTacticalModules 0
        quickStartUpgradeLevelForArtifacts 10
        quickStartUpgradeLevelForInfrastructure 2
        planetItems
            templateName ""
            subTemplates 1
            template "RandomMilitia"
            groups 1
            group
                condition
                    type "Always"
                    param ""
                owner "NoOwner"
                colonizeChance 0.000000
                items 4
                item "Artifact:PlanetaryOrganicAI"
                item "Bonus:StrictSecurity"
                item "Bonus:StrictSecurity"
                item "Bonus:StrictSecurity"
        spawnProbability 1.000000
        useDefaultTemplate FALSE
        entityCount 0
        asteroidCount 0

.

.

.

templates 1
template
    templateName "RandomMilitia"
    subTemplates 0
    groups 11
    group
        condition
            type "Always"
            param ""
        owner "RandomMilitia"
        colonizeChance 0.000000
        items 18
        item "Tech:Module:CrystalExtractor"
        item "Tech:Module:CrystalExtractor"
        item "Tech:Module:MetalExtractor"
        item "Tech:Module:MetalExtractor"
        item "Tech:Module:CombatLab"
        item "Tech:Module:NonCombatLab"
        item "Tech:Frigate:AntiFighter"
        item "Tech:Frigate:Light"
        item "Tech:Frigate:Colony"
        item "Tech:Frigate:Heavy"
        item "Tech:Frigate:Light"
        item "Tech:Frigate:Light"
        item "Tech:Frigate:LongRange"
        item "Tech:Frigate:LongRange"
        item "Tech:Frigate:AntiFighter"
        item "Tech:Frigate:Constructor"
        item "Tech:Frigate:Constructor"
        item "Tech:CapitalShip:Colony"
    group
        condition
            type "PlanetOwnerIsMilitiaWithChance"
            param "0.9"
        owner "RandomMilitia"
        colonizeChance 0.000000
        items 11
        item "Tech:Frigate:AntiFighter"
        item "Tech:Frigate:Carrier"
        item "Tech:Frigate:Heavy"
        item "Tech:Frigate:Light"
        item "Tech:Frigate:LongRange"
        item "Tech:Frigate:Siege"
        item "Tech:Frigate:Utility0"
        item "Tech:Frigate:Utility1"
        item "Tech:Module:HangarDefense"
        item "Tech:Module:GaussDefense"
        item "Tech:Module:RepairPlatform"
    group
        condition
            type "PlanetOwnerIsMilitiaWithChance"
            param "0.9"
        owner "RandomMilitia"
        colonizeChance 0.000000
        items 10
        item "Tech:Module:GaussDefense"
        item "Tech:Module:CultureCenter"
        item "Tech:Frigate:AntiFighter"
        item "Tech:Frigate:Carrier"
        item "Tech:Frigate:Heavy"
        item "Tech:Frigate:Light"
        item "Tech:Frigate:LongRange"
        item "Tech:Frigate:Siege"
        item "Tech:Frigate:Utility0"
        item "Tech:Frigate:Utility1"
.

.

.

Edit: fixed formatting

Any Ideas as to what I am doing wrong? 

12,885 views 10 replies
Reply #1 Top

the  map problem IS that rebellion seems to have created an issue with the withchance conditions on the maps, that WERE working in mapversions 0,1,2 & 3.

regarding the posting of text, my usual method is to open the file in either notepad OR notepad++, highlight the entire text block that I want to post, copy the block, and paste into the browser window(I have been using this method for approx 4 years in this forum)

harpo

Reply #2 Top

Quoting harpo99999, reply 1
the  map problem IS that rebellion seems to have created an issue with the withchance conditions on the maps, that WERE working in mapversions 0,1,2 & 3.

regarding the posting of text, my usual method is to open the file in either notepad OR notepad++, highlight the entire text block that I want to post, copy the block, and paste into the browser window(I have been using this method for approx 4 years in this forum)

harpo

Great...been wasting all this time for naught.  Any known workarounds?

 

As for the posting issue, I did copy from Notepad++ and I thought it had worked before....

Test:

 planet   designName "Planet3"   inGameName ""   type "Desert"   pos [ 3494 , 2382 ]   moveAreaRadius 40000.000000   hyperspaceExitRadius 30000.000000   owner "RandomMilitia"   isHomePlanet FALSE   normalStartUpgradeLevelForPopulation 3   normalStartUpgradeLevelForCivilianModules 1   normalStartUpgradeLevelForTacticalModules 0   normalStartUpgradeLevelForArtifacts 10   normalStartUpgradeLevelForInfrastructure 2   quickStartUpgradeLevelForPopulation 4   quickStartUpgradeLevelForCivilianModules 1   quickStartUpgradeLevelForTacticalModules 0   quickStartUpgradeLevelForArtifacts 10   quickStartUpgradeLevelForInfrastructure 2   planetItems    templateName ""    subTemplates 1    template "RandomMilitia"    groups 1    group     condition      type "Always"      param ""     owner "NoOwner"     colonizeChance 0.000000     items 4     item "Artifact:PlanetaryOrganicAI"     item "Bonus:StrictSecurity"     item "Bonus:StrictSecurity"     item "Bonus:StrictSecurity"   spawnProbability 1.000000   useDefaultTemplate FALSE   entityCount 0   asteroidCount 0

Test Failed....I dunno

Test on Firefox:

    planet
        designName "Planet3"
        inGameName ""
        type "Desert"
        pos [ 3494 , 2382 ]
        moveAreaRadius 40000.000000
        hyperspaceExitRadius 30000.000000
        owner "RandomMilitia"
        isHomePlanet FALSE
        normalStartUpgradeLevelForPopulation 3
        normalStartUpgradeLevelForCivilianModules 1
        normalStartUpgradeLevelForTacticalModules 0
        normalStartUpgradeLevelForArtifacts 10
        normalStartUpgradeLevelForInfrastructure 2
        quickStartUpgradeLevelForPopulation 4
        quickStartUpgradeLevelForCivilianModules 1
        quickStartUpgradeLevelForTacticalModules 0
        quickStartUpgradeLevelForArtifacts 10
        quickStartUpgradeLevelForInfrastructure 2
        planetItems
            templateName ""
            subTemplates 1
            template "RandomMilitia"
            groups 1
            group
                condition
                    type "Always"
                    param ""
                owner "NoOwner"
                colonizeChance 0.000000
                items 4
                item "Artifact:PlanetaryOrganicAI"
                item "Bonus:StrictSecurity"
                item "Bonus:StrictSecurity"
                item "Bonus:StrictSecurity"
        spawnProbability 1.000000
        useDefaultTemplate FALSE
        entityCount 0
        asteroidCount 0

 Stupid IE....I should know better

Reply #3 Top

Quoting harpo99999, reply 1
the map problem IS that rebellion seems to have created an issue with the withchance conditions on the maps, that WERE working in mapversions 0,1,2 & 3.

Well I've gotten some of my on chance stuff to work. What exactly changed?

Reply #4 Top

I also have had SOME withchance entries work BUT I get a LOT of errors in the logs/popups( with the dev) complaining about the withchance entries in maps and find it BLOODY frustrating when I am trying to test that my utilities actually do work inspite of the files looking identical files(to my eye when comparing line by line) (using a stock map from dip updated to map4 from map3 with a rebellion stock map of the same name.

harpo

 

Reply #5 Top

Well, after some playing around it looks like "PlanetOwnerIsMilitiaWithChance" doesn't mix well with "RandomMilitia".  If I set the planet owner as Militia0/1/2/etc I get a random assortment of ships (altho in one test they bombed their own planet lol).  If I use "NoPlanetOwnerWithChance" I get the random assortment with RandomMilitia (making sure they have a colony ship to quickly colonize the planet).  Weird...

Reply #6 Top

Quoting AceXMachine, reply 6
Well, after some playing around it looks like "PlanetOwnerIsMilitiaWithChance" doesn't mix well with "RandomMilitia". If I set the planet owner as Militia0/1/2/etc I get a random assortment of ships (altho in one test they bombed their own planet lol). If I use "NoPlanetOwnerWithChance" I get the random assortment with RandomMilitia (making sure they have a colony ship to quickly colonize the planet). Weird...

Well Ace, now that I can read your code with proper spaces... none of your groups have a colonize chance greater than zero. Use "PlanetOwnerIsMilitiaWithChance" if you want extra stuff to spawn if the militia actually own the planet. Use "NoOwnerWithChance" if no one is going to own the planet. You can't use WithChance if the player or the pirates own the planet.

Reply #7 Top

Ahhh, I was wondering what that was for but I thought I had checked that out already on a map made with map designer a while back when I first starting making maps trying to figure out what everything did.  I must have misread it or something heh.  Thanks!  So for clarification, if I set it to "1", it will always be colonized/spawn "RandomMilitia using my template...assuming everything "works"

Reply #8 Top

Quoting AceXMachine, reply 8
So for clarification, if I set it to "1", it will always be colonized/spawn "RandomMilitia using my template...assuming everything "works"

Yes. If you want the planets to be colonized, you need to set ColonizeChance on one of the groups to be greater than zero (1.0 if you want ones that use "PlanetOwnerIsMilitiaWithCance" to always work). If you just want more militia to appear at the planet without it being colonized, use "NoOwnerWithChance".

+1 Loading…
Reply #9 Top

Thanks again Goa!

Reply #10 Top

Game is an idiot and loves the noplanetowner/withchance over planetowner/withchance.  Games made with the map maker will have militias that colonize -but only the default stuff.  Custom templates -you might as well make them always colonize for how the game selects things.  Royal ****ing Pain.