Buying units

lamppost4

Holder of the Light
Joined
Jan 13, 2007
Messages
286
Location
Over Yonder
I was wondering if it would be possible to make a mod that would allow you to buy and sell units. I was thinking that it would be made in a way so that it worked like the mercenary part of Rhye's mod but instead of paying every turn, you would pay once and take permanent ownership of the unit. I think it would really help the smaller economic based civs.
 
I normally have a big gold surplus once I reach the modern era in my mod, I'd really love a feature like this, if anyone knows how to create it.
 
If the mercenaries hadn't caused a CTD every time I rolled the mouse over the icon, I might have been able to take a shot at this. But, as it is, I have no frame of reference.

I think you could do something with python that would cause the player that deletes a unit to regain a certain amount of gold, but I don't have any idea how to do the purchasing.
 
Look in the Broken Star scenario for help on how to do this -- it uses a buy units/promotion mechanism and a custom popup.
 
Well I have no clue where to look for this. I suppose it might be python? And if it were, would there be a tutorial i could use to learn how to do it or would anyone be willing to look into for me?
 
How do you add that into a BTS mod, and how does it control what units are purchaseable?

I have no Python experience though...
 
in my mod, i have similar thing,

theres a code that adds an xml tag, that states the amount of gold cost of a unit.

and in order to get the speciphic unit - you need to pay the goldcost needed,
i use this for a mercenery system that i developed.

So would there be anyway for me to isolate this feature in your code? Sorry if this is noobish but I don't have much experience outside a little xml stuff. Or do u have a copy of this code that is isolated?
And also I looked in your mod and it said this was exclusive to your mod so would you have a problem with me using it?
Thanks.
 
I would be really interested in that code too.
Haven't tried python yet and I haven't done programming in years but a gold cost for building units would really add to the realism of the game and also be something usefull to spend all that surplus gold.
After all, if you read any ancient history, one of the main things you need to raise an army is money.
I'd like to make it so that armies are raised specifically for campaigns and then disbanded. (to keep them would be prohibitvely expensive)
In the ancient world this was almost universal practice, to my knowledge the Roman's (in the imperial period) were the first people to maintain a large professional army.
 
Top Bottom