Set a limit to the mines

Modding, Map Editor, IES Scripting and Other Questions
Post Reply
AkStrov
Posts: 2
Joined: 23 Jun 2023, 11:02

Set a limit to the mines

Post by AkStrov »

Hi, everybody.

Does anyone know if the amount of resources in the mines can be limited? Either in the internal configuration or by modifying a file in the installation folder or with a mod, patch or script.

I have programming notions, maybe I can do it if it doesn't exist.

I really like the diversity of ages it has, but I lose interest with unlimited mines.

I like to play fighting to control areas with resources, when the ones I control run out. With unlimited mines, the game is more based on battles only.

Thanks & regards.

User avatar
Dr.MonaLisa
High Representative
Posts: 8708
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Set a limit to the mines

Post by Dr.MonaLisa »

When it comes to custom maps/scenarios, you can already place limited resources using Loew Ambient's Pack 2 features, directly in the Map Editor.

For reference, you can check in file: zips\db_155.zip\db\Units\loew_ambient_pack_15_2.ddf
Use WinRar and Notepad++ to edit these files.

As you can see, there's a new Gold resource added:

Code: Select all

UnitType ResourceGold_300000
{
parent = ResourceGold
VisualName=ResourceGold
properties {
		VerboseTooltip = vtt_unit_Gold
		displayName = tx_utn_Gold_name
		DisplayNameScenEdit = tx_ed_Gold_300000
	}
		abilities [
		Resource { type = kResourceType_Gold; alwaysExhaustible = 1; amount = 300000; maxNumOfWorkers = 6}
	]
}
Since you want to have limited resources in every game, you would need to edit the default game file: zips\db.zip\db\Units\resources.ddf

Code: Select all

UnitType ResourceGold
{
	parent = ResourceNotTree
	
	properties {
		displayName = tx_utn_Gold_name
		mmColor = [192,192,0,255]
		VerboseTooltip = vtt_unit_Gold
	}
	abilities [ 
		Resource { type = kResourceType_Gold; amount = 1000; maxNumOfWorkers = 6}
	]
}
I think adding:

Code: Select all

 alwaysExhaustible = 1; 
makes resources limited.


Unfortunately, if you make any change to game files, you will be unable to connect other players on Multiplayer. Also your edits might be lost after installing UP1.5 update, so it's always good to have a backup / notes how to apply your edits.

If you're playing EE2: AOS, the files I listed above will be in folder "zips_ee2x", and might have "EE2X_" prefix. The rest is basically the same.

The similar questions were already answered here:

Limited resources mod error: viewtopic.php?t=1873
Limited resources for a multiplayer map: viewtopic.php?t=1648

They have some more detailed guide.

Have a nice day.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
AkStrov
Posts: 2
Joined: 23 Jun 2023, 11:02

Re: Set a limit to the mines

Post by AkStrov »

Okl, I'll try it.

THANKS A LOT FOR YOUR HELP!!.

Regards.
Post Reply

Return to “Questions”