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

Modding Q&A

Discussion in 'Civ3 - Creation & Customization' started by Oni Ryuu, Feb 1, 2017.

  1. Civinator

    Civinator Blue Lion Supporter

    Joined:
    May 5, 2005
    Messages:
    6,722
    Gender:
    Male
    - As posted above, those units without Nuclear Weapon AI strategy can only been built normally by a civ, if this civ has built the building that allows the construction of nuclear units. No NBC-protection tanks can be built normally without that building, even if the civ has the proper other perequisites for building these units (tech, resources)

    - These units are immun against nuclear strikes

    - These units don´t do nuclear attacks, when no bombard function is activated.
     
  2. Nathiri

    Nathiri Commander

    Joined:
    Oct 7, 2014
    Messages:
    748
    Gender:
    Male
    Location:
    Georgia, US
    So as I assumed it only affects the building of a unit, but doesnt grant any offensive capabilities of the nuke. That's nice to have clarified now.
     
  3. Civinator

    Civinator Blue Lion Supporter

    Joined:
    May 5, 2005
    Messages:
    6,722
    Gender:
    Male
    ... if that unit doesn´t have bombard actions. This is important: Per example in CCM2 there are many nuclear bombers working like nukes without 'Nuclear Weapon AI strategies', but having the bombard flag set.
     
  4. Fortis1

    Fortis1 Warlord

    Joined:
    Jan 28, 2014
    Messages:
    295
    Gender:
    Male
    Location:
    Sukhum, Abkhazia
    Another question: how AI decides which units are "offencive" and "defencive" for the purpose of getting them on higher difficulties? Is it tied to unit strategies set-up or to its position at unit panel?
     
  5. tjs282

    tjs282 Socially distancing since 1975

    Joined:
    May 19, 2009
    Messages:
    3,278
    Gender:
    Male
    Location:
    here, for the job/ handout / woman
    It's based on the AI-strategies set for the unit:

    For example, the AI has a very strong tendency to ensure that each of its towns has at least 2 defenders, regardless of any of its other 'priorities': usually the first of these defenders will be the escort that the original Settler arrived with.

    So if the AI looks at any town and notices that it has only 1 'defender-strategy' unit garrisoned there (because it's a new town, or it just got attacked), it will then build another such unit before it does almost anything else. Once it's decided that it 'needs' another defender, it looks at the list of units with that strategy that it can currently build, given its current tech and resource-availability, and builds the best unit that it can ('best' apparently being defined primarily by shield-cost).

    Then when the second defender-strat unit is in place, it starts 'thinking' about its next project. At this point, the 'Build often/build never' settings for each individual AI-Civ start to come into play: (I believe) these are weightings, rather than specific instructions, i.e. there is still a slight random-choice element involved, but an AI which has 'Build [attackers] often' set will tend to end up building more attack-units and earlier, than an AI which has 'Build [Culture] often' set.

    (Of course, if you leave any AI alone long enough, they will tend to put every generic building in every town, and then build nothing but attackers. And then go to war...)
     
  6. Fortis1

    Fortis1 Warlord

    Joined:
    Jan 28, 2014
    Messages:
    295
    Gender:
    Male
    Location:
    Sukhum, Abkhazia
    tjs282, thank you for the reply!

    I'm afraid I didn't explain my question right. There is an "Additional AI starting units" in "Difficulties" panel. "Unit type 1" and "unit type 2" are set-up by the player in "general settings" but how are "defensive units" and "offencive units" from that pannel are chosen? Is it based on AI strategy on first units with appropriate flags at Units pannel. If I make unique unit lines for every civ, what free units they'll recieve? That's what I wanted to ask.

    I probably lost myself in thoughts, while writting initial question. But new information about AI behaviour is always useful.
     
  7. Nathiri

    Nathiri Commander

    Joined:
    Oct 7, 2014
    Messages:
    748
    Gender:
    Male
    Location:
    Georgia, US
    It is whatever is best available to that civ. In the default game, if an AI has Warrior Code, it spawns with Archers as their offensive unit. If they dont, it is warriors. The best offense unit is chosen.
     
  8. Wolfhart

    Wolfhart The Last in Line

    Joined:
    Dec 30, 2001
    Messages:
    971
    Location:
    Capita, Sweden
    I'm curious about one thing regarding units with the nuke flag but without bombardment or Nuclear Weapon AI strategy: will the AI diplomacy punish you for these units like it does for regular nukes? Is my reputation hit if I use such units, or indeed build them?

    Thank you (all of you really) for sharing this kind of knowledge: it's of great help when I try to improve the game for me :hatsoff:
     
  9. Civinator

    Civinator Blue Lion Supporter

    Joined:
    May 5, 2005
    Messages:
    6,722
    Gender:
    Male
    Wolfhart, i skipped that setting for tanks early. In the CCM1 thread you can read the reason why: https://forums.civfanatics.com/threads/ccm1-epic-mod.352057/page-86#post-14446021 Additionaly I had a frustrated CCM2 betatester, who couldn´t build most of his tanks as he had forgotten to build the SW Manhattan Project before it became obsolete. :D

    Therefore I didn´t have any deeper look to the items in your question.
     
  10. MartinLuther

    MartinLuther look at this kawaii anime boy i found :)

    Joined:
    Jun 5, 2009
    Messages:
    2,797
    Location:
    Where You'd Least Expect
    How do I make a unit that receives no penalties from attacking from a river? Would all terrain as roads do that?
     
  11. Bluemofia

    Bluemofia F=ma

    Joined:
    Dec 8, 2003
    Messages:
    7,976
    Location:
    Dimension called Elsewhere
    Not for a specific unit, as it's hard coded under General Settings.

    You can modify the River defensive Bonus to 0, but you can't make one unit, or unit class ignore specific defensive bonuses, as there's no mechanic for that. Same for fortifying for that matter.
     
    MartinLuther likes this.
  12. Bluemofia

    Bluemofia F=ma

    Joined:
    Dec 8, 2003
    Messages:
    7,976
    Location:
    Dimension called Elsewhere
    I have a question on War-Weariness:

    I'm trying to confirm the effects of War-Weariness as described in this thread, where Police Stations or other War-Weariness reducing improvements reduce the unhappy citizens by 25%, and War Weariness reducing wonders reduce by 1 citizen, and that different wars with different civs generate war weariness independently of each other.

    However, I haven't been able to induce a High War Weariness government to collapse, and instead it looks like War Weariness level 4 in a High War Weariness government generates 200% unhappiness instead, with level 3 generating identical 100% unhappiness (like level 2).

    I'm not sure if this is a feature that was removed, or if this is still a thing. Does anyone have any experience with this in C3C?
     
  13. Shmelkin

    Shmelkin Chieftain

    Joined:
    Mar 16, 2017
    Messages:
    20
    Gender:
    Male
    Hi! I have some questions to experienced modders, mostly about AI.
    1. Is the despotism hardcoded as starting government in the game, or it can be changed? For example, if I make despotism unavailable for a certain civ and give it a unique government instead, will the game use available government at the start?
    2. If submarine is invisible and all ships have detect invisible ability, will it prevent submarine bug?
    3. If all land units are invisible and can detect invisible, will it prevent AI cheating (knowing positions of all units on the map). Will it cripple the AI's ability to play too much?
    4. If all workers are set as army units, and civilization reached limit of allowed army-workers, will it be able to capture slave army-workers from another civ?
    5. It seems there are some limitations to abilities of improvements given by a wonder to every city, for example, if palace gives each city an improvement which makes one citizen unhappy on continent, it will not work, also such improvements don't require maintenance. What are other limitations, is there a list somewhere?
    6. Is it possible to allow certain government only for AI civs in a scenario?
    Thank you!
     
    Last edited: Mar 16, 2019
  14. Bluemofia

    Bluemofia F=ma

    Joined:
    Dec 8, 2003
    Messages:
    7,976
    Location:
    Dimension called Elsewhere
    1. No, whichever government marked "Default Type" is the default government. If you mark a government as "Transition Type" or "Default Type", these governments cannot have prerequisites, so all civs will have access to these governments. What you can do, is to mark Anarchy as both the Default, and the Transition. The next turn, civs will attempt to switch governments to whatever they have access to, such as their own unique governments, or any that they have techs for.
    2. Yes, the AI will officially know a submarine is there, and therefore will not attempt to move there. But then that defeats the purpose of a submarine, reducing it to just stealth attack.
    3. From what you described, probably, but you also cannot see units with your borders, and must have a unit to patrol to see them. Most people argue the AI's ability to play is already crippled, because they don't understand the concept of strength in numbers, offensive use of artillery, threat analysis for enemy units, and cost/benefit analysis for units and improvements, so this would only cripple them even more.
    4. Armies are special units that take on the abilities of other units that are loaded in them, with 2/3 the movement. If you give a unit marked with worker actions, they may act as workers, yes, but thus cannot be built without a SW/GW building that allows Armies to build, or using a leader, if a leader has the ability to build Army (specify in the General tab). Also, Armies, when they are captured with no attack/defense values with nothing in them, are destroyed.
    5. A Palace is the building that is marked "Center of Empire", and runs into problems if it is not an Improvement. Free buildings do not cost maintenance, as such will defeat the purpose of "free". Please see Da Rules where I detailed out what each option does, but do not make mention of tips and tricks with them, as that can easily triple the length, and are often better described in specific threads.
    6. If you specify custom Player Data, and specify a player to not be Human, and then give that player a unique tech, you can do that. Otherwise, no, the only difference between an AI and a Human Player is that the AI makes more questionable decisions, knows where all the resources are on the map without the techs (though may not be able to use them), and can do certain actions despite not having the box fully allowed (sacrifice workers without the sacrifice box checked for example)
     
  15. Shmelkin

    Shmelkin Chieftain

    Joined:
    Mar 16, 2017
    Messages:
    20
    Gender:
    Male
    @Bluemofia
    1. I see now, so all civilizations will always have access to default government, I cannot force them to always use other government from the start (until researching modern governments), as they will always have the option to switch. Marking anarchy as "Transition Type" + "Default Type" and giving AI only one other available government is interesting idea, need to test in the game if it will work.
    2. I don't think it completely defeats the purpose of submarine, as it will still have strategic invisibility to AI (and player inside his borders), so it will be able to make surprise attacks from outside of enemy's vision and then have to run away and hide, just like subs do in real life.
    3. So I assume noone tried that yet, and the AI's abilities to work under such conditions can be revealed by experiment only. For example, will it treat all cities as undefended then and become much more aggressive.
    4. It's ok for me if workers cannot be captured (they can be captured by combat enslavement after all), I just want to limit player's ability to transform land by having horders of workers.
    5. The Palace seems to work well when it's set as small wonder, what problems it can cause? Da Rules thread is useful, thanks but it mostly reproduces the ingame help, I could't find the limitation on wonder given improvements, for example.

    Thank you for detailed and helpful advices!
     
  16. Virote_Considon

    Virote_Considon The Great Dictator

    Joined:
    Jul 7, 2004
    Messages:
    9,359
    Location:
    Skaville UK Reputation: 1
    AFAIK it's only use of the nuclear bombardment option which does this. Using units flagged Nuclear Weapon without the bombardment flag should incur no diplomatic cost.
     
  17. tjs282

    tjs282 Socially distancing since 1975

    Joined:
    May 19, 2009
    Messages:
    3,278
    Gender:
    Male
    Location:
    here, for the job/ handout / woman
    The main limitation here, is that only Great Wonders can add "Free [BUILDING] in each city [on Continent]" -- Small Wonders and 'generic' buildings (technically including the Palace) can't do that (using the Firaxis Editor, anyway -- don't know about @Quintillus' or @Steph's).

    And yes, of course such Wonder-provided buildings have no maintenance cost -- that's kind of the purpose of building (or capturing!) the Wonder in the first place, no? If you want there to be a cost, you could set the 'free building' itself to do nothing (and cost nothing), apart from acting as a prerequisite for a hand-built building that does do something (and has a cost).

    Spoiler e.g. In Civinator's CCM... :
    ...the various 'World-Religion' Wonders each put a free '[Religious] community' building in every city (the communities can also be hand-built cheaply, and cost no maintenance). The community-'building' then acts as a prerequisite to unlock specific religious/Cultural buildings (e.g. a 'Christian community' allows a Church). The cool thing about this idea, is that each CCM-Civ starts with a tech(s) corresponding to one or more of their various historical religions (e.g. Rome = Christianity), so only certain Civs can build each World-Religion Wonder to start with -- but any Civ can then capture any of these Wonders, opening up new building-possibilities in the capturing Civ's homeland.
    If you want a building to add unhappiness to its own city, and/or to all cities, then any building can do that, including Wonders. I'd point out though, that (AFAIK) the AI does not do any cost-benefit analyses for buildings beyond "Can CityX complete BuildingY in Turns<Z?" (where the value of 'Z' depends on whether BuildingY is a GWonder, SWonder, or generic), and will if left to itself eventually put a generic building of every type, in every city where that building is available to build.

    That means that if a non-Wonder building makes 1 citizen unhappy in all cities, an AI-Civ would eventually end up with the same number of unhappy faces as it had cities, in each of its cities. So unless you want to cripple the AI, it's therefore a very bad idea to give a generic building global unhappiness, without also severely restricting the number of potential towns which could put up that building: e.g. by setting strict terrain- and/or resource-specific prerequisites for it (such as 'Requires freshwater', and/or 'Requires [Resource] in city-radius').
     
  18. MartinLuther

    MartinLuther look at this kawaii anime boy i found :)

    Joined:
    Jun 5, 2009
    Messages:
    2,797
    Location:
    Where You'd Least Expect
    Ok so here's an idea I thought I'd share: One of the biggest problems with the AI in Civ III is that they never remove pollution from the map. I've heard they'll actually clean up if the "Remove Pollution" worker job is set to take 1 turn. However, I feel like making this adjustment to my mod would against what I'm trying to do so I came up with an alternative solution: A worker unit whose only available job is Remove Pollution and whose Worker Strength is so high that it'll complete Remove Pollution in 1 turn.

    Would this work or not?
     
  19. Bluemofia

    Bluemofia F=ma

    Joined:
    Dec 8, 2003
    Messages:
    7,976
    Location:
    Dimension called Elsewhere
    @MartinLuther Where did you hear that the AI never removes pollution from the map? I've had the AI clean up pollution all the time. Admittedly, they don't clean up as fast as a human player, and it becomes a bigger problem in mods/situations without a rail network, but they do so.

    Secondly, if you have a worker whose only job is to clean pollution/repair damage, you will need a custom editor (Steph, Quintillius) to manually assign the AI Strategy to Terraform, as the default Editor requires workers to have all of the associated worker actions to be able to be configured as a worker. I am mostly experienced with the regular editor, under the philosophy that it becomes easier to maintain and for new users to modify without breaking everything, so I have not tested this before.

    Third, I have found that the AI is able to cheat worker behavior under certain situations, for example sacrificing for culture. If a Sacrifice tech is researched, the AI is able to sacrifice any unit marked with the "Terraform" strategy, even if that unit has the Sacrifice option explicitly unchecked. The Human player will not be able to sacrifice, but the AI will. This can cause problems with the concept of "high cost workers" and other units using the sacrifice option, as this will allow the AI to gain enormous amounts of culture sacrificing captured workers. Anyways, if the AI can cheat with this specific action, it would be a good idea to test them out to see if a custom editor's "pollution only" worker with the Terraform strategy marked can be used with anything else.
     
    MartinLuther likes this.
  20. MartinLuther

    MartinLuther look at this kawaii anime boy i found :)

    Joined:
    Jun 5, 2009
    Messages:
    2,797
    Location:
    Where You'd Least Expect
    It's funny you bring this up. I just made a mod that's just Vanilla but the only way to gain culture is to sacrifice workers. Although, I did play a little bit of it and no one's borders seemed to have expanded.
     

Share This Page