Happy Razing

There are later versions that did not cause OOS, they used the netnodemessage or whatever. For RoM we (Zappara and I) made it give 20% of the cost back for buildings, less if they were obsolete. You could not sell wonders or free buildings. I believe someone did more modifications after we did, but they are all in that thread.

On banks the Australian people/government used to have a bank but it got privatized back in the 1980's or so.
 
Oh well, if you find this repeative, I can always take it down :D

The biggest difference between privatization and dismantling is the building/business still exists and continues to provide service to the citizens.

Which, obviously is not the way when you remove the building from a city.

Also, there are many more buildings which simply sound weird to "privatize".
Privatize a monastry sound weird and privatize a barracks sound dangerous...
 
No this is not repetitive you have replaced a key short cut with a button. This is good.

Or to be more precise you have replaced half an existing mod with a new easier to use mod and left the other half for the student to complete:mischief:.

Edit if I were looking at doing a sell building mod I would do it similar to the existing one but called from a new button (house with a crossed circle on it, perhaps) next to you the button you have added here rather than by clicking on a building. That would allow you to control which buildings could be sold. One early bug let you sell te same free building over and over;)
 
Civ4ScreenShot0004-2_zps03ad0c2d.jpg


Since you just want a button beside the razing one, that is easy :D
Never did popups before so took a while to figure out how to do it.
Pretty much cut and paste from Change All Plots in WB :sleep:

Since you guys like $$$ so much, I implement it as 10% of initial cost (adjusted by Start Era and Game Speed)

Notes:
Wonders are not sellable
No cost buildings are not sellable
Sometimes the building list on the left not updated after you sell though, but the building is really gone, no way you can sell same stuff twice.
And it is updated once you exit the city screen.
 
Since you just want a button beside the razing one, that is easy :D
Never did popups before so took a while to figure out how to do it.
Pretty much cut and paste from Change All Plots in WB :sleep:

Since you guys like $$$ so much, I implement it as 10% of initial cost (adjusted by Start Era and Game Speed)

Notes:
Wonders are not sellable
No cost buildings are not sellable
Sometimes the building list on the left not updated after you sell though, but the building is really gone, no way you can sell same stuff twice.
And it is updated once you exit the city screen.

Sounds just like it is supposed to, but what if you dont want that building in the list for some "dumb" reason? btw Thx
 
Then you adjust the codes to exclude it lol
How am I supposed to know what is the dumb reason you have in mind :D

If you want to switch C2C version to this, I am sure DH or some other python capable people will know where to add the exclusion list, same place where wonders are excluded.
 
Anyway, I redid the x and y co-ordinates of the button according to the "<" and ">" buttons this time.
Hopefully it works in all screens now.

Tested and wanted to confirm that your new version works now on my screen. By changing just one line in CvMainInterface.py (screen.setText( "HappyRazing",etc...).

I'm saying that because it is a bit confusing now with the "selling buildings option" which I don't want AT ALL.
 
No problem, now one part is commented as Happy Razing while the other is Happy Dismantling.
Both are independent of each other, so up to you which part you want or both.
 
Yes, but in CvMainInterface for example, that part disappeared and I didn't know what to do with it (I left it for now):
Spoiler :
## Platyping Happy Razing ##
global g_pSelectedCity

screen = CyGInterfaceScreen( "MainInterface", CvScreenEnums.MAIN_INTERFACE )

pHeadSelectedCity = CyInterface().getHeadSelectedCity()

g_pSelectedCity = pHeadSelectedCity
## Platyping Happy Razing ##

Then there's a whole new section (under def handleInput) marked 'Happy Razing' but which seems to content mainly stuff for "dismantling" (I didn't take it, just kept the first part as it was before). So it might be a tad more confusing than you think!...
 
because the global variable is no longer necessary
 
because the global variable is no longer necessary

Hummm... took it out and it doesn't work anymore...

So I put it back!

By the way, one funny thing is that if you have only one city and that you raze it, you can continue the game without cities, without settlers... How long I don't know but I played a dozen turns like that (without the 'COMPLETE_KILLS' option on).
 
The bottom part handleinput is changed as well
 
I see... but it doesn't tell me in what it's an improvement over the previous code.

But frankly, I'm quite happy with the old code!
 
Simple.
Both versions work.
New one gets rid of redundant variable, less parts to merge
 
It sounds very good. I hope this will be functional in my mod. "Migrating" and "Enhanced" has some problem. I have not success find where is error :(
 
Have you enabled python exceptions to locate the problem?
 
Hi, platy. Can you please tell ( write ) me, where I can change the icons for Razing happy ? I'd love to have there other. thank you
hroch
 
Currently the codes are using strings so they can only use in game icons.
It is possible to change to use buttons instead but I lazy to do so.
Thus, choices are limited.
 
Back
Top Bottom