[MOD] MongooseMod

Status
Not open for further replies.
Joined
Jan 29, 2006
Messages
731
Location
Boston, MA, USA
This is the original thread.

Please see the MongooseMod Subforum for everything relating to this project, henceforthly.

Thankupo flappily.
 
Looks like quite the package, Mongoose! Do you have any screenshots of the new tech tree and/or game features? That would help display the mod's changes.
 
Sevo said:
Looks like quite the package, Mongoose! Do you have any screenshots of the new tech tree and/or game features? That would help display the mod's changes.
I do now. ;)

I was hoping to put that off for a while (or avoid it altogether, heh) but I guess it's worth doing. Have only put up screenshots of things that are easy *to* screenshot for the moment. I may add encyclopedia-level text of the other stuff when I have time but I'm not sure ppl would want to read it all on here anyway there's so much.

On the tech tree composite jpg, you'll note I've manually added in the appoximate dates each column is designed to correspond to. I need to stress that these are NOT PERFECT. I've done my best with what there is, but the original tree's structure, the need to place certain things in certain places for gamplay reasons, and the need to place techs in certain orders for logical reasons all constrain my options. I still think it works out pretty well overall.

You'll also note the tech tree jpg contains Warlords icons; that's because the Warlords update is in progress. :) Estimate another week or so on that since I really want to get some of the ToDo List stuff into the next update as well. Don't hold me to that though, it may take longer.

Edit -- Nevermind. The StatisticsMod is tangled up with the MongooseEventManager and PLEMainInterface python files as well as the SDK DLL; I could post those files seperately as-is but they wouldn't work standalone, or I could disentangle them but that'd take some time and it'd be extra work maintaining them seperately. So I'm just gonna leave it as part of this thread (at least for now) and put the screenshots of it here.

On that note, if you're wondering what's going on in the HallOfFame jpg, that's the Top10 functionality engaged. It works both there and in HighScores -- you toggle it by clicking the red promotion-like buttons. Click a different one to change the selection; click the currently-selected one (with the satellite crosshairs icon) to turn it off. Of additional minor interest is the corrected spelling of "Lead by Warlord" in vanilla Warlords to "Led". :)
 
Nice work I like the look of the new tech tree, its denser and more organized. I have been wondering about the potential of adding an SDK function that could do the Tech Tree grid arangment automaticaly based on the pre-requisite techs. This would potential remove a lot of tedius work and make technologies more plugable. I like your method of strict coulum groups per age, based on your efforts would such a tool be usefull and if so what kind of algorithm would you recomend.

PS. Someone should mod the TechTree View to actualy HAVE a header with that Era information on it, it would be realy nice.
 
Warlords version posted.

* Set some Favorite Civics, both to be better (e.g. Gandhi from Universal Suffrage to Pacifism) and in a few cases to use the additional civics in the mod.
* Had to remove the Enhanced Foreign and Domestic Advisor screens as they weren't working with Warlords and no updates were in sight.
* Added a few sounds from FFH2 to the dragon units.
* Replaced the reskinned "bronze" cannon with the Primitive Chinese Cannon from Warlords.
* Added in the Statue of Zeus from the scenarios as a full great wonder (with different effect and better hurry resources).
* Brought the Chinese Chariot and Chinese War Galley in from scenarios as well.
* Fair number of tweaks to civics and units since last version.
* All other Warlords content fully integrated (and tweaked :)).
* Added RabbitWhite's Great General Portraits, and added to and synchronized the game's Great General names to use them all.
* Added documentation for the HideNoContactHumansMod and Attack/Defense promotion stuff that was all here in the last version but which I'd forgotten about.

Impaler[WrG] said:
Nice work I like the look of the new tech tree, its denser and more organized. I have been wondering about the potential of adding an SDK function that could do the Tech Tree grid arangment automaticaly based on the pre-requisite techs. This would potential remove a lot of tedius work and make technologies more plugable. I like your method of strict coulum groups per age, based on your efforts would such a tool be usefull and if so what kind of algorithm would you recomend.
In my case the answer is, sadly, "not really". You could probably do pretty well with what you're describing, but my tree in its current state is the result of months of thought, design, and tweaking. Arranging things in such an aesthetically-optimal state is probably impossible with an automated routine. I'd certainly encourage your work on such a tool, but I'm going to stick with the by-hand approach myself I think.

Impaler[WrG] said:
PS. Someone should mod the TechTree View to actualy HAVE a header with that Era information on it, it would be realy nice.
I've given that some thought, and it's certainly doable. The main problem is you'd have to either reduce the allowed number of tech rows (unacceptable heh), or only provide the header information when the user's screen resolution is higher than the minimum 1024x768. I'm not entirely sure off the top of my head either how to get a very-wide graphic to display only portions of itself based on the scrollbar, but it can probably be finagled, and if not you can always just use one header graphic per column. I may work on adding this functionality in a future update.
 
Problem with warlord version ...

The civilopedia is empty

Cities Names are strange

% : no gold coin to represent it

i play in solo
 
Interesting. I am very curious about your tech tree refurbishment. I wonder if that element alone is testable? I am already running with another mod, New Balance, and it doesn't look like the two elements will work together. But your improved tech tree and graphics sounds like it could be possible to merge with the other.
 
Have you noticed the huge slowdown in combat? I suppose that your gc.getGame().getScriptData() is too long. Every time you use sdEntityGetVal or
sdEntitySetVal (instead of sdObjectGetVal), the data is stored in a main file that has to be pickled/unpickled every time it is edited.

I'm no expert in this, but I could single out a large scriptdata file as the cause for immense slowdowns in early versions of the Unit Statistics Mod. That's why I created the sdObjectGetVal functions instead and use them as often as possible (even storing some data in plot objects, as you can see :D). I haven't tested your mod in the late game, but since you store many of your dead units in the game scriptdata, I suppose that it will become slower and slower as the game progresses.

On the other hand, I like the UI changes you made, and I was so free as to adopt some of them for my newest version :)
 
I am having a great time with your mod, I really like all the additions, and like your speed setting and time to work through the tech tree, it gives me the feeling of gradually bringing my civ up through time. Having said all that, I've run into a couple of problems, and they might be particular to my set up, but I thought I would mention them anyways. The first one, and I'm not in game right now, but I can get the call back error if you need it, is with the promotions, I think it's with the one's that are automatic, not sure, like I said I can open the game and get the call back for it, and it's not a huge thing for me as i just have to click through it every few turns. The second one is a potential show stopper for me though, when I get the tech and go to click on the Knights Champion, it's an automatic CTD. This isn't a huge thing for me, as I could avoid it, but I figure if the same thing happens when the A.I. goes to use it, then I would have no way of stopping it, and as it sends me out to the desktop, I don't get an error message with it. If there's something on my end I could do to work past these, I am all ears, or if you could look into them that would be great. Of all the Warlords mods I've played so far, yours really comes the closest to how I like to play, so I'd like to be able to work past these things. Also one more I just thought of, it will let me build the monument, but after I do I don't see the graphic for it in the city, I haven't gotten far enough to see if you might have used it eleswhere. Like I say, I am really enjoying your mod, and know it's still a work in progress, but I thought you might want the feedback if someone has had a few of these type things happen.
 
Hmmm......I guess nevermind on the promotions one...I went back ingame to try and get the error, and have played for an hour or so(which I didn't mind...lol), and it hasn't done it once since I loaded it again.....such is puter gaming I 'spose.
 
Wow some ppl are actually using and liking this... Here I thought just about everybody would already be attached to the big established full mods, given my late entry into the fray. Thanks for the support guys. :)

I was out of town over most of the weekend but I did get to finally start playing an actual game mid last week. As a result I've found a number of problems. ;) You mentioned a CTD with the Knight Champion, brun58. I can tell you more about the issue, but it's the only one I haven't figured out how to fix yet. First of all, it affects ALL new units in the mod. Second of all, these units are 95% fine: they display properly in the 'Pedia, if you use the WorldBuilder to plop one on the map it works properly from then on, and if you add one to a city's build queue below something else it is fine. The CRASH occurs whenever one of the new units in the mod becomes the topmost entry in a city's build queue, either by the stuff above it completing or by the user manually control-key-adding it directly to the top of the queue.

Additional problems I ALRDY HAVE FIXES FOR for but am waiting to post til the above CTD can also be fixed: StatisticsMod Python error when claiming a goody hut by placing a city such that its initial borders cover the hut (as opposed to borders expanding onto the hut later which is fine); StatisticsMod Python error when units gain promotions; StatisticsMod Python string-related error for all kinds of things (just about everything, actually) that is triggered by being in a Golden Age, highly annoying; PLEMainInterface Python error affecting Great Person Points display in city view (this is the result of me sloppily not updating from the new Warlords file given the extent of the changes in this file); and removed the annoying extra empty lines in Goody Hut Acquired and Unit Built in City messages in the unit log in the unit view of the StatisticsMod.

Note that all the StasticsMod errors are harmless -- especially if you have Display Python Errors turned off in your _Civ4Config file -- but they do mess up the tracked stats when they happen.

One additional thing I've noticed, that seems to be a problem with Warlords itself and not my mod, since it happens (for me at least) when running vanilla Warlords too: as injured units heal, missing parts of them don't respawn. For example a warrior unit normally has 3 actual warriors standing in a bent-back-horizontal-line formation. If the unit loses health due to fighting something it drops down to having only 1 or 2 actual warriors displayed, but when it heals the missing dudes don't reappear. It's strictly a graphical issue and is fixed whenever you load a save (though it happens again from there), but I still find it annoying. If anyone has any information on this I'd appreciate it, though I suspect it's alrdy been brought up I'll have to look around.
 
Mongoose, I am not one for using too many new units and that, but your civics changes and techtree revisions and ui improvement I am interested in trying together with New Balance mod for warlords. Would it be possible for me to filter out those aspects of your great work? If so, which files would I be looking at?
 
@Lachlan: If you're running the game in French there could be problems like that. I'll look into it when I have time but at the moment I can only promise things will work with the language set to English.

@Immacolata: The TechTree has its claws in almost everything. Units, buildings, promotions, civics, worker actions, you name it. (That is why I didn't release it until now, when the whole mod was semi-ready, despite having the TechTree revamp more-or-less done many months ago.) It *can* be merged with just about any mod, but even in the best of cases it'd require a decent amount of work to do. You guys are all free to work on that sort of thing, but I'm afraid I personally can only support it as-is and in my full mod.

@TegNavanis: It only stores as many dead units as it needs to. That is to say, between zero and ten per category (of which there are 24). I specifically removed Highest and Lowest AverageCombatOdds from the Top10 bracket because they can change in both directions (if the LowestAverageOdds champion starts fighting all 100%-odds fights over and over he might slide from 1st place to 11th place, in which case you'd need the entire pool of all dead units ever made to choose a replacement, as opposed to every other category where units can only stay the same or get better with time, not get worse).

And I personally have not noticed a combat slowdown, though I only got 1/3 of the way through a game and I have a pretty fast machine so it might still be there. I do use ObjectGet/SetVal for living units, and because of the above there's a cap of 240 on Entity-based tracked dead units. I'll look over the code again when I have time and see how often it's pickling that list, but there are advantages to not using Plot objects too. ;)
 
Immacolata said:
Mongoose, I am not one for using too many new units and that, but your civics changes and techtree revisions and ui improvement I am interested in trying together with New Balance mod for warlords. Would it be possible for me to filter out those aspects of your great work? If so, which files would I be looking at?
In short... most of them. Heh. Again, the TechTree is tied into probably at least a dozen other files if not more. The structure itself is in Civ4TechInfos.xml. The civics are defined in Civ4CivicInfos.xml, but there's a good chance those won't work completely as-is either. In both cases you'll need a lot of text entries out of the XML\Text folder (various files). Not sure what you mean specifically by UI improvement, but UI stuff is generally in Python.

You're free to use anything however you want, just give me a line of credit if you wind up posting stuff that's based on my stuff. :) That being said, I really don't have time to answer basic modding questions right now, so, erm, yeah.
 
That's your scriptdata at the beginning of the game:


Spoiler :
{'StatisticsMod': {'AliveRank1Units': {'LowestAverageOdds': '32771X0', 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': '32771X0', 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': '32771X0', 'HaulCount': -1, 'TotalDamageInflicted': '32771X0', 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': '32771X0', 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': '32771X0', 'LowestVictoryOdds': '32771X0', 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': '32771X0', 'BattleCount': '32771X0', 'WarpCount': '32771X0', 'CollateralDamageInflicted': -1}, 'TotalRank1Scores': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': 2, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': 4.0, 'HaulCount': -1, 'TotalDamageInflicted': 4.0, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': 2, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': 2, 'LowestVictoryOdds': 100.0, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': 100.0, 'BattleCount': 2, 'WarpCount': 2, 'CollateralDamageInflicted': -1}, 'TotalRank4Scores': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'AliveRank3Units': {'LowestAverageOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': '16385X0', 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': '16385X0', 'CollateralDamageInflicted': -1}, 'AliveRank9Scores': {'LowestAverageOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'AliveRank7Scores': {'LowestAverageOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'TotalRank3Scores': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': 1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'AliveRank0Units': {'LowestAverageOdds': '24578X0', 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': '40964X0', 'KillCount': '24578X0', 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': '24578X0', 'HaulCount': -1, 'TotalDamageInflicted': '24578X0', 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': '24578X0', 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': '24578X0', 'LowestVictoryOdds': '24578X0', 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': '40964X0', 'LowestSurvivalOdds': '24578X0', 'BattleCount': '24578X0', 'WarpCount': '24578X0', 'CollateralDamageInflicted': -1}, 'AliveRank0Scores': {'LowestAverageOdds': 100.0, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': 4.1999998092651367, 'KillCount': 2, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': 4.0, 'HaulCount': -1, 'TotalDamageInflicted': 4.0, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': 2, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': 2, 'LowestVictoryOdds': 100.0, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': 4.1999998092651367, 'LowestSurvivalOdds': 100.0, 'BattleCount': 2, 'WarpCount': 2, 'CollateralDamageInflicted': -1}, u'Asian Warrior0': {'TypeNumber': 1, 'LostNamesList': []}, 'TotalRank5Units': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, u'Settler0': {'TypeNumber': 1, 'LostNamesList': []}, 'TotalRank2Units': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': '40964X0', 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': '40964X0', 'HaulCount': -1, 'TotalDamageInflicted': '40964X0', 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': '40964X0', 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': '40964X0', 'LowestVictoryOdds': '40964X0', 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': '40964X0', 'BattleCount': '40964X0', 'WarpCount': '40964X0', 'CollateralDamageInflicted': -1}, 'TotalRank3Units': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': '16385X0', 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'TotalRank5Scores': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'AliveRank7Units': {'LowestAverageOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'AliveRank1Scores': {'LowestAverageOdds': 100.0, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': 2, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': 4.0, 'HaulCount': -1, 'TotalDamageInflicted': 4.0, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': 2, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': 2, 'LowestVictoryOdds': 100.0, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': 100.0, 'BattleCount': 2, 'WarpCount': 2, 'CollateralDamageInflicted': -1}, 'TotalRank9Scores': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'TotalRank2Scores': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': 2, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': 4.0, 'HaulCount': -1, 'TotalDamageInflicted': 4.0, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': 2, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': 2, 'LowestVictoryOdds': 100.0, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': 100.0, 'BattleCount': 2, 'WarpCount': 2, 'CollateralDamageInflicted': -1}, 'TotalRank1Units': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': '32771X0', 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': '32771X0', 'HaulCount': -1, 'TotalDamageInflicted': '32771X0', 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': '32771X0', 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': '32771X0', 'LowestVictoryOdds': '32771X0', 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': '32771X0', 'BattleCount': '32771X0', 'WarpCount': '32771X0', 'CollateralDamageInflicted': -1}, 'TotalRank8Units': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'AliveRank8Scores': {'LowestAverageOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'TotalRank6Units': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'AliveRank6Scores': {'LowestAverageOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'AliveRank3Scores': {'LowestAverageOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': 1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': 1, 'CollateralDamageInflicted': -1}, 'TotalRank4Units': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'TotalRank0Scores': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': 4.1999998092651367, 'KillCount': 2, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': 4.0, 'HaulCount': -1, 'TotalDamageInflicted': 4.0, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': 2, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': 2, 'LowestVictoryOdds': 100.0, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': 4.1999998092651367, 'LowestSurvivalOdds': 100.0, 'BattleCount': 2, 'WarpCount': 2, 'CollateralDamageInflicted': -1}, 'AliveRank4Scores': {'LowestAverageOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'AliveRank8Units': {'LowestAverageOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'TotalRank8Scores': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'TotalRank7Units': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'TotalRank7Scores': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'AliveRank9Units': {'LowestAverageOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'AliveRank2Units': {'LowestAverageOdds': '40964X0', 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': '40964X0', 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': '40964X0', 'HaulCount': -1, 'TotalDamageInflicted': '40964X0', 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': '40964X0', 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': '40964X0', 'LowestVictoryOdds': '40964X0', 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': '40964X0', 'BattleCount': '40964X0', 'WarpCount': '40964X0', 'CollateralDamageInflicted': -1}, 'AliveRank5Units': {'LowestAverageOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'TotalRank9Units': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'AliveRank4Units': {'LowestAverageOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'AliveRank2Scores': {'LowestAverageOdds': 100.0, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': 2, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': 4.0, 'HaulCount': -1, 'TotalDamageInflicted': 4.0, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': 2, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': 2, 'LowestVictoryOdds': 100.0, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': 100.0, 'BattleCount': 2, 'WarpCount': 2, 'CollateralDamageInflicted': -1}, 'TotalRank0Units': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': '40964X0', 'KillCount': '24578X0', 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': '24578X0', 'HaulCount': -1, 'TotalDamageInflicted': '24578X0', 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': '24578X0', 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': '24578X0', 'LowestVictoryOdds': '24578X0', 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': '40964X0', 'LowestSurvivalOdds': '24578X0', 'BattleCount': '24578X0', 'WarpCount': '24578X0', 'CollateralDamageInflicted': -1}, 'TotalRank6Scores': {'HighestDefeatOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, 'AliveRank5Scores': {'LowestAverageOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}, u'Tank0': {'TypeNumber': 3, 'LostNamesList': []}, 'AliveRank6Units': {'LowestAverageOdds': -1, 'TotalFortifyCount': -1, 'DamageSufferedDefending': -1, 'CommandoCount': -1, 'DamageSufferedAttacking': -1, 'KillCount': -1, 'AirStrikeDamageInflicted': -1, 'DamageInflictedAttacking': -1, 'HaulCount': -1, 'TotalDamageInflicted': -1, 'AgeCount': -1, 'MaxFortifyCount': -1, 'MoveCount': -1, 'CollateralDamageSuffered': -1, 'AirStrikeDamageSuffered': -1, 'Experience': -1, 'LowestVictoryOdds': -1, 'DamageInflictedDefending': -1, 'WithdrawalCount': -1, 'TotalDamageSuffered': -1, 'LowestSurvivalOdds': -1, 'BattleCount': -1, 'WarpCount': -1, 'CollateralDamageInflicted': -1}}}



This is a bit long ;)
 
Teg_Navanis said:
That's your scriptdata at the beginning of the game:

<snip>

This is a bit long ;)
Okay, first of all the size of that post was kinda annoying but I get your point. :)

Second of all, that's exactly what it should be, given how I did things. Which is to say, size 10 arrays for names and scores, for each category (24 of em), for each bracket (alive and total ie high scores and hall of fame). It's necessary for Top10 tracking of everything, and it's also a lot more efficient at doing things like sorting and searching. Because that's the entire statistics "state" right there, what you posted will never increase further in size.

It probably also seems larger than it is because I broke all your WhateverCount[] arrays out into individual elements, for various reasons. Because the elements all have names now they're going to take up a lot more text space without taking up any more storage space. ... Unless you mean the text space IS the storage space, in which case it could be solved pretty easily be chopping down the string constants used as identifiers.
 
For pete's sake, can't you just attach it as a file instead? Please remove that huge block of nonsensical data.
 
Also, there *is* quite a bit of UI slowdown for things like selecting units, units moving, switching into GoTo mode with the flowing dotted line, etc. This may be what you were noticing since the units have to move a bit to get into combat positions. Just now I've found it gets MUCH much better if you remove the venerable PLE mod, which I may have no choice but to not include in future versions as a result.

Still, when I have time I *will* do as you suggest Teg and reconfigure things to avoid Entity functions entirely, and see if that makes any difference. For the time being I firmly believe it shouldn't be having a major impact, and whatever impact it *is* having, if any, won't get worse as a game progresses.
 
Do you know my litmus test for performance? I create 40 tanks and a railroad over ten tiles. Then I move the whole stack over this distance. I think this is a realistic simulation of an AI turn, especially if you're moving whole armies with the go to command.
With your mod, it takes me 2 min 35 sec (150s). With Unit Statistics, the number is down to 2 seconds, vanilla civIV takes 1 sec.

I went through the code to see what's the difference between the mods:

Mongoose Mod: per movement, every unit goes through 2 updateBracketsWithUnit. This triggers updateHighScoresWithUnit and updateHallOfFameWithUnit, in both of which you use sdEntityGetVal around 20 times if it has no high score and (if the unit reaches the top ten) sdEntitySetVal up to 60 times. Notice that sdEntityGetVal only unpickles the scriptdata, while sdEntitySetVal first unpickles, then modifies, and then re-pickles it.
With 400 movements (40 units, 10 tiles each) the ScriptData is unpickled 16.000 - 56.800 times (probably 24.000 times in my test case) and pickled up to 40.800 times (in my test case probably somewhere around 6000 times). Unpickling is faster than pickling since cPickler has a memorizing function for data streams it recently unpickled, but I think you get the point. Movement may actually be faster in the late game when not every movement updates the high scores, but the amount of unpickling does not go below 16.000.

Unit Statistics: 2 checkHighScoresCurrentUnit per movement, 2 - 7 sdObjectGetVal and up to 5 sdObjectSetVal within checkHighScoresCurrentUnit. This makes 1600 - 5600 sdObjectGetVal and up to 4000 sdObjectSetVal in total, the scriptdata being 1/24 as long as the one in the Mongoose mod.

I suggest you both shorten your scriptdata and reduce the number of pickling/unpickling per action (especially updateHighScoresWithUnit).
 
Status
Not open for further replies.
Top Bottom