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

[Religion and Revolution]: Bugs and Todos

Discussion in 'Civ4Col - Religion and Revolution' started by raystuttgart, Dec 13, 2011.

  1. Schmiddie

    Schmiddie Emperor

    Joined:
    Feb 27, 2012
    Messages:
    1,257
    Location:
    Germany
    I recognized another bug which seems to be major:

    I was breeding cattles and one of the events triggered (the natives claim for cattles short after you have started breeding).

    I gave them all cattles in order to achieve +2 relationship with the natives.

    The next round I joined the city screen and recognized this: Cattles have now a negative value of approx. -1.300 and every building (!!!) demands for this amount cattles. The effect is that no building incide the city will be finished now (I delivered tools in the city but nothing happened, the building was not finished).


     

    Attached Files:

    • bug.jpg
      bug.jpg
      File size:
      402.4 KB
      Views:
      269
  2. Nightinggale

    Nightinggale Deity Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,130
    do you have a savegame of this? I have no idea what happened, but I'm willing to give it a try with the debugger. Also do you happen to have an autosave from just before it happened where it happens if you click next turn? That would be really helpful for tracking down this bug.
     
  3. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    4,447
    Location:
    Stuttgart, Germany
    That bug is most likely related to Python logic.
    (Somewhere in CvRandomEventInterface.py)

    Similar bugs had happened in the past, when Python-Events were removing higher amounts of a certain yield, than there was available.

    The only explanation I would have is that one of the changes (for new Gamespeeds) from Barthoze is buggy.
    Although I did not see any problems when checking the commits. :dunno:

    Don't have a lot of time to go searching though.
    (Easiest way to test be would to trigger the corresponding event with cheat menu: Ctrl + SHIFT + E)
     
  4. Schmiddie

    Schmiddie Emperor

    Joined:
    Feb 27, 2012
    Messages:
    1,257
    Location:
    Germany
    could make sense, I play with "epic" for the first time...
     
  5. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    4,447
    Location:
    Stuttgart, Germany
    Ok, I took a look and I am pretty sure that I now know what is wrong.
    It was indeed caused by the GameSpeed changes. (A small copy paste error.)

    Edit:

    It is now corrected again.
    (New revision available in SVN.)
     
  6. Schmiddie

    Schmiddie Emperor

    Joined:
    Feb 27, 2012
    Messages:
    1,257
    Location:
    Germany
    Oh, what a pitty...it does not work with savegames. However, I will start a new game. Thanks ray!
     
  7. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    4,447
    Location:
    Stuttgart, Germany
    Actually it should.
    The fix was all just Python.

    It will of course not correct the negative Yields in a savegame (from the bugged Pyhton event file before my last commit).
    But if you have a savegame before the event was triggered, everything should work fine with the new corrected Python file.
     
  8. Don Senglar

    Don Senglar Chieftain

    Joined:
    Nov 8, 2010
    Messages:
    76
    Religion & Revolution 2.4 (rev 1032 -27.02.15)

    File GlobalDefinesAlt.xml

    I found double definition of SCORE_FATHER_FACTOR

    Code:
    	<Define>
    		<DefineName>SCORE_FATHER_FACTOR</DefineName>
    		<iDefineIntVal>2000</iDefineIntVal>
    	</Define>
    and

    Code:
    	<Define>
    		<DefineName>SCORE_FATHER_FACTOR</DefineName>
    		<iDefineIntVal>3000</iDefineIntVal>
    	</Define>
     
  9. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    4,447
    Location:
    Stuttgart, Germany
    Ah ok thanks.
    That isn't critical at all though.
     
  10. Don Senglar

    Don Senglar Chieftain

    Joined:
    Nov 8, 2010
    Messages:
    76
    You're right, it's not critical. I accidentally found this small bug when adjusted RaR 2.4 for my own needs.

    My idea was to fully remove iFatherScore from TotalScore calculations:

    Code:
    		int iSubTotal = iPopScore + iLandScore + iFatherScore;
    I'd like to have TotalScore that depends only on Population and Land size.

     
  11. ederl

    ederl Chieftain

    Joined:
    Mar 2, 2015
    Messages:
    12
    Hello everybody! First I want to say: This Mod is great! I love it!
    This is my first post and I'm from Austra, so my English is not the yellow from the egg...
    Although I really enjoy playing the mod I recognized something which disturbs me:

    When I build a farm on turkeys I should get a bonus on food, but for a farm I have to chop down the wood and the bonus for turkeys gets lost.

    When I build a trapperhut I don't lose the food bonus of turkeys and get a little food bonus, but then I get less food than with a farm. A great farmer doesn't compensate this.

    I would recommend that the bonus for turkeys shouldn't get received by a farm but by a trapperhut. I would also give the expert hunter a bonus for turkeys (because turkeys can't be planted on farms but be hunted in a trapperhut).

    Best regards!
    ederl
     
  12. vetiarvind

    vetiarvind Prince

    Joined:
    Oct 20, 2013
    Messages:
    328
    Location:
    Chennai, South India
    Turkeys are reared in farms, much like many poultry species and farm animals. Farms are not necessarily "fields", it can also be farmsteads with pens and such. Trapper huts I imagine are for wild animals. Turkeys are easy enough to capture and raise without trapping them using snares and traps, so i think it is ok as it is.
     
  13. ederl

    ederl Chieftain

    Joined:
    Mar 2, 2015
    Messages:
    12
    Yes, I can see your point, vetiarvind.
    But now the problem is, that to get a bonus from turkeys, I'm not allowed to cut down wood, otherwise I lose the bonus and building farms cause a cutdown of wood. So with building a farm I get the maximum of food, but then what do I need the resource tukeys for?

    So there are 3 ways to solve the problem:
    1) Turkeys do not lose their bonus when wood is cut down
    2) A farm doesn't cause cut down wood
    3) Give the trapperhut and expert hunters a bonus for turkeys

    Thank you!
     
  14. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    4,447
    Location:
    Stuttgart, Germany
    Actually I thaught that would be the case already.
    If not, that is a very very simple xml change.

    However, development of the base mod has ended and there won't be any further releases.

    Maybe somebody will provide the xml snipplet here.
     
  15. Don Senglar

    Don Senglar Chieftain

    Joined:
    Nov 8, 2010
    Messages:
    76
    I have a problem with Salt production.

    Game version: Religion & Revolution 2.4 (rev 1032 -27.02.15), no changes

    I have a Hill with 3 Salts. Salt Bonus is absent on this tile. There are only three options to build or Monastery, or Fort, or Route.

    NoMine.jpg

    Why I cannot build Mine to produce Salt?

    I don't need a fix. Please, just explain the reason. Thank's.
     
  16. Nightinggale

    Nightinggale Deity Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,130
    Looks to me like you could have some local modifications because I can't trigger this with the released XML files. Anyway the explanation is in XML.

    CIV4ImprovementInfos.xml
    Code:
    <Type>IMPROVEMENT_MINE</Type>
    	<Description>TXT_KEY_IMPROVEMENT_MINE</Description>
    	<Civilopedia>TXT_KEY_IMPROVEMENT_MINE_PEDIA</Civilopedia>
    	<ArtDefineTag>ART_DEF_IMPROVEMENT_MINE</ArtDefineTag>
    	<PrereqNatureYields>
    		<YieldIntegerPair>
    			<YieldType>YIELD_ORE</YieldType>
    			<iValue>1</iValue>
    		</YieldIntegerPair>
    [COLOR="Red"]		<YieldIntegerPair>
    			<YieldType>YIELD_RAW_SALT</YieldType>
    			<iValue>1</iValue>
    		</YieldIntegerPair>[/COLOR]
    	</PrereqNatureYields>
    I think adding the red text should fix it. It will then build if the plot produces either ore or salt. You could argue that it would be correct to add silver as well.
     
  17. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    4,447
    Location:
    Stuttgart, Germany
    This looks like you did modifications of your own.
    On the hill you should have Yield Ore as well.

    Either we have a bug in our last release or you have been lying about "no changes".
    Please be honest about your own changes to the base mod.

    Also, please don't post issues of your private modifications in our thread for "Bugs and Todos".
    Please use our thread for "Feedback and Questions".

    No, it won't.

    That change will make it only worse.
    Because it will then require both Yields (Ore and Salt) to build a mine.
     
  18. Nightinggale

    Nightinggale Deity Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,130
    Are you sure? Looking at CvPlot::canHaveImprovement(), it checks for this setting.
    Code:
    bool bPrereq = false;
    bValid = false;
    for (iI = 0; iI < NUM_YIELD_TYPES && !bValid; ++iI)
    {
    	int iRequired = GC.getImprovementInfo(eImprovement).getPrereqNatureYield(iI);
    	if (iRequired > 0)
    	{
    		bPrereq = true;
    		if (calculateNatureYield(((YieldTypes)iI), eTeam) >= iRequired)
    		{
    			bValid = true;
    		}
    	}
    }
    if (bPrereq && !bValid)
    {
    	return false;
    }
    
    return true;
    Looks to me like it will set bPrereq if it requires one or more yields and bValid if a required yield is present. More interestingly, it has no way of setting bValid to false once the loop starts meaning once just one yield set it to true, it will be true.

    Naturally we can only be completely sure if somebody actually test this. There could be code somewhere else, which rejects the build even if it is ok here.
     
  19. Don Senglar

    Don Senglar Chieftain

    Joined:
    Nov 8, 2010
    Messages:
    76
    I'm afraid you are wrong. I have CIV4ImprovementInfos.xml file

    Size 88,0 KB (90121 bytes)
    Modified 27.02.2015, &#8207;19:44:16

    I downloaded mod Religion & Revolution 2.4 (rev 1032 -27.02.15) only 02.03.2015, &#8207;8:51:24 that is few days later.

    In any case I will redownload Religion & Revolution 2.4 and test Salt production on Mine again.

    No, it doesn't work. I already tested this variant.
     
  20. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    4,447
    Location:
    Stuttgart, Germany
    Quite sure. (99%)
    But I am also wrong sometimes. :)

    The problem is not caused by that file.
    (It is much more likely caused in Yield balancing of the Terrains.)

    Did you modify any XML file in your version ?
    Because you say "no changes" and I don't believe that, sorry.
     

Share This Page