TCR Passive Damage Calculator

I want my 15 rapid-fire quantum torpedo launchers Uber-Defiant now! - Get help from modders. Share your work. Discuss modifications.
1, 2
posted on June 8th, 2011, 3:48 pm
Last edited by Anonymous on June 8th, 2011, 4:18 pm, edited 1 time in total.
I'm building a passive damage calculator at Team Chapman Racing that will hopefully, help me be able to easily build ODF files.  I'm going to use it for the Tereanan Empire mod and maybe the Buildable Warp-Ins mod for the Steamrunner Refit.

The passive effects will be hardcoded into the PHP file while the ship, station, weapon, and passive lists will use an SQL database.  The goal is to create a script that can auto-generate thousands of ODF files in a matter of minutes.  I know the developers have something similar (probably using C++ instead of PHP), but I need an easy way to calculate passives NOW!  Since I know PHP more than I do C++ or any other scripting language, it seems logical for me to use PHP.

Once it's finished, I will let other modders use the calculator and even customize it for a mod like Sigma to give an example.  Each mod will use a separate database.  Right now, I'm building the database for stock Fleet Operations.  I haven't programmed in the passives yet.  I'm going to wait until I'm done with the ship, station, weapon, and passive lists before programming the calculator.

UPDATE:
Borg ship/station list complete.  The Borg have 227 total entries for ships and stations.
posted on June 8th, 2011, 4:59 pm
Sounds really great TCR. I'm guessing it would be a really useful tool for modders.
posted on June 8th, 2011, 7:34 pm
Last edited by Anonymous on June 8th, 2011, 7:54 pm, edited 1 time in total.
Probably.  But I don't know how I would create a form that would let you put in all of the data required.

EDIT:
By the way, how are fighters calculated for passives?  What size are they considered to be?  Tiny or small?  And are their types counted as being their own groups (fighters)?

What's the base hit chance for a fighter for pulses, torpedoes, and phasers?
posted on June 8th, 2011, 8:28 pm
Pretty sure for range they are considered the same as their carriers.
posted on June 8th, 2011, 8:34 pm
That doesn't answer my question.  I asked about size and type, not range.  But I guess I was eventually going to ask about range, so thanks.
posted on June 8th, 2011, 8:50 pm
Your first question was "how are fighters calculated for passives?".  He answered that question on the range part :).


  You can find the answers to all your questions by looking in the ODF's for the fighters OR by looking in the ordinance files for each type of weapon.  They will all have an entry in them for Fed_AvalonF or something like that ( I don't recall the exact filename).


  If the value does not exist - it is given as 1.  I believe that I have not seen weapons miss fighters so they may have general values of 1 for all weapons.  I don't want to unpack the ODF's myself and find out, but I hope that helps you do the research yourself ^-^
posted on June 8th, 2011, 9:54 pm
Maybe size and type [of the carrier] are considered for passives too.
posted on June 8th, 2011, 10:09 pm
Last edited by Anonymous on June 8th, 2011, 10:15 pm, edited 1 time in total.
Well, it seems that the fighter is considered a small vessel on the account that the torpedoes only have a 60% hit chance.  So the size passive of the fighter is small.

However, the Defiant is overpowered against the Avalon's Fighter.  It's supposed to deal only 17.102 damage to the fighter, but it does 17.181 damage instead.  It's also overpowered against the carrier.  It's supposed to deal only 10.261 damage to the Avalon, but it does 10.309 damage.  That's with a base damage of 11.401.  That's 0.47% above what it's supposed to be.

EDIT:
Yes, I think that a margin error of 0.47% is unacceptable.  Anything greater than +/- 0.001 (since FO only requires 3-digit accuracy) is unacceptable in my opinion.
posted on June 8th, 2011, 10:15 pm
Last edited by Tryptic on June 8th, 2011, 10:28 pm, edited 1 time in total.
Cool.  I actually started work on the exact same thing several months ago, but I should warn you: you won't be able to calculate any of the numbers used in Fleet Ops standard.

The devs work with Matlab to create super-complex relationships around Offensive value and cost especially.  So you can input every single cost, weapon damage, and weapon RoF by hand if you want, but you won't be able to just put in the offensive value and have it figure out the weapon odf numbers.  I asked the devs to give me the formula, saying I didn't care if it was super-complex but in the end they refused.

Although, if they do agree to give you the formula, I already have a SQL database where I entered ship data for the 4 other races besides borg.  Granted it's from a previous patch and the fields may need rearranging, but if you can use it I'd be willing to bring it up to date and send it to you.

EDIT: I should also mention that all the passives are rounded decimals.  In other words you can't do calculations expecting the Defiant to get a 50% bonus because the actual passive bonus is 49.982743% or something.  Matlab is good at doing visual graphs but its precision is awful.  That's why all of Fleet Ops is about 0.47% off.

In short, trying to create odf files with a database and script is a good way to drive a person mad.
posted on June 8th, 2011, 10:25 pm
0.47% percent completely irrelevant and insignificant in this case. The Avalon is long dead before that 0.47% difference would have any kind of effect at all, and even then it wouldn't be noticeable.
posted on June 8th, 2011, 10:29 pm
The formula that the developers gave us in the guide don't seem to match the formulas in the results.  I want absolute precision.  At least some of the passives are accurate within +/- 0.001.

Well Tryptic, it looks like we're working on the same thing.  I would be willing to work with you over the PM system.  It's kind of you to offer to help, thanks.




@Zebh
You are probably right about that amount of damage being insignificant, but the devs have good calculators and they should be able to get results a whole lot more accurate than that.
posted on June 8th, 2011, 10:39 pm
Sounds like it could be very useful for your mod, but since you won't be able to create a version of Fleet Ops that passes the version check, perhaps you should focus on the script instead of the database.

Unfortunately, almost all my programming experience is in Java  :pinch: so between the two of us there may not be much we can collaborate on.  Unless you feel like teaching me PHP...
posted on June 8th, 2011, 10:42 pm
Last edited by Anonymous on June 8th, 2011, 10:44 pm, edited 1 time in total.
Well, http://www.tizag.com is a good beginners source.  I also have a PHP book and Google searches to help me out.  I'd be willing to help you out on what you need help on.

EDIT:
Well, I actually need the database to test the script.  That's why I'm writing the database in the first place, which I've already had to make a few revisions to.  The plan is to write the database and use it to test the script when I write it.
posted on June 10th, 2011, 1:19 am
Sounds like a good idea. I'll definitely look into this tool.
posted on June 10th, 2011, 4:33 am
Well A2 uses floats anyway so its an approximation to begin with.
1, 2
Reply

Who is online

Users browsing this forum: Google [Bot] and 3 guests