[MOD] Lawyer Unit: Remove Corporations from a City

tsentom1

Bubble Dragon
Joined
Jul 24, 2007
Messages
1,000
Location
New York
This unit acts like the popular Inquisitor mod going around, but for corporations.



Great for Modern Crossroads of the World mods or mods with a Commerce Victory!

This is another unit I made for my big total mod coming out soon.

Here are the stats:

Lawyer - 2 Movement
National Unit (2 Allowed)
150 Hammers

Abilities:
Litigate: Removes all corporations from the target city

Available at Corporation

Note:

I made this unit primarily for my upcoming total mod, so therefore he is formated to fit it.

- Can only litigate in your own or your vassal's cities
- Removes all corporations - no choice
- Can remove a Corporate Headquarters, however this drastically reduced the chance that litigation will succeed. Additionally, doing so removes the Corporate Headquarter's Building

If someone wants to tweak and refine the unit, please do. I wanted to add a gold cost to the ability but couldn't figure out the python. Additionally, there's currently no AI for the unit. I might do this for version 2.0 but am very busy at the moment so can't promise it anytime soon. If someone wants to take a crack at it I figure something like: loop through opponents, check their gold slider, if below x%, form a corp loop with their cities, if has a headquarters ignore, if doesn't and they don't own the headquarters use Lawyer, etc, but that has a lot of holes in it.

I should have marked all my python changes. (The python also includes my other Great People mods, but that's also marked and can be ignored).

Credits:
Modern African Settler Model: Chugginator

Download
 
awesome awesome unit!!!!

and i have just what you need mate!!!!
i have a code that adds a gold cost tag through the sdk!!

ive been using it for a year now in all my mods,

you can use it to add gold cost to your lawyer and every other unit,

i think ill release the code for everyones usge,

but it may take sometime,
pm if you wanna have the code.

*********************************************************************

heres the goldcost mod:
http://forums.civfanatics.com/showthread.php?t=274944

hope you use this, have fun.
 
This unit could even be better if it allows you to select a corporation to remove from your city in stead of removing all of them. As it is now it's probably more devastating than a squadron of Stealth Bombers! ;)
 
Hey Ekmek, I love your leaderheads (using a bunch in my upcoming total mod) :)

I'm still getting the hang of the python, but getting better.

I'll take a look and see if I can help out with your stuff.

------------

Arian, to have the ability to select corporations i would need to make a popup module in the python.

I thought about doing this and it will probably be there if and when I get around to making a 2.0 (along with some AI)

The way it is now is how it best works for my upcoming total mod. I still find it useful as not all cities need certain bonuses from certain corporations so you can avoid maintenance costs, or to deny gold to an opponent when you don't want to block foreign corporations in all your cities.

Though primarily I see it as a flavor unit. It's cool to have the ability in the game in some form similar to the Inquisitor Mod. That one is technically even more useless (if you don't have a sort of religious % victory in place) and there's no downside to having more religions in a city.

----------

keldath, thanks a lot!!!

i've been looking for something like that for a couple things and will probably use it extensively in an upcoming release :)
 
thanks keldath,

my total mod is almost practically done.

i'm just now trying to get a new python based wonder to work (though i'm about ready to give up on it), and working out bugs so it'll be multiplayer compatible
 
I can see it now: Jack Thompson (Great Lawyer)

But in a more serious tone, yeah, all corporations are a bit extreme. Maybe, lawyers for each corporation which either only target competing corporations, or all other corporations?
 
Making separate lawyers is easy.

The problem is there is no state corporation like there is religion. Originally, it was going to keep headquarter corporations but my python kept not working. Though thinking about it now if I make it look for the Headquarter building first it might work...
 
All corporations removed, even HQs? A wee-bit overpowered don't you think? When a lawyer sues, he/she doesn't take on the corporate world. On the whole, I do think that a unit (might as well be a lawyer unit) to remove one corporation at a time from a city is very useful.
 
I could easily make separate lawyers for each corporation that can only remove one corporation.

I was having some trouble with the python to remove everything but headquarters as there was no state religion to exclude from the corporation loop. i had tried doing something like if pycity.hasheadquartersbytype != (icorploop) - that's not a direct quote of the python just paraphrasing, and append the corploop. It worked if there was only one headquarters but didn't if there was multiple. Creating multiple appends is where i got into the difficulty.

For people saying it's currently overpowered though...

I've been thinking and I don't think it is. Remember, you can only use it in your own cities. If you could pick and choose you could effectively prevent any unwanted corporations with ease. Since you can only use it in your own cities, managing which corporations you keep requires a bit of work since you'll have to re-spread the wanted corporations. I mean making more executives is really easy as they're not that expensive.

Personally, I think it's more overpowered if you could pick and choose. (Granted this is only due to the case of the limitation of only your cities. Someone - which can easily be done - allowing it in all, would definitely want only one at a time). Plus, there is already a limited way in the game to remove a single unwanted corporation with competing corporations or blocking foreign corporation civics.

This of course assumes you'd want some corporations, since if you didn't want any State Property is a really good civic even without the no corporation effect. As for removing Headquarters... well you wouldn't really have a Headquarters if you didn't want to build it.

Once I have free time (probably after my total mod is released) i'll update this to allow you to pick and choose
 
BTW...


for people wanting to allow him to use the ability in every city, a really cheap (though for all intents it works) way to do this is go into the CvMainInterface python file and find:

if iUnitType == CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_LAWYER") and gc.getMap().plot( g_pSelectedUnit.getX(), g_pSelectedUnit.getY() ).isCity():
pCity = gc.getMap().plot( g_pSelectedUnit.getX(), g_pSelectedUnit.getY() ).getPlotCity( )
pCityPlayer = gc.getPlayer( pCity.getOwner( ) )
if ( pCity.getOwner( ) == pUnit.getOwner( ) ) or ( gc.getTeam( pCityPlayer.getTeam( ) ).isVassal( gc.getPlayer( pUnit. getOwner( ) ).getTeam( ) ) ):

and just change it to

if iUnitType == CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_LAWYER"):

and erase the rest (note the added colon)
 
Top Bottom