Special Ability & Special Unit Questions

Jeremy8419

Chieftain
Joined
Jul 31, 2011
Messages
1
Hi,

I am considering doing a mod and am a noob at this. I specifically want to create a certain civilization. I already have the Special Ability and Special Unit I want thought out in my head, but since I am a noob, I am unsure if it is even possible.

the Special Ability would cause you to have +culture to be proportional to your overall rank in the match (or maybe just military might); e.g., if you are in 8th place, you gain +8 culture in each city. i also want it to cause your overall +culture to increase your happiness by a % of the +culture

the Special Unit i would like to be the warrior and have the warrior double the food bonus on any improved tiles he occupies in your own territory

Not really asking for a "hey script this for me" (though that would be much appreciated), but i am definately asking if these two are even possible.

Thank you for your time :)
 
The things you're asking for are not easy. Just so you know.

Nearly anything is possible in Lua, but things are rarely simple, and there's nearly always a disclaimer involving the AI. You'll see what I mean in a minute.

the Special Ability would cause you to have +culture to be proportional to your overall rank in the match (or maybe just military might);

That's easy enough to do, just make a start-of-turn event that gives the culture. Of course, this sort of ability would depend HEAVILY on map size, since on a Duel map you'd never be able to get very low.

i also want it to cause your overall +culture to increase your happiness by a % of the +culture

This is a lot harder. Adding Happiness, in general, is not easy. The best way I've found to do this is to make a custom building that adds +1 Happiness, has Cost= -1, and has the <NoLimit> flag in its building class. Then use a Lua event to set how many of these are in your cities (or in this case, your capital). It's messy, though.

The bigger problem is mathematical. In the early game you'll only be getting two or three culture per turn, maybe scaling up into the teens, but by the Modern Era you'll be getting 400-500 per turn easily. A fixed percentage just wouldn't work for this, so you'd have to come up with something more intelligent (like scaling it with the cost of the next policy).

the Special Unit i would like to be the warrior and have the warrior double the food bonus on any improved tiles he occupies in your own territory

This is also not easy. It's possible to tweak the yields of a specific tile, no question, but the overhead on this would be... problematic. After all, you'd need to have the event happen at the end of the turn, and then on the following turn you might need another start-of-turn event to make sure it's set back to normal. I'd actually made a unit for my own mod that was going to do this, and I scrapped the idea because of the next part...

The main problem with this one is the same thing that kills many great ideas: the AI would have no clue how to use it. The AI tends to garrison units, which wouldn't really help for this, while the player would know to take the unit and park it on his Great Improvements. As a result, it'd be HORRIBLY unbalanced when playing against this civ played by an AI.
Your above idea with culture is much more AI-friendly, because there are no conscious decisions involved. Basically, there are three tiers:
BEST> Abilities that reward for playing the way the AI already does.
OKAY> Abilities that reward players no matter what they do.
WORST> Abilities that reward players for following an unusual strategy.
Once we have the DLL SDK it might be possible to tweak things to allow the AI to understand concepts like this, but I wouldn't hold my breath.
 
Back
Top Bottom