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

Noob modder trying to add resources to Snow tiles.

Discussion in 'Civ5 - Creation & Customization' started by Peng Qi, Apr 29, 2015.

  1. Peng Qi

    Peng Qi Emperor

    Joined:
    Aug 19, 2007
    Messages:
    1,431
    Location:
    Irrelevant.
    This is my code:
    Code:
    <GameData>
    	<Resource_TerrainBooleans>
    		<Row>
    			<ResourceType>RESOURCE_DEER</ResourceType>
    			<TerrainType>TERRAIN_SNOW</TerrainType>
    		</Row>
    		<Row>
    			<ResourceType>RESOURCE_FUR</ResourceType>
    			<TerrainType>TERRAIN_SNOW</TerrainType>
    		</Row>
    	</Resource_TerrainBooleans>
    </GameData>
    What else do I need to do? :blush:
     
  2. ThorHammerz

    ThorHammerz zzz

    Joined:
    Jul 31, 2014
    Messages:
    836
    The file you are looking for is AssignStartingPlots.lua; those GameData tables do just about nothing (well, they used to do something... I'm fairly sure they still do something somewhere..... but nearly everything in terms of map generation is currently hard-coded by Firaxis in AssignStartingPlots.lua).

    Note: in the event that it takes you an inordinate amount of time to understand the logic of this file.... this is normal (because everything is all over the place, and there's just so much stuffed inside the file itself)! Just take it slow :)

    For bonus resources, the plot eligibility is determined inside:

    Code:
    function AssignStartingPlots:GenerateGlobalResourcePlotLists()
    Just add a list of plots for snow tiles, and link it up with the functions (there are multiple), such as the

    Code:
    function AssignStartingPlots:AddExtraBonusesToHillsRegions()
    and

    Code:
    function AssignStartingPlots:PlaceStrategicAndBonusResources()
    and these are in addition to the functions that places bonus/strategic resources at a civilization (or city state's) start locations.... which you are going to need to also modify (as I'm fairly certain - don't quote me on it though - they will also classify snow tiles as "bad" tiles when determining plot eligibility to place those extra resources next to your initial city sites).

    [Placeholder for Luxury resources component]
     
  3. Peng Qi

    Peng Qi Emperor

    Joined:
    Aug 19, 2007
    Messages:
    1,431
    Location:
    Irrelevant.
    I guess I have to start learning LUA earlier than I expected. :D

    Thanks!
     

Share This Page