Add ''Chop Down'' Parameter to a new resource

JOHN007

Chieftain
Joined
Jan 30, 2018
Messages
53
Hello,

How do you allocate the parameters for the ''Chop Down'' to a new resource? I cannot find any information regarding this?

I thought the parameter was an 'improvement' example IMPROVEMENT_LUMBERMILL but I believe its some sort of ENTITY_EVENT / BUILD_REMOVE_FOREST / ENTITY_EVENT_CHOP I'm not sure if those strings are for the animations?

Basically I have a new type of tree which is located in forests/jungle tiles, the problem is when you chop down a forest/jungle tile with the new tree also in the same tile, you cannot build a lumbermill on that tile even though the new tree is still there?

Any help would be greatly appreciated.
 
In the non-modded game Lumbermills don't look to resources for valid build locations, they look to features:
Code:
	<Improvement_ValidFeatures>
                ....snipped out lines from the Improvements file ........
		<Row>
			<ImprovementType>IMPROVEMENT_LUMBERMILL</ImprovementType>
			<FeatureType>FEATURE_FOREST</FeatureType>
		</Row>
	</Improvement_ValidFeatures>
Once the Forest Feature is removed from a plot, that plot is invalid for the Lumbermill.

Resources are never "chopped down".
 
Hello and thankyou for the reply much appreciated.

I honestly didn't know this, I thought the jungle/forest tiles were resources, how silly of me.

Would it be possible to allocate a new script to implement a resource tile to the lumbermill? So it would also look for the new resource and hopefully the chop down parameter would work correctly.

Thankyou for your time and hope to speak soon,
 
In the non-modded game Lumbermills don't look to resources for valid build locations, they look to features:
Code:
    <Improvement_ValidFeatures>
                ....snipped out lines from the Improvements file ........
        <Row>
            <ImprovementType>IMPROVEMENT_LUMBERMILL</ImprovementType>
            <FeatureType>FEATURE_FOREST</FeatureType>
        </Row>
    </Improvement_ValidFeatures>
Once the Forest Feature is removed from a plot, that plot is invalid for the Lumbermill.

Resources are never "chopped down".

Hello Lee.

May I ask where exactly did you find the script for the Lumbermill parameters?

Thanks again.
 
In the game's base files.

In this example, in C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization VI\Base\Assets\Gameplay\Data/Improvements.xml for the vanilla expac "Improvements" rules.

You can also get a SQL database viewer program (several are free to download and use) and open the SQL database file C:\Users\[YourNameHere]\Documents\My Games\Sid Meier's Civilization VI\Cache/DebugGameplay.sqlite and directly see the endproduct of what gets entered into the game's database from all the various XML files in the "Gameplay" folder, inlcuding anything alterred or added by mods, DLC, or Expacs.
 
In the game's base files.

In this example, in C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization VI\Base\Assets\Gameplay\Data/Improvements.xml for the vanilla expac "Improvements" rules.

You can also get a SQL database viewer program (several are free to download and use) and open the SQL database file C:\Users\[YourNameHere]\Documents\My Games\Sid Meier's Civilization VI\Cache/DebugGameplay.sqlite and directly see the endproduct of what gets entered into the game's database from all the various XML files in the "Gameplay" folder, inlcuding anything alterred or added by mods, DLC, or Expacs.

Hello and thanks for the reply.

This is for Civilization V, I see there is no Base folder in any of the directories for Civ V.

May I ask do you know where the config is located for Civ V?
 
Sorry. I pulled the wrong folder locations in that previous post because I have Civ6 on the brains, I guess.

  1. Vanilla files are at:
    C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\assets\Gameplay\XML
  2. G&K files are at:
    C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\assets\DLC\Expansion\Gameplay\XML
  3. BNW files are at:
    C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\assets\DLC\Expansion2\Gameplay\XML
The beginning portion of your file path might be slightly different depending on whether you have Win7, Win10, etc. (I have Win8.1)

The database file for Civ5 that can be opened and inspected with an SQL Viewer program will be at C:\Users\[YourNameHere]\Documents\My Games\Sid Meier's Civilization 5\cache/Civ5DebugDatabase.db
 
Hello and thankyou for the detailed reply.

Finally found what I believe is the lumbermill scripts location in the Terrain config, I was looking at the buildings config.

I can see that the lumbermill has a string which looks like a feature parameter, set to true. I also see the improvements sections for resource to building parameter. Now I tried to add the Lumbermill to also look for the new tree resource but no luck. I also tried setting the feature parameter to false, but still no luck.

May I ask do you think the lumbermill can look for features and resources? Would the engine allow this?

Thankyou for your time and hope to speak soon.
 
Since this is a boolean
Code:
<RequiresFeature>true</RequiresFeature>
It's 100% on or off. Neither the Brazilwood Camp nor the Lumbermill have any "valids" for terrains or resources, so my guess would be the game would not implement correctly if you add something for the Lumbermill to table Improvement_ResourceTypes. "RequiresFeature" tells the game that the improvement must be built on a specified feature, and the entry in table Improvement_ValidFeatures tells the game which feature is needed.

You could however create a copy of the Lumbermill Improvement and make it valid only on certain resources by removing the "RequiresFeature" on the copy-cat improvement, and listing the needed resources in table Improvement_ResourceTypes, and the effect of building the improvement on a given resource (if any in addition to the yields inherent to the improvement) under table Improvement_ResourceType_Yields

When creating an improvement, remember that every improvement also needs a "Build" defined in table Builds, and data as necessary in the child tables to Builds. See file Civ5Buildsxml in the "Units" folder under the BNW expansion folders, for example.
 
Hello and thankyou for the reply.

I have read this, but I didn't want to reply without first diving in and attempting a clone of the lumbermill.

I believe we are the right path here, hopefully have a clone ready soon.

Thanks again for your expertise.
 
Back
Top Bottom