1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

RevolutionDCM for BTS

Discussion in 'Civ4 - Modpacks' started by glider1, Feb 11, 2008.

  1. Chronis

    Chronis Chieftain

    Joined:
    Feb 3, 2011
    Messages:
    98
    Wanted to report a bug.

    The option to Defect and lead rebel armies seems to be causing a reproducible
    game freeze with the latest version of RevDCM.

    I tested it out in the following settings

    RevDCM (latest version) with patch 3.19 -> Spawns units and transitions to new civ but does not let you advance to the next turn

    LOR (latest version) with patch 3.19 -> Same as above freezes game

    Old stand alone Revolutions with patch 3.17 -> Works without any problems
     
  2. glider1

    glider1 Deity

    Joined:
    May 29, 2006
    Messages:
    2,784
    Location:
    Where animals hop not run
    Thanks Chronis. I'm thinking about updating RevDCM in the next few weeks to incorporate the work that is on going in Evolution mod especially K-Mod.
    Well done on the detective work, it should be easier to fix now.

    Cheers
     
  3. Ferocca

    Ferocca Warlord

    Joined:
    Nov 21, 2011
    Messages:
    162
    Really? That's great news! If you are happy to receive bug reports, I could repeat one for you that has been mentioned before:
    when your cultural pressure is high on a foreign city, the AI sometimes does decide to liberate the city/cities to you. However, when you click on the popup that confirms you want to accept the liberated city, nothing happens. Basically, the AI can never liberate cities that are rebelling because of your culture to you, because you cannot accept their offer.

    Oh and if you are interested to incorporate the UniqueCivics modcomp with RevDCM - which I think really fits RevDCM - I basically finished that. I could give you a RevDCM merged with UniqueCivics, including a Unique Civic for every Civilization.
     
  4. Chronis

    Chronis Chieftain

    Joined:
    Feb 3, 2011
    Messages:
    98
    I just checked out the Evolution thread exciting stuff.
    I am interested to try out the k-mods culture mechanics changes in the setting of revolutions. I very much look forward to the next version of REVDCM.

    If you are updating RevDCM you might want to look at the dll changes I made in my LORtweak mod (source code is with file).

    I added two changes that you might be interested in.
    1) Added ability to pillage your own roads (code taken from FFH more naval AI)
    2) Changed code so that Civ culture no longer vanishes when the last civ city is captured.

    The second one especially makes the revolutions experience more dynamic imho
     
  5. glider1

    glider1 Deity

    Joined:
    May 29, 2006
    Messages:
    2,784
    Location:
    Where animals hop not run
    Hi Chronis
    Thanks for the links I'll look into adding that in.

    Ferocca if you ever ever see that bug in action, please post the save here it will help to save on debugging time. At least you have tried to explain it as well as you can. I realise the save will be useless if you are not using RevDCM 2.90 exactly as it was shipped, and this is a big problem with modding Civ4 generally.

    Cheers
     
  6. Ferocca

    Ferocca Warlord

    Joined:
    Nov 21, 2011
    Messages:
    162
    Yes, that's true. If I face it again (which is not often really, the AI does not like to liberate their cities), I'll upload the save AND the whole mod;)
     
  7. glider1

    glider1 Deity

    Joined:
    May 29, 2006
    Messages:
    2,784
    Location:
    Where animals hop not run
    Good idea. The whole mod included. If at the very least the RevDCM DLL core is the same, that would mean I wouldn't have to recompile the mod from source files for purposes of debugging. However most mods that are derived from RevDCM like LoR and RAND have heavily modified DLL cores. I think Diversica might be the only mod out there that does not modify the RevDCM core.

    Cheers
     
  8. Ferocca

    Ferocca Warlord

    Joined:
    Nov 21, 2011
    Messages:
    162
    I have a modified RevDCM core now, but the bug already occured when I was still playing the unmodified RevDCM ;)
    So the bug is in basic RevDCM for sure. When I encounter it I'll first run a debug.dll and post a report because maybe you can solve it from there without the need of downloading my mod and load the save.
     
  9. Chronis

    Chronis Chieftain

    Joined:
    Feb 3, 2011
    Messages:
    98
    Another Bug Report... don't hate me =)
    Edit: Post edited for clarity

    There are a few bugs in the mod when it attempts to adjust for game speed via the GameSpeedMod function.

    The bugs are located in the following files:
    BarbarianCiv.py
    Line 916: if( game.getSorenRandNum( int(100*RevUtils.getGameSpeedMod()), 'BC: Settle minor') < odds ) :

    Revolution.py
    Line 1164: recentlyAcquired = (game.getGameTurn()-pCity.getGameTurnAcquired() < 12*RevUtils.getGameSpeedMod())

    RevEvents.py
    Line 554: pCity.changeRevSuccessTimer( int(iTurns + RevUtils.getGameSpeedMod()*15) )
    Line 580: pCity.changeRevSuccessTimer( int(iTurns + RevUtils.getGameSpeedMod()*6) )

    In all four cases the game speed modifier appears to be multiplied when it should have been divided. The result is that on for slow game speeds barbarian cities are overly likely to turn into a minor civ and the temporal happiness bonus on city capture is significantly reduced.
    getGameSpeedMod returns 2 for a quick game, 1 for an epic game, and 0.5 for a marathon game.
     
  10. Ferocca

    Ferocca Warlord

    Joined:
    Nov 21, 2011
    Messages:
    162
    I really didn't expect to be able to give you this already, because it really happens rarely that the AI liberates a city to the player because of revolutionary pressure, but it happened! It actually gave me a python exception, so maybe you won't have to edit the DLL :)

    Traceback (most recent call last):

    File "CvEventInterface", line 34, in applyEvent

    File "CvEventManager", line 207, in applyEvent

    File "Revolution", line 6013, in joinHumanHandler

    KeyError: 4
    ERR: Python function applyEvent failed, module CvEventInterface

    ---
    I got this right at the moment I clicked 'welcome back' or something like that (well, it was that I accepted the city).

    If this does not give much of a clue, I can upload my mod + the save + a debug DLL for you.
     
  11. glider1

    glider1 Deity

    Joined:
    May 29, 2006
    Messages:
    2,784
    Location:
    Where animals hop not run
    Thanks Ferocca and Chronis. As soon as the exams are over in the next couple of weeks I'm going to build and release RevDCM 3.00 which will be nothing but classic RevDCM plus latest K-Mod. Then after that I will start working through the bugs in Revolutions you are posting here.

    The benefit of working one step behind Evolution mod is that RevDCM has a proper SVN project system. Once Evolution is fully stabilized RevDCM can then start to take on board what Evolution is doing.

    Cheers
     
  12. Edgecrusher

    Edgecrusher King

    Joined:
    Aug 7, 2006
    Messages:
    915
    Location:
    Massachusetts
    Really excited to see RevDCM being continued.
    It has been (by far), my favorite mod to play.

    One thing I did want to ask about.
    I am not sure if this was something that had been discussed during my sobatical from Civ4.
    I remember a few years ago, when I played pretty consistently, AI civs, often went through a leader change.
    i.e. England would start with Victoria, then often switch leaders mid game (due to a revolution i am guessing). I always load my mods with leaders, for that reason.
    Now, since my return, I noticed that it doesn't seem to happen.
    Was this due to the system being removed? or an option I have off?,
    Was just curious.
     
  13. glider1

    glider1 Deity

    Joined:
    May 29, 2006
    Messages:
    2,784
    Location:
    Where animals hop not run
    Hi Edge. I'll try to keep the observation in mind when I begin major tests of the RevDCM 3.00 build. The leader change mechanic is well and truly still there. If you around these parts in 2008-2009 perhaps you have memories of when the Revolution AI in RevDCM was less stable and so AI's often went through leadership changes more frequently. They should however still happen. At some point the Revolution AI was tightened in a few different ways to make it more competitive.

    You've reminded me that I will have a lot of testing to do because of the introduction of K-mod. Keep in mind that the Evolution Mod might already have more observations on the effect of K-Mod and Revolutions working together.
    Cheers
     
  14. Ferocca

    Ferocca Warlord

    Joined:
    Nov 21, 2011
    Messages:
    162
    Oh I found another small bug for whenever you have the time really:
    With inquisitions on, if you don't switch to Organized Religion but straight away to Theocracy from Paganism, you can't build inquisitors. For some reason, you have to switch to Organized Religion once in the whole game and then it works fine for both Organized Religion and Theocracy for the rest of the game.
     
  15. glider1

    glider1 Deity

    Joined:
    May 29, 2006
    Messages:
    2,784
    Location:
    Where animals hop not run
    Thanks Ferocca I'll add it to the list that I keep and I do play with Inquisitions on myself. Will do a release of RevDCM 3.00 fairly soon with the major bugs removed then a 3.10 for the smaller bugs.

    I'm currently burning the candle on both ends working hard to release. So far it's looking promising with K-Mod 1.40. Made some major improvements/fixes to range bombard as well.

    Cheers
     
  16. glider1

    glider1 Deity

    Joined:
    May 29, 2006
    Messages:
    2,784
    Location:
    Where animals hop not run
    Hi Ferocca. Just tested your bug but couldn't reproduce it. I switched from paganism to theocracy straight away and did not go through organized religion and ensured that the city had my state religion in it. I could build an inquisitor.

    I certainly keep an eye out for the bug and am not disagreeing with you just not seeing it. That is where save games really help.
    Cheers
     
  17. Ferocca

    Ferocca Warlord

    Joined:
    Nov 21, 2011
    Messages:
    162
    Okay, for the previous bug I still have the save + mod backed-up for when you need it, when I encounter this bug again, I will do the same for this bug ;)
    I clearly remember having this bug with RevDCM before I started modding it as well, just in case you were wondering if the bug could be part of my mod.
     
  18. glider1

    glider1 Deity

    Joined:
    May 29, 2006
    Messages:
    2,784
    Location:
    Where animals hop not run
    Bugger. I was starting to warm up for a release of RevDCM 3.00 but then started testing some of the more detailed Revolution events like leader change, hand over control and revolt etc. Although they all work, they cause a strange CTD now with K-Mod that actually doesn't matter in the sense that you can reload the game from the desktop and continue. But still it's not good.

    Don't know what is causing it. Haven't given up, just disappointing at this stage....The clue is that they seem to work without CTD in autoplay but not under human control when random CTD's start happening...

    The last major bug I found for Evolution Mod with minor civs was because K-Mod made changes to mutated integers which caused data inconsistency and crashes.

    The difference this time is that the game just flat CTD's to the desktop, no messages in the BUG python system to tell me where it crashed.....

    That seems to smack of something more basic and possibly easier to fix.....

    Let's hope so.

    Cheers
     
  19. Chronis

    Chronis Chieftain

    Joined:
    Feb 3, 2011
    Messages:
    98
    Looking forward to trying this out when it is released.
    Thanks for all your work on this.
     
  20. Ferocca

    Ferocca Warlord

    Joined:
    Nov 21, 2011
    Messages:
    162
    Good luck with everything! I will try to help, the great problem being that I am not very fluent when it comes to python and C++...
    I tried to fix the Inquisitor bug I mentioned. To be sure, I checked the unmodded, basic RevDCM as well myself for the bug. At first I had the same as you had: there was no bug when switching from Paganism to Theocracy immediately. However, after switching between Organized Religion and Theocracy a few times I did have a few times that you couldn't train inquisitors though! So I also noticed it can happen with any of the two civics that you can't build inquisitors for a strange reason. In both cases, if you check in the city-screen, and hover over the Inquisitor unit, it says 'requires [Organized Religion in case you are using Theocracy/Theocracy in case you are using Organized Religion]'. I suppose this means there is something wrong the the 'Or' in 'PrereqOrCivics'.
    I read all the code regarding the inquisitor unit in the SDK itself, I don't think there is the problem. After all, it has to do with the 'CanTrain' part of RevDCM.

    When you arrive at the point that you will look at this bug, I suggest you search for this part in the SDK:

    if (kCivic.isAllowInquisitions())

    The code after this sentence seems most suspicious to me. I hope it helps a little at least ;) Oh and if you want to see the bug for yourself, just switch back and forth between some religious civics and sometimes nothing wrong happens and sometimes something wrong does happen. Anyway, I checked for myself and the bug does happen in the unmodified latest RevDCM.
     

Share This Page