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

Bug Reports

Discussion in 'Civ4Col - Medieval: Conquests' started by Kailric, Aug 4, 2013.

  1. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,675
    Location:
    UK
    Remember to use the font file editor, makes rearranging fonts....less painful.
    This was what happened to my yields in WHM, the font images were 'misaligned' for some reason that i never got to the bottom of.
     
  2. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,117
    I remember wanting to make icons aware of their own ID, hence allowing you to insert a single icon into the row without moving everything. I can't remember if I ended up getting it to work though.

    I noticed something else regarding yields and bonus graphics. \Assets\Art\interface\symbols\resource_icons_64 ea.dds appears to be inside an FPK file. That's stupid as it is likely to be modified somewhat frequently.
    (I would still argue that putting FPK files in git is a bad move...)
     
  3. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    I thought that was the way it was, but that must have been the file you mentioned below

    Well, I don't think there was actually any intelligence used, stupid or not, when it was packed with all the other files. No one thought about it, but all you have to do is uppack it and then it takes precedence when next it loads.

    In fact I'll place it there after posting this so there won't be any issues.
     
  4. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    I was moving from the game to my other screens and somehow started some kind of python debug... anyway it kept flashing on the screen something about buildingUpdateThreshold, I looked it up and found this...
    self.buildingUpdateThreshold = gc.getDefineINT("BuildingUpdateInterval")

    As far as I can tell there is no BuildingUpdateInterval in the DefinedInt.
     
  5. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,117
    That's awesome. I never managed to get the python debugger to work. Can do it consistently?

    No there aren't. It's a small feature I added, which can be enabled in GlobalDefineALT. If you set it to a non-zero value, every nth update (or second?), it will force reading the building XML and redraw the screen. I added this when I moved building placement to XML. The goal is to make a live update for changing building placement.

    I didn't think it would cause problems to not have this variable. Just add it and set it to 0.
     
  6. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Heh, if I can remember what I did, doubt it though. My screen was froze and I was clicking places and pressing different things, next thing I know that was happening.

    I don't know if it was causing problems but it kept flashing on the screen.
     
  7. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,117
    Debugging scenarios I noticed that some players lack start locations. It's bad for regular gameplay, but it's far worse for scenarios where it can crash the game.

    I wonder if we should do the "easy" solution and just kill the players that we do not have room for. Not ideal, but if the player fails checks on isAlive() and hasEverBeenAlive() (or whatever they are called), the game will completely ignore them and that will increase stability.

    The real solution would be to make room for everybody, but I don't think that will happen anytime soon and I want to have a stable game at all time even if it mean "cheating".
     
  8. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Does this happen during game setup or after, or just during scenarios?

    All players should have a starting location. As far I have ever experienced, if a player fails to receive a starting location the game FAsserts and will then crash. Without a starting location players can not be placed on the map. I don't know any reason why players would lose a starting location either, after being assigned one. Not saying there isn't one, but I don't know why.

    There may have been an issue with finding a starting plot for the Barbarian Player after all other starting plots had been assigned, but I added code to simplify the Barbarian start plot.

    But yeah, if this is an issue then killing off players that can't be added to a random map would be a viable solution. It would mean one less player than the XML specified but that's the draw back to randomness.
     
  9. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,117
    I have created a few scenarios using tiny maps. I have yet to make one where all players have a starting location. Maybe it has to do with number of players vs map size.

    I had an alternative idea. If a player can't get a starting location, remove start plot from all players using random location and start over. After two failed attempts, try placing backwards (some civs might be more picky). If that still fails, reduce minimum distance by one and start over.

    Eventually it should be able to fit all players using that approach. The question is how densely packed they will be.
     
  10. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Ok, I see one issue, I only changed the settings on one WorldInfo for player counts, that is Large Maps. So, I adjusted the player counts to allow for the addition of the Pope. I remember reversing the order of assigning something, but it doesn't look like starting plots.

    Naturally if you set to many Players per world size it will not be able to fit them all. We should consider the best approach here. Thinking about it, since we have placed several starting players on Land, as apposed to the wide open ocean we should perhaps increase Map sizes by a percent. We could also modify this in the game based on the number of extra Land Start players, by adding an attribute, iLandStartModifier. World Maps could stand to be larger, even Large Maps I've been testing seem a bit to small.

    I pushed some player count adjusted changes to develop.

    Edit: We could also modify the Player Count based on how many Additoinal Players we plan to add.
     
  11. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,675
    Location:
    UK
    Yeah, the original Col maps were only designed for 4? Players?

    All of whom start on the ocean, so size may be an issue.
     
  12. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    I increased the maps by 19% and adjusted the Player counts to account for the Popes, pushed those changes to develop. I start a tiny map and it loaded just fine, didn't try more than once, but I bet it will work out much better now.
     
  13. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    :wallbash:

    I just spent way to much time trying to figure out a bug in the CivicsScreen when I finally realized what happened, my screen resolution changed and made it so I couldn't see the Exit button. So, yeah we need to make sure all screens can adapt to the Player's resolution.
     
  14. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,117
    :lol:

    I think I said something like that not long ago. I said the exit button was drawn outside the screen and I had to press escape. I use fullscreen when I play for real, but testing and debugging is in window mode. Interestingly window mode does provide lots of odd screen options and we should make all windows look good in all of them. DA is recoded to be really "stretchy" and looks great (or at least as intended) on any resolution. It's actually not that hard to do.
     
  15. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Exactly, that's why I said "yeah we need" as I was agreeing with you 100%. I tried to put up a ticket on sourceforge but they are currently down.
     
  16. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,117
    They have a major problem. I encountered problems 6 hours ago and it took out git and the browser based login.

    Well at least git can commit offline and push when the server is back up. In fact we can do everything in git apart from push/pull to the missing server. Svn relies heavily on the server and can't even view the log while being offline. That's the major reason why I picked git in the first place even though people are more used to svn.
     
  17. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    I have attempted a fix of acquired cities not having a Plotgroup. The plotgroup was only updated if the plot wasn't previously visible, so I changed it so it is updated regardless of previous visibility.

    Also, I have attempted to adjust the AI's handicap of placing units in professions with missing multi yields. The AI Profession value will check all inputs and return the lowest value.
     
  18. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Well, my game was stuck with a bugged Delayed Response so I took a bit of time to attempt to figure this one out. Now sure if I did as they bug went away on its own in my saving and reloading, but I forced some Diplomacy Events and produced the FAssertMsg(ePlayer < MAX_PLAYERS, "Player is not assigned a valid value"); that kept accuring during my play sessions. This code either came from python or the exe as there was no stack code with it.

    I studied the code you added Night and so I added this code to the getPlayer funciton...
    Code:
    static CvPlayerAI& getPlayer(PlayerTypes ePlayer)
      {
    	 
    		int iPlayer = ePlayer;
    		if (iPlayer > DELAYED_RESPONSE_BITS_NEGATIVE_OFFSET)
    		{
    			//bRemove = iData1 | DELAYED_RESPONSE_BITS_FROM_QUEUE;
    			iPlayer &= ~DELAYED_RESPONSE_BITS_FROM_QUEUE;
    			if (iPlayer & DELAYED_RESPONSE_BITS_IS_NEGATIVE)
    			{
    				iPlayer &= ~DELAYED_RESPONSE_BITS_IS_NEGATIVE;
    				iPlayer -= DELAYED_RESPONSE_BITS_NEGATIVE_OFFSET;
    			}
    			ePlayer = (PlayerTypes)iPlayer;
    		}
    		
    	  FAssertMsg(ePlayer >= 0, "Player is not assigned a valid value");
    	  FAssertMsg(ePlayer < MAX_PLAYERS, "Player is not assigned a valid value");
    	  return m_aPlayers[ePlayer];
      }
    This seemed to fixed the Failed assert I was getting, now if it fixed the locked up Delayed Response bug, I do not know.

    What was happening it seems was that Python or the exe was doing a getData() of the Diplomacy infos and which was returning the value of DELAYED_RESPONSE_BITS_FROM_QUEUE thus casing the FAssert.

    My question is, how is it that when the python is called to build a Diplomacy screen it built it correctly. Like the Diplomacy to join a war would send the Python a BestTeam value stored in getData(), but you changed the getData value to DELAYED_RESPONSE_BITS_FROM_QUEUE, so how does it use the correct value that time and not up where it does a getPlayer()? And also, it is using a getPlayer function when the value sent is a TeamType. Although it works still because the value of the PlayerType and TeamType are the same in this instance.

    Also, all but one of the times that the Delayed Response assigns a value to getData it uses Teamtype, the one other time it uses a city ID, but I checked this and it seems to work fine.
     
  19. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Ok, I encountered the Delayed Response bug once again. This time Rollo was trying to offer me a Peace Treaty but the offer never would appear. I did some extensive testing.

    1. I checked the saved Diplomacy and all seem to be in order, the Diplomacy is pull from the saved Responses and sent to start diplomacy, but it never displays.

    2. I added a check to see if the Python Diplomacy screen was being called, it wasn't so it is being stopped somewhere after the beginDiplomacy is started

    3. After beginDiplomacy is called the dll does a checks for "canContact" also for "canTradeItem", then something else must be being checked that returns a false. Is there a way we can see all the functions that are being called to see which one is returning false?

    4. I edited the code to change the tradingwith from Rollo to Arpad and the Diplomacy screen loaded for Peace Talks just fine. It appears that something is preventing Rollo specifically from being able to contact the player.

    5. I added checks for other Diplomacy types with Rollo and other players. Those wold load. I even made Rollo ask for Help when I am at War with him. I just couldn't get Rollo to Offer Peace again.

    6. When the Delayed Response is first saved there is two functions that could be interfering with this, the AI_setContactTimer will, for example, set the timer for Peace Offers so that the AI doesn't attempt to do this again anytime soon. Also, there is a pDiplo->setAIContact(true); that is set, not sure what this variable does. I did checks to see if AI_getContactTimer was being called, but it wasn't during the Cycling of responses. And getAIContact() isn't used in Python or the DLL.

    Conclusions: The Exe is clearing doing something with Diplomacy, the question is will we be able to figure out what it is and will we be able to get passed this. Sometime the Delayed Responses work correctly, then at some point they stop. So, we can figure when they stop working correctly.

    I'll do some more testing on another day, to much time on this today already.

    Edit: Make a note that Rollo never contacted me at all, the Icon for Delayed Response just appeared. It was a single Delayed Response that turn.
     
  20. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,117
    If I had the savegame, I would start debugging from that point and then simply step through the lines to see where it stops.

    Kailric -> :ar15: <- Kailric

    Looks like Rollo really figured out this war strategy thing :lol:
     

Share This Page