Spawning Rebels/Converting Units??

porkysports

Chieftain
Joined
Nov 22, 2011
Messages
16
Location
the Little Apple
I thought I saw a thread or so earlier about what some people have been able to do with the Spawning Rebels that usually only occur when you are very unhappy, like -20 :mad: and/or Converting of enemy units but can't seem to find anything about it now.

What I am wondering is does anyone know of a way to have a Civilization Spawn Rebels with triggers other than "when this civ is uber mad"? For example, I would like to have my Civilization's Trait trigger this if possible. Something like "Enemies at War Spawn Rebels inside their borders."

I also thought it would be useful or a nice replacement for the above if I could just use one of my units to cause this inside the opponent's city borders he is currently occupying. I have an invisible unit that can enter rival territory and I thought it would be cool to have the city he was in spawn rebels. Or "convert" enemy units without defeating them in battle first, as it is a non-combative unit, for a different price, say, gold or culture, would be even better!

If anyone has accomplished anything like these two things I would greatly appreciate any help you could give. Thanks!
 
It can be done through Lua. Spawning units for any arbitrary trigger is not hard at all, as long as you know how to program in Lua. There are just three main factors to keep in mind:
1> The AI will have no clue about how to do this. It won't know that if it goes to war against you it's in more danger than normal, and it won't know that if it's playing as that civ that it'll get additional forces when it decides whether it's strong enough to declare war.
This is the single largest drawback to any Lua change: the AI just won't handle it. Adding things that are resistant to direct control helps for this (like making the chances of this happening be purely random) as it reduces the human's advantage over the AI, but it's still a notable issue.
2> You'll have to decide exactly where and when these spawn. The more flexible you try to make this, the more work it's going to be. If you're trying to make it be that any hex in the opponent's territory CAN spawn a rebel, then you effectively have to do a full-map scan every turn, and that gets to be a huge amount of overhead on larger maps.
You need to be SPECIFIC. Exactly how common should these be? Exactly where should they spawn? Does the strength of the unit spawned depend on the tech level that other civ is at, or the level you're at?
3> There are a whole bunch of balance issues involved. Do these spawned rebels cost anyone maintenance? Can they pillage improvements? Will they attack your forces when you invade (in which case they can just be part of the Barbarian faction) or are they supposed to be friendly to you (which requires the addition of another civ)? What happens if they conquer a city?
 
Thanks for the reply.
1> That is something I always forget when I think about what I would like in my mods. The AI right now does so many silly things I can't say I would really mind adding something it can't really handle. Or at least, in this case.

2> At first I was thinking of trying to just activate what already happens with the Rebels just with different triggers. That would encompass all of their land and like you pointed out be a rather large amount of overhead on the larger maps, so maybe that's not the way to go.

When I got to thinking about the unit possessing a trait or something to do it I was thinking a much smaller area as in just the city radius it is currently occupying (that civ wouldn't need to be in war with the unit but I wouldn't want the unit to spawn barbs while in their own civ's borders.) I think the unit spawned should be set off of the spawning civ's science, that way something consistent to what they currently own is spawned and I wouldn't like it to be every turn that unit is in an opponent's land that it spawns. Maybe something like 5-10% chance? I have never tested anything like this before so have no clue what a balanced % would be, what would you suggest?

3> I never thought much about this aspect at all but I guess the easiest thing would be just to have it be a Barbarian as in from the Barbarian Civilization? That would make me more than happy. In a perfect world it would be friendly to the unit that spawned it but that isn't necessary at all.

I've been trying to read up and learn some of this Lua but it's not going as well as I was hoping it would. I am currently stuck on what I imagine is a rather simple process, the Lua listener code you gave me in the last thread you helped me in. LOL, I think I am making it a lot harder than it really is.
 
Back
Top Bottom