Jump to content

Charts Mod


Recommended Posts

{  "name": "charts",  "label": "0 A.D. Charts Extension",  "url": "http://www.wildfiregames.com/forum/index.php?showtopic=18763",  "description": "Visualizes resource consumption, units, etc",  "dependencies": ["0ad"],  "type": "content addon"}

Looks good?

Link to comment
Share on other sites

  • 1 month later...

In svn, there were some changes in simulation/components/GuiInterface.js, so you should update the mod to make it work properly with svn (although it should seem ok as long as you only have AI players). Otherwise, I use it from time to time to test Petra, and it is quite useful, thanks.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...

It's not that hard. The damage for each statistic is calculated as

AttackValue * 0.9^ArmourValue

Then the resulting number is summed for the 3 possible stats (pierce, crush and hack), and together, it's the reduce in hitpoints. If an AttackValue for a certain stat is zero, then it causes no reduce in HP. If an ArmourValue is zero, then the reduce in HP is just the amount of the AttackValue.

Then you have the bonuses. Which are just multiplicators if the damage in HP.

More elaborate damage (like splash damage) is a bit more difficult, as it takes the distance between the two into account.

I've been wondering, isn't a calcuation like 0.9^armorvalue a bit too demanding? if you reduced it to a simpler calculation, wouldn't that net performance boost?

or is that stuff peanuts compared to path-finding?

Link to comment
Share on other sites

It's peanuts/1000. Computers are fast with math. There's little memory involved and probably SpiderMonkey caches n values. Open the console of your browser here (F12) and copy/paste this code:

var i = 2400, r = 0, t0 = Date.now();while(i--){  r += Math.pow(0.9, i);}[Date.now() - t0, r]

i is the amount of units on your map, worst case is all are fighting. What you get as milliseconds?

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...
  • 5 months later...

There is a ticket to track this feature ?

A ticket was recently created on trac that proposes the creation of charts in the summary screen: http://trac.wildfiregames.com/ticket/3403

In the meantime, its been pointed out that the mod no longer works with the current development state of 0AD, so if you're running at the cutting edge of SVN and want to run the mod, here's an (unofficial) update: https://github.com/0ADMods/summary-charts (if you're still on A18, agentx's zip should work)

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...