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

Artificial Unintelligence

Discussion in 'Civ5 - Mod Components' started by Delnar_Ersike, Oct 23, 2014.

  1. Delnar_Ersike

    Delnar_Ersike Prince

    Joined:
    Jan 1, 2007
    Messages:
    497
    Location:
    localhost
    It should work in multiplayer just fine. Of the two methods, I think most people (including myself) use MPMPM; just be sure to follow all the instructions EXCEPT for the bit that says you need to delete CvGameCore_Expansion2.dll in the mods that you're packaging. JdH's mod manager is still very much WIP, and I don't know how well it deals with DLL mods like AuI (I tried using it about a year ago and never got it to work properly with my mod). If JdH's mod manager does work though, it should be easier to use than MPMPM.
     
  2. Ninakoru

    Ninakoru A deity on Emperor

    Joined:
    Nov 14, 2002
    Messages:
    658
    Location:
    Madrid, Spain, Europe
    Hi Delnar,

    I'm back to modding, yesterday I've spent about 3-4 good hours only to check all your changes on the surface... Wow! You really spent a good amount of hours doing this amazing work, my legacy changes could be about only 10-15% of the change volume.

    I was already preparing an updated new version of Smart AI, my initial idea is to keep a simple DLL with AI upgrade while contributing the Community Patch with the most interesting enhancements not addresed there.

    Seeing your approach is very similar to mine... Do you mind I use your project as code base for my new Smart AI version?

    My personal approach in modding the AI: Keep the dll fully compatible. Don't add any new bug at all costs, Keep the performance similar of the unmodded game, focus on existing behaviours over adding new layers of complexity.

    I hope you're agree, let me know if this must be further discussed or you are totally disagree. Your work and DLL would be fully recognized and recommended from mine, and I could send you pull requests with my new enhancements and fixes.
     
  3. Gazebo

    Gazebo Lord of the Community Patch Supporter

    Joined:
    Sep 26, 2010
    Messages:
    18,297
    Gender:
    Male
    Location:
    Little Rock
    I'll be honest, I really don't see why we need three separate AI-improvement DLLs (4 if you count the work whoward has done in the VMC). The CP has incorporated almost all of the work both of you have done, and its performance is much, much faster than the vanilla DLL (especially in the late-game). I think it makes a lot of sense for us to join forces on a single DLL that all other mods in the community can use as their base (helps prevent mod fragmentation as well).

    G
     
  4. Delnar_Ersike

    Delnar_Ersike Prince

    Joined:
    Jan 1, 2007
    Messages:
    497
    Location:
    localhost
    As always, I do not mind anyone using my code for their own mod, so long as everything is properly attributed. As Gazebo said in the post I'm quoting below though, a lot of AuI's changes have apparently made their way into the CPP's base DLL (the one that doesn't include any gameplay changes). Since CPP's DLL contains a lot more fixes and modular options than mine, it may be worth thinking about using their DLL as a base instead.
    Don't sell yourself too short, BTW. Sure, the changes you made that I migrated over and built on top of are now just a small part of the overall package, but your code also often served as inspiration for seemingly unrelated fixes. For example, it was your (not well functioning) "avoid water tiles" changes to the Move to Safety functions that made me look into the DangerPlots class in the first place.

    I mostly would agree with you, but I wish to keep AuI its own thing for now for two, closely intertwined reasons:
    1. AuI's code is what I'm familiar with inside and out. Even if the CPP's code has more features, I'm only superficially familiar with most of them because I simply haven't spent the time needed to really get to know them. Since I'm so limited on time as of late (since mid-October), I would rather just stick with my own WIP codebase for now whenever I get the free time to actually work on it instead of trying to familiarize myself with another WIP codebase.
    2. Even though you migrated AuI's changes into the CPP, I know that a lot of the stuff that is currently in the v10 experimental branch is very much a placeholder, even if it is functional. For example, my new DangerPlots combat simulation stuff is incredibly non-portable, as are its sibling functions in TacticalAI; I know that I will want to use CvCombatInfo stuff for the final implementations of these functions. I also know that my citizen management plot-swapper (the code that lets the citizen managers of multiple cities determine which city should be working a shared tile) could also be a lot better optimized (IIRC, it's also buggy as heck). Basically, even if the code sort of works and is committed (in the experimental branch), I don't necessarily want it in the DLL. You ported these functions over to the CPP and I assume built a lot of extra functionality on top of them, so I'm guessing that me scrapping these functions and replacing them with a different system would break a lot of CPP-specific code. I don't want to deal with that, not when my code already breaks as much as it currently does.
    Also, unless you guys significantly changed the defines setups since I last looked at the CPP's code base, the preprocessor defines in the CPP that control the technical and AI improvements are organized so that one or two defines toggle a wide array of unrelated changes (eg. a "core tweaks" define, a "core balance tweaks" define, etc.). On the other hand, I like to have one define per individual change type (with a few exceptions for incredibly miniscule changes) both as a good form of documentation for myself and to act as a lazy man's complete changelog.

    I also might violate the CPP core's dogma with some of the changes I've been working on as a side thing for NQMod and plan to move back into AuI's experimental branch, as those changes alter core Civ5 gameplay. The best example is my change that yields for the player's turn are cached at the very beginning of turn processing, so actions during turn processing that would alter yields no longer do so; e.g. growing a pop and having it work a tile with hammers no longer increases the city's hammer output that very turn, building a building will no longer increase the city's gold maintenance that very turn, a lux trade expiring for the player will not lower the player's calculated happiness that turn (this one was probably the hardest to implement, since the logic for deal expiration is not built to take individual players into account), etc.
     
  5. Ninakoru

    Ninakoru A deity on Emperor

    Joined:
    Nov 14, 2002
    Messages:
    658
    Location:
    Madrid, Spain, Europe
    Yeah any changes from any other mod will be properly attributed. You can count on that.

    Ok, I also think, like Gazebo says, we should end all joining efforts on the CP project, but as it is right now, I feel uneasy to mod that dll source. The cuantity of changes are just overwhelming, and the are continually integrating many new functionallities that make the DLL sometimes unstable.

    Also I discovered that some changes are just not wrapped into define directives and are difficult to track. Is quite a beast to handle for me.

    I'll keep an eye on both dll versions and try to help as much as I can while making my own version with the changes wich I think fit best for me, I still think your code is a best code base for my new version but I will make some more research in CP.
     
  6. Hurricane55

    Hurricane55 Chieftain

    Joined:
    Jan 12, 2016
    Messages:
    69
    Location:
    NJ, USA
    Thanks for the prompt reply. I'll take your advice and try MPMPM.
     
  7. venomz322

    venomz322 Chieftain

    Joined:
    Mar 26, 2016
    Messages:
    1
    Could anybody please upload a RAR folder of the package they have built with MPMPM? I'm sorry to be lazy but I looked at the steps and I have no experience and limited intelligence. It would be so much easier for me and I'm very keen to try this out with my friends, it looks great!
     
  8. pod123

    pod123 Chieftain

    Joined:
    Dec 29, 2013
    Messages:
    8
    Hi & many thanks for the mod!

    Sadly, it does not seem to fix one stupid AI move when it can gift a city to make a peace treaty, for no reason.

    My question: is there a simple way to just prohibit the AI to trade any city of the size 6 and above? Or at least to ban any trade of the cities?
     
  9. IronCrown

    IronCrown Black Foe of the World

    Joined:
    Jun 21, 2007
    Messages:
    674
    @Delnar_Ersike: I just came across your thread for your ongoing modding of the Civ VI AI. As that will obviously still take a lot of time, and the DLLs are not released yet, it's more a hope for the future for me (playing Civ VI without an AI, as it is now, is obviously not an option).

    Now I see that you also made this AI mod for Civ V. I gave up on that game years ago when there were no AI mods and people were telling that there could never be one because the tools were not released. Happy to read that this changed!

    Out of curiosity: Are you familiar with the mods 'BetterAI' and 'K-Mod' for Civ 4? If so, how would you rate your own mod in terms of how well the AI plays? I found that the K-Mod AI is amazingly good and in fact plays better than many weaker human players. It can also pursue coherent strategies like world domination. But I suspect that writing AI for Civ V (and VI) might be much harder because of the hex tiles and unit restrictions.
     

Share This Page