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

v27 and above - Single Player Bug/Crashes report thread

Discussion in 'Bugs and Crashes' started by Dancing Hoskuld, Nov 3, 2012.

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

    sp00n Prince

    Joined:
    Jan 4, 2007
    Messages:
    347
    Well, it's definitely a setting somewhere, I just cannot find it.
    I've added a new promotion PROMOTION_BLITZ_ALT with no prerequisites altogether, available to UNITCOMBAT_ARCHER, UNITCOMBAT_MELEE, UNITCOMBAT_MOUNTED, etc.
    No joy, this promotion also doesn't show up for the elephants. Indeed it's an exact match, if City Raider 5 is available, so is this new Blitz.

    Additionally I've found out that not all other units are eligible for the promotion either. E.g. Archers, Axemenand and Spearman, whereas Assassins (Melee, Criminal) and Ambushers (listed as Melee only) can.
    So there has to be a white liste / black list somwhere. I just hope it's not in the DLL file.


    That was my current testing list:

    Can skill CR5 (Blitz)
    (Melee) Ambusher
    (Melee, Criminal) Assassin
    (Mounted) Carabiner
    (Gunpowder) Gudari
    (Gunpowder, Criminal) Sharpshooter

    Cannot skill CR5 (Blitz)
    (Archer) Archer
    (Melee) Axeman
    (Melee) Hatchet Warrior
    (Melee) Robotic Imperial Guard
    (Melee) Spearman
    (Gunpowder) Guerilla
    Any Elephant, Mammoth, Rhino, Bison, Bear


    // Edit
    Checking the 1 move theory now. All on that list that cannot skill CR5 have only 1 base movement...

    // Edit2
    Derp. Indeed. Setting <iMoves> to 2 instead of 1 makes the promotion available. Mystery solved. But not fixed. ;)
    And the funny thing is, the promotion also isn't available if the unit has the Speed promition, which grants +1 movement.

    I didn't even think about that possibility, because the Riding School building automatically added the Speed promotion to the units. (I just wondered about that odd Elephant which didn't have 2 movement points. :hmm:)
     
  2. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,573
    Gender:
    Male
    Location:
    MN
    I also have noticed that the Attacking Multiple Times, is NOT working at ALL:sad: Usually i can get that promotion for my Assassin and it makes a HECK of alot of difference NOT having that promotion for this unit, i am in Renaissance Era now and still does NOT show up???:(
     
  3. sp00n

    sp00n Prince

    Joined:
    Jan 4, 2007
    Messages:
    347
    Hm, Assassins always worked for me during my testing. He also has a base speed of 2, so maybe there's something different going on for you. Maybe another one of those SVN promotion bugs?
     
  4. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,573
    Gender:
    Male
    Location:
    MN
    I know that is the problem, but i just wanted it out in the open, so i can sometime remember IF i ever go back and look for certain stuff. Besides I believe TB said he has a fix for the SVN PromotionLine that will be pushed this weekend, Hopefully.
     
  5. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,912
    Gender:
    Male
    Location:
    Las Vegas
    I should have it by end of day today. And the problem you're experiencing with the blitz filter not looking at TOTAL movement but on only the base movement of the unit is something I can work out today too I think.
     
  6. sp00n

    sp00n Prince

    Joined:
    Jan 4, 2007
    Messages:
    347
    :)
    Though, does that mean that Blitz will still not be available unless the unit has a movement of >1?
    Also, could you tell me where that fix is going to end up in, so that maybe I could integrate it without having to use the full svn edition?
     
  7. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,573
    Gender:
    Male
    Location:
    MN
    If your getting into personal stuff, pls use PM's that way it doesn't distract others from, what the heck are they talking about, :p
     
  8. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,912
    Gender:
    Male
    Location:
    Las Vegas
    Blitz should NOT be available to units if they can't use it (move > 1) but it should be asking for the current total max moves, not the original move information from the unit without modifiers as it is now. I can only help you as far as with an SVN update since this is a coding issue. I just fixed it and apparently it was a problem for us that we were unaware of since long before I got into coding here. Very easy fix but it IS in the dll.

    I'll have an update that includes this fix and a fix for the promo losses in a few hrs. I have a few other things I want to squeeze into this update first.
     
  9. zeinul

    zeinul Warlord

    Joined:
    Apr 24, 2010
    Messages:
    143
    i'm constantly getting ocean tiles next to land tiles.
     
  10. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,912
    Gender:
    Male
    Location:
    Las Vegas
    Anybody notice they don't currently have any trade routes in their cities??? (That'll be fixed on my next update.)

    I also found this under processBuilding in CvCity:
    Code:
    	if (!bObsolete)
    	{
    		PROFILE("CvCity::processBuilding.NotObsolete");
    		[COLOR="Red"]//TB DEFENSEBUG:  The following building defense line is allowing buildings that are replaced to continue to function!  
    		//We can only assume this entire section therefore gets around replaced buildings, particularly after a recalc.[/COLOR]
    		changeBuildingDefense(GC.getBuildingInfo(eBuilding).getDefenseModifier() * iChange);
    		changeBuildingBombardDefense(GC.getBuildingInfo(eBuilding).getBombardDefenseModifier() * iChange);
    
    		changeBaseGreatPeopleRate(GC.getBuildingInfo(eBuilding).getGreatPeopleRateChange() * iChange);
    
    		if (GC.getBuildingInfo(eBuilding).getGreatPeopleUnitClass() != NO_UNITCLASS)
    		{
    			eGreatPeopleUnit = ((UnitTypes)(GC.getCivilizationInfo(getCivilizationType()).getCivilizationUnits(GC.getBuildingInfo(eBuilding).getGreatPeopleUnitClass())));
    
    			if (eGreatPeopleUnit != NO_UNIT)
    			{
    				changeGreatPeopleUnitRate(eGreatPeopleUnit, GC.getBuildingInfo(eBuilding).getGreatPeopleRateChange() * iChange);
    			}
    		}
    
    		GET_TEAM(getTeam()).changeBuildingClassCount((BuildingClassTypes)GC.getBuildingInfo(eBuilding).getBuildingClassType(), iChange);
    		GET_PLAYER(getOwnerINLINE()).changeBuildingClassCount((BuildingClassTypes)GC.getBuildingInfo(eBuilding).getBuildingClassType(), iChange);
    
    		GET_PLAYER(getOwnerINLINE()).changeWondersScore(getWonderScore((BuildingClassTypes)(GC.getBuildingInfo(eBuilding).getBuildingClassType())) * iChange);
    
    		for (iI = 0; iI < GC.getNumBonusInfos(); iI++)
    		{
    			if (hasBonus((BonusTypes)iI))
    			{
    				if (kBuilding.getBonusDefenseChanges(iI) != 0)
    				{
    					changeBonusDefenseChanges((BonusTypes)iI, kBuilding.getBonusDefenseChanges(iI) * iChange);
    				}
    			}
    		}
    	
    	}
    The pertinent notes are in red. I need to know if this section is supposed to be bypassing building replacements due to upgrades! I'm having a feeling its NOT supposed to work that way... It's causing the debug dll to throw up an assert error saying that the city defense is not displaying properly, and given that this is allowing replaced buildings to continue to contribute their defense values, we can see why. If this is by intent, I need to adjust the defense help display.

    Otherwise this whole section needs to include an omission of buildings that are replaced, which the main section above it does, so I'm wondering if these lines need to be isolated from the main processing at all.
     
  11. LumenAngel

    LumenAngel King

    Joined:
    Apr 15, 2012
    Messages:
    669
    Location:
    Center of the World (France)
    In my actual game, barbarians city nearly all keep a 1 population size...
    I was wondering why, and I found...
    They all have angry citizen!
    (build 4468, not the last one, but I need captive too much)
     

    Attached Files:

  12. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    If it's in processBuilding() it is not getting around replacement, because processBuilding() will be called again to process it OUT when it processes the replacement building. In a recalc it processes the buildings in numerical order (not the order they were built in), so a replaced building with a smaller number than its replacement will be processed in during recalc then out gain later in the same recalc

    Attempting to 'fix' it by changing the handling in processBuilding() will almost certainly break things. ALL processBuilding() dos is apply/remove the modifiers for a building. Replacement checks occur at a higher level.
     
  13. Yudishtira

    Yudishtira Spiritual/Creative

    Joined:
    Nov 2, 2012
    Messages:
    2,772
    Location:
    Brisbane
    My version of civics says:
    For Junta: +30% number of cities maintenance
    and for Sovereignty: -15% number of cities maintenance

    However, the reduction I got was from 105 to 90 (should be more like 68-70). Should Sovereignty say "+15%"?
     
  14. BlueGenie

    BlueGenie Emperor

    Joined:
    Apr 23, 2009
    Messages:
    1,575
    You probably have other modifiers to Distance Maintenance too, not just the one you changed.
    How it works as far as I know is that you have a base (say 40 randomly) and a bunch of modifiers to a total of +165% (+165% to 40 becomes 105).
    Changing from one +30% to a -15% is a 45% reduction in the percentage modifier (+165-45 would make it +120%, so +120% to 40 would be 88).

    This integration and difficulty in seeing what does what with City Maintenances is one reason why I don't like so many different Civics modifying City Maintenances.
    It becomes even more complex when you have individual cities increasing or decreasing their maintenance to such a degree that you can really never extrapolate your real city maintenance costs before modifiers to determine what a change in city maintenance modifiers would actually do.

    This is something I think we'd need, a LOT better breakdown on what goes on in the City Maintenance area. Financial Advisor (F2) only tells us the final values, and the # of Cities one is even wrong as Building Maintenance added to City Maintenance is placed there too but is not affected by the % modifier to # of Cities Maintenance, only, afaik, by the cities own changes to Maintenance costs.

    Cheers
     
  15. Yudishtira

    Yudishtira Spiritual/Creative

    Joined:
    Nov 2, 2012
    Messages:
    2,772
    Location:
    Brisbane
    I know I have other modifiers, but for 45% to be equal to 15, it would mean that 105 included a penalty of more than 200% - (105-33)/33 = 215ish%. I know there are some hefty penalties and they add up, but I don't think they hit those heights.

    ETA: Yes sorry your arithmetic is correct and it's more like 165ish%. Is that likely?

    ETA again: my civic penalties are about 40%. What else do you get penalties from?
     
  16. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,912
    Gender:
    Male
    Location:
    Las Vegas
    Ok. Well... in the section above this one, buildings are filtered out of processing if they exist in the city and have been 'replaced'. And on a test game, I'm getting 5 extra city defense from an unknown provider. This may have led me to an inappropriate assumption here. And this is why I asked... lol. I wanted to be sure before moving on this. So why else would we have 5 more defense from buildings in the actual total, than is found in the total of the buildings listed in the city screen? Any theories?
     
  17. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    I must admit I don't know, and it DOES look wrong. However, it's certainly not just those 2 lines for building defense. **IF** it's wrong (and I suspect it is, since it doesn't make sense to me) then the entire 'if (!bObsolete)' clause will be wrong. If I had to hazard a **guess** I'd say that that entire 'if' should be inside the previous one that starts near the top of the routine (the one with the 3 line comment) - i.e. - move it up 3 lines so it's inside the previous clause. **HOWEVER** I don't really understand what it's doing, so it would really need walking through over all the various cases (replacing buildings, researching obsoleting techs, recalcs) etc. in the debugger to try to understand why it's there.
     
  18. CiverDan

    CiverDan Warlord

    Joined:
    Mar 28, 2004
    Messages:
    256
    Pretty sure you went over a value of 2^31 which caused your money to go negative. This is related to the same reason the culture graph can go negative late in games and why the population numbers in the stats page wont go over 2 Billion. I am not a modder but got the impression its a 32-bit limitation issue and therefore hard coded. What is generating so much money by the way? Never generated that much gold in any of my games, even in very late eras. Perhaps something needs to be modified on that end.
     
  19. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,912
    Gender:
    Male
    Location:
    Las Vegas
    The scope of C2C is larger than CIV4 was ever intended to be and we're starting to see some crazy stuff like this. Koshling enlightened me on what some of the problem is and hopefully we can delay having to adjust some of our integers to long integers by finding the spots that have similar problems he mentioned could be overcome.
     
  20. BlueGenie

    BlueGenie Emperor

    Joined:
    Apr 23, 2009
    Messages:
    1,575
    Did you check through all Civic categories?

    Other than that you also have increased City Maintenances from the Administration buildings, Village Hall, City Council and so on. These are added between and after other modifiers I think and separate for each city so if you have Admin buildings in your most costly cities it adds more to the total than if you have them only in smaller cities.
    With "between" I mean that you first have a total City Maintenance, in this case for Distance to Capital. This is spread out among your cities depending on their population sizes. Each of those cities THEN get the added costs for Admin and other +maintenance buildings in them.
    That is then added to the City Maintenance in the F2 screen for a full total.

    It's complicated maths and what you see as an end result is most likely correct. Reduced City Maintenance does not always give back as much as one would think.

    Cheers
     
Thread Status:
Not open for further replies.

Share This Page