Research weight computations

* Added game.research.weightBase constant

* Added view which computes the weights for each in-progress research

* Added view which computes total weights per empire
This commit is contained in:
Emmanuel BENOîT 2012-03-01 12:42:05 +01:00
parent c9d8a077bd
commit a14601df37
8 changed files with 150 additions and 1 deletions
legacyworlds-server-beans-system/src/main/java/com/deepclone/lw/beans/sys

View file

@ -128,7 +128,7 @@ public class ConstantsRegistrarBean
// Research
String[] rcNames = {
"basePoints" , "visibility.points" , "visibility.ratio"
"basePoints" , "visibility.points" , "visibility.ratio" , "weightBase"
};
for ( int i = 0 ; i < wcNames.length ; i++ ) {
rcNames[ i ] = "game.research." + rcNames[ i ];
@ -140,6 +140,10 @@ public class ConstantsRegistrarBean
defs.add( new ConstantDefinition( rcNames[ 1 ] , cat , cDesc , 2500.0 , 0.01 , true ) );
cDesc = "Completion ratio above which a technology becomes visible.";
defs.add( new ConstantDefinition( rcNames[ 2 ] , cat , cDesc , 0.10 , 0.01 , 0.99 ) );
cDesc = "Technology weight base value. This value is taken to the Xth power (where X is a priority) "
+ "to compute the actual weight when determining how research points are distributed between "
+ "an empire's in-progress research.";
defs.add( new ConstantDefinition( rcNames[ 3 ] , cat , cDesc , 10.0 , 1.0 , true ) );
// Vacation mode
cDesc = "Initial vacation credits.";