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

impossible reinforcements for spain

Discussion in 'Bugs and Crashes' started by Parsec, Dec 4, 2015.

  1. Parsec

    Parsec Chieftain

    Joined:
    Dec 4, 2015
    Messages:
    24
    hi guys

    i registered to post you a crashing savegame. loading works normal with this savegame but if you try to go to the next round the game will stuck....

    reason for this is some spanish atlantist which is crying for reinforcement... again and again (at least regarding the BBAI-log). I deleted them to play on :)

    maybe this will help you to improve this mod, which is realy awesome imho.
     
  2. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,428
    Gender:
    Male
    Location:
    Las Vegas
    Is this happening on the current SVN version? A major delay has just been debugged... may be the same thing.
     
  3. Parsec

    Parsec Chieftain

    Joined:
    Dec 4, 2015
    Messages:
    24
    Cavemen2Cosmos V36 BtS 3.19

    so should be latest version (download around 2 weeks ago)
     
  4. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,428
    Gender:
    Male
    Location:
    Las Vegas
    I'm quite happy to take a look here tomorrow. I'm also hoping that it's already been solved on the latest SVN. It might be. But I'll take a look anyhow and let you know what I find.
     
  5. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,552
    Gender:
    Male
    Location:
    MN
    ty very much, and Welcome to CFC and trying Caveman2Cosmos . . . SO
     
  6. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,428
    Gender:
    Male
    Location:
    Las Vegas
    I'm looking into this and it looks like I'll be stuck on this problem for a while here. It's still a valid problem on the current SVN version. Looks like a unit joins an attack stack, then the stack offloads the unit then when it checks if units need updating, the same unit comes up again, joins the stack again, causing the stack head unit to update again and it again offloads the unit. Rinse and repeat indefinitely.

    What I'm struggling to find is where the unit gets offloaded. Once I find that I may be able to solve this.
     
  7. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,428
    Gender:
    Male
    Location:
    Las Vegas
    UPDATE:
    Ok, I've found the solution here. When a unit in the city attack stack was being offloaded to go defend the city because the city apparently needed the defense, it wasn't changing the AI type of the unit. The stack would later call for a loose city attack unit that may wish to join in their building stack effort and the unit just offloaded would answer the call when it came time to update it's decisionmaking after it had been offloaded.

    Telling the unit it was supposed to be a city defense unit now was the primary trick involved in fixing the loop. It then hit another infinite loop I was able to resolve by giving a proper boolean response where it needed one.

    Complex. Horrifying. The City Attack AI is... imo a mess. But it's a mess that's grown out of the hundreds of considerations that city attack AI needs to make. At some point it needs restructured but it's going to be either very tricky to do or would be best to do from the ground up. I'm thinking of chipping away at the latter option eventually.


    At the moment I gotta go out for a bit but I'll commit with the fix as soon as I can. To get the repair, you'll need to start working with a current SVN version once committed.
     
  8. Parsec

    Parsec Chieftain

    Joined:
    Dec 4, 2015
    Messages:
    24
    okay.. i admit.. i cannot follow your thoughts.. :confused:
    what i get is, that someone need to go to a mud-bath (called AttackAI) and need to clean up there :)

    i will be excited to test the next mod-version :)
     
  9. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,428
    Gender:
    Male
    Location:
    Las Vegas
    Just get the SVN. The fix is already there. Loading an SVN copy is quite easy and keeps you up to date with the development.
     
  10. Parsec

    Parsec Chieftain

    Joined:
    Dec 4, 2015
    Messages:
    24
    Hi guys

    same situation again. the game stuck on the change to the next round again...

    unfortunaly this time it seam nothing todo with the BBAI.. the log is "empty"... last action was from one of the ai.. but the time the last action was done is already past away...


    edit: last svn
     
  11. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,428
    Gender:
    Male
    Location:
    Las Vegas
    Ok. Will look into it soon. I'm in the middle of some stuff here but I'll be soon freed up.
     
  12. Parsec

    Parsec Chieftain

    Joined:
    Dec 4, 2015
    Messages:
    24
    thx

    take your time.. the 32c3 is interesting too :)
     
  13. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,428
    Gender:
    Male
    Location:
    Las Vegas
    I'm on the case with this one. Looks like it'll be a little complex but I'm sure I'll be able to get to the bottom of it by the end of the week.
     
  14. Parsec

    Parsec Chieftain

    Joined:
    Dec 4, 2015
    Messages:
    24
    thx...

    if this is not service.... even between the years :)
     
  15. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,428
    Gender:
    Male
    Location:
    Las Vegas
    Resolved. Enjoy! (Actually... thanks for finding this. It wasn't easy to sort out but very rewarding in terms of improving turn times, not just for solving the infinite loop.)
     
  16. Parsec

    Parsec Chieftain

    Joined:
    Dec 4, 2015
    Messages:
    24
    i have to thank you...

    btw is there a way i can find such a reason by myself?
    btw what was the reason?
     
  17. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,428
    Gender:
    Male
    Location:
    Las Vegas
    I had used a function I really didn't mean to use that was very similarly named to the one I was after. I never got fully to the bottom of it but the function I used shouldn't have been called in the way I was calling it and the loop was somehow caused there. Was deep in the AI code. I'd have to explain nearly everything I know to explain how to fix this and that's a few years of learning it took me to get this depth of a fix.

    It helped that it was in my own programming and I could spot the problematic behavior and its culprit without having to dig all the way down to exactly what was causing the loop.
     

Share This Page