 |
|
mapfi
|
|
Zurich, Switzerland
Jul 2002 time: 06:21
|
|
quote: Actually we can send the message for every player. AI will get the message although he wont use it. |
I actually didn't read that part properly, that's why I haven't replied to it. Martin tried to do that in a fix for the KillCityOption for MP but it didn't work. I tested it again a few nights ago. Any news on that, Martin?
|
|
|  |
 |
|
mapfi
|
|
Zurich, Switzerland
Jul 2002 time: 06:21
|
|
Had another go at it last night and got it almost done.
When playtesting I discovered a problem with our loop workarounds. I'd get a DoYouWantToConvert message for a city which I had conquered every turn. My suspicion is, that because of the asynchronous execution of the events the following happens: In the BeginTurn handler, the ConvertCity event is called for each city with the global variables set to prevent the message and that part of the code appearing. So for each city an event will be added to the 'waiting to be executed list' Then the first city goes through this event and those global variables are set back to their default value, resulting in a execution of the message code for the next city that has a different religion. Am I thinking right here??
After changing all convert handling code to the convertcityunit event things work now and we can even get rid of those global variables!
Furthermore I started writing on a readme, here's what I've got so far:
README to the Religion Code by Pedrunn and mapfi
Basic Idea:
The game already provides religion as a gameplay option. So far this was only available for theocratic governments. This mod makes it available to every rulership. Furthermore it introduces the concept of a changeable state/leader religion. The religion’s names are those of the founding civilizations.
Features:
-You’re starting religion will be your own, easily noticeable when you found your first city because the blue cross will appear next to the name on the next turn. Every fifth turn a religion info message will appear. It tells you: your current state religion, the current religion level (percentage of world pop converted to your state religion) and the effects religion has on cities, those being amounts of money paid by/to you by your/foreign cities with different/your state religion and happiness effects on each city depending on the success of the city’s religion. Be advised that in the beginning you need to grow as quickly as the AI’s in order not to have to put up with a severe happiness penalty for quite a while.
-With the discovery of religion (often already given at start) you’ll be able to build priests. Their abilities are those of the known cleric, converting cities, selling indulgences and soothsaying. Converting another city if successful has a chance of converting the AI to your state religion. While you won’t get any money from that player anymore the religion level of your civ will rise resulting in greater happiness. If another player successfully converts some of your cities the citizens will ask you to convert to this new religion. Positive aspects are that you won’t be paying anything to that civ anymore and your happiness will rise in those cities, the drawback is that you’ll have to reform the not yet converted cities which can be rather costly. With the discovery and the installment of a theocratic government you’ll be able to produce clerics, which have higher success rates when converting.
-Reformation by combat units: On ordering a reformation you’ll be giving the following options: Don’t do it after all, convert to your state religion or convert to your civ’s original religion. The last one will also revert your state religion back to your civ’s original religion. Reformation costs now depend on the religion level of the city’s religion you’re trying to convert and the number of combat units that can help you with the reformation in that city.
-Settler religion: Settlers, being of the pop of a city, naturally have the religion of that city and will stick to it even when that city is converted while they’re looking for a new settling spot. The newly founded city will then have the settler’s religion.
-Assimilation: By killing another player every city on the planet that was converted to this civ’s original religion will be converted to your current state religion.
-Diplomacy: Player’s with the same state religion will like you more, while the other’s will like you less.
Exact numbers and formulas: costs/succes rates/happiness ...
|
|
|  |
 |
|  |
 |
|  |
 |
|
mapfi
|
|
Zurich, Switzerland
Jul 2002 time: 06:21
|
|
quote: Originally posted by child of Thor
The readme looks great - any chance of a selection over how often you get the religion message(5/10/20 turns kinda thing)? |
Anything you wish, I'll try. There is a slight problem with the hardcoded size of the alertbox so I can't combine the button with the religion info message. So it's either going to be a pop up every 50 turns or so where you'll select, or a button included in the alertboxes for reformation and conversion or whenever you produce a cleric (and then not anymore for the next 50 turns if another cleric is produced). What do you think?
|
|
|  |
 |
|
mapfi
|
|
Zurich, Switzerland
Jul 2002 time: 06:21
|
|
Or wait, I can have buttons in regular message boxes too, can't I?
|
|
|  |
 |
|
mapfi
|
|
Zurich, Switzerland
Jul 2002 time: 06:21
|
|
Readme continued
as requested you can now choose to have the religion info msg pop up every 5,10,20 turns and you can also change to have it only appear in the msg tab and not on the screen
success rates
priest, success 0.4, death 0.5
cleric, success 0.8, death 0.25
sell indulgences
you'll get the nr of pop in the city times 1/2/1/.5, depending if the city owner has researched default/theology/age of reason/mass media
if the city's religion is your state religion you'll get twice that amount
tenth
if a city of yours has got a different religion than your state religion it'll pay a tenth to all other players who have that religion as state religion
the paid amount is equal to the nr of pop of the city times 3/5/3/1, depending if the city owner has researched default/theology/age of reason/mass media if there's only one other player with that state religion, for each additional player the city will pay an additional half of this amount, the so paid amount is equally divided between the other players.
reformation
NewReformCost = percentage of world pop converted to the religion of the city times number of players times city pop times 5 divided by the number of units in the city
changing your state religion
when another player converts one of your cities you'll get a message to convert to that player's religion if more than 10 percent of your pop have converted to it already
when you're state religion is not your original one anymore and you try to reform one of your cities with another player's religion you'll get an option to resurrect your original religion
happiness bonus/malus
the so called happymod of a city is on a scale of 0 to 100, it is calculated in the following way:
As default the value of (percentage of world pop converted to the city's religion times number of players) is 100.
If this value is above 100 then the happymod is equal to (this value minus 100) divided by (the number of players minus 1)
if this value is below 100 than the happymod is 100 minus this value.
So the default value of the happymod is 0, and converting the whole world is equally grave as having no city converted to one's state religion
if HappyMod < 12.5 0 happiness
HappyMod < 27.5 +/- 1 happiness
HappyMod < 42.5 +/- 2 happiness
HappyMod < 57.5 +/- 3 happiness
HappyMod < 72.5 +/- 4 happiness
HappyMod < 87.5 +/- 5 happiness
HappyMod >= 87.5 +/- 6 happiness
reforming a city give's it -2 happiness for one turn
denying the request for a change of the state religion also give's the city -2 happiness for one turn
|
|
|  |
 |
|
mapfi
|
|
Zurich, Switzerland
Jul 2002 time: 06:21
|
|
Have fun. I PMed Peter today because I had a few ideas why the LogRegardEvent might not want to work. So maybe we can solve that one easily enough.
You'll notice that I got completely rid of those loop preventers and set all handlers to convertcityunit. It works fine. It's just vital that whenever the code calls convertcity the change is actually stored in the array first.
The assimilation and changing messages work as well, though I had an AI change right back after I had him changed to my religion - I tried to adjust the values, so I shouldn't happen too often. (It can always change it's mind just after one turn, can't it...)
If you start testing keep in mind that 10% of your pop have to be converted before you're prompted about changing your state religion - fell over this one myself when playtesting but I want to keep it in - otherwise we'll have even more messageboxes appearing.
|
|
|  |
 |
|  |
 |
|
mapfi
|
|
Zurich, Switzerland
Jul 2002 time: 06:21
|
|
So, Pedrunn you're busy studying? Well, yesterday was my first day back at uni, so I'll have to see how much time to spend on Ctp2 will be left.
Anyway, I had a little idea last night after this diplo stuff finally works now. The moment you change your state religion should have a greater diplo effect. Think of an AI converting your cities. For the AI to do that it's likely he doesn't like you much, so converting to him should reset trust and regard or give bonus. Same with recreating your own religion - that should hurt diplomatically. Just more than the little -2,+5 that we have every turn.
|
|
|  |
 |
|  |
 |
|
mapfi
|
|
Zurich, Switzerland
Jul 2002 time: 06:21
|
|
quote: Did the Peter Triggs fix worked? | So you really don't have any time to read the threads anymore, do you? Yes, the problem was that we went up to player number 33, but actually theoretically only up to 31 is possible and only up to 29 works without faults in the game. Slic should be made for 31 though (and it works fine) in case somebody finds a fix sometime. IsPlayerAlive returns true for any number bigger than 31 - that's what screwed us up...
quote: I just hope your university doest take as much time as mine takes from me. It almost makes me regret trying to do medicine. Almost... | Math here - while I still have some time till things really get going (so about another week...) I'll post as much as I can.
|
|
|  |
 |
|  |
 |
|
mapfi
|
|
Zurich, Switzerland
Jul 2002 time: 06:21
|
|
quote: Originally posted by Pedrunn Decrease the Cross size. |
A very good idea!
quote: Why the religionLevel in-code is from 0-10000 and in the message is from 0-100. |
well 0-100 makes sense because of it being a percentage - but rounding will screw it up if you play with large number of players, that's why i blow it up for calculation
quote: The Happy mod part is so confusing! | I know I'm a math-nerd, but it's really simple though. Just write the formulas down and insert a few different levels and you easily see what it's doing and how it's working - all straight forward...quote: The infocycle[] doenst need to be a array. It could be an simole variable | yes, I just didn't want to set up three variables for it. I don't think the game needs more ram if I define the size of the array, maybe even less because it's only one name.
quote: PlayerNum, infocycle[], SentChanges[], Receiver, allcities[]. Are of too common use | Good point - a prefix is a good idea.
|
|
|  |
 |
|  |
All times are GMT. The time now is 05:21. Apolyton Time is 00:21. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|