Requesting following features

Wait will this mean NO other languages at all? Not even unit and building translations?!

or just english civ names?
The way I designed CivPlayer any code using it wouldn't work with any other language setting that English. :p But I'm working on fixing it right now...

edit: This is my proposed fix:
Spoiler :
Code:
def getEnglishName(pPlayer):
        iLanguage = Game.getCurrentLanguage()
        Game.setCurrentLanguage(0)
        key = pPlayer.getCivilizationShortDescriptionKey()
        name = Translator.getText(key, ())
        Game.setCurrentLanguage(iLanguage)
        return name
If anyone can spot a mistake here it would be very helpful to know... :p
 
Right I think that the Rebels should only be applicable to the 'barbarian civs':

Brittania
Gaul
Germania
Pictia (I am going to rename the short des to Pictia because it will sound better than: How can mighty Picts assist ____ ... Just to let you know :lol: But it will remain the same for other langauges)

In this case the Brythons will get increased chance of the spawning and if the civ is dead just have Barbarians spawn authough what happens if the great wall is protecting the city? Aswell as getting the culture thing asaf suggested and everything you were going to do... What did asaf mean exactly?

EDIT: "THE SPOILER" has been updated with Pictia...
 
Aswell as getting the culture thing asaf suggested and everything you were going to do... What did asaf mean exactly?

When Civ A conquers a city from Civ B, then the more culture was accumulated by Civ B in the city and its adjacent plots, the higher the odds for the city to revolt back to Civ B.

My suggestion was that if Civ B is the English, than the influence of its accumulated culture on the revolt odds will be bigger.

A question regarding a point that Baldyr raised: do you (j_mie6) want this to happen only for cities founded by the English, or to all cities that were ever owned by the English (if you want this feature at all)?

And should this be triggered from Python or will this be determined in the CivilizationInfo in the XML?
 
Right I think that the Rebels should only be applicable to the 'barbarian civs':
Hmm... I for one think that rebellions and civil wars can happen anywhere... Even in Rome!

In this case the Brythons will get increased chance of the spawning and if the civ is dead just have Barbarians spawn authough what happens if the great wall is protecting the city?
Ouch, never though of the Great Wall. What happens if you put barbarian units inside the wall in WB? I'm guessing the AI will reach the same...

Aswell as getting the culture thing asaf suggested and everything you were going to do... What did asaf mean exactly?
I'm not sure. We'll just have to wait and see what he comes up with. :king:
 
And should this be triggered from Python or will this be determined in the CivilizationInfo in the XML?
I guess you should do what is most convenient for you, even if it means that you hard-code it in the SDK. Otherwise XML would be easier to edit for j_mie6 and Python would be easier to tweak for me. I'm fine with anything, really.

I guess such a solution also make the Rebels modcomp superfluous? :p
 
@Asaf - Brython founded cities, Defined in the python probably...

@Baldyr - I think that as as soon as the civ in question is dead the rebel chance should stop instead of spawning barbarians, what do you think... I guess you are right about everywhere revolting but I think that the "barb" civs should get higher than the "civilized" civs (Rome, Greece, Carthage and Egypt) and Brittania should get the highest chance... What should the chances be though?

It also occured to me that the ERE (The J's code) will be taking the Roman's cities so if possible they should be immune from the effects...


What does superfluous mean? :lol:
 
@Baldyr - I think that as as soon as the civ in question is dead the rebel chance should stop instead of spawning barbarians, what do you think... I guess you are right about everywhere revolting but I think that the "barb" civs should get higher than the "civilized" civs (Rome, Greece, Carthage and Egypt) and Brittania should get the highest chance... What should the chances be though?

It also occured to me that the ERE (The J's code) will be taking the Roman's cities so if possible they should be immune from the effects...
I think Asaf has you covered as for the tools I need to do the actual power you requested. So lets start with that and decide on the Rebels later. It does sound like yet another form of rebellion would be redundant (which is what I believe superfluous to mean) in your scenario.

Also, I believe that the Rebellion code also requires there to be some number of foreign citizens in the city. Or something, I forget. :p
 
Ok, the language thing should be taken care of, at least. *phew* I actually thought I would have to scrap one days worth of work... :rolleyes:

So lets not worry about that anymore. :D
 
great... So I definatly think that this is what we should do...

POR - Conquored Brython cities get an extra 15% chance of doing an anarchy revolt (or something similar, not a flip revolt though...) OR 50% culture thing... AND an increased chance to spawn rebels.

I think the chances should go like this

Brython - 15% (if thats not too much)
Barbarian - 10%
Civilized - 5%

These should happen when city is revolting correct?

If the civ is not present it should either be replaced by barbs OR none at all (which do you think is best?)

If he great wall is there I think barbs would just get pinged out or something...
 
POR - Conquored Brython cities get an extra 15% chance of doing an anarchy revolt (or something similar, not a flip revolt though...) OR 50% culture thing... AND an increased chance to spawn rebels.
So the Rebels mod is in? And Asaf is going to increase the revolt chance in the SDK - or give us the tools to do it in the XML or with Python. And I believe I managed to increase unhappiness rate of conquered Briton cities. Ok, check.

I think the chances should go like this

Brython - 15% (if thats not too much)
Barbarian - 10%
Civilized - 5%
I'm not sure what these values represent. Is it the revolt thing (flipping back to the previous owner) or the spawning rebel units? And are these groups (civilized, barbarians, Bryton) defined as the city's current owner - or the original owner?

These should happen when city is revolting correct?
Spawning units or what?

If the civ is not present it should either be replaced by barbs OR none at all (which do you think is best?)
I dunno, actually. :dunno: You probably have to test what works best.
 
ok sorry for not being specific the %ages are referring to the rebels spawn possiblilty

The Groups represent the chance the rebels will appear from the original owners

Rome (roman) -> Conquored by gaul -> has a 5% change of the rebels appearing
Bibrate (Gallic) -> Conquored by Germania -> Has a 10% of rebels appearing
Londinum (Brython) -> Conquored by Pictia -. Has a 15% of rebels appearing

Hope that clears things up for that

The next question referred to when the units spawn... is this only when the city is in revolt?

The Catagories
Brython - Brython only
Barbarian - Gaul, Pictia and Germania
Civilized - Rome, Greece, Carthage and Egypt
 
The next question referred to when the units spawn... is this only when the city is in revolt?
I actually had to look it up myself. :rolleyes: The prerequisites are:

1. city must be in disorder
2. city must have culture percent anger ("We yearn to join you Motherland")
3. city must have been lost at some point
4. if all above checks then there is a mere 5% chance of rebellion on any given turn

But. You can basically get it any way you want. This is not even my own design - I made the modcomp as a tutorial on demand. But I do like the basic idea - its up to you to put you own spin on it! I will most likely end up rewriting the code anyway. :lol: (Its like... several months old, man! :twitch: Well, there are improvements to be made for performance and whatnot.)

I would like to propose that you test the present modcomp yourself before I do any actual work on it. Because then you would probably get more - and better - ideas. The installation/merging instructions are in the final lesson of the tutorial. Its actually good if you try this yourself, because you will be doing a lot of this going forward! :eek2:

The Python code for the powers you requested in the OP is about 90% done at this point, by the way. :goodjob: We have to give Asaf the chance to come though before we wrap this up, and only then would it make any real sense to start work on the Rebels.
 
The prerequisites that you posted seem perfectly fine to me as long as we can use the edited values I specified (Post 129)

I will test this when I can....
 
In the post you attached it had this popup message on it.... Is this like the science popup (where you slect your next research)

Because that could be useful to explain the powers and the Rebels and of course the Forest Construction (when will somebody comment on that? :crazyeye:)
 
In the post you attached it had this popup message on it.... Is this like the science popup (where you slect your next research)
Just try it already! :lol: Yeah, there are a lot of cool and useful things that can be done with programming, even with Python. :goodjob: (Did you know that the game interface is mostly Python? :eek2:)

Because that could be useful to explain the powers and the Rebels and of course the Forest Construction (when will somebody comment on that? :crazyeye:)
Oh, I totally forgot about that. Lets just get to that whenever... :p
 
I updated the DLL (here)
I didn't put everything we've talked about yet.

What I did add:
From python (using the following new API), you can add (and subtract) extra yield for certain types of terrains and plots to a specific player.

Code:
int getExtraTerrainYield(int iTerrain, int iYield);
void setExtraTerrainYield(int iTerrain, int iYield, int iValue);
int getExtraPlotTypeYield(int iPlotType, int iYield);
void setExtraPlotTypeYield(int iPlotType, int iYield, int iValue);

For example (I did this at onGameStart, but you can use it anywhere you want):

Code:
player.setExtraTerrainYield(gc.getInfoTypeForString('TERRAIN_DESERT'), gc.getInfoTypeForString('YIELD_COMMERCE'), 2)

player.setExtraPlotTypeYield(PlotTypes.PLOT_HILLS, gc.getInfoTypeForString('YIELD_FOOD'), 1)

Note that this new data is saved for each player in the save file, so it breaks previous saves but there's no need to update it on game load.

I forgot to ask - should the +10% defense for cities on hills be bombardable?
 
hows it all going? I will try the rebels when I have time (no time at the moment)

mmmm I dunno about bombardable... I guess as long as if the city survives the bonus returns then yes....
 
mmmm I dunno about bombardable... I guess as long as if the city survives the bonus returns then yes....

That's part of being bombardable. So I take it as a yes.
 
hows it all going? I will try the rebels when I have time (no time at the moment)
Oops! I must have missed Asafs post. :blush:

I'll try to whip something together tomorrow or the day after. With any luck Asaf will have done even more by then. :king:
 
With any luck Asaf will have done even more by then. :king:

Lucky us :D

Updated the DLL to version 3.

Again, it breaks saved games.

A copy paste of the addition from the file description:

New functionality:
1. Added option to change the city defense bonus (the cultural/building one) from Python:
Code:
int CyCity.getExtraDefense()
void CyCity.changeExtraDefense(int iChange)
This extra defense bonus is bombardable.
This value is saved when saving a game. No need to update it after loading.

Baldyr - don't forget to change this value back when city is acquired by a rival!
Note the difference between 'set' and 'change':
city.changeExtraDefense(-10)


2. Added option to increase/decrease a player's cultural strength for cultural wars over cities.
There are 2 new values for each player:
A modifier for cities owned by the player, which the player founded.
A modifier for cities which are not owned by the player but which the player founded (Ex-Cities).

In both cases this modifier affects the cultural owner calculation and the cultural strength when calculating city revolt probability.
Again, these values are saved in the saved game.

Code:
int CyPlayer.getCitiesCultureStrengthModifier()
void CyPlayer.setCitiesCultureStrengthModifier(int iValue)

int CyPlayer.getExCitiesCultureStrengthModifier()
void CyPlayer.setExCitiesCultureStrengthModifier(int iValue)

Let me know how it goes, and if everything works fine.
 
Top Bottom