Jump to content


Photo

Changing resource rate ingame


  • Please log in to reply
4 replies to this topic

#1 Andi

Andi
  • Members
  • 7 posts
  • Location:Germany, Bavaria

Posted 12 April 2009 - 01:58 PM

Hello,

Maybe you know this problem: at the beginning of the game it's really hard to get money but after playing a while you have so much money that you can never spend it. And one player who is already a bit stronger than the other ones can make this bit to an enormous advantage.
My question is: can you make the resource rate depending on how many units you have, like in War Craft III?

For example if you have more than 50% of the maximum command points limit, you only get half of the money.

#2 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 12 April 2009 - 02:43 PM

Hello,

Maybe you know this problem: at the beginning of the game it's really hard to get money but after playing a while you have so much money that you can never spend it. And one player who is already a bit stronger than the other ones can make this bit to an enormous advantage.
My question is: can you make the resource rate depending on how many units you have, like in War Craft III?

For example if you have more than 50% of the maximum command points limit, you only get half of the money.



Nice Idea ,I hope you can do INI coding
I agree with your observation !

I was looking at the FARM codes for men :



CODE


#define GONDOR_FARM_MONEY_TIME 6000
#define GONDOR_FARM_MONEY_AMOUNT 10

#define GENERIC_ECONOMY_COMMAND_POINT_BONUS 50


Behavior = AutoDepositUpdate AutoDepositModuleTag
DepositTiming = ROHAN_FARM_MONEY_TIME ; in milliseconds
DepositAmount = ROHAN_FARM_MONEY_AMOUNT ; cash amount to deposit every DepositTiming
InitialCaptureBonus = 0 ; no initial bonus
End


#SUBTRACT( GANDALF_FORCE_ATTACK_RANGE 25 )

DAMAGE_MULT 150%

#MULTIPLY( LEGOLAS_BOW_RANGE .01 )


#DIVIDE( PLAYER_MAX_PURCHASE_POINTS_DEFAULT PLAYER_PURCHASE_POINTS_GRANTED )

------------------------------------------------------------------------------

///REPLACE IN FARM / SLAUTERHOUSE / MALLORN TREE / MINE ETC
Behavior = AutoDepositUpdate AutoDepositModuleTag
DepositTiming = ROHAN_FARM_MONEY_TIME ; in milliseconds
DepositAmount = #DIVIDE( ROHAN_FARM_MONEY_AMOUNT PLAYER_PURCHASE_POINTS_GRANTED )
InitialCaptureBonus = 0 ; no initial bonus
End


OR

Behavior = AutoDepositUpdate AutoDepositModuleTag
DepositTiming = #MULTIPLY( ROHAN_FARM_MONEY_TIME PLAYER_PURCHASE_POINTS_GRANTED ) ; in milliseconds
DepositAmount = 10
InitialCaptureBonus = 0 ; no initial bonus
End

OR BOTH



Behavior = AutoDepositUpdate AutoDepositModuleTag
DepositTiming = #MULTIPLY( ROHAN_FARM_MONEY_TIME PLAYER_PURCHASE_POINTS_GRANTED ) ; in milliseconds
DepositAmount = #DIVIDE( ROHAN_FARM_MONEY_AMOUNT PLAYER_PURCHASE_POINTS_GRANTED )
InitialCaptureBonus = 0 ; no initial bonus
End


The codes are the time and amt of money deposited
By making it a % value it should work like this
If player has 10 special powers points he makes 10 / 10 : = 1 = LESS
If player has 5 special powers points he makes 10 / 5 : = 2 MORE

OR

If player has 25 special powers points he takes 6000 * 25 : = MORE TIME TO GET MONEY
If player has 5 special powers points he makes 6000 * 5 : = LESS TIME


I could not find the code that represents your current commandpoint level
So I used PLAYER_PURCHASE_POINTS_GRANTED which is powerpoints
***If you find it then the codes will work as you want it to !!***

As a stronger player will have defeated weaker players units and racked up
commandpoints this will have the same basic effect but it will be better
if you / anyone knows what commandpoint level is defined as !!

Look at the codes above and you will see that one value can be
+ - / * by another to get final value

Hope this helps

Edited by JUS_SAURON, 12 April 2009 - 02:52 PM.


#3 Andi

Andi
  • Members
  • 7 posts
  • Location:Germany, Bavaria

Posted 12 April 2009 - 06:36 PM

This PLAYER_PURCHASE_POINTS_GRANTED is a constant, isn't it. It's a value that is defined in gamedata.ini for example, as far as i see. Are you sure, that it represents the current power points?

I tested it and it had always the same amount: 1. But maybe i made a mistake.

Anyway: thanks for your help.

#4 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 12 April 2009 - 11:36 PM

This PLAYER_PURCHASE_POINTS_GRANTED is a constant, isn't it. It's a value that is defined in gamedata.ini for example, as far as i see. Are you sure, that it represents the current power points?

I tested it and it had always the same amount: 1. But maybe i made a mistake.

Anyway: thanks for your help.

Your right , it is constant ;)
The trick is to find a value that fluctuates and has a label
I dont thick anything in gamedata can be used as these are all constants

#5 Andi

Andi
  • Members
  • 7 posts
  • Location:Germany, Bavaria

Posted 14 April 2009 - 12:21 PM

Ok, I haven't found the command points yet, and so I have (for the moment) another solution:

I added new experience levels to the money buildings. But instead of improving the production rate, it decreases it. It's like the building has used up all the resources around it.
It's not a beautiful solution, because if the player sees through my trick he can evade it.

the production factors are:

lv 1: 100%
lv 2: 125%
lv 3: 187% (125% * 150%) // level 2 and 3: the normal factor, i haven't changed anything
lv 4: 50% (187% * 27%)
lv 5: 25% (50% * 50%)

I'll balance the factors. I'll also change the factors of level 2 and 3.

If you find a solution with the command points, please tell me.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users