#1 17.11.2011 15:22:33

akfaew
Administrator
Posts: 619

More veteran levels

Let's add some more veteran levels:

veteran_names = _("green"), _("veteran 1"), _("veteran 2"), _("veteran 3"), _("hardened 1"), 
_("hardened 2"), _("hardened 3"), _("elite 1 "), _("elite 2"), _("elite 3")
veteran_raise_chance = 50, 45, 40, 35, 30, 25, 20, 15, 10, 0
veteran_power_fact = 100, 150, 175, 200, 225, 250, 275, 300, 325, 350
veteran_work_raise_chance = 12, 9, 9, 9, 7, 7, 7, 5, 5, 5
veteran_move_bonus = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Any comments? If not I'll make it into a poll.

Offline

#2 18.11.2011 15:22:00

kevin551
Player
Posts: 285

Re: More veteran levels

In the current games veteran_work_raise_chance = 5, 3, 1, 0
These values are low but we still end up with lots of hardened and elite workers after 50 turns or so.

With veteran_work_raise_chance = 12, 9, 9, 9, 7, 7, 7, 5, 5, 5 workers will gain levels much more quickly.
But veteran_power_fact has not been lowered. So workers will very rapidly have high defensive capability in the early game.
The veteran_move_bonus has been lowered though.

I will vote for this as it stands though because I am happy to test things out in LTeX to see whether it is fun or not.

Offline

#3 18.11.2011 15:34:04

akfaew
Administrator
Posts: 619

Re: More veteran levels

With the current values, it is expected a worker will gain elite 3 status in 144 turns - an average length of a game. A soldier will gain elite 3 status after 38 kills.

1/(12/100) + 1/(9/100) + 1/(9/100) + 1/(9/100) + 1/(7/100) + 1/(7/100) + 1/(7/100) + 1/(5/100) + 1/(5/100) + 1/(5/100)
144.52380952380952380950

1/(50/100)+ 1/(45/100)+ 1/(40/100)+ 1/(35/100)+ 1/(30/100)+ 1/(25/100)+ 1/(20/100)+ 1/(15/100)+ 1/(10/100)
38.57936507936507936506

Offline

#4 20.11.2011 01:58:59

kevin551
Player
Posts: 285

Re: More veteran levels

The debate about probability of workers getting promoted has been covered on longturn before
see http://old.longturn.org/ltxiv-allow-veteran-workers
Edrim even wrote some code to allow you to calculate the odds.

Vonzgred gave the best summary of how to do this -

As for probability over time...
Well, if 5% is probability of even happening on one try, chance of succeeding at least once (not once and only) in multiple tries is calculated by reversing the probability of continuous failure. Chances on not being promoted are 95%, x turns, that would be 0.95^x. The border of 50% is crossed on 14th turn in a row. Other words, with 5% chances and large amount of workers, on 14th turn we should have more non-greens ( that includes hardened and elites) than greens.

Using the new value of 12% we find that on 5th turn we should have more non-greens ( that includes all promoted units) than greens.

Offline

#5 20.11.2011 09:42:04

akfaew
Administrator
Posts: 619

Re: More veteran levels

You are right, the value for workers are too high, and my calculations are incorrect. I went along with vonzgreds suggestion and wrote a test program - 200 turns, 1M workers. This should definitely be readjusted.

Workers with exact level:
exp.svg
Workers with at least this level:
exp-or-highier.svg

C and gnuplot code (gcc a.c -o a && ./a > plot.dat && gnuplot plot.p):

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <time.h>

#define WORKERS 1000000
#define TURNS 200
int main()
{
        int turn;
        int workers[WORKERS];
        double chance[] = {12, 9, 9, 9, 7, 7, 7, 5, 5, 5};
        int i, j;

        srand(getpid() * time(NULL));
        bzero(workers, WORKERS * sizeof *workers);
        for (turn = 0; turn < TURNS; turn++) {
                int lvl[10];
                bzero(lvl, 10 * sizeof *lvl);

/*
                for (i = 0; i < WORKERS; i++)
                        for (j = workers[i]; j >= 0; j--)
                                lvl[j]++;
*/
                for (i = 0; i < WORKERS; i++)
                        lvl[workers[i]]++;

                printf("%d ", turn);
                for (i = 0; i < 10; i++)
                        printf("%d ", lvl[i]);
                printf("\n");

                for (i = 0; i < WORKERS; i++)
                        if (workers[i] < 9 && (double)rand() / RAND_MAX * 100.0 < chance[workers[i]])
                                workers[i]++;

        }
        return 0;
}
set terminal svg size 650 300 fsize 8
set border 31 linewidth .3
set xlabel "turn"
set format y "%6.0f"
set yrange [0:]
set output "plot.svg"
set ylabel "";
plot \
        "plot.dat" using 1:2 with lines title "green", \
        "plot.dat" using 1:3 with lines title "veteran 1", \
        "plot.dat" using 1:4 with lines title "veteran 2", \
        "plot.dat" using 1:5 with lines title "veteran 3", \
        "plot.dat" using 1:6 with lines title "hardened 1", \
        "plot.dat" using 1:7 with lines title "hardened 2", \
        "plot.dat" using 1:8 with lines title "hardened 3", \
        "plot.dat" using 1:9 with lines title "elite 1", \
        "plot.dat" using 1:10 with lines title "elite 2", \
        "plot.dat" using 1:11 with lines title "elite 3"

Offline

#6 21.11.2011 07:09:06

kevin551
Player
Posts: 285

Re: More veteran levels

A side effect of adding extra veteran levels is that veteran diplomats and spies will be a lot less powerful than currently.

Currently a veteran spy has a 5% power bonus and a +1 move bonus.
This will reduce to a 2% power bonus and a +1/3 move bonus.

Overall this alters the balance in diplomatic attacks in favour of the attacker.

Offline

#7 23.11.2011 08:27:26

Grendel
Player
Posts: 45

Re: More veteran levels

I suggest more interesting names for the levels, perhaps:

Private
Corporal
Sergeant
Lieutenant
Captain
Major
Lt. Colonel
Colonel
Brigadier General
General

Offline

#8 23.11.2011 14:50:09

kingofnerds
Player
From: Sunrise, Florida
Posts: 28
Website

Re: More veteran levels

What will be the impact on how the rank bars beside the units display?


==== In the end, Nerds with Linux will rule the world ====

Offline

#9 23.11.2011 15:00:51

akfaew
Administrator
Posts: 619

Re: More veteran levels

Check units.png or something similar in your data/trident or whichever tileset you use to have a look.

Offline

#10 10.01.2012 08:12:55

kevin551
Player
Posts: 285

Re: More veteran levels

My workers are becoming elite3 now about 50 turns after we implemented the new veteran system. This fits in nicely with that pretty graph you drew showing the probabilities.
In future I would probably lower veteran_work_raise_chance slightly.

Offline

Board footer

Powered by FluxBB