Author Topic: Drop Calculator on Google Docs - Final Edition  (Read 20191 times)

0 Members and 1 Guest are viewing this topic.

Offline thEClaw

  • Star Captain
  • ***
  • Posts: 976
  • l33tp0intz: +75/-0
Re: Drop Calculator on Google Docs - Now with tonnage!
« Reply #30 on: December 17, 2011, 08:26:02 AM »
Yeah, something like this would be nice, but I have no idea what would be a good way to handle it. If I had knowledge of Python I might be able to modify the script you're talking about (although I didn't even know it existed, actually) to convert it to a more user-friendly format, but I'm not sure how else to do it.
It might even work by just changing the drop calculator in a way that enables it to use the file generated by the script.

In any case, just having a tool like that to extract the mech info from the game would make this trivially easy for me to keep updated, even after big patches. Going through the document and making the changes doesn't take me more than an hour or two, the really time consuming part was painstakingly going through the in-game buy menu and copying down the data. :P
Sadly the information in the buy-menu is not guaranteed to be correct. There are a couple of mistakes, the only sure way to get your information would be to actually buy every vehicle in the game. I did that for my little weapon group editor and it was a huge pain in the ass.

If I could easily add some type of auto-complete where it would drop down a list of suggestions based on what you entered, I totally would do that, but I don't know of any way to do that.
I thought about it the same way you did. A shortened dropdown-list in combination with an auto-completion-system would be nice. I'll take a look into the documentation, maybe there is a way to do it.

Offline thEClaw

  • Star Captain
  • ***
  • Posts: 976
  • l33tp0intz: +75/-0
Re: Drop Calculator on Google Docs - Now with tonnage!
« Reply #31 on: December 17, 2011, 08:50:50 AM »
The documentation for OpenOffice did not help. There was mention of a function to complete words but somehow that function was missing for me. ???

I made a little change, it might be somewhat ugly: I just added all the names of all the vehicles in a couple of hidden rows below the "chassis"-fields. That way the names get completed. They are contained in rows 100 to 134. If I come up with something prettier, I'll change that again. But until then this does the job quite efficiently.

PS: Words for auto-completion are only looked up within 2000 rows of the current cell, if the documentation tells the truth. So the data can't be put too far away.

[attachment deleted by admin]

Offline Snyp3r

  • Recruit
  • *
  • Posts: 169
  • l33tp0intz: +28/-0
  • Boom! Legshot!
Re: Drop Calculator on Google Docs - Now with tonnage!
« Reply #32 on: December 21, 2011, 01:27:49 AM »
I see 0.5.4 is out now, good timing I guess. Do you have a link handy to that Python script you mentioned for pulling data out of the game files? Or if you wanted to pull it yourself and post it, that would work too.

Offline thEClaw

  • Star Captain
  • ***
  • Posts: 976
  • l33tp0intz: +75/-0
Re: Drop Calculator on Google Docs - Now with tonnage!
« Reply #33 on: December 21, 2011, 08:47:25 AM »
I see 0.5.4 is out now, good timing I guess. Do you have a link handy to that Python script you mentioned for pulling data out of the game files? Or if you wanted to pull it yourself and post it, that would work too.
I looked it up again. From now on the link can be found in my signature. I already ran the script and will attach the vehicle-part. But since it was made for 0.5.3 I myself cannot guarantee correct data.

I already did a good amount of work in making your droplist easier to maintain, but because of that work it is not fully functional yet. I think it would be best to find a different way to display the vehicle-list-tabs (you know what I mean :P). The current format is not easy to automate.

Offline Snyp3r

  • Recruit
  • *
  • Posts: 169
  • l33tp0intz: +28/-0
  • Boom! Legshot!
Re: Drop Calculator on Google Docs - Now with tonnage!
« Reply #34 on: December 21, 2011, 09:32:42 PM »
Thanks man, this helps a lot. I think I have a way to almost automate the process. Using Macros in Excel, I can convert the formatting of weapon names and mech names and such quite easily. Now I'm going to try to set up the asset spreadsheets I already have (I like the formatting I have going there) to fetch the mech data from the converted mech info (and hopefully that many VLOOKUP commands doesn't make it perform like trash). Hopefully I can make it all update with a few clicks of a mouse. Not fully automated, but pretty close. Not sure if the macros will work in OpenOffice though...

Offline thEClaw

  • Star Captain
  • ***
  • Posts: 976
  • l33tp0intz: +75/-0
Re: Drop Calculator on Google Docs - Now with tonnage!
« Reply #35 on: January 14, 2012, 09:49:19 AM »
How is it going? I know somebody who is in real need of an up-to-date calculator. But I am hesitating to work on it myself since I expect to see a new version around here and I don't want my time to be wasted.

It would be nice to get information like vehicle prizes without having to check the game itself. If any of the script-gurus is reading this, he (or she) might know about this.

Offline Az

  • MechWarrior
  • **
  • Posts: 274
  • l33tp0intz: +49/-0
Re: Drop Calculator on Google Docs - Now with tonnage!
« Reply #36 on: January 15, 2012, 02:35:00 AM »
It would be nice to get information like vehicle prizes without having to check the game itself.

It would be so nice the devs included a command for it in 0.5.0... which broke in 0.5.2 :'(. The bug report is here if you want to bump it.

I've got a script that reports asset prices since 0.4.9 and it works well, however pretty much each MWLL updates exposed some flaw in error handling or wrong assumptions about the xml format that ended up confusing my script for one asset/variant or two. I can't be certain of its accuracy for each new version since I can't double check against dumpMwllPrices' results anymore.


I could dump the prices for 0.5.4 if you need it, it's still much easier and faster to double-check with the game rather than writing everything down then double-checking.

However the real fix would be to get that command's functionality restored.

Offline Snyp3r

  • Recruit
  • *
  • Posts: 169
  • l33tp0intz: +28/-0
  • Boom! Legshot!
Re: Drop Calculator on Google Docs - Now with tonnage!
« Reply #37 on: January 15, 2012, 05:39:19 AM »
How is it going? I know somebody who is in real need of an up-to-date calculator. But I am hesitating to work on it myself since I expect to see a new version around here and I don't want my time to be wasted.

It would be nice to get information like vehicle prizes without having to check the game itself. If any of the script-gurus is reading this, he (or she) might know about this.
Hey, still working on it, just been kind of busy with friends/family over the holidays so I didn't get much done then. I've been trying to figure out a solution for ammo, but since it doesn't look like there's a way to fetch tonnage data from the game directly, it looks like I'll either have to do that manually, or just strip out the functionality all together. Otherwise I think I have everything else figured out, just need to make time to actually type it all out.

Do you know if the mech data on the wiki is current for 0.5.4? It'd be a lot easier for me to get tonnage info from there than trying to get it out of the game myself.

Offline thEClaw

  • Star Captain
  • ***
  • Posts: 976
  • l33tp0intz: +75/-0
Re: Drop Calculator on Google Docs - Now with tonnage!
« Reply #38 on: January 15, 2012, 05:02:10 PM »
I could dump the prices for 0.5.4 if you need it, it's still much easier and faster to double-check with the game rather than writing everything down then double-checking.
Which prices are included? All vehicles, weapons and ammunition? Or just vehicles?

Hey, still working on it, just been kind of busy with friends/family over the holidays so I didn't get much done then.
Nice to hear you're still working on it.

I've been trying to figure out a solution for ammo, but since it doesn't look like there's a way to fetch tonnage data from the game directly, it looks like I'll either have to do that manually, or just strip out the functionality all together.
Manually would be the best option for now, I think. Leave a wy to automate it later on, but the calculation of ammunition prices is extremely important and can't be left out.

Do you know if the mech data on the wiki is current for 0.5.4? It'd be a lot easier for me to get tonnage info from there than trying to get it out of the game myself.
I would not rely on it. You don't have to extract these information on your own. Just use a template value for the time being (20 tons for every asset), upload the calculator and somebody will do the work for you. If a group of four to ten people does this, it won't be that much of a hassle.

Offline Az

  • MechWarrior
  • **
  • Posts: 274
  • l33tp0intz: +49/-0
Re: Drop Calculator on Google Docs - Now with tonnage!
« Reply #39 on: January 15, 2012, 07:56:53 PM »
Which prices are included? All vehicles, weapons and ammunition? Or just vehicles?

The dumpMwllPrices command did all that, neatly categorised in a CSV format. My script focuses on vehicles (and still gets the APC wrong) but prices for BA weapons and ammunition can easily be read from MechLists.lua.


I've been trying to figure out a solution for ammo, but since it doesn't look like there's a way to fetch tonnage data from the game directly, it looks like I'll either have to do that manually, or just strip out the functionality all together.

Asset tonnage is available for mechs only (just look for "tonnage" in the XML). Things like tonnage aren't supposed to change from version to version so I'm not sure you should worry about an outdated wiki :) but in doubt you can check www.sarna.net.

Offline Snyp3r

  • Recruit
  • *
  • Posts: 169
  • l33tp0intz: +28/-0
  • Boom! Legshot!
Re: Drop Calculator on Google Docs - Now with tonnage!
« Reply #40 on: January 16, 2012, 01:16:45 AM »
Asset tonnage is available for mechs only (just look for "tonnage" in the XML). Things like tonnage aren't supposed to change from version to version so I'm not sure you should worry about an outdated wiki :) but in doubt you can check www.sarna.net.
I guess I should have specified a bit better, I meant free tonnage on mechs/vehicles for ammo.

Offline Az

  • MechWarrior
  • **
  • Posts: 274
  • l33tp0intz: +49/-0
Re: Drop Calculator on Google Docs - Now with tonnage!
« Reply #41 on: January 19, 2012, 07:50:44 PM »
I guess I should have specified a bit better, I meant free tonnage on mechs/vehicles for ammo.

Well, I did suspect you were talking about free ammo tonnage, but I thought you used a script to read the assets' loadouts. And since free tons are listed with the rest of the equipment I found it strange you wouldn't have that information. Asset tonnage, however, is more or less hidden in the middle of the XML, and only available for mechs.


I took some time to post because I had to fix a nasty potential bug in my script, I also took that opportunity to add a dumpMwllPrices-like output you should be able to use directly in a spreadsheet, until that command is fixed.

The attached zip contains:

stdout.txt - my script's output.
It lists weapons, equipment (incl. free tons), total armor and price, for each asset variants.
The only exception is the APC, the XML is different from other assets and for a single, simple variant... it's easier to just fix the output.

stderr.txt - error output (for completeness' sake, I guess)

prices-051.txt - that's the 'prices.txt' generated by the game for version 0.5.1, as a reference.

prices_out_sorted.txt - my script's 'prices.txt' for 0.5.4.
It doesn't include the APC either, you'll have to add the line from prices-051.txt.


The script was accurate for 0.5.1, but I can't vouch for 0.5.4 as I don't have a way to check the prices automatically any more.
If you want to use my output, please double check the prices in-game. If the prices are good, so will be the load-outs. So you can use prices_out_sorted.txt to check, but don't bother with ammo and BA weaponry: I'm pulling those numbers straight from MechLists.lua.
Please tell me if you find any errors!

Offline Snyp3r

  • Recruit
  • *
  • Posts: 169
  • l33tp0intz: +28/-0
  • Boom! Legshot!
Re: Drop Calculator on Google Docs - Now with tonnage!
« Reply #42 on: January 20, 2012, 12:58:27 AM »
Aha! Excellent, thanks Az. I was using the data extracted with Hiruma Kai's script that theClaw posted earlier, but yours should work even better, I'll see if I can make use of it. I did a quick random check of a bunch of the prices against the dump I did in 0.5.4 using the "dumpmwllprices" command (or whatever it is), and they were all accurate.

Offline Az

  • MechWarrior
  • **
  • Posts: 274
  • l33tp0intz: +49/-0
Re: Drop Calculator on Google Docs - Now with tonnage!
« Reply #43 on: January 20, 2012, 03:27:20 AM »
Oh gawd, I feel stupid. The fact the command worked for you led me to try it again, and this time I found the output file. But in a totally unexpected place, even though I used it twice before. Brain farts happen... but that one went on for months! I'm embarrassed. I even filed a bug report about it... I did consider the problem might be on my side, but nobody ever confirmed or infirmed it. If anyone has the prices.txt for 0.5.2 and 0.5.3, I'd be glad to have them.

Anyway...

With the correct prices I could check my script, and I found one error:
Morrigu B     Price mismatch error: calculated 118373, read 115873

It turns out I'm finding a Heavy Coolant Tank for that variant (noted simply "Heavy" in the equipment), but the game doesn't seem to account for it. It's strange really, since the parsing looks correct. I'll have to investigate further. In the meantime the price I report for the Scalpel is 2500 C-Bills too high.


I found another error, this time in the dumpMwllPrices itself:
Tracked, IS_PartisanF, 9000
Tracked, IS_PartisanG, 9000


Those variants ought to be commented out from MechLists.lua, as they don't exist in the XML. 9000 is the price of the Partisan's chassis.

Offline thEClaw

  • Star Captain
  • ***
  • Posts: 976
  • l33tp0intz: +75/-0
Re: Drop Calculator on Google Docs - Now with tonnage!
« Reply #44 on: January 20, 2012, 08:03:24 AM »
The profile-folder? Who came up with that? I ran the command several days ago and didn't find anything either. But there it is now.