Announcement

Collapse
No announcement yet.

Technology Model 7

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

  • #31
    Originally posted by LDiCesare
    factor is the lower of:
    1 or (cost of own troops/cost of enemy troops).
    I don´t follow your conclusions. It looks like losing to an army that costs the same provides exactly as many RP´s as losing to an army that costs a tenth as much.

    It is good to prevent kamikaze behavior, so losing to a much more expensive army shouldn´t help much. Similarly, winning against a much cheaper army shouldn´t help much either. Maybe there should be different formulas for winning and losing:

    If you win, you get RP´s proportional to the cost of the enemy units.

    If you lose, you get RP´s proportional to the cost of your own units.

    About the coding, I think it needs a bit more than just one formula change. The entire concept of tech levels has disappeared, and handling those involved a lot of variables that no longer exist. The old xml files had a lot of stuff that is meaningless now, so I will be leaving that stuff off the new files. We need to make sure that the code does not try to read things like startlevel off the files.

    Also, can we split the model into three different xml files? It would be much easier for me to make my tech editor if technologies, applications, and activities were in three different xml files instead of lumped together in one big file, and I think it would be better overall.

    Comment


    • #32
      I don´t follow your conclusions. It looks like losing to an army that costs the same provides exactly as many RP´s as losing to an army that costs a tenth as much.
      Argh! Yes you are right. I agree with the different win/lose formulas. Remains the point about stalemates. Should they give points at all? Maybe not. That and territory factor should make a good formula.


      Splitting the xml file in three is not a problem. Particularly considering that some applications (military units and elements) are already in their own file. You can have as many files as you like, actually. I'll just put them in a folder if there are too many.


      If I have to rehaul the code more than one formula, I can do it, but it will take even more time. I'll have to read all the model carefully now...
      I have been scanning the code.
      If I understand well, barring diminishing returns which are easy to locate, the following changes affect the equations:
      global helperweight disappears.
      Do multiplier and growthfactor remain? They are not in your sample xml. I guess they don't, as I didn't see them in the equation.
      I am struggling to have the correct understanding of the old model in order to know what I need to change so I will probably be asking silly questions soon.

      Variables no longer in the xml?
      global: diminishingreturns, helperweight, multiplier, growthfactor
      technology: diminishingreturns, startlevel??
      helper: startlevel, leveloffset -> requirement just a rename for startlevel or leveloffset or something different?
      I haven't read everything in depth, and will not have time until saturday (maybe friday), but I need to know what changes and what stays. Also, if you can keep the same names for things that don't change, that helps a little. Am I correct in saying that tech levels are replaced by knowledge in the equations? I'll have better questions this weekend I hope.
      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


      • #33
        Originally posted by LDiCesare
        I agree with the different win/lose formulas.
        I realized last night that they are not actually different. Each side gets RP´s proportional to the cost of the loser´s units, so it should be easy and simple.

        Remains the point about stalemates. Should they give points at all? Maybe not.


        I vote no. Stalemate implies lack of progress.

        That and territory factor should make a good formula.


        I am not so sure about the territory factor. There is nothing inherently different about a fight in your hometown versus far away. The increased risk to the home civ should IMO be modeled by an increase of RP´s fed into military research when the people feel threatened.

        If I have to rehaul the code more than one formula, I can do it, but it will take even more time. I'll have to read all the model carefully now...


        Tech 7 was a big change, since it entirely ditched tech level and all the variables needed to deal with it. Now Knowledge is the only thing that calculations are based on.

        The only globals that remain are growthrate and upkeep

        multiplier and growthfactor have been swept into the rubbish bin of history, as have all cases of diminishingreturns and anything with level in its name

        requirement does something similar to startlevel, but note that the helper tech equations have changed significantly.

        Nothing really changes in the technology growth equations, since knowledge has always been there. Tech level was a logarithmic function based on knowledge, and we got rid of it to concentrate only on knowledge. No names for things that work the same way have been changed.

        No, you are not correct in saying that tech level has been replaced by knowledge. Knowledge was always there, and the two are very different things. In the past, tech level was based on knowledge and the helper and applications were based on tech level. Now, helper and applications are based directly on knowledge with no intermediary, which means that the equations for those have been changed quite a bit, since they are now based on a linear function rather than a logarithmic one.

        Maybe it will help if I add an application or two to my tech spreadsheet to provide a concrete example. I´ll start working on that.

        Comment


        • #34
          Originally posted by Richard Bruns
          That and territory factor should make a good formula.


          I am not so sure about the territory factor. There is nothing inherently different about a fight in your hometown versus far away. The increased risk to the home civ should IMO be modeled by an increase of RP´s fed into military research when the people feel threatened.
          I am guilty of not explaining the importance I ascribe to the "desperation factor" in tech advancement. One of the main modifiers of tech progress, at least from my readings, is peoples' resistance to change. Significant change usually implies large risks, and that's why it isn't normally undertaken. That is somewhat true today, and was Very true in earlier days.

          One thing that does lead to change is Desperation. If what your society is doing now seems doomed to failure then there is an oppenness to potential change since "we're screwed anyway, might as well try something different and hope for a miracle". FE when the Romans started fighting the Gauls the Romans' rigid phalanx-like formations regularly got creamed. Rome at that time came into serious trouble, and was fairly nearly destroyed. The desperation of not being able to fight the Gauls well lead them to develop the Legion and its much more flexible fighing style. Without the Gaul threat and near-destruction of the Roman state, who knows how long it would have taken them to evolve to a Legion.

          I think this effect is also good for Game Balance. If you are small and about to go under there is a chance for a miracle in military innovation to save you! If you are big and swallowing up everything in sight there is no pressure to innovate, things are working just fine, thank you.

          The problem with the comment that risk should be modeled as increased military tech investment is that if a civ is small it just doesn't have much to invest. Especially when the barbarians are battering down the gates. For that reason I think there should be a serious 'desperation bonus' when a civ begins shrinking toward nothingness. I picture in the long run something more nuanced than Laurent's proposals, but I think what he says captures easily, and good enough for the time being, what I was looking for. I'd like to clarify that the bonuses Laurent is ascribing should only be applied for the losing side of the battle. Winning gloriously on your own ground shouldn't give any benefit beyond a normal win on someone else's land.
          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


          • #35
            I finally read teh model carefully.
            I sum it up to 2 equations:
            Knowledge = previous Knowledge + ( TotalHelperEffect * GrowthRate * RP ) / ( 1 + Upkeep * Knowledge )
            TotalHelperEffect = 1 + ( HelperTechEffect1 * Knowledge1 ) + . . .
            I guess the divider in the Knowlege equation is 1 + Upkeep * previous Knowledge, just to clarify.

            Now I understand the difference between knowledge and levels.

            I have a few points about applications:

            Obsolescence: Teh way I coded it for military units (and the way I definitely want it to be) is different from " a tech makes an application obsolete". It is "an application makes an application obsolete".
            So in Delenda scenario, legions become obsolete when cohorts are available.
            Not only that, but they become obsolete only when they are less efficient: I compute an overall "efficiency" value for military units (applications), and an app is obsolete if the obsolescing app is more efficient.
            That prevents people from having obsolete units and being unable to build a replacement for example.

            The equation for effect of tech on applications is a bit complicated for me:
            effect multiplier = 1 + (knowledge1 - base1) / knowledge1 * knowledgeffect1 + ...
            Consider LowTechApp with a base knowledge of 1 and a factor of 0.1, and a HiTechApp with a base knowledge of 10 and a factor of 0.1.
            HiTechApp is helped ten times less than LowTechApp for a change of 1 in knowledge.
            I'd simplify the equation by changing it to:
            (knowledge - base) * knowledgeffect (skip the division).
            This allows to keep factors constant if you change the base knowledge.
            If we don't do it that way, imagine the figures you would have for applications that don't obsolete one another: The knowledgefactor would have to be at lest proportional to the base knowledge in order for higher tech applications to be of any good. Linking two variables that way makes the model cumbersome to adjust IMO.

            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


            • #36
              Originally posted by LDiCesare
              I finally read teh model carefully.
              I sum it up to 2 equations:
              Knowledge = previous Knowledge + ( TotalHelperEffect * GrowthRate * RP ) / ( 1 + Upkeep * Knowledge )
              TotalHelperEffect = 1 + ( HelperTechEffect1 * Knowledge1 ) + . . .
              Basically, yes.

              I guess the divider in the Knowlege equation is 1 + Upkeep * previous Knowledge, just to clarify.


              Yes, if that divider equals TotalHelperEffect then growth will be balanced.

              Your system for obsolescence looks very good.


              Consider LowTechApp with a base knowledge of 1 and a factor of 0.1, and a HiTechApp with a base knowledge of 10 and a factor of 0.1.
              HiTechApp is helped ten times less than LowTechApp for a change of 1 in knowledge.


              You are forgetting that knowledge is supposed to grow on an exponential curve, not a linear one. Knowledge should double at a fairly constant rate over time, so the time it takes for a primitive civ to move from knowledge 1 to 2 is the same as the amount of time it takes for a more advanced civ to move from knowledge 10 to 20. Look at the spreadsheet for clarification, taking note of how fast Knowledge grows in the later years. This is a natural consequence of the exponential growth in GDP that all civilizations experience, so we have to adjust the model to it. Your proposed simplification would cause later applications to grow to astronomical levels, multiplying their effectiveness by up to 20 each turn.




              Research Point Generation

              Mark´s points about the desperation effect are quite valid. However, I believe it is a mistake to link the tech growth to battles. If desperation tech only comes from losing battles, then the civ will be unable to adjust to an obvious threat until a battle is fought. If a horde of clearly superior enemies is on the doorstep, then the civ should get RP regardless of whether a battle is fought. If they don´t then clever players will be forced to send the troops in a kamikaze attack in order to turn on the desperation RP growth.

              I believe that the battle formula should remain the same, no matter where battles are fought. The civ should then get free RP´s added to the system in times of dire need. Obviously, losing a major battle on home ground would turn this on, but so would the knowledge that the battle will be lost if nothing is done.

              Of course, we have to prevent players from abusing this by keeping no armies in reserve. The desperation RP should only come if a large percentage of the economy is already devoted to the military, and the civ cannot reasonably make more units normally.

              There has been some discussion in the demo planning thread about peaceful contact causing tech growth. I believe that this is best represented by a Peace Dividend to RP´s that is seperate from trade. The Peace Dividend comes from friendly contact, and is not affected by the level of economic contact.

              So we have the following ways of generating RP´s:

              Economic: from the civ´s spending money on things, currently the primary RP source
              Desperation: when the civ is about to die, and economic means cannot save it
              Trade: based on trading volume with another civilization and difference in Knowledge between the two civs
              Peace: from diplomatic contact with another civ, based on attitudes toward each otehr and difference in Knowledge between the two civs
              Spying: from covert operations, based on success of spies and difference in Knowledge between the two civs
              Diplomacy: gaining RP´s in a fair exchange

              The peace dividend, spying, and diplomacy will have to wait form the diplomatic model. Is there a trading model already that can generate trade RP´s?

              Comment


              • #37
                You are forgetting that knowledge is supposed to grow on an exponential curve, not a linear one. Knowledge should double at a fairly constant rate over time, so the time it takes for a primitive civ to move from knowledge 1 to 2 is the same as the amount of time it takes for a more advanced civ to move from knowledge 10 to 20. Look at the spreadsheet for clarification, taking note of how fast Knowledge grows in the later years. This is a natural consequence of the exponential growth in GDP that all civilizations experience, so we have to adjust the model to it. Your proposed simplification would cause later applications to grow to astronomical levels, multiplying their effectiveness by up to 20 each turn.
                I understand what you say, and thought as you do at first, but the maths say you are wrong. The function is basically the following:
                1 + (knowledge1 - base1) / base1 * knowledgeffect1 + ...
                (I wrongly typed /knowledge1 in the previous post).
                Considering base1 and knowledgeeffect1 are constant, this sums up to:
                1 + constant factor * (knowledge1 - base1).
                What I say is that instead of constantfactor being made up from two variables input in the xml file, I want it to be directly input in the file.

                I understand the exponential problems, and that is actually why I want to suppress that divider.

                Let's look at a warrior (req tech 1, attack 1, knowledgeeffect 0.1).
                At tech knowlege 1 it is attack 1, at 10 it's got 1.9, at 100 it's got 10.9, at 1000 it's got 100.9
                Now what does a phalanx (req tech 10, attack 2) needs in terms of knowledgeeffect to be better than a warrior?
                Say I put 0.1 too. At tech knowledge 100, I have a multiplier of:
                (1 + 90/10*0.1) = 1.9, for a total attack of 3.8. The warrior has 10.9 at that knoweldge! Phalanx started slightly better (2 > 1.9), but ends up worse while the knowledgeeffect (0.1) remains the same.
                For the phalanx to be competitive, it would have to have at least attack = 11, so that means a multiplier of 5.5. But to still be better at knowledge 1000, it needs more, and you end up needing a knoweldgeeffect of 1 in order not to become worse than a warrior at some point.

                Do note that my simplification is just a mathematic simplification. I do not change the model. I am just replacing the knowledgeeffect/baseknowledge constant name by knowledgeeffectvariant constant name.

                If there is an exponential problem, then it lies in the model and we should change the formula to something like:
                sqrt (or log) (previous formula for multiplier).
                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


                • #38
                  Mark´s points about the desperation effect are quite valid. However, I believe it is a mistake to link the tech growth to battles. If desperation tech only comes from losing battles, then the civ will be unable to adjust to an obvious threat until a battle is fought. If a horde of clearly superior enemies is on the doorstep, then the civ should get RP regardless of whether a battle is fought. If they don´t then clever players will be forced to send the troops in a kamikaze attack in order to turn on the desperation RP growth.
                  Currently, some RPs are earned through battles, but if you invest your economy in military tech, you will earn much bigger benefit. Try to get Cohorts available in Delenda if you get RPs only through battles. Chances are you will have finished the game before you do. If you put some econ in Military, then you will have them.
                  If you don't decide to put points in Military techs when there are big armies regularly invading you, then you should lose IMO because that research should put a strain on other areas of the economy.
                  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


                  • #39
                    Originally posted by Richard Bruns
                    So we have the following ways of generating RP´s:

                    Economic: from the civ´s spending money on things, currently the primary RP source
                    Desperation: when the civ is about to die, and economic means cannot save it
                    Trade: based on trading volume with another civilization and difference in Knowledge between the two civs
                    Peace: from diplomatic contact with another civ, based on attitudes toward each otehr and difference in Knowledge between the two civs
                    Spying: from covert operations, based on success of spies and difference in Knowledge between the two civs
                    Diplomacy: gaining RP´s in a fair exchange

                    The peace dividend, spying, and diplomacy will have to wait form the diplomatic model. Is there a trading model already that can generate trade RP´s?
                    I'm game to give your approach a shot Richard. Most of these type things are really easy to change or tweak anyway.

                    Is there a trading model already that can generate trade RP´s?
                    Yes. Check out the crude merchant function in delenda now. It is nowhere near as sophisticated as it will be, but it can start to serve an RP generation function as soon as we have a spec.

                    Trade: based on trading volume with another civilization and difference in Knowledge between the two civs
                    I would even offset this a little so that two civs with identical tech knowledges still gain some RPs from trade. This is because different tech approaches that give the same practical results can still be recombined to increase capabilities.

                    I'm going to leave the math to you guys for the moment. If you think you need a third opinion let me know. And of course if I see something I don't like, I'll speak up as usual .

                    Lookin' Good!
                    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


                    • #40
                      Originally posted by LDiCesare
                      Considering base1 and knowledgeeffect1 are constant, this sums up to:
                      1 + constant factor * (knowledge1 - base1).
                      What I say is that instead of constantfactor being made up from two variables input in the xml file, I want it to be directly input in the file.
                      You are correct. This mathematical simplification is basically what I did with helper techs. The difference is that helpers of technologies affect growth rates, while helpers of applications change the values directly. This means that if we removed the base number, applications would start at a multiplier equal to the tech start level.

                      I vote to accept the changes, giving the name knowledgeeffect to your new factor.

                      Note that with this change, knowledgeeffect must decrease as we get higher up the tech tree, just as helpertecheffect does.

                      Let's look at a warrior (req tech 1, attack 1, knowledgeeffect 0.1).
                      At tech knowlege 1 it is attack 1, at 10 it's got 1.9, at 100 it's got 10.9, at 1000 it's got 100.9


                      Correct

                      Now what does a phalanx (req tech 10, attack 2) needs in terms of knowledgeeffect to be better than a warrior?


                      Think about those requirements. Why is it that something that requires ten times the knowledge only has twice the attack? That is a giant step backwards in efficiency. Something that has a requirement of 10 should start at an attack of 10. The phalanx is one fifth as strong as it should be at the start, so of course it will be horribly weak for all knowledge levels.

                      I believe that you are still thinking in terms of tech levels. Previously, if a tech level of zero had a knowledge of one, then a tech level of 10 would have a knowledge of 2. Your phalanx unit uses the old tech level requirements. It should have a required knowledge of 2 in the new system, and the next unit in the chain should have a knowledge requirement of 4, then 8, 16, and so on. Using either unit past knowledge levels of 10 would be almost impossible.

                      Look at what happens with phalanx (req tech 2, attack 2) If the old knowledgeeffect is also 0.1, then new knowledgeeffect is 0.05. As tech advances, the attack numbers are:

                      Code:
                      knowledge | warrior | phalanx
                      ----------|---------|--------
                      2         | 1.1     | 2
                      3         | 1.2     | 2.1
                      4         | 1.3     | 2.2
                      5         | 1.4     | 2.3
                      8         | 1.7     | 2.6
                      10        | 1.9     | 2.8
                      16        | 2.5     | 3.4
                      100       | 10.9    | 11.8
                      1000      | 100.9   | 101.8
                      As you can see, the phalanx always has an attack value of 0.9 higher than the warrior, no matter what the knowledge of the civ. Of course, once the knowledge hits 4 or so, a new unit will be discovered, rendering both of them obsolete.

                      If you don't decide to put points in Military techs when there are big armies regularly invading you, then you should lose IMO because that research should put a strain on other areas of the economy.


                      I believe that desperation tech is designed to be above and beyond the typical investment into RP production.

                      Since I posted that last message as I was in a hurry to get to class, I left off a couple methods of RP generation. The full list, with a rough draft of the RP generation formulas, is:

                      Economic: (labor input)*X
                      Direct Investment: (cash input)*Y
                      Battles: (cost of loser´s army)*Z
                      Desperation: formula to be determined
                      Trade: (trade volume)*((their knowledge/your knowledge)+1)*A
                      Peace: (relations number)*((their knowledge/your knowledge)+1)*B
                      Spying: (number returned by spy application)*((their knowledge/your knowledge)+1)*C
                      Diplomacy: no formula, just treat RP´s as a commodity to be traded in some deal.

                      Comment


                      • #41
                        I believe that you are still thinking in terms of tech levels. Previously, if a tech level of zero had a knowledge of one, then a tech level of 10 would have a knowledge of 2. Your phalanx unit uses the old tech level requirements. It should have a required knowledge of 2 in the new system, and the next unit in the chain should have a knowledge requirement of 4, then 8, 16, and so on. Using either unit past knowledge levels of 10 would be almost impossible
                        OK I get it.
                        Values increases should be proportional to the knowledge level, then things will roll correctly.
                        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


                        • #42
                          So should I try to build an online application editor based on the following xml spec?
                          Code:
                          <application>
                          
                            <name>Charger</name>
                            <type>element</type>
                          
                            <requirements>
                              <technology>
                                <name>Warhorses</name>
                                <knowledge>1.5</knowledge>
                              </technology>
                            </requirements>
                          
                            <obsolescence>
                              <application>
                                <name>Knight</name>
                              </application>
                            </obsolescence>
                          
                            <Mobility>
                              <technology>
                                <name>Warhorses</name>
                                <baseknowledge>1.5</baseknowledge>
                                <knowledgeeffect>0.33</knowledgeeffect>
                              </technology>
                            </Mobility>
                          
                            <Attack>
                              <technology>
                                <name>Warhorses</name>
                                <baseknowledge>1.5</baseknowledge>
                                <knowledgeeffect>0.07</knowledgeeffect>
                              </technology>
                              <technology>
                                <name>Military Tactics</name>
                                <baseknowledge>1</baseknowledge>
                                <knowledgeeffect>0.1</knowledgeeffect>
                              </technology>
                            </Attack>
                          
                            <Defense>
                              <technology>
                                <name>Military Tactics</name>
                                <baseknowledge>1</baseknowledge>
                                <knowledgeeffect>0.1</knowledgeeffect>
                              </technology>
                            </Defense>
                          
                          </application>
                          Note that the new knowledgeeffect numbers were obtained by dividing the former knowledgeeffect numbers by the baseknowledge numbers. We still need the baseknowledge in there to determine what to subtract.

                          Note that Charger should probably be the second cavalry unit that the civ gets. The first one should come when Warhorses hits a knowledge of one. This is because, when the civ discovers the terrain special, the knowledge is at zero, so it will take several turns of RP input to raise it to that knowledge of one, representing the time it takes to turn wild horses into decent mounts.

                          Comment


                          • #43
                            Originally posted by Richard Bruns
                            Note that Charger should probably be the second cavalry unit that the civ gets. The first one should come when Warhorses hits a knowledge of one. This is because, when the civ discovers the terrain special, the knowledge is at zero, so it will take several turns of RP input to raise it to that knowledge of one, representing the time it takes to turn wild horses into decent mounts.
                            This is certainly correct IRL. For good player feel though we may just arbitrarily set the knowledge to 1 when something is discovered in the way that we have the horses working now. But you don't need to worry about that since any knowledge bonus setting would be determined by the scenario designer.
                            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


                            • #44
                              I think that it would be good policy to always model tech advance as RP input rather than direct knowledge adjustment. So there can be an event that gives the civ some RP´s in Horses when they are first discovered. That way the Biology tech and any other helpers can do their job. If we balance it right, the RP gain when the horse special is discovered can be enough to immediately give knowledge=1 if the player has a good Biology level, but not enough if the helper tech is at a bad level due to economic mismanagement.

                              I have completed and uploaded a spreadsheet that shows how applicaions advance along with tech. One page of the spreadsheet shows three different units (warrior, phalanx, and legion) with a single attribute that rely on the same technology, and another page shows all three attributes of the charger unit as described in the xml file above. Again, the formula has to be altered manually but you can play around and see what happens with different numbers.

                              Comment


                              • #45
                                I'd rather have all military data together, and these include things which are not tech-related, like cost. The image used can be tech-dependant, but the is not a figure so doesn't rely on hte application equations.
                                The existing data looks like:
                                <Element>
                                <name>Charger
                                <default>Warrior
                                <category>horse
                                <Cost> (...)
                                </Cost>
                                <requirement>
                                  <name>horses</name>
                                  <startlevel>5.0</startlevel>
                                  </requirement>
                                <attack>
                                  <value>80</value>
                                  <technology>
                                  <name>horses</name>
                                  <startlevel>5.0</startlevel>
                                  <add>1.0</add>
                                  <multiply>0.03</multiply>
                                  </technology>
                                  </attack>
                                (...)
                                </Element>

                                It should be changed to something like:

                                <Element>
                                <name>Charger
                                <default>Warrior
                                <category>horse
                                <Cost> (...)
                                </Cost>
                                <requirement>
                                  <name>horses</name>
                                  <knowledge>1.5</knowledge>
                                  </requirement>
                                <attack>
                                  <value>80</value>
                                  <technology>
                                  <name>horses</name>
                                  <baseknowledge>1.5</baseknowledge>
                                  <knowledgeeffect>0.1</knowledgeeffect>

                                  </technology>
                                  </attack>
                                (...)
                                </Element>

                                The <type>element</element> tag that you suggest happens to be very awkward to handle in terms of code: If the application requires additional data like cost which is outside the tech model, then either the tech model would have to know that cost stuff in order to relay it to the application or the application definition would be split into different xml files. Both solutions I dislike. One becque it prevents us from adding new kinds of applications without changing the tech code, the other one because it requires even more bookkeeping to make the link between the tech model application and the other model object.

                                As a side note, obsolescence is managed at Unit level, not Element level. It is easier to plug in with the econ and, generally, in order to design units and their progression.

                                So a single application.xml file shouldn't exist, but the application editor would instead fill in all the teh-related data of various xml files (military, social?, diplomacy?...) which use the applications,with a pattern:
                                  <value>80</value>
                                  <technology>
                                  <name>horses</name>
                                  <baseknowledge>1.5</baseknowledge>
                                  <knowledgeeffect>0.1</knowledgeeffect>

                                  </technology>
                                (and add their own tags like cost, category, elements in the military case.

                                For units, the military.xml file, goes like this:
                                <Unit>
                                  <name>Legion</name>
                                  <Image>Legion</Image>
                                  <element>
                                    <name>HeavySpear</name>
                                    <number>3500</number>
                                  </element>
                                (snip)
                                  <obsolete>Cohort</obsolete>
                                </Unit>
                                <Unit>
                                  <name>Siege weapons</name>
                                  <Image>
                                    <Default>Ballista</Default>
                                    <technology>
                                      <name>Military Tactics</name>
                                      <startlevel>12.0</startlevel>
                                      <image>Catapult</image>
                                    </technology>
                                    <technology>
                                      <name>Military Tactics</name>
                                      <startlevel>15.0</startlevel>
                                      <image>Trebuchet</image>
                                    </technology>
                                  </Image>

                                  <element>
                                    <name>Catapult</name>
                                    <number>500</number>
                                  </element>
                                </Unit>
                                again, "startlevel" can be replaced with "knowledge".

                                So the application editor would be like what you proposed except instead of writing
                                <Application><type>element</type></Application>
                                you write
                                <element></element>,
                                Also add a value tag inside the attack and other tags.
                                The image name stuff in the units gives an idea of how tech-dependant strings work (currently you can play Delenda and increase Military Tactics to 15 to see the siege weapons and archer units change uniforms).
                                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