1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Bug Thread

Discussion in 'Civ4 - Final Frontier Plus' started by TC01, May 26, 2010.

  1. Imp. Knoedel

    Imp. Knoedel That's Imperator Knoedel.

    Joined:
    Nov 11, 2011
    Messages:
    7,549
    Location:
    Bergdeutschland
    Playing 1.83, I noticed that the turn after I declared war on someone I get the message "Will Sign Peace Treaty: (my victim, e.g. Raul Colombo or Leonard Pritchard)" and that they will trade this and that, while in reality they still refuse to talk. I don't remember if that was the case in earlier versions too, but I'm noticing it now because half the galaxy apparently feels entitled to build Starbases and settle systems in areas that clearly fall under New Earth jurisdiction, and Senior Alvarez doesn't take lightly to thieves.

    When cities suddenly get plunged into unhappiness they have -1 assigned population.
     
  2. God-Emperor

    God-Emperor Chieftain

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    This is a BUG issue. Specifically, it is because FFP only adds BUG, not BULL. The basic function in the DLL for this, CvPlayerAI::AI_isWillingToTalk, is not available to the Python unless the DLL is adjusted (which it is in BULL). Without access to this, it only checks to see if the AI is theoretically willing to talk to you based on their attitude not if there is any specific thing that makes them refuse (like just having declared war more recently than that leader's setting for how long to not talk, give or take some possible modifiers). In theory the Civ4lerts Python could track when wars are declared and do the same calculations as the DLL, but it doesn't.

    And yes, they do put starbases and settle star systems wherever they want without regard to any sort of "apparent territorial jurisdiction" other than actual cultural boundaries. Distance from their capital is a factor in the evaluations, but it is only a small factor and a good location is a good location even if it is next to you and not them...

    This ought to be automatically cleared up at the end of the turn via a full population reassignment if you do not correct it yourself during your turn. This "gone negative" fix was added back in 1.81, according to the comment in the updateHumanCityTurn function in FinalFrontierEvents.py.

    Note that this reassignment is a full redistribution of all the population using the AI's priorities and may not give you the distribution you really want. If, for example, you had moved population from food producing planets to commerce planets (because the city was near it's happy cap and didn't need to grow in population any time soon, and you needed extra commerce more than extra production) you may not end up with it like that - the AI might give you more food per turn than you want in a situation like this and it might pick a production focus instead of a commerce focus since that is usually its priority.
     
  3. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    If we want to fix this, it'd be trivial to export AI_isWillingToTalk without actually going through the messy process of merging BULL- I could take care of that.

    Although... would we want to merge BULL if we could? It'd be much more difficult (I think the reason you didn't merge it when you did the BUG merge was because we already had a custom DLL, right?), but it'd be something I could work on over the next month or so (well, more accurately, the next few months or so, but still).
     
  4. Imp. Knoedel

    Imp. Knoedel That's Imperator Knoedel.

    Joined:
    Nov 11, 2011
    Messages:
    7,549
    Location:
    Bergdeutschland
    So what you are saying is you guys are still continuing to improve this mod. :mischief:
    Now this might sound nitpicky, but when you enter a new era you still only get the same pop-ups as in the base game, which seems a tad anachronistic. Maybe you could get some new designs from somewhere.
     
  5. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    Well. Maybe. :mischief:

    I'd at least like to keep fixing bugs, or at least keep releasing patches with bugfixes in them. Maybe do some more of the modcomp merging that I promised to do a while back, when I have the time.

    Not promising any major new changes or updates, but I'll definitely still be around in some capacity.

    As for the art, I noticed that earlier, actually, when doing a test in 1.83, and wondered about it. I feel like Star Trek had different pop-ups, but I might not be remembering properly. But either way, it would be something to replace: if anyone has suggestions, feel free to suggest them.
     
  6. PsiCorps

    PsiCorps FF: Babylon 5 mod team

    Joined:
    Dec 30, 2007
    Messages:
    1,410
    Location:
    Britain
    Hi TC01 & God-Emperor
    I was fairly certain I'd had this error message before and that I'd already posted about and received info on how to fix it. My searching has proved futile so here is a new error message I have been getting.
    Error Messages.JPG
    I haven't been able to trace it back to a root cause as it involves CvAI and I don't know what I am doing with that. It does refer to BUG but the files it refers to in Python don't lead me anywhere.
    I get the error message when the AI is doing its turn....6 messages per Civ with at least 1 Civ a turn causing it. I have tried increasing building costs to prevent getting the message but all that does is delay the turn it starts.
    Any ideas on how to fix this?
     
  7. God-Emperor

    God-Emperor Chieftain

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    The question is, what is line 1134 in the CvAI.py file?

    In V3.0 of B5 is was "if ( pPlayer.canTrain( iSquadronQUnit, true, false) ) :".

    If it still is, I am guessing that the value of iSquadronQUnit is -1, most likely, due to either UNITCLASS_SQUADRON_Q not being a valid unit class in the mod anymore or one or more civilization being set to have NONE as a UU for that unit class.

    If that is not what that line is anymore, then I need to see what it is (and a few lines around it, at least).
     
  8. PsiCorps

    PsiCorps FF: Babylon 5 mod team

    Joined:
    Dec 30, 2007
    Messages:
    1,410
    Location:
    Britain
    I've not made any changes to the Q Squadrons but now that you have mentioned this I realised I have not set the Q Squadron as a UU for anyone. Which, in theory, should mean that everyone can build them if they have the correct techs. That said it has definitely given me something to look into tonight when I get home.

    Problem solved Q Squadrons commented out of the CvAI. No further error messages.
     
  9. DarkLunaPhantom

    DarkLunaPhantom Chieftain

    Joined:
    Feb 4, 2013
    Messages:
    273
    I ran an AI autoplay game until one AI won. I witnessed these issues:

    -AI influence slider
    I noticed that most of the AIs had all sliders on 0% (science, influence and espionage) after researching all techs. The problem is that a few AIs had 0% spending for 20-40 turns but if they had maxed out their influence slider they would've won in 5-20 turns. Spending credits on influence (especially when victory is just a few turns away) is always better than amassing 200.000+ credits for nothing so I would consider this a bug.

    -Victory info screen
    In influence victory (both player's and best rival's) list of highest influence star systems does not take in consideration that influence victory can be won by teams.
     
  10. Imp. Knoedel

    Imp. Knoedel That's Imperator Knoedel.

    Joined:
    Nov 11, 2011
    Messages:
    7,549
    Location:
    Bergdeutschland
    If a faction I have closed borders with builds a Starbase and one of my units is in its influence it does not get expelled, meaning it can't move anywhere whatsoever without declaring war on the faction.
     
  11. God-Emperor

    God-Emperor Chieftain

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    I have noticed this before. I wasn't sure if it was ever fixed or not. So apparently not...

    The fix for this should be pretty easy. I think all it takes is to change one line in FinalFrontierEvents.py, line 445, from this:
    Code:
    						pLoopPlot.setOwnerNoUnitCheck(iPlayer)
    to this:
    Code:
    						pLoopPlot.setOwner(iPlayer)
    With that change it should boot ships that belong to someone else with whom the starbase owner does not have an open borders agreement, and is not at war, out of the plot, putting it on a plot that is valid for it to be on. That plot it is now might become invalid as the starbase ownership loops over the plots, which will keep pushing it around until it is eventually outside the area. The only issue with this that I can think of is that it could move the ship multiple plots, over past the other side of the new base from where it started since the loop over the plots does not start with the one the base is on, it does a square area starting at one of the corners.

    This will add a tiny amount of processing time for each plot owned by each starbase each turn, but the total should be insignificant even added up over a full game.
     
  12. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    That's strange, I wonder why it was written like that?

    I see you haven't pushed this fix to the repository- I've just done it.
     
  13. God-Emperor

    God-Emperor Chieftain

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    Don't know why it was done like that, but the reason I didn't send it in is that I have not actually tested the change to make sure that it doesn't cause any other problems... I don't think it will, but without testing I'm not sure.
     
  14. Publicola

    Publicola Chieftain

    Joined:
    Apr 26, 2014
    Messages:
    307
    I've been playing Civ IV for a while, but I've mostly stuck with Rhye and derivative mods based on him. I decided to try out Final Frontier Plus, downloaded it, and started playing no problem. However, when I clicked on the 'bug-face' button and clicked various tabs to make changes, I get an error message. Technically, I get about a dozen, and they clog up my screen so effectively I'm unable to see what I'm doing or play further without closing the entire game and restarting.

    The error reads:

    "Bug Options - failed writing INI file **address of BUG Main Interface.ini ** "

    You can see what I mean via the attached screenshot.

    I went over the procedures at the front of this forum, checked and edited the _Civ4Config file, made sure everything was in its most recent version and patch, etc. I'm guessing the error lies in the BUG features, but I got nothing. Was I supposed to download and install the BUG 4.4 mod separately before installing FFP, or was BUG included in the FFP installer (as I suspect)?

    EDIT: I also checked out the BUG Main Interface file itself, but I couldn't tell if anything were amiss. I'd have a hard time believing things could be amiss, since it was unchanged after the original install. If you want me to cut/paste the text of that file here, I can do so, but let me know.

    Any help would be appreciated.
     

    Attached Files:

  15. God-Emperor

    God-Emperor Chieftain

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    You have most likely installed Civ in the default location (under "Program Files", or "Program Files (x86)"). That location does not like to let "random programs" directly modify files, so it blocks that unless you run the program as administrator ("it" is actually called "UAC", which stands for User Account Control). It is not good enough to have your account set to be in the administrator group - this particular thing doesn't check the groups, so you have to run the program as administrator.

    If you are launching from a shortcut you can set the shortcut to run as administrator via right-clicking it and going to Properties (the exact wording and location of the option depends on the version of windows - they just love to change these things). Alternatively, you should also be able to set the BtS program itself (Civ4BeyondSword.exe) to always do this. A good fix is to install the game in some other location, like creating a top level folder called "games" an installing there, but this requires reinstalling and might be difficult if you have Civ4 via Steam as it would require reinstalling all of Steam and all your games from it (as far as I know, and assuming it is actually possible to put that somewhere else).
     
  16. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    So I've been performing an experiment, in my spare time, attempting to migrate the CvPlanet and CvSolarSystem (or CvSystem as it's currently called) classes to C++.

    Something that's just come up...

    The Python addPlanet() method never checks to make sure you're not trying to add a planet to an orbit ring that's already occupied.

    Code is all written to assume that there will only ever be one planet in an orbit ring, and indeed, createSystem steps through all possible orbit rings and decides whether or not to make a planet or not.

    But, if you open the Python console in-game and run:

    Code:
    import CvSolarSystem
    system = CvSolarSystem.getSystemAt(x, y)
    system.addPlanet(2, 3, {ORBIT}, True, True)
    system.updateDisplay()
    
    Where "ORBIT" is some number from 1 to 8 that already has a planet... as long as there aren't already 8 planets in the system, you'll see some graphical weirdness as the planet you just added replaces the one that was already there.

    This would be fine if it replaced the planet that was already there, but it doesn't; they both take up two slots in the planets array.

    This is never an issue in practice because no code just lets planets be spontaneously created- at least in vanilla Final Frontier (Plus). (Though now that I've found the bug, I'm half-tempted to make some kind of scenario/modmod that involves the creation of planets...)

    I'll push a fix for this, but I figured I'd take the excuse to post here and confirm to anyone who happens to read this thread that I'm still around, more or less. (Well, emphasis on less, but...)
     
  17. DarkhorseNine

    DarkhorseNine Chieftain

    Joined:
    Jul 24, 2014
    Messages:
    2
    I'm having this exact problem - the annoying wall of text in the messages area.

    I also have a different problem. I'm not a coder. I'm just a schnook. I can install a game and play it, but as for all this file moving and bug finding and what-not, I'm totally in the dark. I'm good at following concise, step-by-step instructions of how to fix it, like reading a walkthrough of how to fix it, or else I'm not finding it. I'd really like to enjoy this mod without the annoying wall of text.

    I'm in Windows 8. I'm pretty sure I'm on the Admin account, it's the only account I set up for the computer. I've tried everything I've read here that I could follow with no luck. Would it be easier to just turn off Bug Mod? And if so, how?
     
  18. God-Emperor

    God-Emperor Chieftain

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    Run the game as administrator. It isn't the same as just being an admin (by being in the Administrator group), you have to specifically activate it. This is a security measure Microsoft added back in Vista to make it harder for things to tamper with software installed in the default locations. You can avoid it by not installing to the default location, but into a folder you make called Games, or whatever - but this won't work if you are using the Steam version and it iwould require re-installing.

    I have no idea if the way to do it is identical in Windows 8 to the way in 7, but it should be similar. In W7, and maybe W8, it can be done by right clicking the Civ4BeyondSword.exe file (wherever it is installed for you), picking Properties, and going to the Compatibility tab and selecting the option to run the program as administrator. If you have a shortcut set up to directly launch the mod you should be able to have the shortcut do the same thing (probably not necessary if the .exe is set to do this) from the options you get with the Advanced button on the Shortcut tab of the Properties dialog for the shortcut.
     
  19. DarkhorseNine

    DarkhorseNine Chieftain

    Joined:
    Jul 24, 2014
    Messages:
    2
    Okay thanks, that solution worked. Annoying wall of text gone... but now the game is crashing. I'm a good number of turns into it too, but it crashed, and when I loaded my saved game it just won't work - it loads, but then the game crashes immediately when I do anything. No error message or anything, just 'poof, begone' and Windows asking me if I want to look for a solution online. >.<

    I haven't tried playing normal Civ 4 without the FFP mod, should I do that and see if it crashes too to see if it's just FFP?
     
  20. God-Emperor

    God-Emperor Chieftain

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    That could be a good test.

    It is possible that you have hit some bug that still exists in FFP. Bug free code is nearly impossible, so there are probably some still in there. Other people are not reporting crashes, so if there is one it would only crash in some rather specific cases.

    I think I should ask this: What version of FFP are you using? The current version is 1.83. In various old versions there have been bugs that could crash the game. One such bug that comes to mind is that it used to crash if a black hole was too close to the edge of the map. Any time a ship got too close to that black hole the game would crash. I think there was also a potential crash related to the inhabited planets. So if you are using an old version there could easily be bugs that have been fixed since that version.
     

Share This Page