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

DLL edit request

Discussion in 'Civ4 - Creation & Customization' started by Civciv5, Mar 5, 2016.

  1. Civciv5

    Civciv5 Grand Emperor

    Joined:
    Aug 14, 2011
    Messages:
    2,103
    Location:
    Nergenshuizen, Belgium
    Could someone please recompile/edit (whatever it's called) the DLL of this so that it is possible to include 77 civs (exactly)?

    I once again tried to do DLL editing (for like the 5th time, and I failed again). So that's not going to happen, could someone please help me out?

    Thanks
     
  2. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,568
    You can add 77 CivilizationInfos to xml and it is allowed by any DLL I know of. If you are asking to have them in the game at the same time, then you ask for 77 players. Sadly the exe is hardcoded not to allow this. The exe has some 6 bit limitation 2^6 = 64, though other limitations prevents us from using all player IDs.

    If it's just a matter of getting the code compiled without modifications, then compiling shouldn't be a big issue.
     
  3. Civciv5

    Civciv5 Grand Emperor

    Joined:
    Aug 14, 2011
    Messages:
    2,103
    Location:
    Nergenshuizen, Belgium
    Well, I have a DLL that currently uses max 77 players as I'm building a huge mod, since a significant part of the civs will be unplayable, will that be an issue?
    I currently use this DLL.
     
  4. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,568
    So you are saying that you can compile a DLL with support for 77 players? Based on what I read, the game should crash if you do that :think:

    Somebody mentioned crash due to too many leaderheads at some point. Somehow I suddenly feel like experimenting. What is the limit? 60? 77? 5000? Generally speaking the game can be slow enough with just 50. Adding more might not be a great idea, but I'm still interested in knowing if it is possible.
     
  5. Civciv5

    Civciv5 Grand Emperor

    Joined:
    Aug 14, 2011
    Messages:
    2,103
    Location:
    Nergenshuizen, Belgium
    I already use the 77 civs DLL in my Ancient Middle East mod, with around 50 civs playable in the scenario at the start currently, I can run the game quite fine (but my computer is quite powerful). I also use the same DLL in another mod on a gigantic map, with 51 civs, and I can run it just fine.

    So could you (or anyone else) fulfill my request, please?
     
  6. Civciv5

    Civciv5 Grand Emperor

    Joined:
    Aug 14, 2011
    Messages:
    2,103
    Location:
    Nergenshuizen, Belgium
    Anyone, please?
     
  7. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,568
    I intend to compile that DLL next time I boot into windows. However being a dualboot system with windows as the secondary OS and switching OS is somewhat slow, I will not go into windows just for this. This mean it's on the TODO list for next time I boot windows anyway. I can't tell you precisely when that would be, because according to my plan, I would be modding in windows yesterday, but external events wanted it otherwise and odds are that doing anything today could be an issue as well :(

    However I will try to compile this DLL file within a few days.
     
  8. Civciv5

    Civciv5 Grand Emperor

    Joined:
    Aug 14, 2011
    Messages:
    2,103
    Location:
    Nergenshuizen, Belgium
    Really, that's very kind of you, thank you! :D
    Also, it seems a bit much to request, but could you also adjust the city population things in the DLL? Like I see cities size 20 or even 30 in 500 BC in my mod, and in that era, even the largest of cites (Babylon, Ctesiphon, Pataliputra, Alexandria etcetera) had 500,000 people and only Rome managed to get a million. If you are able to find where these things are stored, I can post a list which size of a city should display a specific population (like size 12 is a million in the base game).
     
  9. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,568
  10. Civciv5

    Civciv5 Grand Emperor

    Joined:
    Aug 14, 2011
    Messages:
    2,103
    Location:
    Nergenshuizen, Belgium
    Thanks you! :D
    Do you happen to know which files would be needed to edit the population that is displayed when in the city screen. (like size 12 is actually around a million?)
     
  11. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,568
    PHP:
    long CvCity::getRealPopulation() const
    {
        return (((
    long)(pow((float)getPopulation(), 2.8f))) * 1000);
    }
    It's a calculation done inside the DLL and in human readable layout, it says:
    Real population is the number you talk about and pop is the number of citizen units in the city.

    It can be modded, but since it's done in the DLL, it requires compiling that file. It could be made to use two values from globalDefineALT instead of hardcoding 2.8 and 1000, but it would slow down the game. Is it really that important?
     
  12. Civciv5

    Civciv5 Grand Emperor

    Joined:
    Aug 14, 2011
    Messages:
    2,103
    Location:
    Nergenshuizen, Belgium
    Well, it does give a sense of immersion to time game, would it be possible to merge this formula with the previous DLL you made?
    real population = pop1.95*1000 (I didn't know how to write 1.95 in supercript)

    Would such a change really slow down the game?
     
  13. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,568
    [raw]1.95[/raw]
    Sure it wouldn't make a change at all to hardcode a new number. The slowdown would be from reading numbers from xml rather than knowing them at runtime. However I'm not sure I really like just hardcoding new numbers for everybody. I could end up doing nothing else.
     
    Ramkhamhaeng likes this.
  14. Civciv5

    Civciv5 Grand Emperor

    Joined:
    Aug 14, 2011
    Messages:
    2,103
    Location:
    Nergenshuizen, Belgium
    I'm sorry I'm asking this from you, and I I'd really like to learn DLL one day.
    I promise I won't request anything else for at least half a year or something!
     
  15. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,568
    That would be silly. Feel free to say whatever you want. However if I really am to sit down and code something, it should be something where I would at least have a little interest in it. The image to event thing looks interesting. The unit art for all eras is interesting. I might be able to use them constructively myself even though it was on a request by somebody else and that is really the key. If you request changing a number just for you, then it isn't beneficial to anybody but you. If it is generic enough to work for multiple people, then it becomes interesting.

    Btw feedback on how the DLL is working would be most welcome. Both the image system and the 77 players. Doing that would give me an indication if I can use it even without spending time testing.
     
  16. Civciv5

    Civciv5 Grand Emperor

    Joined:
    Aug 14, 2011
    Messages:
    2,103
    Location:
    Nergenshuizen, Belgium
    Well, I do plan to release my mod someday. You see it is for one of my secret projects, of which only the Ancient Middle East is currently publicly known. I actually could use such a modified DLL for both mods!
    Also, the current DLL you compiled is working faultlessly, no problem at all! :D :clap: :thumbsup:
     
  17. nci

    nci Chieftain

    Joined:
    Apr 7, 2016
    Messages:
    41
    Would it be possible to mod this dll to allow 50 civs + 27 colonies please?
     
  18. nci

    nci Chieftain

    Joined:
    Apr 7, 2016
    Messages:
    41
    Dear Friends, please-please-please, consider making such dll, it'd be fantastic!
     
  19. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,568
    Isn't it possible with the current DLL :confused:

    It allows 77 players, hence 77 civilizations at once. It's not mandatory 77, but up to 77, which should allow 50 as well. I'm not quite sure how the colonies are defined, but I don't think you need a new DLL to change the number of those. At least you are asking for 77 players and colonies combined, which the DLL should be able to handle.

    Do remember that barbarians is actually a player and some mods use one player for barbarians and one for animals. This mean you can't have 77 playable players in one game at once.
     
  20. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    Colonies is just an attribute of a civilization in the game.

    If Nightinggale defined the dll for 77 Civs, then it is for 77 Civs (Colonies or not) + Barbarians.

    Anyway, from what I've read elsewhere, it should not be playable above 62 Civs.
     

Share This Page