Reducing Luxury Resources Question

Jackkyl

Chieftain
Joined
Feb 20, 2010
Messages
7
I'm in the process of developing a mod that decreases the amount of resources (both strategic and luxury) but increases the individual contribution of each (similar to Civ 4).

I'm running into a small issue. How do you decrease the overall occurrences of resources?

So if a huge map has 15 iron.... how do I change that to 5 iron?

Any suggestions, thoughts or ideas?

Thanks everyone. My goal is to make a mod where all the resources matter and individual tiles have more variety of worth (changing tile mod values and improvement values).
 
Interesting. This would result in fewer but more prosperous cities I assume? I can't help on the technical side, but the idea is sound.
 
I'm curious to know how this could be accomplished. I've been looking through the XML files and I see a decent number of values related to resources but even though I've done quite a bit of experimenting I still have no idea what or how they effect. :(
 
You're looking at various functions within AssignStartingPlots.lua, which is inside Assets > Gameplay > Lua

Some that might help reduce the number of resources:
AttemptToPlaceBonusResourceAtPlot at line 3209 (but this function is actually trying to balance non-fertile areas, so if you want to have an even placement of resources you'd better look elsewhere and not fiddle much with this one -- though I think having barren wastelands is kinda nice :D -- and the script will try not to place Civs/CS at those)
same thing for NormalizeStartLocation at line 3512
AttemptToPlaceSmallStrategicAtPlot at line 3324
AddStrategicBalanceResources at line 3365

There are more functions related to it that I'm sure I've seen, but the file is kinda huge and I'm lazy :)
Edit: Oh yeah, there are many functions related to Luxuries near the end of the file.
Here's how I'd go about it: make a copy of the AssignStartingPlots file somewhere and work from there (don't fiddle directly with the file in the steam directory). You can use Notepadd++ for instance. Then, collapse all functions (Alt+0 does it all, if you want one by one click the minus icon next to them) and the file will look much more manageable and you'll be able to scan for functions that might help you.

Changing tile yields also has to do with this file, you may want to do some balancing in the script to account for the changes.
 
Top Bottom