NoQ wrote:In the "battle for wesnoth" opensource game i have recently checked out, they have a similar system of experience levels and commanders and a similar campaign system with units transfered to the next level, so, much like in warzone, experience has a lot more importance in campaign than in sk/mp. Their solution is to make an adjustable experience rate multiplier for sk/mp games; before an sk/mp game you just set that you need 30% less experience points to advance the unit to the next level, and it gets sort of reasonably balanced. In our case there is also a problem that experience is more important in skirmish than in multiplayer, but this solution handles that as well: you can set different modifiers for skirmish and multiplayer when necessary.
I like this !!!
Taking a look at the c++ code seems easy to me to implement.
I already made a patch that in case of "non campaign" apply a multiplier of 1.3, seems to work fine.
If you (or someone else) can suggest an appropriate .txt file to add the multipliers, I'll make the changes.
This is the patch for the commanders number of units, works fine in rc3.
The patch apply the default values (6+2*LEV) in brain.txt.
Code: Select all
diff -r -u warzone2100-3.1_rc2/data/base/stats/brain.txt warzone2100-3.1_rc2.mod/data/base/stats/brain.txt
--- warzone2100-3.1_rc2/data/base/stats/brain.txt 2012-08-20 19:33:02.000000000 -0300
+++ warzone2100-3.1_rc2.mod/data/base/stats/brain.txt 2012-10-06 17:49:17.000000000 -0300
@@ -1,2 +1,2 @@
ZNULLBRAIN,Level All,0,0,0,0,0,ZNULLWEAPON,0
-CommandBrain01,Level All,1,1,1,1,1,CommandTurret1,0
+CommandBrain01,Level All,1,1,1,6,2,CommandTurret1,0
diff -r -u warzone2100-3.1_rc2/data/mp/stats/brain.txt warzone2100-3.1_rc2.mod/data/mp/stats/brain.txt
--- warzone2100-3.1_rc2/data/mp/stats/brain.txt 2012-08-20 19:33:05.000000000 -0300
+++ warzone2100-3.1_rc2.mod/data/mp/stats/brain.txt 2012-10-06 17:48:56.000000000 -0300
@@ -1,2 +1,2 @@
ZNULLBRAIN,Level All,0,0,0,0,0,ZNULLWEAPON,0
-CommandBrain01,Level All,1,1,1,1,1,CommandTurret1,0
+CommandBrain01,Level All,1,1,1,6,2,CommandTurret1,0
diff -r -u warzone2100-3.1_rc2/src/cmddroid.cpp warzone2100-3.1_rc2.mod/src/cmddroid.cpp
--- warzone2100-3.1_rc2/src/cmddroid.cpp 2012-08-20 19:33:08.000000000 -0300
+++ warzone2100-3.1_rc2.mod/src/cmddroid.cpp 2012-10-06 19:15:02.000000000 -0300
@@ -170,7 +170,7 @@
/** This function returns the maximum group size of the command droid.*/
unsigned int cmdDroidMaxGroup(const DROID* psCommander)
{
- return getDroidLevel(psCommander) * 2 + MIN_CMD_GROUP_DROIDS;
+ return getDroidLevel(psCommander) * getBrainStats(const_cast<DROID*>(psCommander))->dMult + getBrainStats(const_cast<DROID*>(psCommander))->minDroids;
}
/** This function adds experience to the command droid of the psKiller's command group.*/
diff -r -u warzone2100-3.1_rc2/src/droid.h warzone2100-3.1_rc2.mod/src/droid.h
--- warzone2100-3.1_rc2/src/droid.h 2012-08-20 19:33:08.000000000 -0300
+++ warzone2100-3.1_rc2.mod/src/droid.h 2012-10-06 20:29:22.000000000 -0300
@@ -59,9 +59,6 @@
/* Misc accuracy modifiers */
#define FOM_PARTIAL_ACCURACY_PENALTY 50 // penalty for not being fully able to fire while moving, in %
-/* Minumum number of droids a commander can control in its group */
-#define MIN_CMD_GROUP_DROIDS 6
-
enum PICKTILE
{
NO_FREE_TILE,
diff -r -u warzone2100-3.1_rc2/src/stats.cpp warzone2100-3.1_rc2.mod/src/stats.cpp
--- warzone2100-3.1_rc2/src/stats.cpp 2012-08-20 19:33:09.000000000 -0300
+++ warzone2100-3.1_rc2.mod/src/stats.cpp 2012-10-06 15:57:50.000000000 -0300
@@ -1131,7 +1131,7 @@
//read the data into the storage - the data is delimeted using comma's
sscanf(pBrainData,"%255[^,'\r\n],%255[^,'\r\n],%d,%d,%d,%d,%d,%255[^,'\r\n],%d",
BrainName, dummy, &psStats->buildPower,&psStats->buildPoints,
- &psStats->weight, &dummyVal, &dummyVal,
+ &psStats->weight, &psStats->minDroids, &psStats->dMult,
weaponName, &dummyVal);
if (!allocateStatName((BASE_STATS *)psStats, BrainName))
diff -r -u warzone2100-3.1_rc2/src/statsdef.h warzone2100-3.1_rc2.mod/src/statsdef.h
--- warzone2100-3.1_rc2/src/statsdef.h 2012-08-20 19:33:09.000000000 -0300
+++ warzone2100-3.1_rc2.mod/src/statsdef.h 2012-10-06 15:55:06.000000000 -0300
@@ -485,6 +485,8 @@
struct BRAIN_STATS : public COMPONENT_STATS
{
WEAPON_STATS *psWeaponStat; ///< weapon stats associated with this brain - for Command Droids
+ UDWORD minDroids;
+ UDWORD dMult;
};