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

CAR Mod: Civ AcceleratoR

Discussion in 'Civ4 - Modpacks' started by stmartin, Aug 18, 2009.

  1. stmartin

    stmartin aka. poyuzhe

    Joined:
    Aug 4, 2007
    Messages:
    640
    Location:
    Shanghai
    @Tripod

    In one post of the first page I listed all changed files.
     
  2. Tripod

    Tripod Chieftain

    Joined:
    Dec 9, 2007
    Messages:
    32
    Location:
    Germany
    I allready found it.This is the list I was looking at to find out what files you change.
    But 4 Files are missing : CvDefines.h ,CvTeam.h and CvPlot.ccp & h
    After merging those files too,everything seems to be ok now :)

    Edit:Seems as if it is not compatible with BetterAI Mod :(
    After building the new DLL I got an Errormessage that there is an unresolved external error in CvUnitAI and CvTeamAI
     
  3. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    Bad news.

    I've got a bug to report. With the Merged CAR and RevDCM, I have no barbarians spawning. Animals will spawn until they are phazed out, but no barbarians will spawn, even on raging barbarians, and a large map with only two civs. I checked it out, and when I removed the CAR changes from CvGame.cpp, the barbarians started spawning again. This leads me to believe that one of the cache's is probably not being invalidated. Anyways, I though you guys would like to know of this bug.
     
  4. stmartin

    stmartin aka. poyuzhe

    Joined:
    Aug 4, 2007
    Messages:
    640
    Location:
    Shanghai
    Something is wrong with your merge. Try merge CvUnitAI.h, CvUnitAI.cpp, CvTeamAI.h, CvTeamAI.cpp again.

    It could be, though I doubt it since so many players have downloaded CAR and no one report it sooner. Also, HoTK has all CAR's content, yet in HoTK barbrians sprawl perfectly. If you've got some time, could you try a AI auto play with CAR? CAR has ai auto play built in, I forgot which hot key it is though.
     
  5. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    Hmm. It might be a strange interaction the code is having with RevDCM and all the other modcomp's I've added too. I'm going to try adding each of the three sections in CvGame.cpp, one at a time, and see which causes my problems.

    Specifically, only animal barbarians spawn correctly with CAR. If you changed or removed animal spawning in HoTK, you might never notice my problem...

    Anyways, We'll see...
     
  6. stmartin

    stmartin aka. poyuzhe

    Joined:
    Aug 4, 2007
    Messages:
    640
    Location:
    Shanghai
    @Afforess

    I've run a test with CAR, at turn 150 the Barbarian has 4 archers and 5 galleys alive. Screenshot is attached. So CAR is fine. Thanks for report bugs all the same.
     

    Attached Files:

  7. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    I remerged CAR into CvGame and tested it, and it seems to work fine now. Sorry about that false report.
     
  8. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    I've got a question.

    Since the CAR mod speed up the game by creating cache's of frequently used functions in the DLL, is there a higher chance that users with lower RAM will get a MAF error?
     
  9. stmartin

    stmartin aka. poyuzhe

    Joined:
    Aug 4, 2007
    Messages:
    640
    Location:
    Shanghai
    I believe not.

    The caches added by CAR is independent with unit numbers in game, so it will stay the same tiny size as in the beginning. Such very tiny cache size is negligible compared to the many units and cities in late game. As for memory usage, my computer has 1 Gig, I run HoTK without any problem, nor has any HoTK players experienced any MAFs. Please keep in mind HoTK uses way more memory than vanilla BTS and thus CAR.

    Also, MAF seems to be related to save game size. Save game size will increase with the numbers of units and cities in game. Since CAR's cache will stay the same tiny size no matter how many units and cities the game currently has, CAR is irrelevant to save game size increase, so CAR will not increase MAF chance.

    That's my personal opinion.
     
  10. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    Okay, thanks. I'm just getting more and more reports of MAF errors, so I was worried that CAR was the cause. I'm glad it's not.
     
  11. luxCRUSADER

    luxCRUSADER Chieftain

    Joined:
    Sep 24, 2009
    Messages:
    7
    Location:
    Toronto, Canada
    Great job here m8 :)
     
  12. Meatbuster

    Meatbuster formerly Robo Kai

    Joined:
    Dec 6, 2005
    Messages:
    2,302
    Location:
    Philippines
    Quick question: If I paste the DLL into custom assets, will this work with BtS?
     
  13. JujuLautre

    JujuLautre Deity

    Joined:
    Apr 9, 2007
    Messages:
    3,112
    Location:
    Kansai, Japan
    Not in customassets. You need to replace the dll which is in the Assets folder of BTS.

    Just be careful to backup the previous dll before, and know that the saves provided will not be compatible with other installations not using this dll. Careful for SGs.
     
  14. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,144
    Location:
    Germany / Netherlands
    :bump: the savegame here will produce a repeatable crash when you declare war on Cyrus, who's in an alliance.

    No idea, if it's related to CAR, but also not sure, that it's not, so i think you should take a look at it.
     
  15. stmartin

    stmartin aka. poyuzhe

    Joined:
    Aug 4, 2007
    Messages:
    640
    Location:
    Shanghai
    @The_J

    Thanks very much for reporting this bug! I checked it out, it's indeed caused by CAR. I mistyped iK with iJ...
     
  16. Sephi

    Sephi Deity

    Joined:
    Jan 25, 2009
    Messages:
    2,908
    yeah, these kind of bugs are ugly. I looked at your code some time ago because a CTD with DoWs was reported every now and then in my mod, but missed this. Great to see this solved :goodjob:

    I can't give you feedback on how much the CAR mod speeds up my mod, but except this very minor issue there were no bugs related to CAR in month now.
     
  17. Ninja2

    Ninja2 Great Engineer

    Joined:
    Nov 17, 2005
    Messages:
    1,142
    Location:
    Denmarkia
    Thanks for finding and fixing this. Where is this mistype located?
     
  18. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,144
    Location:
    Germany / Netherlands
    It was not really me ;), another user in the german forum reported it.

    He has a question: Will the fix break savegames?
    (i guess not)
     
  19. stmartin

    stmartin aka. poyuzhe

    Joined:
    Aug 4, 2007
    Messages:
    640
    Location:
    Shanghai
    Yep, ugly indeed.

    I'll release an update version very soon. The mistype is in CvTeam::declareWar()

    No, it won't.
     
  20. stmartin

    stmartin aka. poyuzhe

    Joined:
    Aug 4, 2007
    Messages:
    640
    Location:
    Shanghai
    Uploaded CAR Mod V0.3, fixes a couple of bugs. This is save-game compatible with V0.2.

    For Modders, the names of the changed functions in V0.3 are mentioned in the readme file in the download. Source Code is also included in the download.
     

Share This Page