Requesting following features

I wonder if the improvementBuilt callback can't be used for the catapults as a Python trigger. So if the military unit is doing the dummy worker action and completes the task, then I could add some code that fires the catapult spawning code. The ImprovementTypes value is already available, as are the map tile coordinates. The only thing missing is the PlayerTypes value - because there may be valid units of several players on the target tile on that game turn...
 
Ok, everything has been sent via email. :king:

Regarding the civil war code - I just took a quick look and it was a bit hard to get into. What, exactly, seems to be the problem?

If I was to give something like that a try myself I would probably hook the code up with the Event Manager instead of the random events infrastructure. But the issue would probably still be the same - whatever it may be...

Does the player option to control the new Civ really work? I wasn't even aware that new players could be added to the game like that... (I would probably just had the Byzantine as a dead Civ from start, and revived them at a target date. Then switch the player, but I'm not quite sure how that is done.)
 
There is also an onUnitBuildImprovement that is fired when a unit starts building an improvement (or route, apparently).

In Final Frontier it uses that to set script data for the unit that is used in onImprovementBuilt to identify which unit was doing the build. In onImprovementBuilt the dummy improvement is removed and the starbase is initialized on the plot for the owner of the unit that has the script data set. You'd also clear the script data for the unit (the starbase construction just kills the unit instead).

Note that there is a drawback to this method, and a problem that may need SDK work to overcome - but it also may be possible to overcome with some more Python.

The drawback: Since it is done via an improvement, it will wipe out any other improvement that is on the plot since each plot can only have one.

The problem: In the case you're talking about you also have to somehow convince it to allow building an improvement in enemy territory. The bOutsideBorders tag in the ImprovementInfo data allows an improvement to be built outside your cultural borders, but it does not allow you to do so inside someone else's borders. There is a canBuild callback in CvGameUtils.py that might let you override this in Python (if the build type is the catapult build and the plot has a forest or jungle on it then return 1, otherwise return -1 as it normally does; this assumes the callback does what I think it does).

In FF this all resulted in a bug in the attempts to build a starbase every once in a while. It caused massive slowdowns when it happened. The reason was that while it was checking the plots of resources (which it wanted to use the starbase's plot ownership capability to claim) to see if they were owned by someone else, it wasn't checking the plot where the starbase would go. It can't build a starabase in someone else's territory. This would have resulted in an infinite loop as it kept trying, but the code in the DLL actually checks for looping in this case and limits each unit (well, selection group, actually) to 100 attempts to carry out instructions each turn. See posts 431-434 over in the FF thread in the Official Mods forum. That's a problem with overriding the unit AI - if your Python override always tells it to do the same thing and that thing is impossible then you get to make use of the 100 attempt counter, after which the unit does nothing for the turn (but may very well try the same thing 100 times next turn).
 
Uploaded DLL version 4.

From the updated description (you can read it there as well):

A BuildInfo now has an optional new tag: UnitClassType (comes after ImprovementType).
If this tag exists (and is not NONE), it contains the class type of the unit that will be created when this build completes.

The schema was changed to reflect that and is part of this package.

An example:
Spoiler :
Code:
    <BuildInfo>
      <Type>BUILD_CATAPULT</Type>
      <Description>TXT_KEY_BUILD_CATAPULT</Description>
      <Help/>
      <PrereqTech>TECH_CONSTRUCTION</PrereqTech>
      <iTime>300</iTime>
      <iCost>0</iCost>
      <bKill>0</bKill>
      <ImprovementType>NONE</ImprovementType>
     [B] <UnitClassType>UNITCLASS_CATAPULT</UnitClassType>[/B]
      <RouteType>NONE</RouteType>
      <EntityEvent>ENTITY_EVENT_BUILD</EntityEvent>
      <FeatureStructs>
        <FeatureStruct>
          <FeatureType>FEATURE_FOREST</FeatureType>
          <PrereqTech>TECH_BRONZE_WORKING</PrereqTech>
          <iTime>300</iTime>
          <iProduction>0</iProduction>
          <bRemove>1</bRemove>
        </FeatureStruct>
      </FeatureStructs>
      <HotKey>KB_C</HotKey>
      <bAltDown>0</bAltDown>
      <bShiftDown>0</bShiftDown>
      <bCtrlDown>0</bCtrlDown>
      <iHotKeyPriority>0</iHotKeyPriority>
      <Button>,Art/Interface/Buttons/Builds/BuildCatapult.dds,Art/Interface/Buttons/Actions_Builds_LeaderHeads_Specialists_Atlas.dds,3,7</Button>
    </BuildInfo>

This build can be started on a forest, and when it ends - it removes the forest (without giving production to the nearest city) and a new catapult is created in this plot.

Known issues:
  1. Unless it also creates an improvement, this build can only be made if there's a feature which will be removed (forest, in this example). This is according to the original requirements.
  2. This cannot be done inside a rival's cultural borders (same as any forest chop). (I think this is the correct behavior, I might be mistaken though).
  3. The AI has no special code to use it. It may do it as part of the 'best build', but I haven't tested it and have no idea how it will act.

Notes:
  • As in any other build, if you want another unit besides a worker to do this, you should change this unit's iWorkRate from 0 to something else (e.g. 100).

Let me know if everything's OK.

The problem: In the case you're talking about you also have to somehow convince it to allow building an improvement in enemy territory. The bOutsideBorders tag in the ImprovementInfo data allows an improvement to be built outside your cultural borders, but it does not allow you to do so inside someone else's borders. There is a canBuild callback in CvGameUtils.py that might let you override this in Python (if the build type is the catapult build and the plot has a forest or jungle on it then return 1, otherwise return -1 as it normally does; this assumes the callback does what I think it does).

I didn't really solve it here, but if j_mie6 wants, I can change this behavior so catapults can be constructed in enemy territory as well.

Since there's no improvement, then even the bOutsideBorders does not work in this case.

Let me know how you want me to handle this.
 
I would think it should only be available in friendly and neutral territory. The thought occured to me though for the egyptian power (sorry baldlyr) that there is not nearly enough desert to constitute this power and it should be changed to plains (or maybee just back to river (with the nile bonuses on top! :lol:, has that been implemented?))

anyway... isn't there some way to teach the ai to use things using python or SDK (and I presume that not being able to use it properly doesn't mean they make it whenever possible?)

does anybody know what 6 turns would be in the time put on the info (would it be 600)

@Baldyr:

The player being able to change to the Byzantines is not nessisary I don't need that. The bug was that in the turn 225 (the executing point) the ERE didn't spawn but resurrected germania! It spawned with clovis as the leader but with the skin of marc antony (their leader) and I don't even know about the flag because they didn't get any of the units they were meant to get (meant to recieve all units in the cities past a certain point (in this case everything east of sparta)) I will have to test the completed code for the other features and test The J's entry point code in 3.19 and see if it was just that... If I had everything else (powers, comandeering, Forest Construction) would the code have to be merged in or is it ok (in the entrypoints not used by you). If so then this weekend I will test everything that we have so far!
 
I would think it should only be available in friendly and neutral territory.
So please test it, and if this is not the case (I'm not sure which it is) I'll try to make the needed modifications.

anyway... isn't there some way to teach the ai to use things using python or SDK (and I presume that not being able to use it properly doesn't mean they make it whenever possible?)

There is "some way" to "teach" the AI to use it. But it's not simple.

Besides the fact that writing proper AI is probably one of the most difficult tasks in game programming, I see 2 specific problems:
1. Builds usually affect the land, and the AI uses the new yields/resources values decide to which build to do (if at all). This build has a totally different affect, which is actually a military decision.
2. The fact that you want a non-worker to do that, means a military unit needs to decide to do this, which is something completely new.
The result of these two issues is that it's not just a code tweak, but adding a whole new logic.

I'm not saying it's not doable, and I'm sure there are more complicated things, but I don't think I really want to get into it right now.

does anybody know what 6 turns would be in the time put on the info (would it be 600)

Yes. Only note that there are 2 different values - one for building the catapult and one for removing the forest. The actual time is the total of these two, and is also dependant (as I wrote) in the iWorkRate (or something like that) value of the unit.
 
The thought occured to me though for the egyptian power (sorry baldlyr) that there is not nearly enough desert to constitute this power and it should be changed to plains (or maybee just back to river (with the nile bonuses on top! :lol:, has that been implemented?))
The terrain type can easily be changed to anything you like, but I now realize I didn't make it as customizable as I originally intended. :rolleyes: I might put all mod settings into a Python module of its own in the end. Making it really easy for you to edit the different mod components.

I was thinking, though, that you should probably add more desert to Egypt, now that the Nile tiles yield the extra food. I really don't think you should have grassland tiles representing flood plains, right? So I'm proposing desert base terrain + flood plains terrain feature + wheat bonus resource + extra Nile river tile yield + Egyptian desert bonus yield. That still adds up to mighty potent farm land without the grassland!

anyway... isn't there some way to teach the ai to use things using python or SDK (and I presume that not being able to use it properly doesn't mean they make it whenever possible?)
I think that the only realistic option is to simply spawn catapults to the AI players. The human player wouldn't notice the difference anyway... :p

The player being able to change to the Byzantines is not nessisary I don't need that. The bug was that in the turn 225 (the executing point) the ERE didn't spawn but resurrected germania! It spawned with clovis as the leader but with the skin of marc antony (their leader) and I don't even know about the flag because they didn't get any of the units they were meant to get (meant to recieve all units in the cities past a certain point (in this case everything east of sparta)) I will have to test the completed code for the other features and test The J's entry point code in 3.19 and see if it was just that...
It sounds like a mess but I could probably give it a try, based on some of The_J's code. If you can't get it to work with the most current patch, that is.

If I had everything else (powers, comandeering, Forest Construction) would the code have to be merged in or is it ok (in the entrypoints not used by you). If so then this weekend I will test everything that we have so far!
Since the Byzantium code isn't connected to the Event Manager there is no more merging needed. The Rebels code is also included in the files I sent you, though I just realized one more thing I need to test. So I will probably send you a replacement file... :rolleyes:

edit: One question: Since cities under occupation are also in disorder - should the Rebels event fire then also? Because occupation would account for 99% of all city disorder, or so I would think. You can basically have it any which way you like. (I need to edit something anyway. :p)

edit, again: I think I'll just get rid of the "city must have been conquered" condition for the Rebels event also. Because the event should be rare enough as is.
 
The problem with lots of desert is you can't build on it... which is why I use plains (I use grassland because it makes the nile look more fertile :lol:) I definatly think plains bonus with what I currently have at the nile... but maybee I can add some more desert somewhere...


wait! if you remove the city must have been conquored and it goes into disorder and it gets a rebellion then what unit spawns.... It doesn't make sense to do that, I say you should keep it in.

I'm not sure about the during the 'Vive la restistance' from being conquored but I guess I could work. Would make holding cities harder though :D

Try the alternative for the ai catapults (authough wouldn't spawning them not remove forest? and be alot of them? hmm...)

the problem with me doing a playthrough to test the civil war is it takes a long time... but oh well!

I just realised, that with the code Asaf has done it doesn't say it HAS to be in a forest (that is defined in the impovement infos.xml in Terrian with the 'Featuremakesvalid' tag) how are we going to make sure that it only happenes in a forest?


Question: Is the forest construction code included in the DLL download then?

remember: I got this callback from the civil war code during when The J was on it
Spoiler :

Traceback(most recent call last):

File "CvAppInterface", line 56, in onLoad

File "CvEventInterface", line 23, in onEvent

File "CvEventManager", line 187, in handleEvent

File "vEventManager", line 323, in onLoadGame

AttributeError: 'module' object has no attribute
'resetNoLiberateCities' ------------------------------- maybe DLL could fix this?

 
The problem with lots of desert is you can't build on it... which is why I use plains (I use grassland because it makes the nile look more fertile :lol:) I definatly think plains bonus with what I currently have at the nile... but maybee I can add some more desert somewhere...
I can change the bonus to plains or whatever (or you can edit it yourself). But why not just enable city building on Desert tiles, instead? Next to rivers? I believe its even possible to make the Nile River region buildable via CvGameUtils - regardless what terrain XML you currently have.

This is modding, after all. :rolleyes: You can have city founding on desert tiles. - if you want. Period.

wait! if you remove the city must have been conquored and it goes into disorder and it gets a rebellion then what unit spawns.... It doesn't make sense to do that, I say you should keep it in.
I was thinking there can also be domestic rebels, like dissidents, worker/slave revolts, an so on. Those would of course be Barbarian units.

I'm not sure about the during the 'Vive la restistance' from being conquored but I guess I could work. Would make holding cities harder though :D
I created a ModSettings module and I can include a bOccupation constant that you can switch to either True or False in order to test this yourself.
Code:
bOccupation = True # change to False in order to disable
Try the alternative for the ai catapults (authough wouldn't spawning them not remove forest? and be alot of them? hmm...)
I don't think building some siege engines should remove a forest. Makes no real sense. Nor does it make any real sense that it would take a military units several decades to construct those. I mean, it wouldn't even be the same men finishing them than who started work on them...

I know its a bit late to comment on the actual design aspect of this, but wouldn't it just make sense if advanced armies would spawn catapults in forested areas? It could still be a unit action for the human player, but a AI at war would get those automatically. Perhaps one per turn?

the problem with me doing a playthrough to test the civil war is it takes a long time... but oh well!
If you know how to use the built-in Python console you can just change the game date manually. In order to test things, that is. (It would be as easy to just add one line of code in CvEventManager or some other module.)

Also, once you do play a full game up to the trigger date, make a save. Because then you can test any changes on that save game. (Unless there is stored data it shouldn't break saves.)

remember: I got this callback from the civil war code during when The J was on it
What is a "vEventManager"? A typo? :confused:
 
I added another custom feature for you - a setting that allows you to change the game turn on-the-fly by editing ModSettings.py in mid-game. (Changing the starting date proper is done in the WBS, by the way. This feature should not be used for changing the scenario starting date.)
Code:
iGameTurn = -1 # set to other than -1 to enable
 
ok thats good... the thing was when I was thinking about that feauture it clicked that it would be really unbalanced when you can construct 20 catapults waiting for you to build your army... it just seemed wrong. Which is why I wanted a longer turn limit and it to remove forests (but that can easily be changed in the XML). but I agree with the ai... maybee you could make a 5% chance of them spawning or something in python as long as it is in a forest? (baldyr)

There is still the problem that it would be available anywhere by the way as the xml in buildinfos doesn't state wether is has to be built on a forest, the improvementinfos do that... so asaf you will need to make another xml tag for the build infos that reflects the feauturemakes valid tag in the ImprovementInfos.xml

(Have you sent me the final code by the way? with all 8 powers, rebels code, comandeering? or are you not finished fine tuning the rebels (remember with domestic disputes the great wall can bounce them out as far as I know) and did you change anything in the civil war code or is it fine?)
 
There is still the problem that it would be available anywhere by the way as the xml in buildinfos doesn't state wether is has to be built on a forest, the improvementinfos do that... so asaf you will need to make another xml tag for the build infos that reflects the feauturemakes valid tag in the ImprovementInfos.xml

Currently, since there's no improvement defined, you can only do BUILD_CATAPULT in the features defined which are to be removed, that is - a forest.
It does not require any change to keep it that way, but if you want to enable it without a forest, or to allow it to not remove a forest - I'll need to make some changes.

Alternatively, you can enable the Python callback 'canBuild', and use it to define your own logic (return 0 for false, >=1 for true, or a negative value for the DLL to decide).
 
the thing was when I was thinking about that feauture it clicked that it would be really unbalanced when you can construct 20 catapults waiting for you to build your army... it just seemed wrong. Which is why I wanted a longer turn limit and it to remove forests (but that can easily be changed in the XML). but I agree with the ai... maybee you could make a 5% chance of them spawning or something in python as long as it is in a forest? (baldyr)
Sure, I'll just let you handle the actual mod/scenario design. Spawning units like this with Python may be sub-optimal but is very doable. What about spawning catapults only if you don't move. (So the move action is substituted with catapult. Or the other way around - spawning a catapult consumes the move action.)

Figure out the design and I can get started on the code. Like what units can spawn catapults for the AI? Only in domestic forests or even in enemy territory?

(Have you sent me the final code by the way? with all 8 powers, rebels code, comandeering? or are you not finished fine tuning the rebels (remember with domestic disputes the great wall can bounce them out as far as I know) and did you change anything in the civil war code or is it fine?)
I'm not sending you any more files until you're ready to start testing. Because I'm working on them all the time. Right now I'm up to 8 modules... :rolleyes: I added a Utils module by the way which, among other things, contains so called enumerated types. But this is what the ModSettings module looks like right now:
Spoiler :
PHP:
# Unique Powers

iCarthageMoves = 1
eGreeceCivic = eUniversalSuffrage
iEgyptianFood = 1
eEgyptianTerrain = ePlains
iEnglishUnhappiness = 2
iEnglishCulture = 10
iGallicDefenseBonus = 10
iPicticFood = 1

# Rebels mod-comp

bOccupation = True # enables rebellions under occupation
bDomestic = False # enables rebellions in non-conquered cities
tCivilized = ( "Carthage", "Greece", "Rome", "Egypt" )
rebellionMessage = "A %s rebellion has broken out in the %s city of %s!"

# Custom Features

iGameTurn = -1 # set to other than -1 to enable
iNileFood = 1
iNileProduction = 1
iNileCommerce = 1
eCommandeerer = eQuitrireme
iCommandeeringProbability = 30
iCaptureDamage = 50
captureMessage = "A %s %s unit has been captured!"
popupHeader = "Jamie's Rome Mod"
popupMessage = "This mod includes the Rebels Python mod component. It spawns barbarian units around \
cities with foreign citizens that are currently in disorder. The unit type and the number of units \
adapts to the makeup of the city garrison and the outcome will vary with the circumstances.\n\n\
..."
Do I need to document this further (like with line comments) or is everything pretty much self-explanatory? Note that you can change the string values (the text within quotations) to what ever you like. If you do translate all the text later you can just change them to whatever you name the XML tag. I'm building in capability for this right now.

This is the only module you should ever need to edit yourself, and as you see there is no programming required. If you need to disable some custom Python feature I made you can just comment out the line with the function call (like Custom.commandeering) in the Event Manager.

Anyways, if you give me something like a 16 hour warning I can test all the latest changes and send everything to you in a zip-package. But there is no real point in sending you files twice a day, is there?

edit: Oh, yeah. I rewrote the whole Commandeering code and put it in the new CustomFeatures module. It also includes a dynamic (color coded) text message. It works the same but is easily customizable from ModScenarios module.
 
1. It's Quintrireme :lol:
2. Are the roman and germanic powers there?
3. I don't want the spawning catapults to be for humans aswell though: I want the ai to have 5% chance of spawning catapults (with contruction & if possible in a forest :D,only in friendly and neutral terrain) and it should remove their movement to do so
4. Really? it works with just saying it removes forest... hmm..... (@asaf)
5. in your new code for comandeering do barbs get the chance to use it? (that should not happen :lol:)
6. I have decided that only advanced swordsmen can contruct catapults (that we it is easier for me to have them animated :lol: I'm having to take a crash course here (I have done unit edited but I get the feeling animations are a little more complicated here) :D
7. Good Work!!!!

Spoiler :

Code:
		<UnitInfo>
			<Class>UNITCLASS_SWORDSMAN_II</Class>
			<Type>UNIT_SWORDSMAN_II</Type>
			<UniqueNames/>
			<Special>NONE</Special>
			<Capture>NONE</Capture>
			<Combat>UNITCOMBAT_MELEE</Combat>
			<Domain>DOMAIN_LAND</Domain>
			<DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI>
			<Invisible>NONE</Invisible>
			<SeeInvisible>NONE</SeeInvisible>
			<Description>TXT_KEY_UNIT_SWORDSMAN_II</Description>
			<Civilopedia>TXT_KEY_UNIT_SWORDSMAN_PEDIA</Civilopedia>
			<Strategy>TXT_KEY_UNIT_SWORDSMAN_STRATEGY</Strategy>


Do not be deceived by advanced swordsman, it is in fact swordsman_II see spoiler
 
1. It's Quintrireme :lol:
Oops, typo! :blush:

2. Are the roman and germanic powers there?
Yeah, but I seem to have forgotten to include variables in the ModSettings module. This has been fixed now.

3. I don't want the spawning catapults to be for humans aswell though: I want the ai to have 5% chance of spawning catapults (with contruction & if possible in a forest :D,only in friendly and neutral terrain) and it should remove their movement to do so
Ok, AI only, in non-hostile forest, 5% chance by default, kill movement. Check. What about the forest terrain feature itself? Should that be removed on spawn also?

5. in your new code for comandeering do barbs get the chance to use it? (that should not happen :lol:)
Its basically the same feature, so don't expect any surprises.
Spoiler :
Code:
def commandeering(pWinner, pLoser, winnerInfo, loserInfo):
        pWinningCiv, pLoserCiv = instance(pWinner.getOwner()), instance(pLoser.getOwner())
        if ( not pWinningCiv.get(CyPlayer).isBarbarian()
             and winnerInfo.getUnitClassType() == eCommandeerer
             and loserInfo.getUnitCombatType() == eNaval
             and loserInfo.getUnitClassType() != ePrivateer
             and Game.getSorenRandNum(100, "commandeering") < iCommandeeringProbability ):
                pCaptured = pWinningCiv.get(PyPlayer).initUnit(loserInfo.getID(), pWinner.getX(), pWinner.getY())
                pCaptured.finishMoves()
                pCaptured.setDamage(iCaptureDamage, pWinningCiv.get(playerID))
                tStrings = pLoserCiv.getName(), loserInfo.getDescription()
                tColor = pHumanCiv == pWinningCiv, pHumanCiv == pLoserCiv
                addMessage(captureMessage, tStrings, tColor, getCoords(pWinner))
The main difference is how the code looks. :lol: But I did add the dynamic color-coded message.


6. I have decided that only advanced swordsmen can contruct catapults (that we it is easier for me to have them animated :lol: I'm having to take a crash course here (I have done unit edited but I get the feeling animations are a little more complicated here) :D
So the feature will only be available for units belonging to "UNITCLASS_SWORDSMAN_II" then?
 
yes removal on spawning (forest)

only the swordsman_ii

I was thinking that for the rebels mod comp for the domestic disputes I was thinking: "why would the romans have barbs spawn out of thei own cities? What if the great wall was there?"

So, I decided that I will make a rebel civ which cannot build settlers (not sure about a unit skin :lol:) which basically only appears with the spawned units (would this work or once it spawns once would it not be able to spawn again?) but it can control cities and be barbarian style (non contactable), What do you think? It may require extra editing of the senario (but nothing too major probably wether I need to add a dead civ at the start)
 
yes removal on spawning (forest)

only the swordsman_ii
The code is basically done - I just have to test everything before submitting. But I'm not happy with the script. Because what you requested is not very likely to happen. Sure, it might in some odd game, but the human player wouldn't even notice it.

The problem is of course that this setup adds lag to the game. Even if looping through and checking all units probably can be counted in micro-seconds per player, it does add up to a full second per game turn. And with hundreds of game turns we're looking at several minutes worth of wait-in-between-turns per game. And this basically just to have an event that probably won't even fire.

Now, I do however propose that you test it out yourself to see if the AI is getting any catapults. And you can easily change the probability - even in mid-game. I'll set it to 5% by default, but you could as well start testing it with a full 100% setting. Because I really don't think that its all that likely that any advanced swordsmen are going to be on tiles with forest that haven't already been chopped down. I was thinking that you could lower the probability as you continue testing, until you find something that seems reasonable. (The optimal setting may or may not turn out to be higher than 5%.)

But if you do find that the catapults that are spawning doesn't do so at an appropriate time, then we can develop this further. Like mimic now the human player would, consciously, build catapults in forests in preparation for an assault. So there would be a sub-routine running whenever a AI player with Construction declares war. Then all the advanced swordsmen of that player are indexed and only those are checked every turn. And if one happens to be in a non-hostile forest tile - then the rest of the code is triggered and spawns a catapult. But it could easily be limited to only one unit and spawn per turn - and perhaps only a few spawns per war. Because the code would terminate once the war has ended.

Or something along these lines. We can figure out the details when and if we reach that point.

I was thinking that for the rebels mod comp for the domestic disputes I was thinking: "why would the romans have barbs spawn out of thei own cities? What if the great wall was there?"

So, I decided that I will make a rebel civ which cannot build settlers (not sure about a unit skin :lol:) which basically only appears with the spawned units (would this work or once it spawns once would it not be able to spawn again?) but it can control cities and be barbarian style (non contactable), What do you think? It may require extra editing of the senario (but nothing too major probably wether I need to add a dead civ at the start)
I don't foresee any problems with anything along these lines, but you could just test what already is in place before adding to the mod. My code should however be robust enough to handle another minor player without any adjustments at all. (Just change the domestic rebels player from the barbarians to the new one.)

Another idea could be that there can only be one rebellion in the game at any given point - to avoid the formation of a super-Civ that picks up free units (and cities) all over the map. So the Rebels code would only run if the new rebel player isn't - currently - active. There could also be a time limit on how long a rebel city could remain independent, again to avoid unforeseen effects when the AI is simply too dumb to retake cities lost to rebels.

With that said, you could also add an "Independent" Civ that represents a city state that was created by the Rebels code spawning rebel units. So once some number of turns has passed (perhaps as soon as the occupation disorder ends) the city will flip to the independent player, freeing up the rebel player to strike somewhere else...

I can already see how this is developing itself into a separate Rebellion mod. :D
 
I like that idea (rebels) and so I think that we should have the rebels themselves and then an independant civ which correponds to the original owner... for example

Spoiler :

Rome -> Domestic Rebellion -> 10 turns? -> changes to Italian Rebels

Londinium -> Domestic Rebellion -> 10 turns? -> changes to Brython Rebels

Bibrate -> Domestic Rebellion -> 10 turns? -> changes to Gallic Rebels

Trier -> Domestic Rebellion -> 10 turns? -> changes to Germanic Rebels

Scone -> Domestic Rebellion -> 10 turns? -> changes to Pictic Rebels

Athens -> Domestic Rebellion -> 10 turns? -> changes to Hellenic Rebels (this would help for the version 2 series where there are more Hellenic civs)

Carthage -> Domestic Rebellion -> 10 turns? -> changes to Numidian Rebels

Thebes -> Domestic Rebellion -> 10 turns? -> changes to Nubian Rebels



OR - Instead we could have no Rebels at all and just have the Civ Specific Rebels (this would cut down on size because of easier skinning) this makes it more fair as you will not get a huge rebel empire but 8 little ones

What do you think?

We could EVEN have rebels that take control of certain areas :D as Italian rebels would not be appearing in north Germany

My favourite is the 2nd solution (Civ Specific Rebels)



You seem to be right about the CC I will start at 80% or soemthing during my testing phase and see how we go!

Great that this is all going excellantly! :D

I am going to make some flags/buttons!
 
Also, what players have access to the advanced swordsman class? Because there is no reason to even check any other players. Which means less lag.
 
I like that idea (rebels) and so I think that we should have the rebels themselves and then an independant civ which correponds to the original owner... for example
(...)
What do you think?
This is entirely up to you. We can add that to the Rebels code at some point - but you of course need to get all those players online firsts.

Or we could take it in steps and firstly add a separate Rebels civ. Then expand that to the various civ-specific rebels.

We could EVEN have rebels that take control of certain areas :D as Italian rebels would not be appearing in north Germany
Yeah, all you pretty much need to do is define the regions with map coordinates and I can add that.

But what civ would Roman rebels in Germania be then? The default barbarians? :confused:

My favourite is the 2nd solution (Civ Specific Rebels)
You're the mod designer so you get to decide. :king:

You seem to be right about the CC I will start at 80% or soemthing during my testing phase and see how we go!
I suggested 100% so that you can verify that it works first, and only then figure out what probability works best.

Great that this is all going excellantly! :D
Yeah, just let me know in advance when you need the files for testing. Because I'm editing them all the time...
 
Top Bottom