1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Snofru's Space Maps

Discussion in 'Maps & Scenarios' started by Snofru1, Dec 11, 2018.

  1. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    8,135
    Location:
    Poland
    They have <iPlacementOrder>-1</iPlacementOrder>, it was done so they don't spawn on earth, if someone does crazy things with SmartMap resource generation....
    I wonder if @Toffer90 can limit them so they don't appear on Earth tiles.
     
  2. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,344
    Location:
    Norway
    Ah, right, makes sense that space bonuses don't have proper xml setup for map placement yet.

    Been working on random starting position code today, it's a friggin mess!
    Started a full rewrite of it, but there's a lot to consider, so it will take some time.
    It has to work for map scripts and scenarios, and it needs to consider difficulty better (difficulty factor seemed completely broken as it was).
    Scenarios must be able to define starting positions for just some arbitrary player slots, all or none, it also needs to be able to define plots as startingPlots without tying it to a specific player slot.

    Random factor can't be a dominant factor either as there has to be some rules to guide the starting position picker to not pick terrible plots and for difficulty to meaningfully give low diff players better starting positions than high diff players. Currently it didin't have any random factor in this evaluation, but I need to figure out the strength of randomness that is appropriate to add here and perhaps some way to not have it random at all for map scripts so that it picks the best spots with precision then.
     
    Last edited: Jan 25, 2021
    Snofru1 likes this.
  3. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    8,135
    Location:
    Poland
    They have some setup defined (feature/terrains being there), just <iPlacementOrder>-1</iPlacementOrder> blocks them.
    This space bonus infos is in Peppers module.

    Example:
    Code:
    <BonusInfo>
                <Type>BONUS_ABANDONED_CIVILIZATION</Type>
                <Description>TXT_KEY_BONUS_ABANDONED_CIVILIZATION</Description>
                <Civilopedia>TXT_KEY_BONUS_ABANDONED_CIVILIZATION_PEDIA</Civilopedia>
                <BonusClassType>BONUSCLASS_MISC</BonusClassType>
                <ArtDefineTag>ART_DEF_BONUS_ABANDONED_CIVILIZATION</ArtDefineTag>
                <TechReveal>TECH_ASTROIMPERIALISM</TechReveal>
                <TechCityTrade>TECH_ASTROIMPERIALISM</TechCityTrade>
                <YieldChanges>
                    <iYieldChange>0</iYieldChange>
                    <iYieldChange>0</iYieldChange>
                    <iYieldChange>3</iYieldChange>
                </YieldChanges>
                <iPlacementOrder>-1</iPlacementOrder>
                <iConstAppearance>35</iConstAppearance>
                <iMinAreaSize>3</iMinAreaSize>
                <iMinLatitude>0</iMinLatitude>
                <Rands>
                    <iRandApp1>25</iRandApp1>
                    <iRandApp2>25</iRandApp2>
                    <iRandApp3/>
                    <iRandApp4/>
                </Rands>
                <iPlayer>0</iPlayer>
                <iTilesPer>32</iTilesPer>
                <iUniqueRange>0</iUniqueRange>
                <bArea>1</bArea>
                <bFlatlands>1</bFlatlands>
                <bNormalize>1</bNormalize>
                <TerrainBooleans>
                    <TerrainBoolean>
                        <TerrainType>TERRAIN_ORION_ARM</TerrainType>
                        <bTerrain>1</bTerrain>
                    </TerrainBoolean>
                    <TerrainBoolean>
                        <TerrainType>TERRAIN_MILKY_WAY</TerrainType>
                        <bTerrain>1</bTerrain>
                    </TerrainBoolean>
                    <TerrainBoolean>
                        <TerrainType>TERRAIN_STAR_CLUSTER</TerrainType>
                        <bTerrain>1</bTerrain>
                    </TerrainBoolean>
                </TerrainBooleans>
                    <FeatureBooleans>
                    <FeatureBoolean>
                        <FeatureType>FEATURE_MINI_NEPTUNE</FeatureType>
                        <bFeature>1</bFeature>
                    </FeatureBoolean>
                    <FeatureBoolean>
                        <FeatureType>FEATURE_SUPER_EARTH</FeatureType>
                        <bFeature>1</bFeature>
                    </FeatureBoolean>
                    <FeatureBoolean>
                        <FeatureType>FEATURE_DESERT_PLANET</FeatureType>
                        <bFeature>1</bFeature>
                    </FeatureBoolean>
                    <FeatureBoolean>
                        <FeatureType>FEATURE_OCEAN_PLANET</FeatureType>
                        <bFeature>1</bFeature>
                    </FeatureBoolean>
                </FeatureBooleans>
                <FeatureTerrainBooleans>
                    <FeatureTerrainBoolean>
                        <TerrainType>TERRAIN_TRANSTELLAR_SPACE</TerrainType>
                        <bFeatureTerrain>1</bFeatureTerrain>
                    </FeatureTerrainBoolean>
                </FeatureTerrainBooleans>
            </BonusInfo>
     
  4. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,344
    Location:
    Norway
    If they had proper xml setup then they wouldn't need <iPlacementOrder>-1</iPlacementOrder> as map scripts would then know where to, or where not to, place them.
     
  5. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    8,135
    Location:
    Poland
    I meant only SmartMap was broken in this case, and only if you select some custom resource generation settings.

    So I guess you would new tag for space resources, so they can be placed in space only no matter what python says.
     
  6. Snofru1

    Snofru1 Emperor

    Joined:
    Dec 29, 2005
    Messages:
    1,249
    Location:
    Germany
    Thanks a lot for your help, it is priceless! I am looking forward to these changes and will update my maps when they are done.
     
  7. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,344
    Location:
    Norway
    Ok, pushing the change to SVN now, also updated your included maps to use random starting locations.

    Similar results will happen, the randomization is currently quite weak, but it won't be the same exact result every time you start a new game on these scenarios. I'll probably try to refine it more during the next week.
     
    Snofru1 likes this.
  8. Snofru1

    Snofru1 Emperor

    Joined:
    Dec 29, 2005
    Messages:
    1,249
    Location:
    Germany
    Thanks a lot, @Toffer90 ! I have tested the maps and it works - restarting with the same setting did give different starting locations and difficulty settings seem to have an effect, too. A very nice side effect: There is no more limit to the number of civs (in fact that problem was already gone with your changes on SVN 11255). I have tested 30 civs and it worked, too!

    Now this means the descriptions of the scenarios aren't up to date anymore. I have changed these (and nothing else) in the attached file. I have also advanced the version of the maps. Could you replace the current maps with these for future C2C versions?
     

    Attached Files:

    Last edited: Jan 26, 2021
  9. Snofru1

    Snofru1 Emperor

    Joined:
    Dec 29, 2005
    Messages:
    1,249
    Location:
    Germany
    I have adapted the 4 Duel spacemaps to current SVN so they also have random starting positions and no limitation for number of civs. Download is available in the 1st posting where you can also find the new large and standard sized maps which are already in SVN. The older maps that should be used with the 41.0 release version are still available.
     
  10. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,344
    Location:
    Norway
    Sure thing.
     
    Snofru1 likes this.
  11. Snofru1

    Snofru1 Emperor

    Joined:
    Dec 29, 2005
    Messages:
    1,249
    Location:
    Germany
    Thanks a lot Toffer - quick as lightning!

    I have changed the names of the maps in the 1st posting here according to the name change in SVN 11289.
     
    Toffer90 likes this.
  12. ScubaV

    ScubaV Chieftain

    Joined:
    Nov 15, 2019
    Messages:
    25
    Appreciate the work, thank you!
     
    Snofru1 likes this.
  13. Snofru1

    Snofru1 Emperor

    Joined:
    Dec 29, 2005
    Messages:
    1,249
    Location:
    Germany
    In SVN 11308 random resource distribution has been turned off for all spacemaps by @raxo2222 as it didn't work correctly in space. This has been adapted for all the maps which are on download in the 1st posting here, including the Duel spacemaps which are not part of the C2C SVN.
     
    raxo2222 likes this.

Share This Page