Jump to content

Charts Mod


Recommended Posts

  • 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...

I've added the dependencies and now there is a zip for the release (0.0.17) and the svn (0.0.18), rev 15952. Both work in parallel folders in the user folder like .local/share/0ad/mods on Linux.

It would be great if there was a hook in GuiInterface.prototype.GetExtendedSimulationState() so that these 2 lines don't make so much work.

guiinterface.jpg

  • Like 2
Link to comment
Share on other sites

  • 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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...