Permanently expendable resources?

markusbeutel

NiGHTS
Joined
Sep 26, 2010
Messages
1,976
Location
Vancouver BC Canada
Does anyone know if/how to make resources permanently expendable? Like if a Swordsman dies, then you don't get back the Iron that was required to build him?
 
Well, you could do this through Lua. Create an unbuildable (cost=-1) building that requires a unit of iron. If an iron-using unit is destroyed, then spawn one of those buildings in your capital. Of course, if you lost your capital, this penalty would transfer to the civ that took it, unless you set the building to NeverCapture, in which case you taking back the city wouldn't re-enable the penalty for you.

The big question is why you'd do this in the first place; it just seems horribly abuseable, since the human players always have far better kill ratios than the AIs. You'd very quickly make it so that the AI could never build a resource-using unit again.
 
Well, you could do this through Lua. Create an unbuildable (cost=-1) building that requires a unit of iron. If an iron-using unit is destroyed, then spawn one of those buildings in your capital. Of course, if you lost your capital, this penalty would transfer to the civ that took it, unless you set the building to NeverCapture, in which case you taking back the city wouldn't re-enable the penalty for you.

The big question is why you'd do this in the first place; it just seems horribly abuseable, since the human players always have far better kill ratios than the AIs. You'd very quickly make it so that the AI could never build a resource-using unit again.

It wouldn't be for Military Units - no doubt the AI would be crippled with mechanics like that.
 
Does anyone know if/how to make resources permanently expendable? Like if a Swordsman dies, then you don't get back the Iron that was required to build him?

Hallo Markus!

Das dürfte mit

pSpieler:ChangeNumResourceTotal( iRessourcenID, iVeränderung )

klappen, wenn du das beim Aufruf des Einheitentod-Events verwendest.

PS:
Am besten noch zusätzlich mit

pPlot:ChangeNumResource( -1 )

die Anzahl der Ressourcen des im Besitz befindlichen Plots anpassen, damit das Spiel beim Neuladen nicht durcheinanderkommt.
So weit ich das erkennen konnte, verarbeitet das Spiel keine nachträglichen Veränderungen einer Ressourcen-Anzahl, es sei denn, man verliert den Zugriff und gewinnt ihn wieder zurück.

---
English: Hi Markus, try ChangeNumResourceTotal. :)
And pPlot:ChangeNumResource( -1 ) for consistency.
 
Back
Top Bottom