Announcement

Collapse
No announcement yet.

[C4:AC][Programming] Faction Traits

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [C4:AC][Programming] Faction Traits

    I've implemented my first leader trait:
    Bananas Trait, okay it's a joke but it was a learning exercise.

    Here are the options I see for creating Faction Traits:
    • "Leader Traits"
      It is very easy to add free promotions. Like a free "Fanatic" promotion for Miriam.
      Bonuses like Financial can be made - but not more specific.
      Making certain facilities cheap is also possible ofcourse.
    • "Custom Faction Techs"
      Another mechanism we could utilize is to create a tech for each faction (automatically researched, cannot be traded etc). Hive Tech might give +1 hammer per mine, for example. There are a lot of options available in Tech's that aren't in Leader Traits. The game supports this principle quite well. (ie Desert War mod uses it)
    • "Custom Faction HQ"
      Another method is using a customized HQ for each faction, using facility/wonder bonuses like bonuses for specialists, free facilities, etc. It might be nessecary to replace the Generic HQ with the Custom HQ using Python, but that's no biggy.
    • Hardcode in Python.
      It's possible to directely hardcode certain benefits using python, as I did for the Bananas Trait. This could for example give Zak his free tech, and add free buildings for certain traits (when it doesn't make sense to use the Custom HQ method). One problem with python stuff is it's sometimes hard to give feedback on (ie a production bonus makes the time to completion inaccurate), as such it should be avoided when such feedback problems will result.
    • Custom SE.
      The idea would be to create "Hive SE" and "Peacekeeper SE" and so on with the relevant one permamently switched on. This would be an exercise in Python and XML I believe.


    Using a combination of those methods it should be possible to create very convincing SMAC faction traits.

    edit: Added Custom SE method.
    Last edited by Blake; November 22, 2005, 23:16.

  • #2
    Okay here's a preliminary list of SMAC faction traits, adapted to Civ4. Bear in mind that where what I propose deviates from the SMAC bonuses it is simply due to what Civ4 makes available. The bonuses I list are all possible, afaik. But I may have missed some things that are possible and would fit better. In any case all feedback is welcome, as are suggestions (as long as you are being reasonably realistic). The biggest problem at the moment is the lack of probe teams and native life... I've assumed the non-existence of them rather than assuming they'll be easily implemented.
    • Believers: Fanatic Bonus: +25% on attack, ++ Support, + Probe, --Research, -Planet

      Units receive free Fanatic Promotion, providing +25% attack vs bases.
      All science specialists generate -1 beakers. (Custom SE)
      Support extra units for free. (Custom SE)
      I think it'd be an interesting twist if the believers could get to spread a religion around, their HQ would act as the holy city and they would get a shrine in the HQ. (Python)
    • Peacekeepers: +Talents, -Effic, Relaxed population limits, Double votes.

      Starts with the “UN” in UN:HQ, guaranteeing eligibility (if the PK are not in the game, it is buildable). (Python)
      Free specialist in every base. (Custom SE)
      +2 Health.
      Social Engineering 25% more expensive.
    • Morganites: +1 Economy, -Support, Extra Commerce, Reduced hab limits.

      +1 Trade Route every base. (Custom SE)
      +1 Energy in base tiles.
      +1 Energy in tiles producing at least 2 energy.
      Military 20% more expensive to build.
    • Gaians: +1 Planet, +2 Effic, -1 Morale, -1 Police, +1 nuts in fungus.

      +1 food in “Fungus” (cIV Jungle).
      +2 Health.
      Units start with “Pacifist” demotion, -8% strength. (until Morale System implemented)
      need ideas for more Gaian bonuses
    • Hive: +1 Growth, +1 Industry, Immune to negative Effic, free Perimeters, -2 Economy.

      -1 energy in base tiles.
      -1 energy in tiles producing at least 3 energy.
      +20% Production. (Custom SE)
      Receives free Perimeter Defenses (Custom HQ)
      Reduced base upkeep. (Custom SE?)
      50% cheaper Social Engineering.
    • Spartans: ++ Morale, +1 Police, -1 Industry, free prototypes.

      Units receive free “Survivalist” promotion (until Morale implemented), I suggest +10% strength and March.
      +1 Happy per military unit. (Custom SE)
      Facilities 10% more expensive. (Custom SE)
    • University: Free Tech, ++Research, --Probe, Added drones, Free Network Nodes.

      Free Tech (Python or Custom HQ)
      Free Network Nodes (Custom HQ)
      Specialists produce +1 beakers.
      -1 Happy. (Custom SE)
      Looks overpowered.
    Last edited by Blake; November 22, 2005, 23:51.

    Comment


    • #3
      Excellent findings and suggestions, Blake! I'd say we'd try implementing these "traits". The idea of a custom HQ may be a viable solution, even though the idea of applying faction specific abilities to a specific base seems less desireable to me.

      I really like your approach. While we may, ideally, be looking for an exact "copy" of the SMAC faction traits, tweaking the code and options already available in Civ4 could prove very powerful (and a lot easier, perhaps).

      I'd like to see something playable; even if the balance is terribly poor and the options limited. If possible, I'd like to help (mainly .xml editing). How do you suggest we proceed?

      Comment


      • #4
        With the CustomHQ, Civ4 seems to rely on there always being a capital, atleast in the default game play. I wouldn't mind if the behaivour were retained so factions always have a HQ.

        The "Custom SE" concept isn't that attractive to me since I think it'd be a bit untidy, but it seems to enable a lot of stuff, like unit support costs. I tried to design a set of traits without "Custom SE" but it seemed a bit empty. We could probably edit the UI screens to hide some of these workarounds.

        I'm going to put some stuff in stone, like faction names for internal use.

        Comment


        • #5
          Originally posted by Blake
          • Gaians: +1 Planet, +2 Effic, -1 Morale, -1 Police, +1 nuts in fungus.

            +1 food in “Fungus” (cIV Jungle).
            +2 Health.
            Units start with “Pacifist” demotion, -8% strength. (until Morale System implemented)
            need ideas for more Gaian bonuses
          Just a suggestion, but perhaps you could emulate the police settings with war weariness?
          He who knows others is wise.
          He who knows himself is enlightened.
          -- Lao Tsu

          SMAC(X) Marsscenario

          Comment


          • #6
            Hmmm I was thinking more bonuses than more penalties! Ack!


            Now I was thinking hard on how to best use the trait system. I'm trying not to overthink things but not thinking isn't something I do well... uh?

            Anyway. What I concluded is that there are cases when the faction bonus requires use of the Leaders Traits bonuses. So it's justifiable having a single trait for each faction.
            TRAIT_GAIANS
            TRAIT_HIVE
            and so on.

            However, the Custom HQ and the Custom SE should be linked to the faction or leader itself rather than the trait. This can be done in XML alone I believe, which will be very nice indeed!

            Now, for further trait stuff. When several factions share a common trait, but it's not implementable in leader traits, then a unique shared trait should be used, as a reference in Python. Now I'm going to say that when doing fancy stuff in Python, the Python code should *only* reference the "sharable traits", and not faction-specific traits, or faction-leader, or the faction itself. In other words python stuff shouldn't be hardcoded to a specific faction. This is only for Python, XML stuff can reference the faction, faction leader or faction trait as appropriate.

            TRAIT_LUDDITE
            The LUDDITE trait would cause the faction to perform no research for the first 10 turns, and would be shared by the Drones and Believers. (in Python, this just forces the research to 0% for the first 10 turns, or something like that)

            TRAIT_GREEN
            This trait would be shared by the Gaians, Cult and Caretakers and would enable capturing native life (another way to enable capturing native life would be to run Green SE)

            TRAIT_AQUATIC
            This trait would only be used by the Pirates, but be provided seperately for the benefit of custom factions, since it'll probably involve some mean extra coding.

            TRAIT_ALIEN
            Used for the alien factions.


            That's what I have so far.

            Comment


            • #7
              Blake, can you look up, is there any limit on traits?
              Also, can traits be given argument values?

              SOCIAL, +++RESEARCH and
              UNIT, 8

              as examples.

              If not, is it a question of Python or C++ programming to change these two?
              -- What history has taught us is that people do not learn from history.
              -- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

              Comment


              • #8
                Look into XML/Civilisations/Civ4TraitInfos.

                In short, no, while traits contain arguments that can be given values, you can't give a trait itself an argument. (does that make sense?)

                I may be missing something about XML/Python but I think C++ will be required to extend this. But with C++, we should be able to change the CivilisationInfo file(s) to contain whatever variables we please. This is why all this stuff may be subject to review once the SDK comes out.

                Comment


                • #9
                  I was asking because I understand the trait setup you now are making is temporary - it is defined as a constant for SMAC factions.

                  We should be able to make it flexible later, so modders can experiment and add more balance to it without any C++ and even Python coding (only changing proper variables in XML)

                  But thanks for the info and keep up, I'm joining in at the end of next week!
                  -- What history has taught us is that people do not learn from history.
                  -- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

                  Comment


                  • #10
                    Our ultimate goal will be to replicate the "Social Meters" aka Police Rating, Growth Rating ect ect. The actualy effects of having a +3 police rating might be quite different but we can aproimate it in some way. Each particular level of a social Enginering Meter choice would in essence be an independent thing equivilent to the social enginering choice currently in the game. Rather then the games 5 catagores we would have 10 "under the hood" with the choices like "Planned" and "Fundamentalist" simply providing inputs to move us up or down the scale. I think this would pay off in the long run because we can re-use it for all the other places in SMAC ware the social meters get referenced and altered such as Childrens Creech and the Self-Aware-Colony.

                    Thus our imediate goal should be to come up with some thing that will do the conversion from "macro" social Engenering and other such inputs into the "meter" inputs or which we need to have an expanded number of. Then we have total flexibility to add and modify and plug other things in.

                    Also I must point out that if we tie Faction bonuses to the HQ building a faction with out a HQ (often a usfull thing to do on a large map) would lose all its abilites.
                    Companions the creator seeks, not corpses, not herds and believers. Fellow creators, the creator seeks - those who write new values on new tablets. Companions the creator seeks, and fellow harvesters; for everything about him is ripe for the harvest. - Thus spoke Zarathustra, Fredrick Nietzsche

                    Comment

                    Working...
                    X