Page 1 of 1

Limited resources mod error.

Posted: 11 Sep 2017, 16:26
by jonnieve
Hi guys, i''m new at this forum and thanks to the developers of such great mod.

I'm trying to mod the unlimited resources of the game in both EE2 and EE2X but always i add the

Code: Select all

alwaysExhaustible = 1
to the resources.ddf file the game crash, with this error log.

Code: Select all

Crash / Error details: 
 EXCEPTION:    ACCESS VIOLATION
  0x0054b90e
  0x65637275
EAX:ffffff00h ESI:00000000h
EBX:0000215ch EDI:745658a0h
ECX:064a8fa4h EBP:06adc7d0h
EDX:063e2474h ESP:0248f78ch
EIP:0054b90eh EID:00000000h
SS: 0000002bh CS: 00000023h
DS: 0000002bh FS: 00000053h
ES: 0000002bh GS: 0000002bh
Flags: 00210246h  CF:0 PF:1 AF:0 ZF:1 SF:0 OF:0
I'm able to mod the "trees" amount and maxNumOfWorkers but if i touch any other resource i get this error.

Could you help me?

Thanks.

PD: I have de last 1.5 update.

Re: Limited resources mod error.

Posted: 11 Sep 2017, 17:57
by Dr.MonaLisa
Hello. Welcome to the forum!
Could you please post an example code where you added "alwaysExhaustible = 1"?

Re: Limited resources mod error.

Posted: 11 Sep 2017, 18:03
by jonnieve
I've paste the full resources.ddf into pastebin:

https://pastebin.com/5X2Bn8cb

And this is a fragment.

Code: Select all

UnitModel ResourceGold
{
	Parent 				= ResourceNotTreeBaseModel
	ChildNames	 		= [BuildingShadow UnderGold]
	DefaultModel 	= res_gold.nif
	DefaultState 	= Idle
		States = [
		{ StateName="Idle" }
		]
	UIRenderingParams {
		xOffset = 0.01
		yOffset = -0.09
		zOffset = 1.29
		scale = 1.00
		angle = 45.00
		rotationSpeed = 0.00
		pitch = 60.00
		lightAngle = 30.00
		lightPitch = 90.00
		lightDiffuse = [50 50 45 255]
		lightSpecular = [0 0 0 255]
		lightAmbient = [40 40 40 255]
	}
}
UnitType ResourceGold
{
	parent = ResourceNotTree
	
	properties {
		displayName = tx_utn_Gold_name
		mmColor = [192,192,0,255]
		VerboseTooltip = vtt_unit_Gold
	}
	abilities [ 
		Resource { type = kResourceType_Gold; alwaysExhaustible = 1;amount = 1000; maxNumOfWorkers = 6}
	]
}
EDIT: this is the resources.ddf from EE2X

Re: Limited resources mod error.

Posted: 11 Sep 2017, 18:10
by Dr.MonaLisa
Try to change:

Code: Select all

Resource { type = kResourceType_Gold; alwaysExhaustible = 1;amount = 1000; maxNumOfWorkers = 6}
to:

Code: Select all

Resource { type = kResourceType_Gold; alwaysExhaustible = 1; amount = 1000; maxNumOfWorkers = 6}
Maybe an additional space is required for script to be read correctly.

I checked the other mod (Realistic), and they have this line:

Code: Select all

Resource { type = kResourceType_Gold; alwaysExhaustible = 1; amount = 10000; maxNumOfWorkers = 6}
So seems to be correct and shouldn't crash. Are you sure it crashes because of it? When you remove "alwaysExhaustible = 1" it doesn't crash anymore?

Re: Limited resources mod error.

Posted: 11 Sep 2017, 20:41
by jonnieve
Thanks man the problem was the space now works fine, ¿why you don't just add this mod to the unofficial patch 1.5 ? i think most of the players like have limited resources i think this was one of the few bad things of this game.

Re: Limited resources mod error.

Posted: 11 Sep 2017, 21:11
by Dr.MonaLisa
Unofficial Patch doesn't change the original game balance or strategy. Limiting resources would totally destroy Multiplayer gameplay, also many Singleplayer users would hate it. It's better when such changes are edited by players who need it than forcing people to change their gameplay with an update.