A Small Air Damage Calc Program Part 2

Day 3,168, 12:08 Published in Serbia Ireland by Releasethe Krakken

Ok I dont think we are far off but it seems there is some kind of problem in the formula

This is my current rank and it might explain the problem. At the moment I-G-D multiply your basic hit with your rank number



But it seems there is different hits as well some hits hit 2 elite points some 3 some 4 . So what is up with that I checked the opponents when I hit 4 the opponent was a normal airman. Anyway I divided it by 4 perhaps should by 5 as the data does not yet correlate.

Requirements:

Microsoft Access
Microsoft VB.Net (visual basic .net)

Program was provided by I-G-D in C++ . I was originally educated in C++ so can basically follow what he does.

Ok at this stage we are going to add a control to close our program.

So we add a mainmenu component from the toolbox Click on the mainmenu and then click on the top of your window Type in &File Click one level below that (submenu) type E&xit and navigate to the name of the control give it name mnuFileExitItem

the & (ampersand) creates shortcuts (if you want to use keyboard to navigate program.

Double click on Exit and Type end

That will allow you to exit the program



Ok notice an added label i added before the other 2. That is for the rank number which is used in calc.

Add that and add to the code of currentcellchanged of the datagrid

lblRankNo.Text = DSRanks.RSC_RANKS(dgRanks.CurrentCell.RowNumber).RankNo

Also you can see 2 checkboxes Elite citizen and Q1 Air Missile

add that in a panel pnlElite and give them the names chkElite and chkWEP1

below that add a button btnCalculateHit type in text Calc. Hit add 2 labels as seen on the form you need not name the first label just adjust its textalign property to middleright and type in text Hit:. Now click on the second label put font to size you want to see bold or not bold etc. Set textalign to middleleft and borderstyle to FixedSingle in properties. Delete the text and put name to lblHit

I also added a Natural enemy checkbox my 3rd one the other 2 was chkElite and chkWEP1 the third I called chkNE.

Ok we are almost ready for the first of 3 algorithms I-G-D Provided

To calculate hit I wrote the following code.





And finally we can test it giving us the following

Elite with no Weapon no Natural Enemy give us



Elite with Natural Enemy no Weapon give us



Elite with NE + Weapon gives us



No Elite No NE + Weapon gives us



and finally No Elite No NE and NO Weapon gives



Ok this is the end of part 2


Testing it with my own player I am staff sergeant * and has some weapons.

The program calculated hit at 185 yet hit was 156

So at this stage its a bit borderline. I will tweak it a bit to see whether there is some way we can get closer to the result.



and as well program said


Part 3 will follow in an hour