Giter Club home page Giter Club logo

Comments (12)

yairm210 avatar yairm210 commented on June 20, 2024

This should all be done with uniques.
AI priority for policies should be independent of the type of policy, and that can certainly be modified by personality

from unciv.

PLynx01 avatar PLynx01 commented on June 20, 2024

This should all be done with uniques. AI priority for policies should be independent of the type of policy, and that can certainly be modified by personality

What do you exactly have on your mind?
Radio Button Policies can be done this way:

Remove [Government branch]
Adopt [Universal Suffrage]

What about AI priorities? Can you write some pseudocode to explain me your idea?

from unciv.

yairm210 avatar yairm210 commented on June 20, 2024

I'm saying that "policy type" doesn't help us at all, and is unnecessary, and if we want special treatment it should be behind a unique

What's really needed is AI value judgement which is independent of "what type of unique"

from unciv.

PLynx01 avatar PLynx01 commented on June 20, 2024

I'm saying that "policy type" doesn't help us at all, and is unnecessary, and if we want special treatment it should be behind a unique

What's really needed is AI value judgement which is independent of "what type of unique"

The "Policy Type" attribute applies to policy branches, not individual policies.

from unciv.

yairm210 avatar yairm210 commented on June 20, 2024

So what? Policy branches also have uniques, same thing
We need to think in terms of what functionality things have, not in terms of what game is this similar to
Maybe Civ IV is comprised of several different things, and so is VI? Then we can mix and match elements

from unciv.

PLynx01 avatar PLynx01 commented on June 20, 2024

So what? Policy branches also have uniques, same thing

So, in that case, can I mark a policy branch as exclusive (or radio button), either using attribute or unique?

That would be useful for making Civ4-like civics, or a single government selection, like in Civ 1, 2 and 3

from unciv.

PLynx01 avatar PLynx01 commented on June 20, 2024

@yairm210 @SomeTroglodyte

Can I try to implement this by myself?

I need to alter Policy Manager and Next Turn automation.

from unciv.

SomeTroglodyte avatar SomeTroglodyte commented on June 20, 2024

How about this mod:

Policies.json

[
    {
        "name": "Governments",
        "era": "Ancient era",
        "priorities": {
            "Neutral": 5,
            "Cultural": 0,
            "Diplomatic": 10,
            "Domination": 5,
            "Scientific": 5
        },
        "uniques": [
            "Comment [Only one can be active, choosing another removes the previous one.]"
        ],
        "policies": [
            {
                "name": "Despotism!",
                "uniques": [
                    "Remove [Feudalism!] and refund [90]% of its cost <hidden from users>",
                    "Remove [Republic!] and refund [90]% of its cost <hidden from users>",
                    "Remove [Democracy!] and refund [90]% of its cost <hidden from users>",
                    "[+12 Gold] [in capital]"
                ],
                "row": 1,
                "column": 2
            },
            {
                "name": "Feudalism!",
                "uniques": [
                    "Remove [Despotism!] and refund [90]% of its cost <hidden from users>",
                    "Remove [Republic!] and refund [90]% of its cost <hidden from users>",
                    "Remove [Democracy!] and refund [90]% of its cost <hidden from users>",
                    "[-1 Happiness]",
                    "[+1 Production] [in all cities]"
                ],
                "row": 1,
                "column": 4
            },
            {
                "name": "Republic!",
                "uniques": [
                    "Remove [Despotism!] and refund [90]% of its cost <hidden from users>",
                    "Remove [Feudalism!] and refund [90]% of its cost <hidden from users>",
                    "Remove [Democracy!] and refund [90]% of its cost <hidden from users>",
                    "[+20]% Strength decreasing with distance from the capital",
                ],
                "row": 2,
                "column": 2
            },
            {
                "name": "Democracy!",
                "uniques": [
                    "Remove [Despotism!] and refund [90]% of its cost <hidden from users>",
                    "Remove [Feudalism!] and refund [90]% of its cost <hidden from users>",
                    "Remove [Republic!] and refund [90]% of its cost <hidden from users>",
                    "[+2 Happiness]",
                    "[+1 Science] [in all cities]"
                ],
                "row": 2,
                "column": 4
            },
            {
                "name": "Governments Complete",
                "uniques": [
                    "Will not be displayed in Civilopedia",
                ]
            }
        ]
    },
]
...what would that be missing to behave like you want? Then go step by step...

from unciv.

PLynx01 avatar PLynx01 commented on June 20, 2024

@SomeTroglodyte

These are my suggestions:

  1. The policy branch should have an attribute or unique, denoting that only one policy can be active at the same time. This would eliminate the need for writing the uniques removing other policies than the adopted one.
  2. We need to provide each policy additional info about the AI priorities. That would enable AI to choose policies that reflect their values and ideology. For example, peaceful leaders will more often choose democratic governments when possible, whereas more militant ones will opt for ************ instead.
  3. We need to specify the policy maintenance costs, which must be taken into consideration by AI, when evaluating the policy options.
  4. It's also necessary to specify the prerequisites for adopting the policy. It can be a technology, built building, other policy or any other conditionals, including countables.

I think that's all I want to say for now.

from unciv.

yairm210 avatar yairm210 commented on June 20, 2024

3 sounds like "[-1 Gold]" unique on policy
4 sounds like "only available when"
2 sounds like a generally useful unique, "[relativeAmount] weight for AI, modified by [personality] personality" - @tuvus is the expert here

from unciv.

SomeTroglodyte avatar SomeTroglodyte commented on June 20, 2024

eliminate the need for writing the uniques removing other policies than the adopted one

Yes but as you say that's convenience and prettier, so optional and can come later.

That (actually playable) demo mod up there does show some more points, however:

  • When are you supposed to be able to begin switching governments? <only available when> is one thing, but culture cost another. That would need some override to behave like older Civs AFAIR - I think they were 0 culture cost and only tech prereqs?.
  • What should it cost you to switch governments? Nothing, unlimited per turn? Possibly, no additional feature needed (those 90% in the demo were just for kicks to see it in action).
  • BUT - only one change per turn allowed and none of the policies apply (or another set of maluses applies) for the next N turns, as in older Civs? New. I believe that was a thing - wanna change from Communism to Democracy? A few turns of Revolution... Could get tricky to implement.

So - again - go for it, small steps sticking as close as possible to the Uniques system. Once we see it works but could use prettifying/optimizing, that's later PR's.

from unciv.

PLynx01 avatar PLynx01 commented on June 20, 2024

3 sounds like "[-1 Gold]" unique on policy 4 sounds like "only available when" 2 sounds like a generally useful unique, "[relativeAmount] weight for AI, modified by [personality] personality" - @tuvus is the expert here

My remarks:

  • Civic upkeep is not fixed, but dependent on number of cities, units, improvements, buildings, population etc.
  • AI priorities should be obviously linked to Personalities. But should they be defined by modders themselves or evaluated automatically? I believe the former should be recommended, and the latter should be a fallback.

from unciv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.