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

ExtraModMod

Discussion in 'More Naval AI Modmod' started by Terkhen, Jan 19, 2013.

  1. scutarii

    scutarii King

    Joined:
    Jun 10, 2008
    Messages:
    746
    culture reduction but not flipping( for "final push" you need "true culture" ) gets my vote too, speaking of loki

    Mutation from loki makes freaks obsolete, we need better "compensation"( for losing city conversion ability).
     
  2. Sarmatian

    Sarmatian Chieftain

    Joined:
    Sep 30, 2008
    Messages:
    56
    It depends on two factors mostly. First is the map, second is opponents.

    Pangeas tend to be compact, so when Balseraph inevitably overextend (have a lot of poorly defended or undefended cities) there is usually someone close enough there to take advantage of that. If that someone is an aggressive leader who likes to go to war early (Charadon), Balseraph are in a bad position.

    The best position for Balseraph to thrive is similar to the one I posted. Two close non-creative leaders, and the rest are too far away or too passive to take advantage (Amurites, the closest, are still quite far and not aggressive enough to do anything that early). Lanun and Clan aren't strong enough because they can't build an army with a single city. If AI it least understood how to deal with Loki, they could have built troops instead of settlers, which are just wasted hammers if you're that close to Balseraph.

    But, I do agree with you. Balseraph can also end up being crushed because they took over too many cities.

    For both reasons, a change is indeed needed.


    Unfortunately, I didn't. I just tried another game without Calabim because the crash to desktop was caused by something related to vampire promotion.

    I've had a few errors, but I managed to keep on playing after clicking ignore. The game ended relatively early because Balseraph achieved a domination victory.

    I'll later today or tomorrow to do a clean install, delete everything in My Documents/BTS folder also and reinstall everything, and see if it fixes the issue.

    This is the best solution so far.

    I already mentioned my idea of giving Loki the Hero promotion and giving him access to Loki only promotions (and just those, no combat or anything like that). Those promotions should be like combat promotions - ie you can only take Combat 2 if you have already taken Combat 1, and have the ability to take over cities be the last available promotion. During that time, other civs can build a few core cities with some culture and some army so they can deal with both losing a city and going to war. Loki also couldn't take too many cities and bankrupt Balseraph or invite war.
     
  3. Qgqqqqq

    Qgqqqqq Emperor

    Joined:
    Aug 13, 2012
    Messages:
    1,073
    Mutation on Loki is a very silly idea, and destroys the point of Chaos Mana, freaks, etc. and massively overpowers him as a unit. Importantly, it would change his equation towards staying at home and away from the far exploring, which is currently reasonably balanced.
     
  4. Terkhen

    Terkhen King

    Joined:
    Aug 1, 2011
    Messages:
    911
    Gender:
    Male
    Location:
    Granada
    The influence mechanic sounds too complicated to me, and it would be complicated to make the AI understand it. I also don't know how to quantify it. It would also remove the culture alteration shenanigans, which is IMO something that Loki should keep in some way.

    I agree with Qgqqqqq on why Loki should not get mutation. Creating temporary buildings would need extensive DLL changes and I don't think it would be worth the coding effort for just this ability. I agree on Disrupt never adding other types of culture and just reducing the owner's culture (which is how it currently works). Since Disrupt never adds Balseraph culture, city flipping is actually hardcoded in the spell. The city is stolen whenever the owner's culture is 0 when this spell finishes. I do like the idea of reducing new culture, I'll elaborate at the end of this post.

    I prefer to just remove taking over cities automatically from the equation altogether. I think that delaying the taking cities ability will just reduce how severe the problem is, but it won't remove it.

    After giving this issue some thought, I think that just reducing culture by a constant value may not be the best option. If the value chosen is too big, Disrupt will be too dominant in the early game. If it is too small, the ability will devalue to nothingness in the late game. Reducing existing culture by a percentage may make the ability overpowered. I like the part of Tasunke's idea about reducing the amount of culture that the city gets, but I'd prefer a simpler mechanic. Therefore I propose to turn Disrupt into a way to nearly negate culture growth in the target city:

    • Disrupt reduces culture by 80% of the value that the city is currently generating. If this value is smaller than 3, 3 would be used instead. These values are just what I consider interesting for the ability to work, but they could certainly be tweaked.
    • Disrupt no longer can make cities flip automatically. The city can still flip by other causes.
    • Currently, Loki AI gives a value to all known enemy cities, valuing how much gold it would get by Entertain, if it needs gold badly and if there is any city with 0 culture (these get a very high value). This value is scaled down depending on how far the city is. The Disrupt part of the calculation would be modified to giving greater value to enemy cities adjacent to Balseraph territory, and a huge value to enemy cities nearing Legendary culture owned by players who have at least two cities at this level.

    This proposal for Disrupt allows three strategies: take over enemy cities with poor culture production (Monument or less) as long as there is a Balseraph city very close creating a lot of culture, helping Balseraph frontiers grow by negating the culture of nearby enemy cities, and to delay enemy cultural victories. By modifying how the AI chooses city targets for Loki in the way I described, it would automatically use these three strategies when possible (and if it is not giving Entertain a higher priority). Since these strategies are in my opinion quite useful, I don't consider this proposal a great nerf and therefore Loki would need no additional changes.
     
  5. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    813
    I really like the idea that Loki helps culture-flipping cities.

    Well, there are some spells that create a temporary beneficial building, so it works at least for your own cities.
    It that worked, you'd only have to cast the spell once; and the whole -80% culture business would be a lot more elegant. The only thing to do in python would be probably the gold you gain every turn.

    Besides, the problems with lairs should be fixed now (a stupid little bug was preventing especially barrows to spawn), thanks to everybody who reported!
     
  6. Terkhen

    Terkhen King

    Joined:
    Aug 1, 2011
    Messages:
    911
    Gender:
    Male
    Location:
    Granada
    Entertain is the spell that grants gold (stealing it from the owner of the city), while Disrupt reduces culture and causes anger. If Disrupt were changed to a building, that would allow to steal gold and remove culture at the same time. Therefore, with "temporary buildings" I assumed that the proposal what about making the building either last X turns (as part of the spell effect) or be removed when Loki casts an spell other than Disrupt.

    Awesome, thank you! I think that it would be a good idea to release a new beta soon now that this is fixed, because right now Wilderness cannot be tested completely. beta3 would come later with a few more goodies and bugfixes. Since my new development environment already arrived, I'm going to run a few hours of automated multiplayer games hoping to find those mysterious OOS errors and fix them for beta2 too. Expect a new release this weekend or next week.

    lfgr: Once that the bugfixes are done I'm going to continue with many of the new proposed items and contribute them in time for inclusion in beta3. I'm choosing this because it is one of the most noticeable missing features, and also one less likely to break stuff. Let me know if you think that I should focus on something else.
     
  7. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    813
    All right, so the existing mechanic would allow Loki to cast Entertain IIRC. Scratch that then.
    I think releasing soon is a good idea. I have to test two small things already coded, then I'll look into the bugtracker for the next issue to tackle. I'm fine with you doing the equipment, as you said it's not very bug-prone and I think the lairs really deserve some additional attention. You'll have to add the new equipment to the lair result list in python; contact me if you have any problems with that (and if you have any comments on the system :) ).

    EDIT: The 100% spread chance for disciples change (CvEventManager.py, onTechAcquired) causes the game to crash when Hyborem is summoned. The free missionary is initialized with garbage since Hyborem has no capital:
    Code:
    newUnit = pPlayer.initUnit(iUnit, pPlayer.getCapitalCity().getX(), pPlayer.getCapitalCity().getY(), UnitAITypes.UNITAI_MISSIONARY, DirectionTypes.DIRECTION_SOUTH)
    
     
  8. Sarmatian

    Sarmatian Chieftain

    Joined:
    Sep 30, 2008
    Messages:
    56
    Hmm. Even though I've been the most vocal proponent of nerfing Loki for the last several weeks, I think this is too much.

    We need to consider when it will be useful - the targeted city would need to be inside Balseraph cultural influence and not have a significant amount of culture already. This means in practice that only cities built very close to Balseraph developed cities can be converted.

    In the meantime, it forces Balseraph to keep Loki in one place to stop the targeted city from generating a significant amount of culture in order to have it flip later.

    It would be inefficient in stopping players from achieving Cultural victory, for two reasons:

    1) In multi, cultural victories rarely happen. You need to have military muscle to enforce it, because if you don't, other players will declare war on you. If you do have the military muscle, it's easier and simpler to go for conquest/domination. From my experience and what I've been tracking online, 90+% of victories in multi are conquest/dominations.

    Cultural victories are rarities, and they happen mostly when a player can easily achieve a conquest/domination victory but has such a dominant position that he can go for other types of victory.

    2) In single, I've yet to see AI achieve, or even get anywhere close to, a cultural victory. It's rare even in vanilla Civ, let alone in FFH where means of generating culture are much more limited and demand a strategy from the beginning and an optimal combination of civics and wonders.

    And, even if happens once in a blue moon, it can easily be neutralized by declaring war on Balseraph.

    I'm afraid that with these changes, we'll rarely if ever see Loki flip a city to Balseraph. I don't mind that, but we need to give Loki something more substantial then a near useless ability to postpone cultural victory.

    In regards to my issues, I'm still having them. Uninstalled everything, deleted everything that's left manually, both from Program Files and My Documents, installed everything again and I'm still having issues. Granted I haven't had a total freeze yet, but I'm getting this error quite often.

    If I click Ignore Once, I can keep playing, but sometimes it happens once every few turns.

    Could it be related to map or game settings? I usually play Large/Fractal/Marathon. I don't change the default options much - I allow tech trading but not tech brokering, and I use Living World and All Unique Features.
     

    Attached Files:

  9. Qgqqqqq

    Qgqqqqq Emperor

    Joined:
    Aug 13, 2012
    Messages:
    1,073
    Actually, most victories that don't go to concession are done via ToM. It's simply easier than taking the time to kill everyone off, presuming that you're not winning in the axeman stage.

    That's probably less given not-very-recent EitB changes, but again, most victories go to concession anyway.
     
  10. Sarmatian

    Sarmatian Chieftain

    Joined:
    Sep 30, 2008
    Messages:
    56
    I agree, but those happen when someone can achieve conquest/domination victory but it is simply less hassle to go for ToM.
     
  11. Sarmatian

    Sarmatian Chieftain

    Joined:
    Sep 30, 2008
    Messages:
    56
    I've tried another game after have been bored to death by those errors.

    Worked for about 300 (marathon) turns, then I got a different error.

    This time it didn't go away after clicking ignore once, and I was forced to quit.

    I'm giving up at the moment. I'm not sure if the error is at my end (which I still presume it is, unless no one else's playing the mod) or the mod, or some of my map/game settings, which are, for the record:

    Large/MountainCoast/All unique features/Living world/no tech brokering. Everything else default.

    I've tried everything, I can't think of anything else short of formatting my HDD.

    I've included picture of the error and the last auto save.

    Hopefully you can get to the bottom of this Terkhen. I'm said because you've done such an amazing job with this and I would very much like to play it. Even if I don't ever get to, keep up the good work!
     

    Attached Files:

  12. Terkhen

    Terkhen King

    Joined:
    Aug 1, 2011
    Messages:
    911
    Gender:
    Male
    Location:
    Granada
    I'm currently of the middle of a coding frenzy so I will answer in detail later.

    Sarmatian: Some asserts (which is the name of those errors) are worrysome, while others are just warnings that should be removed. The ones you posted pobably belong to the second group. Having said that, with my new computer I found a legit crash happening in multiplayer games, and it may happen in single player too. I'm quite sure that's the problem that you are experiencing. I'm on it; beta2 (and everything else) is on hold until I fix this.
     
  13. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    813
    Sarmatian: You can "Ignore All", I'm doing this for a long time now. IIRC it's am AI bug, so not really something you have to worry about.

    Just wanted to say I got another CTD, this time connected to puppet states. I couldn't find out the exact reason yet, but the whole section is buggy and needs a rewrite.
     
  14. Terkhen

    Terkhen King

    Joined:
    Aug 1, 2011
    Messages:
    911
    Gender:
    Male
    Location:
    Granada
    Thanks, I'll add logging to that too. Since I'm testing these things by running automated tests, I may as well debug for as many CTDs as possible
     
  15. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    813
    Urgh, got it. You forgot an &.
    Code:
    // Leader categories START
    				// Extra scenario leaders are currently always allowed as valid leaders for puppet states,
    				// even if their game option is disabled.
    				CvLeaderHeadInfo[B]&[/B] currentLeader = GC.getLeaderHeadInfo((LeaderHeadTypes)j);
    
    				if (currentLeader.getLeaderCategory() == LEADERCATEGORY_EXTRA && !GC.getGameINLINE().isOption(GAMEOPTION_LEADER_EXTRA)) {
    					// If extra leaders have not been selected, avoid using them.
    					bLeaderValid = false;
    					continue;
    				}
    // Leader categories END
    
    This way it deconstructs currentLeader at the end of its scope (I guess the second time it tries that causes the error)

    Getting an error "in Civ4BeyondSword.exe" after step-by-step executing a closing bracket is a pretty unnerving experience :).

    But I will remove this code soon, anyway.

    EDIT: For explanation, the real choice of a puppet leader is in done in python, that code is only used to determine whether you can create a puppet state.
     
  16. Kariga

    Kariga Chieftain

    Joined:
    Jul 1, 2008
    Messages:
    57
    Hey
    I just found out about this mod and tried the newest beta version. I hope this is the right place to post this kind of problem.
    For some reason all the games I've played have ended with a CTD.
    I don't understand much about coding or python. I saved the crash dump and I recieved a bunch of files into my Logs-file. Most of them were very long text files but the shortest one said:

    Traceback (most recent call last):
    File "BugEventManager", line 361, in _handleDefaultEvent
    File "CvEventManager", line 1935, in onTechAcquired
    RuntimeError: unidentifiable C++ exception

    This same text came up in three different games when the game crashed.
     
  17. Terkhen

    Terkhen King

    Joined:
    Aug 1, 2011
    Messages:
    911
    Gender:
    Male
    Location:
    Granada
    Wow, thank you for finding that! Finding it must have been a pain. Coding too much Java has hurt my C++fu considerably.

    Oh, are you going to make more changes to Puppet States? That reminds me of something. Tholal mentioned that he wasn't going to include version 1.6 of Puppet States but I wouldn't mind having it in ExtraModMod. I found an OOS error while checking at the code but my computer problems and later the crashes prevented me from actually testing if the solution I already have coded works. I was planning on releasing a beta2 after killing the CTD, and keeping solutions for OOS errors until beta3 (as fixing a broken beta has preference over anything else). Should I wait for this particular one?

    Welcome, Kariga! This is indeed the place for talking about ExtraModMod. You are probably experiencing the same CTD that we were talking about in the posts above yours. Thank you about reporting that trace; it also points to the same error that lfgr pointed out. I'm currently running tests after fixing that coding error; if there are no more CTDs I will release beta2 ASAP. I'm sorry about this inconvenience, and I hope you enjoy future versions more than this one :)

    EDIT: I was wrong, the CTD Kariga reported must have a different cause because I got it after fixing the error reported by lfgr :( I will keep searching.

    EDIT2: Kariga, did you use the World Builder in the games in which you got a CTD?
     
  18. Kariga

    Kariga Chieftain

    Joined:
    Jul 1, 2008
    Messages:
    57
    I've used world builder only to check how the map looks on the first turn.
    After the CTD I reloaded a previous save and by deleting a one enemy civ the CTD did not occur again so it must have been something that that civilization did on the interturn.
     
  19. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    813
    Sorry, wait with what for what exactly? :)
    I'll try to fix the puppet states bug mentioned in my last post's EDIT soon and forward the fix to Tholal. I don't think it will interfere with your OOS fix.

    Besides, is your problem that you are running Windows in VirtualBox? If that's the case, I could do OOS debugging myself.
    I guess it's the following CTD, which AFAIK you didn't fix yet:

    If that is true, I guess Kariga deleted the civ that was about to research the infernal pact and unleash Hyborem as well as the CTD.
     
  20. Terkhen

    Terkhen King

    Joined:
    Aug 1, 2011
    Messages:
    911
    Gender:
    Male
    Location:
    Granada
    Sorry, I misunderstood you. Okay, I'll go ahead.

    It was; I've already set up a real machine to check them. Having said that, as they are very difficult to reproduce, help is welcome. I had some leads before finding the CTDs, which now I don't trust because they could have been caused by memory corruption. After fixing the first one OOS errors have been quite more rare.

    I missed that edit :O Thank you again, I will fix it and run some tests.
     

Share This Page