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

Post Feb 1st 2013 - bugs - Single Player

Discussion in 'Bugs and Crashes' started by Dancing Hoskuld, Jan 28, 2013.

Thread Status:
Not open for further replies.
  1. Nimek

    Nimek Emperor

    Joined:
    Jul 7, 2010
    Messages:
    1,179
    Gender:
    Male
    latest svn

    After i build wherehouse that replaces storage pit i was unable to build
    buildings like fleatchers hut that have storage pit as required. It makes no sense :p
     
  2. Hydromancerx

    Hydromancerx C2C Modder

    Joined:
    Feb 27, 2008
    Messages:
    16,281
    Location:
    California, USA
    I will look into that. Thanks for reporting. :goodjob:
     
  3. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    If there is worker in the save that is about to walk out and b devoured I'll find out why (if it's no in the save though I doubt there is enough info here - I need the save from the turn the worker decides (in that turn) to walk out into dangerous territory alone).

    As to improvements, that's (largely) because the AI (until it has larger established cities anyway) does not build workers beyond what is needed to improve enough tiles for the city's current population to work (i.e. - it won't build workers to make improvements it cannot use yet, at least until it is a more established civ). Also, bear in mind that you're looking in WB and seeing resources the AI cannot yet see (it doesn't have the tech) in many cases. Of course, if it's losing workers a lot to animals for some other reason (your first point) that will obviously also be contributing.
     
  4. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,557
    Gender:
    Male
    Location:
    MN
    Yes there should be one ready to do so (I hope i got the right one).

    Ok that does make alot of sense on the worker on tiles then, thx for the info.;)
     
  5. Snofru1

    Snofru1 Emperor

    Joined:
    Dec 29, 2005
    Messages:
    1,217
    Location:
    Germany
    Quantonium Crystals still produce a little too much happiness... (This is current SVN).
     
  6. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    Ok, the worker suicide is easy to explain, and it only effects the human player's automated workers (not AI workers). What we should do about it (if anything - penalty of automation!) is open for debate.

    Basically the workers that do this have decided the best thing they can do is build a route between your cities - in this save game you somehow have 2 cities on opposite sides of the continent! When the AI processes such a routing mission it checks for danger and requests an escort, since it has control over all the other units too. The human automation cannot do this, because automating one unit doesn't give it the right to take control of other units to act as escorts, so it currently just uses much weaker safety criteria (no enemy territory), which leaves it VERY vulnerable in neutral territory.

    The options we have here are:
    1. Too bad. Leave it as it is.
    2. Change the human automation to stick only to owned territory (so it will never try to join your cities up unless their cultural boundaries overlap).
    3. Leave in one of the safety checks, which is to validate before making a move that it isn't moving into obvious (visible) danger (which usually means a visible animal). The problems with this are two-fold - firstly it will happily strand itself deep in neutral territory and then have no way out when it finally notices an animal. Secondly, when it does abort due to seeing danger it has to re-evaluate what to do from scratch, and since it will be in the middle of (probably quit hostile) neutral territory it will probably try to return to the nearest city (and likely not make it anyway). If it does make it, it will then (probably) promptly decide it likes the idea of building the route it was trying to build before and just go again.
    Personally I suspect option (2) is best (for automated human workers). What do you think?
     
  7. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,557
    Gender:
    Male
    Location:
    MN
    I would have to agree, # 2 options seems more feasible, # 1 just itn't gameplayable, as per # 3 seem like it will take more turn time evaluation, and that is definitely not needed.
     
  8. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,523
    Gender:
    Male
    Location:
    Canberra, Australia
    I have noticed that recently that when I have a free worker in a city work area that the AI is suggesting that I improve plots which don't have resources before improving resource plots. In fact even if there is only a plot where a camp could be built then no suggestions (blue circle) shows up.
     
  9. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,523
    Gender:
    Male
    Location:
    Canberra, Australia
    That sort of value usually shows up if you look at the pedia before you start a game and it has all the parameters like game speed to work with. Was this the case?
     
  10. Snofru1

    Snofru1 Emperor

    Joined:
    Dec 29, 2005
    Messages:
    1,217
    Location:
    Germany
    Yes, option 2 it is! Now I would start to automate workers again even if they are not on an island completely owned by me (which I have not done for a long time).
     
  11. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,072
    Location:
    America
    I'd cynically support #1, as it would get people to actually manage their workers! :p
     
  12. Snofru1

    Snofru1 Emperor

    Joined:
    Dec 29, 2005
    Messages:
    1,217
    Location:
    Germany
    Nope, I am just in the middle of a game, and out of this I have made the screenshot. Another game that was much further advanced showed the same thing. Other parameters seem to be fine, as far as I have checked them. You don´t see this huge amount of happiness in your Sevopedia?

    I have activated the PocketMonster Module and yours from zzExperimental if that is important.
     
  13. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,557
    Gender:
    Male
    Location:
    MN
    ah aha ah Never!!!:evil:
     
  14. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,557
    Gender:
    Male
    Location:
    MN
    The trappers/trackers/explorers etc are all back to the way they used to be?? They hardly ever go outside the realm of your area, and if so lately, not that far?? At least before they roamed around everywhere, not so much anymore for some reason???
     
  15. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    6,934
    Location:
    Norway
    About human worker automation:
    What if there were spesific AI for leaving border if and only if a soldier is stacked with the worker in automation, this will make it possible for the player to choose a worker as an "outside border worker". I'm not talking about whenever a worker stands on the same tile as a soldier but a feature that make the soldier automatically follow the worker around which is detectable by the workers AI. option 2 and 3 ish at the same time.
     
  16. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,685
    Gender:
    Male
    Location:
    Las Vegas
    I'm with you on this one ls... why anyone would take their strategic edge to micromanage all decisions being made for their empire and put it into the hands of the same ai they are playing against is beyond me. How can you possibly expect to get an edge over the competition if you just allow your nation to be developed by the same 'thought routines' the competition is using?

    I've never found the management of my workers (or any other units for that matter) boring but I guess I can see why some would...
     
  17. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,685
    Gender:
    Male
    Location:
    Las Vegas
    @Koshling or AIAndy:
    I apparently have found this line to have a problem as it seems to be failing to qualify any cities at all for trade routes:
    Spoiler :
    Code:
    		for (int iI = 0; iI < iNumTradeRoutes; ++iI)
    		{
    			CvCity* pTradeCity = getTradeCity(iI);
    			if (pTradeCity && pTradeCity->getOwnerINLINE() >= 0 && (NO_PLAYER == eWithPlayer || pTradeCity->getOwnerINLINE() == eWithPlayer))
    			{
    				int iTradeYield;
    
    				if (bBase)
    				{
    					iTradeYield = getBaseTradeProfit(pTradeCity);
    				}
    				else
    				{
    // BUG - Fractional Trade Routes - start
    #ifdef _MOD_FRACTRADE
    					int iTradeProfit = calculateTradeProfitTimes100(pTradeCity);
    #else
    					int iTradeProfit = calculateTradeProfit(pTradeCity);
    #endif
    // BUG - Fractional Trade Routes - end
    					iTradeYield = calculateTradeYield(YIELD_COMMERCE, iTradeProfit);
    				}
    
    				if (pTradeCity->getOwnerINLINE() == ePlayer)
    				{
    					iCityDomesticYield += iTradeYield;
    					iCityDomesticRoutes++;
    				}
    				else
    				{
    					iCityForeignYield += iTradeYield;
    					iCityForeignRoutes++;
    				}
    			}
    		}
    
    // BUG - Fractional Trade Routes - start
    #ifdef _MOD_FRACTRADE
    		if (bRound)
    		{
    			iDomesticYield += iCityDomesticYield / 100;
    			iDomesticRoutes += iCityDomesticRoutes / 100;
    			iForeignYield += iCityForeignYield / 100;
    			iForeignRoutes += iCityForeignRoutes / 100;
    		}
    		else
    #endif
    // BUG - Fractional Trade Routes - end
    		{
    			iDomesticYield += iCityDomesticYield;
    			iDomesticRoutes += iCityDomesticRoutes;
    			iForeignYield += iCityForeignYield;
    			iForeignRoutes += iCityForeignRoutes;
    		}
    	}
    }


    In particular, this line itself is the one that never seems to be qualifying a trade route:
    Code:
    if (pTradeCity && pTradeCity->getOwnerINLINE() >= 0 && (NO_PLAYER == eWithPlayer || pTradeCity->getOwnerINLINE() == eWithPlayer))
    in CvCity line 14176.

    I'm not quite sure what's wrong here but on first glance, simply using pTradeCity as a condition doesn't seem right does it? Should that be pTradeCity != NO_CITY ? Is this how another programming language allows this kind of check to be made?

    I could also be completely off base with my debugging diagnosis here too...

    BTW, I'm updating what I have to fix SO's crash which would be affecting anyone with that SVN rev. It's just a stickytape fix though as I suspect the underlying problem may indicate a potential for more (a -1 reference returned in the AI code... check out the revision changes Koshling to see what else may need to be done there. There's a lot going on there I don't know what its all referring to but I was able to create a bypass to the crash at least.)
     
  18. sp00n

    sp00n Prince

    Joined:
    Jan 4, 2007
    Messages:
    347
    I would also prefer option 2). I generally micromanage my workers until I have improved all of my city tiles, and after that send them to auto-build trade networks. Which does make them build improvements and forts as well (which I have to disable for each new game, as this setting is not saved), but also makes them suiciding into animals.

    By the way, I'm mildly amused by the fact that a pigeon is able to kill a worker. Must be some pretty ancient giant killer pigeons with claws and teeth roaming the lands there... :borg:
     
  19. Hydromancerx

    Hydromancerx C2C Modder

    Joined:
    Feb 27, 2008
    Messages:
    16,281
    Location:
    California, USA
    According to the code it requires a Storage Pit OR Barter Post OR Trading Post. So I suggest building a Barter Post OR Trading Post then.
     
  20. Nimek

    Nimek Emperor

    Joined:
    Jul 7, 2010
    Messages:
    1,179
    Gender:
    Male
    @Hydro

    I did what you sugested and it works but such bug spoil gameplay.

    If some building (werehouse) replace other building (storage pit) it is very logical
    that this new one should act as old one in other buildings requirements.

    I suggest that building requirements code need some tweaks to include buildings upgrade chain.
     
Thread Status:
Not open for further replies.

Share This Page