Players' scores.

Discussion in 'Modding' started by Ftoomsh, Jun 25, 2017.

  1. Ftoomsh

    Ftoomsh Well-Known Member

    Anyone done any work on the player score system? Where are the files and formulas for player scores? I think they need some work, at least in my mod, so they are more indicative of the player's game situation.

    How does it work? I imagine it gives a score for;

    (1) each peasant you created;
    (2) each military unit created (based on value of the unit - either creation cost or estimated military value);
    (3) each building created;
    (4) each capture and destroy;
    (4) the amount of terrain sight range achieved;
    (5) each enemy unit killed; and
    (6) a negative score for peasants, units and buildings the player has lost.

    Or something like this. Hmmm, I wonder it works?
     
  2. Wralth

    Wralth Active Member

    Every unit has a score value added to it, whenever you build it you get a percentage of that value while the killer of the unit gets the full value afaik.

    Besides, you can just file search for .score to find where the important functions are being called, though id assume its in dodamage in miscext2 and those functions for adding/removing units to player counters in unit script
     
  3. Ftoomsh

    Ftoomsh Well-Known Member

    That would explain why big battles in the middle of the map can take people's scores down to nearly zero when in fact they still have a base, production, resources, mines and another army building up. To my mind, this is not a correct score count method. Chess programs use legal move generators, tree search algorithms and position evaluation functions. The score in C3 would actually be a position evaluation score in this terminology. The quoted method would not give a true position evaluation score and certainly not one usable by the AI to make strategic decisions. Hence, I understand why the score is obviously so inaccurate compared to the real on-map position and (in part) why the AI is so lousy. Of course, there are many other reasons the AI is lousy.
     
  4. Wralth

    Wralth Active Member

    I mean to be fair its the same crap for age of empires 2. You get points for building and killing stuff and lose them by your units dying. As far as i understand the relevant variable for risk managemend for the AI is aiforce.
     
  5. Falc09

    Falc09 Active Member

    I never understood why the visible score just couldn't be the sum of scores for everything you own at the moment.

    Well, if the game requires some strange calculations to help AI identify weak and strong oponents: thats ok, but that can be done fully internally.

    The score at the moment ist just usefull during the first 30min. After that it gives you almost no information about actual players strength.
     
  6. Ftoomsh

    Ftoomsh Well-Known Member

    Yes, scores for everything you own at the moment do make sense. That is how a crude chess position evaluation function works. It adds up the material you have based on scores like;

    pawn = 1
    knight = 3
    bishop = 3
    rook = 5
    queen = 9
    king not counted.

    A crude evaluation function for Cossacks would use values something like this (I am just guessing at values here);

    peasant = 1;
    17th C infantry unit = 5;
    17th C cavalry unit = 10; and so on.

    Then you would give values for structures and upgrades.

    Town Hall = 50 and so on.

    Is a Town Hall worth 50 peasants? Who knows? It would depend on game situation. But you could look at embodied values and add those. Embodied value is how many resources it takes to make something. Then you could express all resources in gold value for embodied gold-equivalent value. This would be easy in OCMOD3 which has a flat market with unchanging prices. Calculate by adding all these, divide by 10 or whatever and integerize to get a manageable number. If you have made units' costs well balanced compared to unit powers for a balanced mod then these embodied costs will be a reasonable guide to real value. Of course, stores of resources count too so there should be a bonus, maybe a factor of 2 (2x) for converting stores into a structure or unit. After all, we all know that if don't convert stored resources into useful structures and units in an RTS game then the stored resources are idle and useless operationally speaking.

    Of course, this wouldn't count other factors like sight of the map, tactical and strategic position but it would best not to try to count these just for a basic player score not used by the AI. Better to go on just what the player has.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice