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

K-Mod: Far Beyond the Sword

Discussion in 'Civ 4 - K-Mod: Far Beyond the Sword' started by karadoc, Jan 8, 2011.

  1. Charles555nc

    Charles555nc Prince

    Joined:
    May 3, 2010
    Messages:
    522
    In this example, the city Nara has marble in its boundaries but cannot connect it.

    I was wondering if the map creater counts this as a resource, since it cannot be connected...wouldnt it be better not to count it, or count it half as much?

    (Just an issue that might lead to some small changes that would have more fair starting areas).
     

    Attached Files:

  2. Windsor

    Windsor Flawless

    Joined:
    Feb 14, 2008
    Messages:
    1,386
    Location:
    Norway
    That would count. To hook it up you have two choices:

    a) put a fort on the resource
    b) put a fort 1S of the resource and connect with road.
     
  3. Charles555nc

    Charles555nc Prince

    Joined:
    May 3, 2010
    Messages:
    522
    Thanks, dont use forts much :)
     
  4. Alrik2002

    Alrik2002 Warlord

    Joined:
    May 24, 2012
    Messages:
    214
    Location:
    Berlin, Germany
    Hi karadoc,

    I´ve seen that you´ve a kind of multiple production already within your mod. In case I want to use the multiple-production mod I know that I have to change the following files:

    cvenums.h
    cyenumsinterface.cpp
    CvCity.cpp
    CvCity.h

    But I don´t know in which files you´ve made the changes for your version of multiple production. Unfortunatly I didn´t find it at guthub, since I don´t know when you´ve made it. Could you please give me the link to the change? Thank you very much!
     
  5. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,819
    Location:
    israel
    hey all,

    i have an eror of a unit stcuk in a loop,

    something about a team hack, anyone have some idea?
     
  6. karadoc

    karadoc AI programmer

    Joined:
    Oct 3, 2005
    Messages:
    1,568
    Location:
    Australia
    I'm pretty sure the only changes I've made relevant to that features are in CvCity::popOrder (in CvCity.cpp). I did a brief search through the git logs, and found these:
    The bulk of the change is here (back when my log entries were a bit more sloppy).
    Here and here are a couple of later adjustments.

    Team hack? I'm not sure what you mean. Are you referring to the comments in the code around the "unit stuck in a loop" assertion? If so, that 'hack' doesn't have anything to do with the cause of the problem you are seeing - the 'hack' just means that the method used to detect the bug is a bit ugly. Whatever the problem is, it is caused somewhere else. Do you know what type of unit was stuck in a loop?
     
  7. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,819
    Location:
    israel
    hi,

    no i dont think i know.
    "unit stuck in a loop" assertion - tyup this is the error message, i know the bug is probably one of the units i have, but i just dont know which one ...
    i tried to investigate the debug notes (i used a debug dll with vc) on the call stack i opened tons of child's, all i could "read" wast that is has something to do with missionai_build.
    so im guessing its a worker issue? or gp/missionary? maybe the error comes cause it cant build something?

    this is the code part that the break point stops at:

    // K-Mod. (replacing the original "isForceUpdate" stuff.)
    if (isForceUpdate())
    AI_cancelGroupAttack(); // note: we haven't toggled the update flag, nor woken the group from sleep.
    // K-Mod end

    //FAssert(!(GET_PLAYER(getOwnerINLINE()).isAutoMoves())); // (no longer true in K-Mod)

    int iTempHack = 0; // XXX

    bool bDead = false;

    bool bFailedAlreadyFighting = false;
    //while ((m_bGroupAttack && !bFailedAlreadyFighting) || readyToMove())
    while ((AI_isGroupAttack() && !isBusy()) || readyToMove()) // K-Mod
    {
    setForceUpdate(false); // K-Mod. Force update just means we should get into this loop at least once.

    iTempHack++;
    if (iTempHack > 100)
    {
    FAssertMsg(false, "unit stuck in a loop");
    CvUnit* pHeadUnit = getHeadUnit();
    if (NULL != pHeadUnit)

    i think its something to do with the : bFailedAlreadyFighting
     
  8. noto2

    noto2 Emperor

    Joined:
    Jul 11, 2008
    Messages:
    1,711
    Karadoc - could machine guns get access to the CG promotion line, please, at the very least? Also, +50% vs mounted seems quite reasonable, there's no reason realism wise or gameplay wise that they should be weak vs mounted units, and it seems like yet another oversight by the game developers. I would go even further than that in buffing them but that's just me. I really think the mounted bonus and access to CG is a bare minimum to make them better than irrelevant, which is what they currently are.
     
  9. plastiqe

    plastiqe Grinch

    Joined:
    Oct 5, 2004
    Messages:
    597
    Location:
    Canada, eh
    I disagree, Machine Guns are great in their era even if they've only got Drill promotions. Intercontinental landings and choke points is where they really shine. If you want to you can upgrade melee or archery units with the promos you desire into MG; all you need is Military Science. But nevermind City Garrison, a few Woodsman + Guerrilla Machine Guns leading a landing force on an enemy forested hill that can never have its defensive bonus be bombarded away is where it's at. : P

    I remember back in Rhye's mod for Civ III there was the basic mod and then there was the expansion pack. Perhaps there is room in the future of K-Mod for an expansion pack that does aim change the flavour by making big changes and adding to the game.
     
  10. noto2

    noto2 Emperor

    Joined:
    Jul 11, 2008
    Messages:
    1,711
    It's not a big change and you're being dishonest if you're saying that MG's are a significant unit in the game as is. I think grenadiers have more of an impact in the game, and I only see them in 1/4 games. I shouldn't have to save archers to upgrade them for CG, MG's should be able to get that on their own - it's a programming oversight, siege doesn't normally get CG. Also, why do they have 50% vs gunpowder but no bonus vs mounted units? It makes no sense.

    I like the idea of an expansion pack.
     
  11. plastiqe

    plastiqe Grinch

    Joined:
    Oct 5, 2004
    Messages:
    597
    Location:
    Canada, eh
    The majority of my K-Mod games go into the industrial age so for me Machine Guns are useful from Railroad until the end of the game (I can't remember ever building a Mech Infantry that mattered). So to your point of whether MG needs a buff or not I disagree. They're already versatile units because they're siege, have anti-air, immune to collateral and 27 Str against the most common unit category of the era.

    Perhaps Machine Guns could use a couple more options for promotions because the list of options is a little sparse but I would add the Woodsman and Guerrilla lines before City Garrison. And as someone mentioned earlier in the thread it's annoying when you accidentally give them a Shock promo when you were aiming for Drill so maybe MG could lose Shock.

    So I think MG are good enough without City Garrison (which you can still get on them if you really want it) but buffing 50% vs mounted is absurd. With a buff like that MG would be totally dominant defenders until Tanks. Good luck if your opponent gets to Railroad first, what are you gonna counter with?
     
  12. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    Although to be fair, the MG was the dominant weapon till the tank.. As cavalry generals who thought otherwise usually learnt by counting what was left of his force after a failed attempt to charge at MGs. The only counter to the machine gun was overwhelming numbers, or eventually the tank..
     
  13. Charles555nc

    Charles555nc Prince

    Joined:
    May 3, 2010
    Messages:
    522
    Im actually kinda excited about this discussion. My suggestion is this:

    1. Allow MGs to get access to anti-mounted promotions (realistic).

    2. Give a bonus vs MGs to grenadiers. (throwing grenades at Machine Gun nests was/is a legitimate military tactic). Adjust the AI to value grenadiers more. Possibly give the grenadier 1 more power (I still dont use or see many grenadiers, except to upgrade)?
     
  14. karadoc

    karadoc AI programmer

    Joined:
    Oct 3, 2005
    Messages:
    1,568
    Location:
    Australia
    I do think it would probably be good if machine-guns were allowed to choose Formation (the anti-mounted promotion), but it's a bit technically difficult to enable any promotion to machine-guns without also enabling the same promotion on all the other siege units. (eg. catapults and cannons.)

    The availability of promotions is primarily determined by the unit's 'combat type'. (Combat types include siege, melee, gunpowder, etc.) But also, unit's are not allowed to choose promotions which give a bonus that the unit cannot use. For example, machine-guns can't choose City Raider, because machine-guns cannot attack; and Explorer's can't choose Woodman III because they also can't attack and that promotion provides and attack bonus. However, since Formation affects both offence and defence, enabling it for siege units would enough it for machine-guns and catapults both.

    One option to get around these promotion rules would be to create a whole new combat type, called 'defense guns' or something like that. If machine-guns were the sole member of their own combat type, then it would be easy to enable and disable whatever promotions we like, without affecting any other units. That would work, but I think it's an inelegant solution, and I'd rather not do that.

    Perhaps the obvious answer is that machine-guns should be gunpowder type. They certainly seem like they should be gunpowder units. But that would be a pretty major balance change. If they were gunpowder units, not only would they have access to the coveted City Garrison promotion, they would also get the free promotions from the Protective and Aggressive traits, and they'd suffer the penalties of +attack vs. gunpowder promotions and bonuses from their enemies and stuff like that. Maybe that's all fine, but it would probably mean some additional balance tweaks would be required.

    I do have another option in mind though. Currently, defensive promotions such as Woodsman and Guerrilla will still work on units with "no defensive bonuses" - but to the best of my recollection there are no units with "no defensive bonuses" that can get those promotions. So, I could change the game rules such that "no defensive bonuses" actually blocks defensive promotions without having any gameplay effect in K-Mod. With that rule change, if I then enabled defensive promotions for siege units, those promotions would be available for machine-guns but would still be unavailable for cannons and catapults. That would work for Woodsman, Guerrilla, and City Garrison. The downside is that it may mess up someone else's K-Mod based mod if they happen to be already using defensive promotions on units with "no defensive bonuses" - but if that stuff is important to some modder, then hopefully they can work out how to fix it for their mod.

    I actually think machine-guns are pretty useful already. I use some of them in most games I play, and occasionally they play a key role by negating the effects of collateral damage, but generally they do get somewhat overshadowed by the versatility of Infantry. I think allowing a few more promotions on machine-guns would make them a bit more interesting and versatile. I don't think I'd want them to have City Garrison available directly, but I'm thinking that both Woodsman and Guerrilla might be ok. Although it may sometimes result in some impregnable choke-points...
     
  15. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    Another rather inelegant solution, could be to make Mgs start with a promotion, and then make copies of promotions that would be 'useful' that then require the MG's special promotion as a prereq, so in essence you would have a set of MG only promotions.. I can't remember the method that we used to block everyone else from being able to take that promotion.. I have a feeling that it might be an unworkable one for other mods.. ugh damn my memory.. But anyway I thought I would put it here for your consideration..
     
  16. Charles555nc

    Charles555nc Prince

    Joined:
    May 3, 2010
    Messages:
    522
    How do people feel about grenadiers, in terms of usefulness, length of use, and fun (other than getting promoted into very strong mgs, which is their major use for me).
     
  17. noto2

    noto2 Emperor

    Joined:
    Jul 11, 2008
    Messages:
    1,711
    You guys seriously use MG's?? I know they seem nice on paper but I use them in perhaps 1% of my games, not even kidding. I take assembly line before railroad in 95% of my games. Railroad is nice, you get railroads which are useful and give a few more hammers here and there, and you get the MG, which is possibly a bit useful, but honestly isn't all that strong against infantry as its base strength is so low that it can't reliably fight off many attackers and cavalry rape MG's anyway. No, I go for assembly line. You get infantry, one of the best units in the game. It's not even comparable. Comparing a MG to infantry is like comparing a scout to a cavalry. You also get factories and coal plants, you also get access to the pentagon.
    Long ago I tried using machine guns a few times and they just get badly raped by cavalry to the point of being worthless. I know, I know, you can jerry-rig a situation like "oh gee, I put a stack of MG's on a forest hill and they fended off 260 riflemen". Okay... who cares.... I could do the same with a stack of G3, D4 longbows defending against chariots, it's not something that decides a game. In the actual game I want an infantry over a MG always. If I have access to infantry I don't build MG's. The ONLY thing that they do that is of any use is anti-air against blimps.

    Seriously, str 18... a C2 cavalry matches that and has 30% withdraw on top. Str 18 +50% = 27, against a C2 infantry which has str 24, not much difference. Once the MG is knocked down to str 12, he's now just defending at 18 and an infantry kills him. I don't know how you guys claim the MG is good or even close to what it was in real life. In real life, the MG made WW1 a trench war, something that NEVER EVER happened before, and trench war did not end until massive artillery and tanks were brought to battle. To represent their role in real life they would need to be str 20 with 200% vs gunpowder and mounted, with tanks possibly having a bonus against MG's. Anyway, I didn't ask for that, I just thought perhaps they could be given the ability to actually be useful against cavalry. But apparently most people can't stand the thought of not being able to finish the game any later than the renaissance. So you have no renaissance unit counter??? Then research more! Horse archers and swords don't reliably kill longbows, you need a better unit to take them out!
     
  18. karadoc

    karadoc AI programmer

    Joined:
    Oct 3, 2005
    Messages:
    1,568
    Location:
    Australia
    I appreciate your opinion and insight on this, but your straw-man argument about when people want to finish the game is unhelpful, and so is your allusion to forced sexual intercourse. That stuff really lowers the tone of the decision.
     
  19. noto2

    noto2 Emperor

    Joined:
    Jul 11, 2008
    Messages:
    1,711
    Plastique said "but buffing 50% vs mounted is absurd. With a buff like that MG would be totally dominant defenders until Tanks. Good luck if your opponent gets to Railroad first, what are you gonna counter with?"

    how did I make a strawman???? I was literally responding directly to an argument made by another human being (assuming Plastique is not a bot).

    As for rape, the word doesn't mean sexual assault, it has several meanings but I guess I have to accept that in 2013 people pretty much only use it to mean sexual assault.
     
  20. karadoc

    karadoc AI programmer

    Joined:
    Oct 3, 2005
    Messages:
    1,568
    Location:
    Australia
    No one's argument was based on when they wanted the game to end. Perhaps 'strawman' wasn't the right word here, but it seems to me that you've misrepresented what plastiqe was saying - and projected that misrepresentation onto "most people".

    Here's what the Shorter Oxford English Dictionary says:
    Presumably you didn't mean "plunder" or "seize"...

    Do you really want to argue about this stuff?
     

Share This Page