Requesting following features

mm a lot to go though here.

1) if there is a unit in no-mans land then they would NEVER die so you need a rebel unit termination code when they spawn elsewhere...

2) the capital always Constantinople is good, but remember... Arcadius is the first leader of the ERE (and thus the leader in my mod)

3) hmmm killing off a new empire in one blow?! I think that is too overpowered to be honest:lol:

4) yay multiple civil wars!

5) will I need use your PlayerAreaCities() function, because you presumably have put it in....

6) for the mission counter thing... how will it pick up if a mission as been completed? what variable will I need to use?

7)Can't wait to test this!
 
1) if there is a unit in no-mans land then they would NEVER die so you need a rebel unit termination code when they spawn elsewhere...
Yeah, that's right. But perhaps it would be ok to kill off the whole Civ once all cities are gone? Because we really only need to get rid of those annoying messages on the first turn, right?

So it would basically be possible to terminate the civil war once all rebel cities are captured - and this would kill off all remaining units. Good?

2) the capital always Constantinople is good, but remember... Arcadius is the first leader of the ERE (and thus the leader in my mod)
Oopps! I need to change that message, then. :blush:

3) hmmm killing off a new empire in one blow?! I think that is too overpowered to be honest:lol:
Ok, lets forget about that one then.

4) yay multiple civil wars!
You'll be able to test everything in actual play. But if we need to constrict it to just one at a time, then the code is already there. (I simply commented it out.)

5) will I need use your PlayerAreaCities() function, because you presumably have put it in....
I included it in a post above. :D (Look in the spoiler.) But right now I'm thinking that we put all helper functions not too specific to any one module in one utils module, and all constants in another module. Sounds good? (I like the name Utils better than CustomFunctions, because, well, all Python in this mod is "custom". What about Helpers?)

6) for the mission counter thing... how will it pick up if a mission as been completed? what variable will I need to use?
With this line:
Code:
if getGlobalData("iMissionCounter") >= 10:
7)Can't wait to test this!
I will send you the files soon enough, but we could discuss what to do with the various modules with overlapping content first. Like how you're defining constants in the ModEvents module, while I'm collecting everything in ModSettings. This is and will be your mod, so there is no real reason to keep yours and mine separated anymore. Because you're taking over this - all of it. And I wanna make sure you will be able to find everything once you need to edit something.

And regarding the Event Manager... I believe that you edited it, right? Well, I haven't been using the version you sent me, so you will have to put my lines into your version instead. Well get to that also.
 
What I mean is what variable do I need to put in the missions for the mission counter to record it?

my mod events module takes things from custom features and Utils and the rest are defined within

Sounds good, I will change my WBS so that the spawn coordinates are under tunda (dont want to give them luxury

OK, sounds like everythings wrapped up here! what were e going to do about the senate module again? I know I am dealing with the reform.... um... well when you are finished with Glory & Greatness we can probably start working on changing it slighty to fit 2.1 :D.... (and anything else we need to do?)
 
What I mean is what variable do I need to put in the missions for the mission counter to record it?
You define the name of the custom value. If we presuppose that you call the value iMissionCounter, then you store the value with:
Code:
setGlobalData("iMissionCounter", iValue)
But you could as well use the helper function I included in an above post.

my mod events module takes things from custom features and Utils and the rest are defined within
Yeah, but you might wanna have a plan also for the general design of your scripting. I was in charge of that before, but now you're in charge. But before I wash my own hands I might as well put your affairs in order.

So, I propose only one utilities module and only one for defining constants. Ok? Or do you wanna define all module specific constants (like the mod settings for the Rebellion module) in that module (like you've done with ModScenarios)?

OK, sounds like everythings wrapped up here! what were e going to do about the senate module again?
I thought I'd write up a sample class and some methods for you. Then you can complete the work yourself, but I'll gladly assist. But it still helps if we can get the whole design in from the start.

I'll get to that once I've sent you the completed work.

I know I am dealing with the reform.... um... well when you are finished with Glory & Greatness we can probably start working on changing it slighty to fit 2.1 :D.... (and anything else we need to do?)
Eh, say what now?
 
ok little fastback!
in anycase will you be carrying on with this for when I need a new version of the rebels and powers etc for Jamie's Medieval Mod (JMM) and Jamie's Fall of Rome (JFoR)?

JFoR: will not need anything new rebel wise but will need name changes and swaps (of course it will use new powers and a couple of features I may need)

JMM will need some new features added to the rebels regarding religious Rebellions (ooo yay!) and of course; new powers!

so what do you say? of course it will be a whole lot easier now we have the current rebels set up!

it will still be a long time untill they are set up as units, buildings, the entirly new civic option (JFoR), civs and first drafts will need to be accomplished first. (and before I start JRM1.3 must be finished)
without promising anything, for sure!

there flashback over!

what I forgot to mention there was there is a version 2 of this mod which replaces the picts with the selucids (who take greek rebels and greek power) and Parthia (which needs a new power but otherwise the rebels will just be renamed) and may need to be adapted slightly....

so after G&G would we be able to sort 2.1 out (It will be a while for JFoR and JMM as I said)


all that aside, I am not sure what you are refering to with the constants thing...:(
 
Ok, I think I'm on-board now.

Whenever we define variables that will never change their values, then these are not really variable but rather constant. So we call them constants. Examples of constants:
Code:
Game = CyGame()
iModSettingValue = 3
pBarbarianCiv = instance(gc.getBARBARIAN_PLAYER())
eAxeman = getIndex("Unit", "Axeman")
The constants can be found in virtually all modules, but some are so to speak globals that can and should be used in more than one module (like pBarbarianCiv or eAxeman). Others are relevant for one module only (like iModSettingValue) and some of these are really "settings" that allow for easy editing of the various mod features. I decided at one point to collect all of these setting type constants and put them into the ModSettings module for you to access easily. (So that you wouldn't need to look for any values to edit in the actual code.)

So we could decide where these things really should be found. I noticed that you preferred to have your settings type constants in the actual module where they belong. Nothing wrong with that - I could go ahead and put all the settings back into the modules where they are used (CustomFeatures, CatapultConstruction, Rebellion, and so on). Or we could make one huge Constants module with all the constants collected in one single place. Its basically up to you - what do you prefer?

And then we have the utils/helper/custom functions...
 
But which option? (Should I put everything into one separate module - my way - or should I keep everything in their respective modules - your way.)
 
utils/helper/custom functions thing, I think the constants should stay in their own modules for ease of referance unless a global constant
 
Ok, so I put all of the utility stuff into a new module called Helpers then? I can put all the global constants in a Globals module, right? But the module specific constants are moved back into their respective environments. (I guess I can put everything at the top of the module for your, for easy access?)

I think I'll document as much of the modules as possible also. (Thinking about it, I should probably rewrite the addMessage() function in the current Utils module, so that you will be able to use it also. Right now its... pretty strange. Because it will be useful to be able to add in-game messages with the option of color-coding.)
 
Is it document well enough documented for you to use?
Spoiler :
PHP:
def addMessage(tag, tValues, eColor, tCoords=(-1, -1)):
        """
        Adds the tag (string) message to the game in eColor. (The preset pointers to valid
        ColorTypes are eRed, eGreen and eWhite. A None value will disable the message.) If
        the tag argument requires other values to be included in the message, then these
        can be supplied with the tValues (tuple) argument. The optional tCoords (tuple)
        argument is set to a pair of default -1 values that indicate that no arrow should
        accompany the text message. (Valid map tile coordinates will enable the arrow.)
        """
        if eColor == None: return
        message = Translator.getText(tag, tValues)
        bArrow = tCoords != (-1, -1)
        Interface.addMessage(pHumanCiv.get(playerID), True, 20, message, "", eMinorEvent, "", eColor, tCoords[0], tCoords[1], bArrow, bArrow)
Examples of use:
Spoiler :
Code:
message = "XML_TEXT_LAST_GAME_TURN!"
addMessage(message, (), eWhite)
Code:
message = "XML_TEXT_BIRTH_OF_HERO"
unitName = pUnit.getName()
cityName = pCity.getName()
tValues = (unitName, cityName)
pPlot = pUnit.plot()
tCoords = getCoords(pPlot)
addMessage(message, tValues, eGreen, tCoords)
Yes, translation is built-in.

Anything unclear?
 
Now I'm confused. I was trying to merge your additions to the Utils module with my own version into a new eNums module (holding all the enumerated values inherited from the SDK used in your mod). But you're version seems to be missing the Swordsman and the AdvancedSwordsman unit. :confused: So I'm thinking that its the new unit types that should replace the swordsmen, then?

Please tell me what the rebellion units should be. This is how they are defined now:
Code:
eDefaultUnit = eWarrior

tRebelUnits = (
(eBronzeWorking, eAxeman),
(eIronWorking, eSwordsman),
(eAdvancedBronzeWorking, eAdvancedSpearman),
(eAdvanceIronWorking, eAdvancedSwordsman)
)
Sure, you will be able to edit this yourself later to reflect whatever setup you end up using, but in order to get it working I need to use some variables that are actually defined. (And I can't define them since I don't know what the XML tags are, remember?)
 
can i confirm what the message actually is because the tCoords confused me a little...

I dont know why sword and advanced sword are not there, maybee I only used the ones That were irregular... The list you posted should be
eBornzeWorking, eAxeman
eIronWorking, eSwordsman
eAdvancedBronzeWorking, eAdvancedSpearman
eAdvancedIronWorking, eAdvancedSwordsman

the ONLY units that are not as the vanilla game has them are axeman (maceman), spearman(axeman), advanced Spearman (spearman) the rest should be easy for you.

in fact these are in my utils,
eAdvancedSwordsman = getIndex("Unit Class", "Swordsman II")
eAxeman = getIndex("Unit", "Maceman") #Irregular
eArcher = getIndex("Unit", "Archer")
eAdvancedArcher = getIndex("Unit", "Archer II")
eSpearman = getIndex("Unit", "Axeman") #Irregular
eAdvancedSpearman = getIndex("Unit", "Spearman") #Irregular
ePraetorian = getIndex("Unit", "Praetorian")
eCatapult = getIndex("Unit", "Catapult")

swordsman would be eSwordsman = getIndex("Unit", "Swordsman")

simple!
 
The tCoords argument is optional and it will add a plot pointer to the screen, pointing to the plot defined by tCoords. In the second example the arrow would point to the birthplace (city) of the hero unit. So you get both a colored text message heralding the name of the hero and the city - and a arrow pointing to the location. (Also I believe that the plot is blinking in the minimap.)

Regarding the rebellion units - why aren't you defining eMaceman? (Or did you really mean eAxeman? :confused: Simple, eh?) And shouldn't it be eAdvancedSpearman that becomes available with eAdvancedBronzeworking?
 
Right now the Python in your mod consists of these modules:
CvRandomEventsInterface
CatapultConstruction
CivPlayer
CustomFeatures
CvEventManager
CvGameUtils
DataStorage
eNums
Helpers
Powers
Rebellion

...and of course your own ModEvents and Senate modules!
 
:lol: sorry to have confused you so much.... you are mistaken, the advanced spearman is available with advanced bronzeworking BUT, in the xml it is actually the spearman:
Code:
		<UnitInfo>
			<Class>UNITCLASS_SPEARMAN</Class>
			<Type>UNIT_SPEARMAN</Type>
			<UniqueNames/>
			<Special>NONE</Special>
			<Capture>NONE</Capture>
			<Combat>UNITCOMBAT_MELEE</Combat>
			<Domain>DOMAIN_LAND</Domain>
			<DefaultUnitAI>UNITAI_COUNTER</DefaultUnitAI>
			<Invisible>NONE</Invisible>
			<SeeInvisible>NONE</SeeInvisible>
			<Description>TXT_KEY_UNIT_SPEARMAN_II</Description>

same for the axeman, in game it is an axeman but in the xml it is the maceman (because I needed the beseker unique unit for germania and axeman was being used by spearman...)

and once again the spearman in game is actually axeman in the xml....

those are the ONLY three like this... Understand?

so in short... eAxeman, for your usage should be defined as (unit, "maceman")
eSpearman (unit, "axeman")
eAdvancedSpearman (unit, "spearman")

edit: yes I did mean eAxeman :rolleyes:

was there anything else we were meant to put into the unit rosters? like the civilized and uncivilized?
 
What about the Axeman/Maceman?

Could you just supply me with the lines I need for both the Rebellion module and the eNums module? Like the completed thing, the whole code, with correct spelling and everything.

I'm afraid this is just too confusing to me. (I guess I could simply have all rebel unit types by the default warrior then. You'd be able to change the values to anything you like.)
 
read the edit....
these are what you will need
eAdvancedSwordsman = getIndex("Unit Class", "Swordsman II")
eAxeman = getIndex("Unit", "Maceman") #Irregular
eSpearman = getIndex("Unit", "Axeman") #Irregular
eAdvancedSpearman = getIndex("Unit", "Spearman") #Irregular

so you can use these where they are needed
 
Ok, so I go with the edit, then use the enums you posted, and add the swordsman? Got it.

But you realize that you're referring to the unit class Swordsman II and not the unit type?

I might just put eDefaultUnit in every slot and then you can figure it out yourself... :p Because you'd have to debug my mistakes anyway and sort everything out from scratch.
 
Back
Top Bottom