Announcement

Collapse
No announcement yet.

[C4:AC][Programming] Social Enginering

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

  • [C4:AC][Programming] Social Enginering

    SMAC's social enginering model wasn't failtfully copied in Civ4, the "Civics" options have direct effects on the players empire rather then working through "Meters" aka Growth, Economy, Probe ect ect.

    I think the best means to implement SMAC style SE is to split the Civics into two seperate entities each of which can be defined in XML for easy Moding.

    The Civics object already has a bunch of hooks for game effects most of which we will want to use. So we can create a large number of such objects to represent each level on a Meter. We would add an int value to represent the meter location for example "Growth-3" position would have its own Civic which defines what it dose. The int value is used to pick which effect is applied to the player. All the Civics that belong to a Meter get a grouping either by making them child objects of a Meter object (prefered) or a tag.

    Now we take away the players ability to choose their "Civics/Meters" directly and replace it with "Psudo-Civics" aka "Police State" "Planned Economics" and all the other choices we love. These objects have "Meter Modifiers" which specify a Meter and an Int. The player is limited to choosing from among these and we simply sum up and apply one of the underlying Civics. These Psudo-Civics can likley be derived from the base Civ4 Civic objects as well, we mearly strip out the game play effect and add in the Meter Modifiers.

    Lastly we would ofcorse need a whole new Screen for displaying this info, we would ofcorse go with a close aproimation of the SMAC SE screen. The AI will then need to be modified to act on the Psudo-Civics and evaluate them in a rational manor. This will ofcorse be the tricky part.
    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

  • #2
    Hi Impaler, I've been exploring SE because at the chat meeting it was mentioned as something that should be done first. I think I've got my brain wrapped around this problem. Is anyone working on it? I understand what you've written about the meters, and I've seen the hooks for game effects in the civics tables. Realize that the tech tree, for example, can also do effects similarly, so we shouldn't be lured into using the civics hooks just because they're there. I think the civics should modify the meters and be done. I don't think very many hooks even apply to SMAC anyway. We're not saving any work by adding Growth-3, etc where they don't belong.

    Comment


    • #3
      I've made some progress on SE. The attached screenshot indicates what's done. It's not meant to be pretty, I'm not working on the GUI. And no, I didn't just edit the text files. What you see are the 4 civic options, 16 civics, 10 society properties that have been added to the XML/schema and the gamecore reads it and parses the civic effects.

      ***Image removed***

      The hard part is left. Doing all the game effects based on the society numbers. We'll need a list of them and what each one really means, e.g.
      "+3 Exemplary Efficiency",
      "+4 Ecological wisdom. Maximum chance of lifeform capture", etc.
      Last edited by mdbill; May 7, 2006, 02:12.

      Comment


      • #4
        The GUI

        The Social Engineering screen in SMAC/X is one of the most pleasing screens in the game (to me at least). It offers a good overview, a simple and effective layout, and when choosing/combining different choices I really get a feeling of "this matters", "this makes a difference"--on the visual side of things, that is.



        The "Social Effects Optimizer" (1), however, makes less sense to use, but can be useful for an effects summary of effects changes, etc. The "Energy Allocation Bars" (2) at the bottom seem somewhat out of place; but overall a pleasing screen (intuitive, user friendly).

        The "Social Effects Summary" (5) is correctly placed when considering the position of the minimap in the main view--giving a brief, yet detailed, summary; but the information boxes (3) and (4) could definitely display more (or more important/relevant) information. The "Pop-up Help" (6) could use some tweaking--either as a piece of static information or perhaps completely removed (well, or something else... I find it annoying).

        The 3 rows of information/options in (7) are good; combining icons, text and colors to display the effects/selections is excellent! And the resulting highlighted pattern of combinations that any combination produces is an even further way of displaying what is going on. Perfect!

        I never paid much attention to the "Faction bonus/penalty" box (8) and the "Ok/Reset/Cancel" buttons (9) can be placed anywhere as long as access to the buttons is easy.

        The central interface box has a simple design and I believe we can reproduce a similar style in Civ4.

        Note that the main interface is changed slightly to fit the Social Engineering screen... however, based on the current findings on how Civ4 handles the interface, I would suggest that we decide on a general layout of the bottom part of the interface that can be used for screens like this one too (with no changes).

        Any comments on the layout, how we want the screen to look in the MOD? (Or comments on my comments?)

        Comment


        • #5
          Amazing work MD! Looking great!
          Come visit the SMAC Mod
          You can download the latest mod by
          http://code.google.com/p/civ4smac/
          Fan of the original SMAC? join us and help

          Comment


          • #6
            Re: The GUI

            Originally posted by Rubin
            The "Social Effects Optimizer" (1), however, makes less sense to use, but can be useful for an effects summary of effects changes, etc.
            It could still be useful in a passive role (IE no buttons, just info readout)

            Originally posted by Rubin
            The "Energy Allocation Bars" (2) at the bottom seem somewhat out of place;
            These are basically the Tech/Culture sliders which determine how much gold is turned into extra beakers/culture. If we move those to here, then we can implement these bars... It would be best to leave them in, since it would keep people happy in terms of reproducing SMAC(X).

            Originally posted by Rubin
            The "Social Effects Summary" (5) is correctly placed when considering the position of the minimap in the main view--giving a brief, yet detailed, summary;
            This would probably take the most work to recreate, but I agree that it's very useful.

            Originally posted by Rubin
            but the information boxes (3) and (4) could definitely display more (or more important/relevant) information.
            If we perhaps put the info from box (4) into box (3) and vice versa, then it may make more sense, although the info form box (3) could indeed be expanded.

            Originally posted by Rubin
            The "Pop-up Help" (6) could use some tweaking--either as a piece of static information or perhaps completely removed (well, or something else... I find it annoying).
            If I remember correctly, you could switch that off in SMAC(X) and you can definitely switch it off in Civ4.

            Originally posted by Rubin
            The 3 rows of information/options in (7) are good; combining icons, text and colors to display the effects/selections is excellent! And the resulting highlighted pattern of combinations that any combination produces is an even further way of displaying what is going on. Perfect!
            Then we should keep it that way where possible .

            Originally posted by Rubin
            I never paid much attention to the "Faction bonus/penalty" box (8) and the "Ok/Reset/Cancel" buttons (9) can be placed anywhere as long as access to the buttons is easy.
            Box 8 is useful in telling you where certain values have come from when you're trying to do the maths yourself . The buttons should be left where they (or as close as possible), again to keep people happy.
            Ceeforee v0.1 - The Unofficial Civ 4 Editor -= Something no Civ Modder should ever be without =- Last Updated: 27/03/2009
            "Just because I'm paranoid doesn't mean there's no conspiracy"

            Comment


            • #7
              Re: The GUI

              The "Energy Allocation Bars" (2) at the bottom seem somewhat out of place; but overall a pleasing screen (intuitive, user friendly).
              You can access the current tech slider when the SE window is open. I wouldn't like to see it moved. In general, I envision a Civ4 with a SMAX look/feel, and of course functionality. I don't see the point of making an exact copy of every detail we can manage. For example, I find the vertical lists of civics just fine. In fact, they are better this way. It is more moddable and has better multi-language support. I could see a mod with 10 different "Politics" choices instead of 4, for example. I don't want to think what that would look like if the buttons were all in a row like in SMAC. And then imagine the buttons with German text on them.
              Last edited by mdbill; April 26, 2006, 16:29.

              Comment


              • #8
                Now that I'm more comfortable with the code. I believe Impaler was right. The new stuff fits best in the CivicInfo XML. I'm going to start this mod over from scratch (not much was changed anyway). This time it will be infinitely moddable. You can have Support=+8, or Planet -9, if you desire. You will be able to create Civic Groupings or even a whole new "Meter", e.g. Labor (-5 thru +5) just using the XML, no programming required.

                Comment


                • #9
                  Nice to hear that mdbill !

                  It sounds like you've found a robust way to do this.
                  no sig

                  Comment


                  • #10
                    [Design/Game Mechanics]

                    I hope you all can follow my shorthand. Anyone wanna help me fill out this list of social effects?

                    Econ

                    ?
                    -1 / base
                    0
                    +1 / base
                    +1/square
                    +1/square, 1 commerce
                    1/square, 2/base, 2 commerce
                    1/square, 4/base, 3 commerce

                    Efficiency

                    -4
                    .
                    ?
                    .
                    +4

                    Support

                    1/base
                    2/base (0 level)
                    3/base
                    4 / base
                    4/base or base size

                    Morale

                    -3 (+modifiers halved)
                    -2 (+modifiers halved)
                    -1 (+modifiers halved)
                    -1
                    0
                    1
                    1 (2 defense)
                    2 (3 def)
                    3

                    Police

                    0, Extra drone for military away
                    0, ?
                    0 no nerve staple
                    1, no nerve staple
                    1 (0 level)
                    2
                    2, double effect
                    3, double effect

                    Growth

                    Near zero growth?
                    ?
                    -10 %
                    0
                    10
                    20
                    30
                    40
                    50 %
                    60 % ? Pop boom?

                    Planet +/-10% combat bonus for each level for Psi combat

                    -3 FUngus production
                    -2
                    -1
                    0
                    lifeform capture
                    lifeform capture++
                    lifeform capture+++ (max?)
                    Max lifeform capture

                    Probe

                    -50% cost of enemy actions, enemy success rate increase (how much?)
                    ?
                    0
                    1 morale, ?
                    2 morale, double enemy actions
                    ?
                    3 morale, no normal subversion

                    Industry: +/- 10 % minerals for each level

                    Research: +/- 10 % research for each level

                    Comment


                    • #11
                      mdbill, as you can see in, for example, this post, the economy settings do not correspond with the game "documentation".

                      I would think something like this needs to be changed:

                      +4 Economy: +1 energy at each square, +3 energy at the base square and +2 commerce rating. Note that the base square gets a total of +4 energy.

                      Here are the economy values (as documented by the game) from the alphax.txt:

                      #SOCECONOMY
                      -3, -2 energy each base
                      -2, -1 energy each base
                      -1, -1 energy at HQ base
                      0, Standard energy rates
                      1, +1 energy each base
                      2, +1 energy each square!
                      3, +1 energy each square; +1 commerce rating!!
                      4, +1 energy/sq; +2 energy/base; +2 commerce!!!
                      5, +1 energy/sq; +4 energy/base; +3 commerce!!!!

                      I don't know if this helps or if it is the sort of information you are looking for.

                      Comment


                      • #12
                        I'm looking for the meaning of some of this stuff. +2 Commerce, what's that?

                        Murderous inefficiency ?

                        lifeform capture rates

                        Efficiency is probably the most mysterious

                        Comment


                        • #13
                          I'd like to help and here's what I find in the conceptsx.txt file:

                          Commerce is bonus energy generated from trade between two friendly factions.

                          The advanced entry goes like this (I underlined what I believe is the "civic" commerce value):

                          #ADVCONCEPT3
                          Commerce is computed base by base between factions with Treaties and Pacts as follows:

                          (1) First, all bases for each faction are ranked from top to bottom by Energy output.
                          (2) Bases are paired off from top to bottom. If one faction has extra bases, these are ignored.
                          (3) For each pair of bases, sum the combined economic output and divide by 8, rounding up.
                          (4) Double this value if a Global Trade Pact is in effect.
                          (5) Now, for each individual base, the commerce formula is as follows:

                          (ValueFromStep4) * (CommerceTech+1) / (TotalCommerceTech+1)

                          (6) CommerceTech is the total # of economic technologies discovered, plus faction & social bonuses.
                          (7) TotalCommerceTech is the total # of economic technologies in the game.
                          (8) Now, using the value from step 5, divide by 2 if no Pact (e.g. only a Treaty)
                          (9) Add +1 if you are Planetary Governor.
                          (10) Reduce to zero if sanctions are in effect against either faction.

                          ---

                          Did this help?

                          Comment


                          • #14
                            yea, helpful. I guess I need to get my SMACX installed so I can browse these files too.

                            Comment


                            • #15
                              On efficiency from the conceptsx.txt file:

                              #ADVCONCEPT1
                              The formula used to compute the energy lost to Inefficiency by a base is:

                              Inefficiency = (Energy * Distance / (64 - ((4 - Efficiency) * 8))

                              Energy: Amount of energy produced by base this turn.
                              Distance: Distance from Headquarters base (16 if no HQ).
                              Efficiency: Social Engineering EFFICIENCY (+2 if Children's Creche)

                              * If denominator reaches zero, ALL energy is lost to inefficiency.

                              Comment

                              Working...
                              X