Announcement

Collapse
No announcement yet.

Technology Model 7

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

  • #76
    There is actually a way to change the military RP output, which is to artificially enhance the upkeep of the tech, thus making it harder to get.
    Now, since that tech grows thru both combat and military research (2 activities), it does affect both of them. Putting a dummy tech which would drain excess RPs would allow a designer to make some activities not very interesting and others more so (but it would probably never be interesting to put RPs into activities that enhance the dummy tech).
    I can also in theory get the divider which computes the number of RPs earned from a fight into a resource file. I may very well forget to do it, however, unless you feel it will really help you tweaking stuff.
    Clash of Civilization team member
    (a civ-like game whose goal is low micromanagement and good AI)
    web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

    Comment


    • #77
      Originally posted by LDiCesare
      There is actually a way to change the military RP output, which is to artificially enhance the upkeep of the tech, thus making it harder to get.
      I think that lowering the growthrate is more appropriate than raising the upkeep, since upkeep is multiplied by the knowledge level. Raising upkeep means that earlier fights could still produce a lot, but later fights, when the civ´s knowledge has increased, produce less and less, until by modern times a fight provides very little.

      The dummy tech is a good idea for a temporary fix, since combat and investment go into different activities. I would not like those kinds of things in the final design, though.

      I can also in theory get the divider which computes the number of RPs earned from a fight into a resource file. I may very well forget to do it, however, unless you feel it will really help you tweaking stuff.


      I´ll see if I need it. Eventially, of course, every single number in the game should be read from a resource file. See my post in the military thread for an idea of what I would like military RP generation to be like in the long term.

      Comment


      • #78
        Cross-post from Economy Thread II

        Originally posted by Mark_Everson
        Its correct that these things aren't in there yet. I am not convinced yet that we need them, although there are certainly individual items where strong cases can be made for requiring particular specials. A particular compelling case is in weaponry, where bronze is a Lot better than stone/wood/copper, and iron a lot better than bronze. I guess my position is that for flexibility purposes the system should include limitations on building things if a special isn't available in the civ. Whether these restrictions should be used extensively in the base game, I'm not so sure of. I believe that if aluminum didn't exist we'd still have satellites. Other, admittedly inferior, materials would be used out of necessity where Al is now the material of choice. People are generally very good about working around lacking resources, although there is a certain cost to the workarounds. We can figure out exactly how this is done in the game as things move forward.
        Horses or other pack animals also. In every civilization that didn't have them or ignored them, the wheel was never devloped for anything beyond a novelty.
        Which Love Hina Girl Are You?
        Mitsumi Otohime
        Oh dear! Are you even sure you answered the questions correctly?) Underneath your confused exterior, you hold fast to your certainties and seek to find the truth about the things you don't know. While you may not be brimming with confidence and energy, you are content with who you are and accepting of both your faults and the faults of others. But while those around you love you deep down, they may find your nonchalance somewhat infuriating. Try to put a bit more thought into what you are doing, and be more aware of your surroundings.

        Comment


        • #79
          Here is a tech output from what I coded. It is not as nice as an array, but I can't format it well in a string.
          Richard, is it OK in terms of reports?
          I set Military spending to 20% in Carthago scenario, and spent some cash on food production (not research).
          There were a few fights with 3 units losing in Roman lands on the turn when they gave the RPs.
          We clearly need some tuning. I'll set the amount of RPs provided by fight in an xml file.

          -----------------------------------------
          Running 1
          Economic sector provides 0.09119316 Research points to Manufacturing
          Economic sector provides 4.202441 Research points to Food
          Economy provides 0.13843131 Research points to Military

          Biology Level = 3.0, New level = 3.008405, RPs = 0.0,Growth rate 0.01,Upkeep 0.0,Helper effect 1.0
          Farming, inactive,Growth rate 0.01,Upkeep 0.5,Helper effect 2.5
          Production Level = 3.0, New level = 3.0007296, RPs = 0.0,Growth rate 0.01,Upkeep 0.0,Helper effect 1.0
          Military Tactics Level = 3.0, New level = 3.0006921, RPs = 0.0,Growth rate 0.01,Upkeep 0.0,Helper effect 1.0
          horses, inactive,Growth rate 0.01,Upkeep 0.5,Helper effect 2.5
          Metallurgy, inactive,Growth rate 0.01,Upkeep 0.5,Helper effect 2.5

          -----------------------------------------
          Running 2
          Economic sector provides 0.018240914 Research points to Manufacturing
          Economic sector provides 0.2801896 Research points to Food
          Economy provides 0.06886797 Research points to Military

          Biology Level = 3.008405, New level = 3.0089653, RPs = 0.0,Growth rate 0.01,Upkeep 0.0,Helper effect 1.0
          Farming Level = 3.0, New level = 3.0022452, RPs = 0.0,Growth rate 0.01,Upkeep 0.5,Helper effect 2.5042024
          Production Level = 3.0007296, New level = 3.0008755, RPs = 0.0,Growth rate 0.01,Upkeep 0.0,Helper effect 1.0
          Military Tactics Level = 3.0006921, New level = 3.0010364, RPs = 0.0,Growth rate 0.01,Upkeep 0.0,Helper effect 1.0
          horses Level = 3.0, New level = 3.0001724, RPs = 0.0,Growth rate 0.01,Upkeep 0.5,Helper effect 2.5042024
          Metallurgy Level = 0.0, New level = 5.217056E-4, RPs = 0.0,Growth rate 0.01,Upkeep 0.5,Helper effect 2.5003648

          -----------------------------------------
          Running 3
          Economic sector provides 0.017021438 Research points to Manufacturing
          Economic sector provides 0.2600643 Research points to Food
          Economy provides 0.064524874 Research points to Military

          Biology Level = 3.0089653, New level = 3.0094855, RPs = 0.0,Growth rate 0.01,Upkeep 0.0,Helper effect 1.0
          Farming Level = 3.0022452, New level = 3.0043285, RPs = 0.0,Growth rate 0.01,Upkeep 0.5,Helper effect 2.5044827
          Production Level = 3.0008755, New level = 3.0010116, RPs = 0.0,Growth rate 0.01,Upkeep 0.0,Helper effect 1.0
          Military Tactics Level = 3.0010364, New level = 3.001359, RPs = 0.0,Growth rate 0.01,Upkeep 0.0,Helper effect 1.0
          horses Level = 3.0001724, New level = 3.000334, RPs = 0.0,Growth rate 0.01,Upkeep 0.5,Helper effect 2.5044827
          Metallurgy Level = 5.217056E-4, New level = 0.0010100515, RPs = 0.0,Growth rate 0.01,Upkeep 0.5,Helper effect 2.5004377

          -----------------------------------------
          Running 4
          Economic sector provides 0.015992679 Research points to Manufacturing
          Economic sector provides 0.24277046 Research points to Food
          Economy provides 0.0034487224 Research points to Military
          Combat provides 56.201187 Research points to Combat

          Biology Level = 3.0094855, New level = 3.0099711, RPs = 0.0,Growth rate 0.01,Upkeep 0.0,Helper effect 1.0
          Farming Level = 3.0043285, New level = 3.0062726, RPs = 0.0,Growth rate 0.01,Upkeep 0.5,Helper effect 2.5047426
          Production Level = 3.0010116, New level = 3.0011396, RPs = 0.0,Growth rate 0.01,Upkeep 0.0,Helper effect 1.0
          Military Tactics Level = 3.001359, New level = 3.563388, RPs = 0.0,Growth rate 0.01,Upkeep 0.0,Helper effect 1.0
          horses Level = 3.000334, New level = 3.0003426, RPs = 0.0,Growth rate 0.01,Upkeep 0.5,Helper effect 2.5047426
          Metallurgy Level = 0.0010100515, New level = 0.0011115386, RPs = 0.0,Growth rate 0.01,Upkeep 0.5,Helper effect 2.500506
          Clash of Civilization team member
          (a civ-like game whose goal is low micromanagement and good AI)
          web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

          Comment


          • #80
            Hi Laurent, I'm working on the update you sent recently, trying to get the testbed out to Richard and Martin. I hope to have that shortly. Unfortunately my new comp chokes on my old IDE (VisualCafe) so I need to bounce back and forth between the new and old computers to do work.

            There was a problem with the econ not producing enough RPs that I think I've fixed by just changing the RP scaling for econ activities. But while I was at it I noticed something odd about your tech diagnostic.

            Originally posted by LDiCesare
            Running 4

            Economic sector provides 0.24277046 Research points to Food

            Farming Level = 3.0043285, New level = 3.0062726, RPs = 0.0,Growth rate 0.01,Upkeep 0.5,Helper effect 2.5047426
            How come RPs = 0.0 for Farming in the Farming Level diagnostic? That's where most of the Food RPs go so I'd expect to see somthing like 0.20 there for RPs. It looks like all of them always say 0.0. Am I missing something?
            Project Lead for The Clash of Civilizations
            A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
            Check it out at the Clash Web Site and Forum right here at Apolyton!

            Comment


            • #81

              Sounds like I should look at the results before I send stuff.
              Yes, there is a slight problem with the number of RPs shown. I guess that is the number after they have been consumed. I'll correct that soon.
              Clash of Civilization team member
              (a civ-like game whose goal is low micromanagement and good AI)
              web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

              Comment


              • #82
                That log helped me a lot as I was fine-tuning Dawn. One thing I would like to point out is the Upkeep numbers. Since the RP´s are divided by one plus the upkeep total, I think it would be good to add one to these numbers in the output too, to make it display like the helper number. I can add one in my head, but other people might get confused. It should be clear that RP´s are multiplied by the Helper number and divided by the Upkeep number.

                The only other problem is the zero RP bug that Mark already pointed out.

                Comment


                • #83
                  Proposal

                  We need a good system for dealing with the activation and inactivation of technologies, and the displaying of Activities on the Econ GUI.

                  Currently, all techs and activities defined in the file start the game active, even when there is a requirement in a helper tag that has not yet been met. As the tech tree gets bigger and starts to include more advanced technologies, this could become a problem. I think that fixing this should be a fairly high priority. Here´s my inital proposal:

                  Definitions:

                  Technologies are either active or inactive, and Activities are either visible or invisible.

                  An inactive technology cannot recieve RP´s from any source, including economic activity, government investment, or events. It still retains it knowledge amount and can serve as a helper for other technologies and applications. Inactive technologies do not appear on the GUI, and so are hidden from the player.

                  An invisible Activity does not appear on the GUI and cannot be funded directly, but it may still recieve RP´s from the economy or events. The Food activity may remain invisible for most of the game, even though the economy gives it RP´s every turn and it distributes those RP´s to various technologies. However, direct investment only comes when the civ knows enough to take an active role in research.

                  Behavior:

                  All techs are inactive by default and all activities are invisible by default. They must be turned on by certain conditions described in xml tags. If these tags are absent, they can only be turned on by events. Once turned on, they may be turned off again with similar tags.

                  Tags:

                  Technologies may have <active> and <inactive> tags, and Activities may have <visible> and <invisible> tags. These tags may contain the following inner xml tags, which change the state of the thing they are placed in:

                  The turn tag: <turn>1</turn> changes the state at a certain time.

                  The technology tag:
                  <technology>
                  <name>Production</name>
                  <knowledge>2</knowledge>
                  </technology>
                  changes the state at the specified knowledge of the specified technology. Note that this replaces the <requirement> tag of the helper technology, which does not appear to be working anyway.

                  The special tag: <special>Horses</special> changes the state when the civ acquires that special through discovery or trade.

                  The unit tag: <unit>Chariot</unit> changes the state when the specified unit can be built by the civ.

                  The diplomaticstatus tag:
                  <diplomaticstatus>
                  <civilization>any</civilization>
                  <status>contact</status>
                  </diplomaticstatus>
                  changes the state when the specified status is achieved with the secified civ.

                  And finally, the condition tag: <condition>Nomads destroyed</condition> allows any named condition in the events model to change the state of the technology or activity.

                  Examples:

                  To help clarify the possible behavior, consider the following:
                  Code:
                   
                    <technology>
                      <name>Woodworking</name>
                      <active><turn>1</turn><active>
                      <inactive>
                        <technology>
                          <name>Woodworking</name>
                          <knowledge>20</knowledge>
                        </technology>
                      </inactive>
                  <!-- ==snip== -->
                    </technology>
                  This technology is available from the beginning of the game. It is a helper for various early production technologies. However, there is only so much Woodworking a civ needs. Once it reaches a Knowledge of 20, there is no more improvement possible, so the technology becomes inactive again. It will recieve no RP´s and will never rise any higher, but it still provides the same helper benefit it did before. The player can ignore it.
                  Code:
                   
                    <technology>
                      <name>Elephants</name>
                      <active><special>Elephants</special><active>
                      <inactive><unit>Knight</unit></inactive>
                  <!-- ==snip== -->
                    </technology>
                  This technology may exist in a scenario for beefing up the civ´s Elephant units. To get these units, the civ has to find a special, and then research the Elephants tech until it reaches a certain knowledge. If the Knight unit is what makes the Elephant unit obsolete, then that unit should also shut off the tech that improves elephants, since it is no longer needed.

                  Tag Logic:

                  If two conditions are in the same tag, then both must be met for the change to take place. If there are two different tags, than either tag alone is sufficient to change. For example:
                  Code:
                   
                    <activity>
                      <name>Military</name>
                      <visible>
                        <diplomaticstatus>
                          <civilization>any</civilization>
                          <status>war</status>
                        </diplomaticstatus>
                      </visible>
                      <visible>
                        <condition>barbarian attack</condition>
                        <technology>
                          <name>Organization</name>
                          <knowledge>2</knowledge>
                        </technology>
                      </visible>
                  <!-- ==snip== -->
                    </activity>
                  This activity will become visible if there is a state of war with any other civilization. It will also turn on if the civ has an Organization knowledge of 2 and the "barbarian attack" condition has been activated.

                  Does this sound good? I tried to make it work like the other things described in the dataformat guide, and I think that it would provide a lot of flexibility and functionality.

                  Comment


                  • #84
                    Currently, all techs and activities defined in the file start the game active, even when there is a requirement in a helper tag that has not yet been met.
                    No they don't start the game active.
                    In fact, with the last code, you can check it before hitting the end turn button in Delenda. You will see that all techs that have prerequisites start inactive. They become active after the first turn. It is a bug, because in that case they should be active on turn 1, but it works, and the bug is really minor IMO.

                    Now to your proposal:
                    I certainly want to be able to push the Elephant tech forward if I have an army of 10000 elephants and no knight yet. I may want to have the elephant tech updated until I get dragoons and skip knights altogether. So I don't want, under any condition, a tech to become obsolete when it could still be useful.
                    I also don't like being able to do research of a tech only if certain conditions are met, like being at war. I want to build up my military tech while at peace and only then should I strike.
                    I'd rather have a <maxKnowledge> tag to show maximum knowledge. Any other limitation which prevents me from researching something will frustrate me, unless I don't have the prerequisites.
                    The only prerequisites I think are OK are:
                    other techs, specials, and condition events. I think conditional events can be made of almost anything, anyway. I can understand the lack of a special would inactivate a tech (no more horses, no more horesback riding tech).
                    So all in all, I think your suggestion is OK although I don't think the tags will look like that when it gets coded. I don't like your examples, however.
                    Clash of Civilization team member
                    (a civ-like game whose goal is low micromanagement and good AI)
                    web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

                    Comment


                    • #85
                      Originally posted by LDiCesare
                      No they don't start the game active.
                      In fact, with the last code, you can check it before hitting the end turn button in Delenda. You will see that all techs that have prerequisites start inactive. They become active after the first turn. It is a bug, because in that case they should be active on turn 1, but it works, and the bug is really minor IMO.
                      Yes, they become active after the first turn even if the prerequisites have not yet been met. I checked by making Metallurgy require a Production of 1. It started inactive and immediately activated and started growing even though production was still about zero. It seems that, currently, anything with helpers starts inactive but then becomes active on the second turn.

                      IIRC Gary said that it was a bad idea to link the helpers and requirements, and it seems that he was right. Linking them seems to cause problems, so it would probably be good to correct my earlier design error by sepreating them comeletely.

                      [q]I certainly want to be able to push the Elephant tech forward if I have an army of 10000 elephants and no knight yet. I may want to have the elephant tech updated until I get dragoons and skip knights altogether.[q]

                      So instead of becoming inactive at Knight, it becomes inactive at Dragoon. I was assuming that the unit in the military model became obsolete at Knight, so once that unit can be built it is impossible to build more elephants. I thought it would be fairly easy to reuse military model obsolescence code to do this as well. Currently we don´t have any spec to inactivate such techs.

                      What we want to prevent is an industrial age civ exploring a new continent, discovering the special, and having that tech on their screen for the rest of the game unless they throw RP at it just to make it hit the max knowledge and go away. If we don´t handle these kinds of units by a technology, then anybody can build it or it is artificially limited to certain civilizations. I don´t like either.

                      So I don't want, under any condition, a tech to become obsolete when it could still be useful. I also don't like being able to do research of a tech only if certain conditions are met, like being at war. I want to build up my military tech while at peace and only then should I strike.


                      I think that these are scenario design considerations, and that problems can be prevented. But IMO it is silly to be able to research, for example, espionage related techs if your civ is not even aware of the existence of other civilizations.

                      But perhaps I didn´t explain the spec very well. Once a conditon in the active or visible tag has been met, the thing will always be turned on unless something inactivates it. I didn´t want to check the activation every turn, just one time. Once you have been at war with anybody (or you organized to prepare for the barbarians), you will always be able to research the technology, even if currently at peace. But if you have never been in a fight, how will your civ even know how to use government funds to make an army better?

                      I'd rather have a <maxKnowledge> tag to show maximum knowledge. Any other limitation which prevents me from researching something will frustrate me, unless I don't have the prerequisites.


                      We don´t have to use all of those things in the Inactive tag. Some of them, like the turn tag and special tag, are really only meant to activate things. (Although it would be kind of cool to inactivate the Bronze Working technology when your civ discovers an Iron deposit.) From what I know of programming, once you write the code in to check a condition and turn something on, is is fairly easy to reuse that code to turn something off. Checking the knowledge to turn something on is a central part of the system, so why not use that same format instead of inventing a new tag?

                      The only prerequisites I think are OK are:
                      other techs, specials, and condition events.


                      As mentioned before, I think some tech should depend on diplomatic status. The turn tag could also be useful, especially for scenario designers. It is also IMO the easiest way to make sure a tech starts the game active. Unit tags would also be worthwhile, but I don´t care about them as much.

                      Comment


                      • #86
                        If you want an event of some kind (reaching a certain knowledge may be particular, but it can still be seen as an event), like meeting a civ or something else to empower the ability to research a tech, then the tags used would be the events tag.
                        That doesn't change the functionality, but instead of designing an object which has to check for events, you design events which will change the object tech. The latter is actually far easier and better to design (and more flexible).
                        Events (condition events) can check a tech knowledge, military things, control of a square, and, the big good thing is, we can add any number of these as we grow the game. That way, we can add diplomatic status events when the diplomacy code is functional, and allow the tech to be affected without touching a line of code.

                        Overall, I think that the code will allow the flexibility you want, but you may have to write the things in an equivalent of civ2's events.txt instead of rules.txt.
                        Clash of Civilization team member
                        (a civ-like game whose goal is low micromanagement and good AI)
                        web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

                        Comment


                        • #87
                          One potential problem is that events are currently only defined in the scenario xml file. This means that if the tech tree depends on such events, then they have to be defined in each and every scenario.

                          Of course, if we add a default events.xml that all scenarios read from, then the problem goes away. I can work with that. All techs simply would start inactive and all activities start invisible unless some event turns them on. The requirement tag can then be removed form the helper tech tag, since it would then be redundant. So the only thing that needs to be coded is the statuses of active/inactive and visible/invisible, and I can figure out how to make the events model do what I want.

                          It might be good to have a seperate techevents.xml and events.xml to keep things straight. One more thing is that the events model should run on a "Turn 0" so that the player can start the game with all techs active that should be active.

                          Comment


                          • #88
                            I agree with you. An events.xml file would be needed. I think separating into techevents.xml will come afterwards, if there are any events that need be done for another sector. Note the frontier between tech and non tech may be fuzzy, as tech discoveries will probably be one of the most common event trigger. We can break the events.xml file in bits when it gets done.

                            I know I must run a turn 0 tech round somewhere. Just need to find out where and some time to do it.
                            Clash of Civilization team member
                            (a civ-like game whose goal is low micromanagement and good AI)
                            web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

                            Comment


                            • #89
                              While balancing tech growth for Testbed 7.5.1, I realized something:

                              Activities should not necessarily output the same number of RP´s that are input into them. Enforcing this requirement ties the hands of scenario builders. The method I propose to fix this is very simple. Keep the current proportion tags, but remove the requirement that they add up to one. Each active recipient simply recieves a number of RP´s equal to the RP´s input into the activity times the proportion.

                              This solves several problems. First, there is the issue of the farm sector. Currently, I had to seriously cut the growthrate of farming techs in order to prevent excessive growth, which means that farm investment is next to impossible. Having two activities could solve this easily. If the Food activity was not visible to the GUI and looked like this:
                              Code:
                              <activity>
                                <name>Food</name>
                                <description>Automatic econ-based improvement</description>
                                <recipient>
                                  <name>Biology</name>
                                  <proportion>0.02</proportion>
                                </recipient>
                                <recipient>
                                  <name>Farming</name>
                                  <proportion>0.08</proportion>
                                </recipient>
                              </activity>
                              and the player could invest in the following activity:
                              Code:
                              <activity>
                                <name>Farm Technology</name>
                                <description>Government Investment</description>
                                <recipient>
                                  <name>Biology</name>
                                  <proportion>0.2</proportion>
                                </recipient>
                                <recipient>
                                  <name>Farming</name>
                                  <proportion>0.8</proportion>
                                </recipient>
                              </activity>
                              Then the growth problem would be solved.

                              Then there is the issue of activities and new technologies. Currently, if an Activity has one active recipient, like they all do on the first turn, that one recipient recieves a huge boost of any RP are fed into that activity. While the turn one bug will be fixed, I think this behavior is unbalancing.

                              An inactive technology should simply not get any RP´s, and this should not affect the RP´s given to the recipients that are active. So if the iv manages to invest in Farm Technology when Farming is inactive, then Biology gets 20% of the RP´s and the rest are wasted. And when a technology becomes active, it should not decrease the amount given to the rest. So if the activity looked like this:
                              Code:
                              <activity>
                                <name>Farm Technology</name>
                                <description>Government Investment</description>
                                <recipient>
                                  <name>Biology</name>
                                  <proportion>0.2</proportion>
                                </recipient>
                                <recipient>
                                  <name>Farming</name>
                                  <proportion>0.8</proportion>
                                </recipient>
                                <recipient>
                                  <name>Genetics</name>
                                  <proportion>0.1</proportion>
                                </recipient>
                              </activity>
                              Then when Genetics become active it gets 10% of the RP´s that go into the activity, but research into the other two is not penalized. In this way the player is rewarded for getting new techs, and existing research is not slowed down by the discovery. I do not think this is unbalancing, since it represents the synergy that results when new techs are discovered.

                              I think these proportions would be much more flexible than a weighted average method, and would be easier for both coders and designers to deal with.



                              I also noticed another problem with the listed upkeep of the techs in the tech output file. It only shows the base upkeep times tech upkeep from the file, which is not very helpful. It should show (upkeep*tech level) + 1, which is the number that RP´s are divided by.

                              Comment


                              • #90
                                I also noticed another problem with the listed upkeep of the techs in the tech output file. It only shows the base upkeep times tech upkeep from the file, which is not very helpful. It should show (upkeep*tech level) + 1, which is the number that RP´s are divided by.
                                I already fixed that. You'll see "upkeep+1=..." in the file.

                                About proportion adding up to 1, you (or someone else) asked elsewhere that the figures should be proportions, so that inactive techs wouldn't benefit from it until they are discovered. I implemented that too, but that is incompatible with the fixed figure. Maybe adding a "Wasted" recipient would do the job too. What do you think?
                                Clash of Civilization team member
                                (a civ-like game whose goal is low micromanagement and good AI)
                                web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

                                Comment

                                Working...
                                X