HiKitty

Untitled

Jul 15th, 2012
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.57 KB | None | 0 0
  1. 6) 50% shared storage would be good.
  2. * m should be shared away as fast as possible
  3. * if team.m then give(player, team.m*player.storageLevel*(player.creditsM or 0)/max(allPlayers.creditsM, 1), M)
  4. * if team.m then give(player, team.m*player.storageLevel*(1- (player.liabilitiesM or 0)/max(allPlayers.liabilitiesM, 1) ), M)
  5. * give and take update credits and liabilities for E/M - important later when it comes to overdrive.
  6.  
  7. 7) If a player e-stalls, it is worse as If you don't get m from overdrive asap.
  8. * Share, but keep track of the bank balance between the players
  9. * If a player with liabilities dies, use his team share m-gain to pay it back.
  10. * E has to be payed from team.creditsE.
  11. * Max E-share to player: % dependent on team size and allPlayers.liabilitiesE compared to allPlayers.creditsE and stallingPlayer.liabilitiesE.
  12. * If this player starts excessing, first pay back the liabilities, then give credits for the E.
  13.  
  14.  
  15. 8) Use team storage to:
  16. * Let each player have a full metal bar, even if team storage is emty!
  17. * To let players use it and get free storage for the unexpected eco boosts!
  18. * Use it to decide how much to overdrive (fill e up if no m is needed, don't dance too much with the overdrive percentage - dancing percentages are inefficient)
  19. * Use it to keep the bank balance script simple (free storage somewhere every times to avoid excess).
  20.  
  21. 9) If one excesses:
  22. * First share to the creditors, even if creditors may share to team storage
  23. * Team storage never excess: see 6), and 10)
  24.  
  25. 10) team.eForOD = team.incomeE *team.storageE.level
  26. * the bank balance tells, which player owns how much: team.IncomeE*(player.creditE or 0)/min(allPlayers.credits-allPlayers.liabilities, 1) tells the weight of this player
  27. * player.eForOD = team.eForOD*player.weight/allPlayers.weight for this player
  28. * only players with credits can get OD
  29.  
  30.  
  31. 11) global optimisation and capping:
  32. * balance all mexes with usedForOD energy units as if they where in one grid.
  33. * if sum(grid.mexes.eUsage) > grid.maxE, balance grid with grid.maxE, push the difference back ot the rest (notUsed = (notUsed or 0) + diff)
  34. * after checking each grid for "cheating :P", rebalance the rest with notUsed.
  35. * cut all new cheaters to grid.maxE, repeat
  36. * perfectly overdriven only one step left 12)
  37.  
  38.  
  39. 12) Everybody get base income of his own mexes until they payed back (The -75e is penalty enough).
  40. * all the other base belongs to the team - evenly
  41. * players get player.eForOD/allPlayers.eForOD/playercount <-- eForOD was initially calculated from credits, players with liabilities get excluded until they paid back.
Advertisement
Add Comment
Please, Sign In to add comment