[MODCOMP] Obtain gold on disband

killmeplease

Mk Z on Steam
Joined
Nov 22, 2007
Messages
2,794
Location
Samara
If a unit was disbanded inside its cultural borders, owner get :gold: as many as unit's cost in :hammers: dvivded by 4.
  • Effect scales with game speed.
  • AI knows how to use it.
  • There is a hint that shows you how many :gold: you will get:



Download here

In source files my code is marked with //@MOD GFD signature.
 
Looks like a nifty little change, killmeplease. :goodjob:

I'm guessing it wouldn't be difficult to add a description of how much gold you'd receive by hovering over the Disband button?
 
Does the AI ever voluntarily disband units? If so, could it be taught to prefer doing it inside its borders so as to get the extra gold?
 
Yes, the AI does disband troops that are not very high levels and are weaker, especially when the AI has financial trouble.
 
it would be pretty simple to include inside-borders test into the criterion function to make AI disbanding units on its own territory for first. I'll put a new modcomp version into downloads database when i get button hint and additional AI logic working.

Thanks for feedback!
 
good idea, is it possible to enable this only for few units?

I'd imagine you would create a new boolean XML tag for units, and check that it is true in the code that killmeplease added CvDLLWidget and CvUnit.

Nice job, BTW Killmeplease. Merged into A New Dawn.
 
This is neat, I'd like to have something like this in my game.

But is it possible to make it so disbanding the unit gives the nearest city (possibly enemy) a production bonus instead of money, similar to chopping?
 
good idea, is it possible to enable this only for few units?
as Afforess said, you have to check if unit is scrappable upon your criteria in appropriate functions (CvUnit::kill() and the another one showing popup, just do not recall its name).

Nice job, BTW Killmeplease. Merged into A New Dawn.
great news!
my work is useful :cool:

This is neat, I'd like to have something like this in my game.

But is it possible to make it so disbanding the unit gives the nearest city (possibly enemy) a production bonus instead of money, similar to chopping?
yeah i think it would be pretty easy to mod my modcomp for this. just change gold to production and find a nearest city.
 
there is a little problem in your modcomp: fishing boat -> fishnet -> gold you should not get.
 
Top Bottom