Assassin Mod

RogerBacon

King
Joined
Nov 16, 2003
Messages
649
Assassin mod
Ver. 1.3
2/19/2006

Concept, Python coding, and XML by Roger Bacon
Art and unit skinning by heroes182

based on original code for Martyr unit in Sevo's "Faces of God" mod.

Download Ver. 1.3 from here:
http://files.filefront.com/Assassin13zip/;4781616;;/fileinfo.html

Also available here: http://civ4mods.loadedinc.com/mod.php?id=22


What it does:

This mod adds a new unit, the assassin, to the game.

Assassin
cost 80
move 2
combat 2
Is invisible, can see other assassins, can enter enemy territory, can not capture cities
Tech required: Monarchy
Other requirement: Can only be built at the capital

Assassins basically move into another player's city and try to cause havoc, riots, or even assassinate the city leader (which is just a explanation for why the city goes in to unrest for a few turns).

How it works:

The assassin moves into a city and then, one turn later, it makes a roll to determine what kind of an effect is generated.

Die roll 1-50 + assassin's exp - best defending assassin's exp

result Effect
< 0 assassin caught and killed
0-14 mission failed
15-34 minor disruption in the city: 1 unhappy face for a few turns, -10 * assassin's exp points of culture, steal up to 1% * assassin's exp of a tech
35-44 City leader assassinated: 1 unhappy face for several turns, city in unrest for a few turns, -50 * assassin's exp culture, steal up to 2% * assassin's exp of a tech
45+ Major riots. Assassin kills city leader and blames another faction in the city. 1 unhappy face for many turns, city in unrest of several turns, -200 * assassin's exp culture, -1 population * assassin's level, steal up to 3% * assassin's exp of a tech, Assassin kills a Great Person in the city (determined randomly)

Assassin's survival roll
On any mission result higher than 0, the assassin has a chance to survive. This chance is directly influenced by his exp.

Exp % Chance to survive
0 0
1 20
2 33
3 43
4 50
5 56
6 60
7 64
8 67
9 69
10 71
11 73
12 75
13 76
14 78
15 79

formula: % chance = assassin's exp / ( 4 + assassin's exp)
Note: This works very well with one of my other mods "Training Barracks Mod". Download it and try it out.

If the assassin survives he will arrive at the capital the next turn. Assassins that survive will gain 1 exp.
A civilization will not know who sent the assassin so it won't trigger war.
The AI knows how to use these assassins so you should probably keep a defending assassin in your larger cities to reduce the enemy assassin's roll.

Version history:

Version 1.3 (2/19/2006)
Added new artwork by heroes182. Added the ability for the assassin to kill a Great Person in the city.

Version 1.2 (2/14/2006)
Added, as an option, the ability to steal a little bit of tech from an enemy city. Only techs that you could currently research can be stolen. Others are too advanced. Tech stealing is enabled by default but it can be turned off by changing line 24 to:
allowTechStealing = false

Version 1.1 (2/11/2006)
Fixed a minor bug that could occur when your assassin was killed by a defending assassin.

Version 1.0 (2/07/2006)
Initial release. Designed to work with Civ4 version 1.52
 
I'm going to check this mod out and combine the assassination skill with the spy unit if I can. It'd be perfect for my enhanced spy project.
 
I am happy that you were able to release this as a single unit. I have to admit that it galls me that Fraxis has made it a little difficult to merge this kind of mod with others.

Basically this leaves the maker the option to step by step explain "exactly" how to combine mods that use CustomEventInterface.py and CustomEventFunctions.py, which would vary depending on what other mods you have(tedious for the mod maker).

I had this happen before and I ended up having to make a choice of having the Inquistor mod or the Spelldemo mod with ranged artillery because I could not combine the two and make them work:mad:

Now I find myself in the exact same position, this or the Spelldemo(ranged Artillery). So unless RB can explain how to combine this with the Spelldemo(in particular the CustomEventInterface.py files) I will not be able to use it:mad:

Please don't take this as an attack on you or your great mod(actually I am mad at Fraxis)
 
This looks awesome. Great job RogerBacon, it's a shame what Firaxis did with the spy and it's great to see people finding ways to bring back some of that functionality and even more. :goodjob: I'll definitely be keeping my eye on it.
 
spincrus said:
I'm going to check this mod out and combine the assassination skill with the spy unit if I can. It'd be perfect for my enhanced spy project.

Giving this ability to the spy (or any other unit) is simple. Just change line 47 in "Assassin.py" from
if (pUnitInfo.getDescription() == 'Assassin'):

to
if (pUnitInfo.getDescription() == 'Spy'):

@ Gekko

This mod has been tested and it works fine. As for balanced, your milage will vary. It's easy enough to change the power by looking in the "Assassin.py" file. Assassins with low exp are pretty well balanced with other units. Once they get high in exp then they start to get moer powerful. Of course, you could have just built a tank and captured the city instead of disrupting it for a few turns so I guess that's balance, of a sort. Basically, the assassin is just a way for you (and the AI) to wage a sort of cold war if you want.

Roger Bacon
 
RED DIAMOND said:
...So unless RB can explain how to combine this with the Spelldemo(in particular the CustomEventInterface.py files) I will not be able to use it:mad:

Please don't take this as an attack on you or your great mod(actually I am mad at Fraxis)

Try this one. (I added .txt to the file name so I could post it here in the forum; you will haev to remove that). I added the following to the SpellDemoEventManager:

Code:
def onEndPlayerTurn(self, argsList):
		'Called at the end of a players turn'
		iGameTurn, iPlayer = argsList
		ass.runAssassinList(iPlayer)
		CvEventManager.CvEventManager.onEndPlayerTurn(self, argsList);
	def onUnitMove(self, argsList):
		'unit move'
		CvEventManager.CvEventManager.onUnitMove(self, argsList);
		#INSERT MODS
		ass.onUnitMove(argsList)

I used the same format that the SpellDemo author used but you may have to change the "CvEventManager.CvEventManager" to "self.parent". That's what I had in mine but I think he does his a little differently. Put the other files of mine in like the radme says and it should work fine.

Roger Bacon
 

Attachments

  • CvSpelldemoEventManagerMerged.py.txt
    4.5 KB · Views: 219
RogerBacon said:
Giving this ability to the spy (or any other unit) is simple. Just change line 47 in "Assassin.py" from
if (pUnitInfo.getDescription() == 'Assassin'):

to
if (pUnitInfo.getDescription() == 'Spy'):

@ Gekko

This mod has been tested and it works fine. As for balanced, your milage will vary. It's easy enough to change the power by looking in the "Assassin.py" file. Assassins with low exp are pretty well balanced with other units. Once they get high in exp then they start to get moer powerful. Of course, you could have just built a tank and captured the city instead of disrupting it for a few turns so I guess that's balance, of a sort. Basically, the assassin is just a way for you (and the AI) to wage a sort of cold war if you want.

Roger Bacon

that's awesome. I'm definitely going to add this to the next version of my compilation. great work ! :goodjob:
 
Sounds awesome! But is there a new skin? If there is, could u post a screenshot?
 
Robo Magic Man said:
Sounds awesome! But is there a new skin? If there is, could u post a screenshot?

Unfortunately, I'm artistically challenged so, no, there is no new skin. But hey, that spy looks pretty cool on her own.

There is a new icon, which I borrowed from Kael's "Fall from Heaven" mod (used with permission).

When we get the ability to make new graphics maybe someone will make a new graphic for the assassin.

Roger Bacon
 
RogerBacon said:
Unfortunately, I'm artistically challenged so, no, there is no new skin. But hey, that spy looks pretty cool on her own.

There is a new icon, which I borrowed from Kael's "Fall from Heaven" mod (used with permission).

When we get the ability to make new graphics maybe someone will make a new graphic for the assassin.

Roger Bacon

check out the second post on the thread Sevo's Faces of God. there you'll see the screenshots of the new units in that mod. I guess the Bandit there would make for a pretty good Assassin...
 
RB thx so much for that extra bit of work. I was becoming unusually cranky:blush:

P.S. Just tried it and you made my day bro! Sweet:goodjob:
Thanks again for getting this one out to us.:cool:
 
RED DIAMOND said:
RB thx so much for that extra bit of work. I was becoming unusually cranky:blush:

No problem. I know what it is like to try and combine mods. All of my mods start out combined and then I have to seperate one when I want to release it. I've got lots of things I've written but it's a pain to seperate them, test them, and put them together to release. Well, most of them aren't balanced anyway so they probably wouldn't be well received. They're really more just for my practice at coding Python.

Roger Bacon
 
Been following the threads for a while and was just going to register and suggest this. It sounds near perfect, cost and effects seem right.

I would suggest that it be made possible to actually assassinate other players if the capital is attacked. Make it quite hard, but if say, four assassins were used, that should be it for that leader.

Then for real chaos, after the leader 'retires', perhaps all cities of that civ should become barbarian. Causing a nasty war and allowing other civs to step up and take cities for themselves.

As Los Tirano (the tyrant) i can hardly wait to use assassins.

:goodjob:
 
Perhaps use the skin of the great merchant. He looks a bit shifty. Is that really a cane? What is the camel carrying?
 
spincrus said:
I'm going to check this mod out and combine the assassination skill with the spy unit if I can. It'd be perfect for my enhanced spy project.
What is enhanced spy project ? The spy can do many things more ??? :scan:
 
junter said:
What is enhanced spy project ? The spy can do many things more ??? :scan:

Well just think of it as a super spy. Take your current spy and add the Assassin abilities to that;)
 
I love this mod! Nothing like seeing the enemy sneak into your country and hit one of your best cities. I realized I needed some serious homeland security. As luck has it, I have developed an excellent counter-assassin network:D
 
RED DIAMOND said:
I love this mod! Nothing like seeing the enemy sneak into your country and hit one of your best cities. I realized I needed some serious homeland security. As luck has it, I have developed an excellent counter-assassin network:D

I'm glad to see it is working. When I tested it I gave the AI assassin units with the world builder and they uesd them correctly but I never actually played out a game long enough (using this mod on its own) to see if they built them. I'm glad to see they are building them. I knew they build them in the setup on my machine so I was 99% sure but I didn't have time to test it out as a stand-alone in a long game.

Roger Bacon
 
I can make you a good Firaxis-looking icon for both the unit and the mission if you want?
 
Top Bottom