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

[RaRE] RaR Extended: a combined modmod for the RaR modification

Discussion in 'Civ4Col - Creation & Customization' started by Commander Bello, Aug 26, 2014.

  1. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,701
    Gender:
    Male
    Location:
    Stuttgart, Germany
    Seriously ?
    Why didn't you just ask ? :)

    --> Click the Name of the Unit in Unit Detail Window (Lower Right Corner)
    (I renamed my Units all the time.)
     
  2. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,413
    I need to investigate this better, but I have seen the AI fail to use experts when it use some other colonist for the profession in question. It does however bring up the interesting question of how to monitor how the AI is doing and why. Right now observations seems to be based on random snapshots.
     
  3. Marla_Singer

    Marla_Singer United in diversity

    Joined:
    Oct 24, 2001
    Messages:
    12,988
    Location:
    Paris, west side (92).
    After my last post I've done some further testing on yesterday night. Using worldbuilder, I've given specialists to the AI placing them on cities (and giving the needed buildings to make them work there), then I checked on next turn how it handled it in pressing Alt+Z.

    And you're indeed right, the AI wasn't so bad at all to put specialists at their accurate profession. On an island city (not connected to mainland colonies), the AI put actually all specialists at their accurate professions, and the free colonists were then used as extra fishermen. However, on a continental colony, the AI only made work a part of the specialists in the colony, the other one being sent for a walk. I can't figure out where they were supposed to go but that would be interesting to know.

    This being said, you're still correct on the fact the AI wasn't so bad in allocating specialists to their dedicated jobs when those are available in the colony. The most sensitive issue is about specialists for jobs which are not available in the colony.

    Indeed I agree. That's where the definition of a city specialty needs list may help the AI. Here's a proposal, tell me what do you think:

    1. The AI allocates its citizens to jobs. Those who are specialists of their professions are left as so, but the jobs done by other units are added by the AI in the specialty needs list. Specialty needs would be determined this way for all cities.
      .
    2. At next turn, same process, but if a badly used specialist correspond to the needs of another city, he will be sent to that city. The AI will then consider the specialist "on his way" (thus removed from that city needs list). If a specialist would actually correspond to no need at all, the AI would delete his specialty to make of him a free colonist that can go to school (I know it could be done more efficently but let's keep it simple to get an idea of the process).
      .
    3. If a free colonist is trained at school, the AI will pick in the needs list, and send colonists where they are needed.
      .
    4. Maybe we can imagine something similar about specialists coming from Europe or even bought there? We could even consider this for trainings in a native village?
    As a sidenote, the AI currently doesn't seem to build schools. But if we give a school to the AI, he'll correctly allocate free colonists in it. A change would probably be needed here to make the AI build schools.

    I'm aware something more subtile would be needed in the end. But do you believe the core principle here could be a good direction to follow?
     
  4. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,701
    Gender:
    Male
    Location:
    Stuttgart, Germany
    Well, why not start with an AI improvment that would not be too hard to implement.
    (Of course, it would require careful balancing and testing.)

    1. Calculate and store (on Player, not on single Cities !) the overall amount for every Yield produced.
    2. Adjust Value Calculation of Buildings using that information. *
    3. Adjust Value Calculation of Units (for Hiring and Buying) with that information.

    * Only necessary for harbour cities.
    (Inland cities should have a reasonable Value Calculation with local Yields already.)

    e.g.

    If you know, that AI Player never yet produced any Tobacco at all.
    --> Buildings for Cigars are not necessary / useful to build.
    --> Experts for Cigars are not necessary / useful to buy or hire from immigration queue.

    If you know, that AI Player produces (much) more Tobacco than Sugar.
    --> Buildings for Cigars are more valuable than Buildings for Rum.
    --> Experts for Cigars are more valuable than Expert for Rum.

    Summary:
    The information of "Overall Amount for every Yield Produced for Player" could definitely be used for many AI improvments (and features).
    (Of course it needs to be calculated and stored on Player first.)

    Spoiler :

    Actually it was part of my original implementation concepts / plans related for "Advances" (my old Tech Concept).
    My concept for "Avances" would need the calculation and storage of Yields Produced on Player anyways.

    The whole concept "Advances" had several other AI improvments as well.

    e.g.

    To Unlock Techs for Buildings producing a Manuactured Yield, AI would also need the a certain amount of accumulated Production of the corresponding Raw Yield.

    So Unlocking Techs in my Tech concept would not simply relate to "Yield Research" like it is done in Civ.
    Every Tech would usually require a certain amount of "Yield Reserach" + a certain amount of one (or even two) other Yields.

    That way, AI would not unlock Techs not useful for its current situation and thus not build Buildings it does not require.


    This is just an idea of course. :)

    Every modder does have different concepts and ideas.
    And modders usually implement their own ideas and concept instead of ideas and concepts of others.

    So whatever you remaining modders do, have fun. :goodjob:
     
  5. Marla_Singer

    Marla_Singer United in diversity

    Joined:
    Oct 24, 2001
    Messages:
    12,988
    Location:
    Paris, west side (92).
    Thanks Ray and Nightinggale for the renaming trick. :goodjob:

    The problem isn't only about which specialists to get, it's also about where they should be sent.

    I'm currently playing turn #333 in my game. And here's how it looks in the AI-controlled Portugal:


    click to enlarge


    As you can see, the city of Sao Salvador (44) has tons of fortified free colonists waiting for nothing. The city is however surrounded with colonies having a very small population of only 4 to 10. The AI won't send them there.

    Earlier in the game, when I was still trying to "save" the AI, I've given a free school to the Spaniards in La Isabella. That school has been grown into a Great University bby the AI, but it didn't actually change anything. We can see the very same phenomenon of fortified colonists surrounded with under-populated settlements. The only difference is that they are specialists rather than free colonists.


    click to enlarge



    I actually wonder if the game really has a mechanism to manage immigration from a colony to another. The more it goes and the more I believe this is the most accute issue.

    The consequence is not only that professions are badly managed, but it also considerably limit the AI's expansion. Indeed, the AI code to found cities depend of the population of existing cities. But as the "big cities" are stuck with no more slots available and "small cities" aren't big enough to grow naturally, then the overall population of cities is limited, which as a result prevent the AI to trigger the foundation of other cities.

    So probably, the best starting point is maybe to actually push the AI to send his colonists of big cities to smaller ones. Maybe the "needs list" system could be enough to do the job.
     
  6. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,701
    Gender:
    Male
    Location:
    Stuttgart, Germany
    Well, there is more than 1 AI issue. :)

    AI not optimally distributing its colonist between its cities is one of them.
    AI not optimally constructing buildings and not ideally hiring and buying specialist is another.
    AI not being able to make (good) use of education system is again another.

    All of these issues appear, because Civ4Col AI in Vanilla was very poorly adapted from Civ4 AI.
    (Modders tried to improve some aspects here and there, but a lot of work for improving AI is still existing.)

    However, currently there are almost no Civ4Col modders around.
    That is why I suggest to the remaining modders:

    Start with AI improvments that can be implemented with reasonable efforts.
    And then, start working on more complex issues.

    But as I said:
    Every modder will follow his own plans and implement his own concepts anyways. :thumbsup:
     
  7. agnat86

    agnat86 Warlord

    Joined:
    Jun 30, 2011
    Messages:
    218
    I like that system, except for the deleting specialties part. Especially in the early game the AI will have many unneeded specialists, but many of them will become useful later on. I fear that, if a specialty is deleted the moment there is no direct need for it, the AI will only have free colonists for a large part of the game. Also, the AI often sends its colonists into native villages to learn specialisms it doesn't directly need, so this may result in colonists getting trained by natives only to have their new specialty immediately deleted.
    A large portion of the population of the AI will be unspecialized anyway, as free colonists and servants are the most common immigrants, so I expect there will be enough unspecialized colonists available under normal circumstances.


    I have found these lines of code in CvCityAI.cpp, they are part of the function "AI_buildingValue":

    Code:
    if (eYieldProduced == YIELD_CROSSES || eYieldProduced == YIELD_EDUCATION)
    				{
    					int iSpecialBuilding = kBuildingInfo.getSpecialBuildingType();
    					CvCity * pCity = kOwner.getCity(getID());
    					// R&R adjustment for Crosses Buildings - START
    					// bSpecialBuildingLimit = (!pCity->isHasSpecialBuilding(iSpecialBuilding) && (kOwner.getSpecialBuildingCount(iSpecialBuilding, true) >= 2));
    					int iTargetAmountOfSpecialbuilding = 2; // So this will be used for education and for crosses if only a few cities exist
    					if (eYieldProduced == YIELD_CROSSES)
    					{ 
    						if (kOwner.getNumCities() >4) 
    						{
    							iTargetAmountOfSpecialbuilding = kOwner.getNumCities() / 2; // so only every second city will build church
    						}
    					}
    					bSpecialBuildingLimit = (!pCity->isHasSpecialBuilding(iSpecialBuilding) && (kOwner.getSpecialBuildingCount(iSpecialBuilding, true) >= iTargetAmountOfSpecialbuilding));
    					// R&R adjustment for Crosses Buildings - END
    
    				}
    Maybe I do not understand these correctly, but the code and the accompanying comments seem to suggest that the AI will never build more than two schools. If this is the case, then this might probably be the place to start making adjustments.
     
  8. R_TEAM

    R_TEAM Chieftain

    Joined:
    Apr 12, 2016
    Messages:
    33
    Hi,

    by using at world generation :
    Caribbean , Gigantic AND "Reduce colonie distance" its CTD .... ("New World" is going fine ..)

    Regards
     
  9. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,413
    Usually a CTD while generating a map indicates that it is trying to add more players, but it ran out of unowned land good enough to place cities (settlements/colonies). It happens once in a while, not often and without lengthy tests to back it up, I would suspect Caribbean maps are more prone to this problem.

    My best advice would be to try a few times to see if it keeps crashing.
     
  10. R_TEAM

    R_TEAM Chieftain

    Joined:
    Apr 12, 2016
    Messages:
    33
    Have this CTD only with "Reduce colonie distance" on ... without it generates fine ... (4 tests - without no problem, with it on always CTD ..)

    Regards
     
  11. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,413
    In that case it just doesn't work. I don't think I ever tested that because I think games becomes boring when the islands are too small. I don't think I will try to fix it as it is far from easy to do so.
     
  12. Marla_Singer

    Marla_Singer United in diversity

    Joined:
    Oct 24, 2001
    Messages:
    12,988
    Location:
    Paris, west side (92).
    Yes, I actually agree with you. Deleting specialty is un-needed. :)
     
  13. Marla_Singer

    Marla_Singer United in diversity

    Joined:
    Oct 24, 2001
    Messages:
    12,988
    Location:
    Paris, west side (92).
    I've promised I would make a post after I totally finished my last game, and I've won it last week. So here's what would be my remarks about how to improve RARE.

    Maybe that's because of me, but the game turns become really insanely long to be played once we're getting close to independence. The problem isn't necessarily in game calculation loops which aren't that long, it's more about the gameplay in itself and all the things we need to do manually by the end of the game. During the war of independence, I needed more than 1 hour to finish a single turn, only to manage stuff manually. There is nothing new here but it makes the game painfully tedious, and that's in my humble opinion where there is the most room for improvement.

    So here are the 4 major points I would point out:
    • The fact we cannot rush buildings during war of independence dates back to vanilla, but in the super big games of RAR/RARE it becomes a nightmare! This forces to do a painful micro-management with charriots to be sure to address to cities all the goods needed at a moment of the game where they all produce hammers industrially. That's really unnecessary. I can fully understand if rushing buildings would cost thrice the price because we can't do it with the motherland, but forbidding it completely is truely discouraging.
    • The turn starts in choosing student trainings and things to be built in all cities. Choosing buildings is not a problem in itself (except for the "no rush" part), but finding student trainings can be tedious if you want to do it carefully. Hence why I'm still convinced the "specialty needs list" idea of last month could be really a significant improvement.
    • During war of independence, money becomes worthless. You can't rush buildings, you can't buy anything from Europe and Africa. The only thing you can actually buy are smuggling ships in Port Royale. It's frustrating because meanwhile, the domestic market alone generates tons of revenues with which you can actually do nothing. Beside allowing buildings rush, maybe the ability to buy mercenaries from other European countries could be fun?
    • Because the massive generated revenues are worthless, the goods production in itself becomes worthless. For fun, I developped a domestic market in which all cities were supplied with all goods, but frankly I was tempted to put all my citizens fortified outside cities to not have to manage any goods production at all. This just don't feel right.
    The thing is, I love that mod. I really want to start a new game, but considering I don't have so much time to play and that it took me so many long hours to finish my last game, I feel a bit discouraged to start a new one. If we would find solutions to make game turns less long in the end, I'm convinced it would improve its replay value.

    Have you a similar experience than me regarding this? What do you think about it? Now this being said, considering the age of the mod, I would perfectly understand if things would remain as they are. I was just saying so for the pleasure to discuss. :)
     
  14. lethiel

    lethiel Streaming Col at https://www.twitch.tv/lethiel01

    Joined:
    Jul 1, 2008
    Messages:
    129
    Location:
    Denmark
    True but there has to be some drawback compared to choosing Monarchy civic. my solution would be that both civics can trade with Europe and monarchy gives you a one- time big chunk of units from another king. It would be useful for a small nation/ peaceful strategy.

    I like this. I was thinking that the (own) king should be more like a shop as mercenaries in Civilization4 where a few experienced/retired ref forces will spawn and de spawn for availability every now and then. King's shop could be extended to other kings (maybe just during WOI). Today you can keep buying king's units forever in predictable loop which is odd.
    Buying soldiers internationally during WOI would be a great addition but it would require the REF to be accordingly stronger.
    i totally agree with everything you said.
     
  15. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,413
    RaRE 2.5.2 released

    Download link: link (upgrade from 2.5 or 2.5.1)

    Should be fixed now. It didn't have anything to do with Caribbean itself. It was an issue regarding placing settlements on the edge of the map and perhaps Caribbean is more prone to do that than other maps.
     
  16. Teskal

    Teskal Chieftain

    Joined:
    May 13, 2013
    Messages:
    42
    Are there any changes made to the pirates since version 2.4? Are they stronger, now?

    I installed the extended mod 2.5.1 on a friends computer and he told me that the pirates in his game have frigates and they are a real problem for him.
     
  17. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,413
    Early on the game produce wild animals. Later it will produce private frigates meaning you will have to deal with pirates if you play long enough. This is unchanged from 2.4. In fact according to the log the pirate frigate is added and configured during the first two weeks of April 2013 and not touched since.

    Sometimes the European AIs gets interested in pirates and sometimes they focus on other stuff. Sometimes the barbarian pirates hunt AI players and sometimes the human player. This mean you will not really see pirates in some games and lots of pirates in other games.

    RaRE has a single change to pirates. The barbarian pirates can only spawn on plots, which have connection with a Europe access plot. In other words they will no longer spawn on lakes. Actually now that I think about it, this might make pirates more active in front of your ports. If the game figures it wants max 6 pirate frigates, whenever one does, it can spawn a new one. If this new one spawns in a lake, it is effectively out of the game and the new max is 5. Depending on the map you could have 5 ships on lakes, which you just happen to never discover and you will be pretty much free of pirates.
     
  18. Marla_Singer

    Marla_Singer United in diversity

    Joined:
    Oct 24, 2001
    Messages:
    12,988
    Location:
    Paris, west side (92).
    Generally, pirates and privateers make it absolutely necessary to build war ships that stay permanently on sea in order to intercept them. I think it's good this way since it simulates well the principle of control of the seas.

    Just one question though, does anyone know exactly how is triggered the event to get the first smuggling ship offer ? I recall that in one of my earlier games (on RAR, I don't remember which version) it didn't happen at all which means Port Royal has never been open to me. Since then, I tend to get a bit stressed about waiting for it.
     
  19. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,413
    You buy/build a pirate ship and send it to Port Royal. Pirates, Pirate Frigates and smugglers can always sail to Port Royal, event or no event. It's not uncommon for me to buy a pirate and then send it to Port Royal to get a frigate or two. They then sail together meaning if one gets damaged in combat, the others will defend it as needed. It also allows to capture using 4 cargo slots instead of the usual 1/2 with single ships.
     
  20. Marla_Singer

    Marla_Singer United in diversity

    Joined:
    Oct 24, 2001
    Messages:
    12,988
    Location:
    Paris, west side (92).
    Thanks Nightinggale. :)

    What about my observations about making game turns less tedious in the final stage of the game? Do you see any "easy" solutions which would make sense without needing an awful lot of development? :undecide:
     

Share This Page