<!--quoteo(post=155892:date=Jul 30 2006, 12:23 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Jul 30 2006, 12:23 PM) [snapback]155892[/snapback]</div><div class='quotemain'><!--quotec-->
Could you make a short summary on what exactly you are changing as far as boarding is related? Then Maximus would know which things he won't need fixing, because you'll be working on those. <img src="style_emoticons/<#EMO_DIR#>/doff.gif" style="vertical-align:middle" emoid="
" border="0" alt="doff.gif" />
<!--QuoteEnd--></div><!--QuoteEEnd-->
A *short* summary? <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid="
" border="0" alt="biggrin.gif" />
First of all, the boarding code is based off the June 28 version of the build. I'm doing it this way so that I won't have to try to merge in changes every few days, and I can be sure that any bugs I find are ones I introduced myself and not by something else that's changed in the code. Before release I will be merging in all the changes in the new versions.
StartBoarding has been broken out into two functions. One runs when boarding is actually started, and contains only the code necessary to set the boarding up. The second is InitializeDeck and runs at the beginning of each deck, even if it's the top deck of the ship. From the looks of my log files, there is some duplication of code from a few other places still remaining in this function. And since I sent the code to Hat I've moved one block of code from InitiailzeDeck back to StartBoarding.
The stock game handled boarding on multiple decks by first deciding how many PBC's (Player Boarding Characters) would be used in the entire boarding process if the boarding proceeded through all the decks and included your entire crew. It also setup EBC (Enemy) the same way. If you fought through every deck you'd end up with very few crew left on either ship. Subsequent mods changed what PBC meant. I'm not sure that PBC is even relevant any more, except for use in other calculations. Without having the code in front of me, I can't give concrete examples.
Since most of the crew on both ships would be dead at the end of boarding, especially if all your boarding characters were killed on each deck, there were a lot of kludges added to create crew out of thin air after the boarding was finished. I've removed all those random crew increases and calculate remaining crew in a more reasonable manner.
First of all, you don't send your entire crew to fight on every deck. You always keep a reserve. Even the enemy keeps a reserve. If everyone gets killed, there are still some crew left to fight on the next deck. If the boarding goes to the last possible deck (the captain's cabin) and you've lost your entire boarding party on each deck, it's possible that both ships will be at or below minimum crew. The actual numbers I used still needed more tweaking. Crew casualties are being calculated properly from the number of boarding characters lost on each deck for both friendly and enemy.
The musket fire perk used before boarding has been recalculated to include the enemy ship defense as stated in the description of the perk, along with other factors. The calculation has also been moved from AIAbordage.c to the boarding code.
PBMM, the Post Boarding Morale Modifier has been rewritten. It currently gives a larger morale boost than I was intending and I'll be tweaking that part of the code before release, based on extensive testing.
Most of the variables cannot be assumed to still have their original meaning, so changing them probably won't have the intended results.
A number of bugs were fixed along the way, including the one that caused weapons to multiply in your weapons locker.
I have not included any of the code that changed crew numbers based on what happened in the boarding cabin dialog. I was waiting for other bugs in that part of the code to be fixed before I tried to make it work. That code is commented out in LAi_Boarding.c at the moment. For testing, I've always stuck the enemy captain in my hold for later disposition.
The last major function I was working on was attacking a fort, which is treated as a boarding and handled in the boarding code. The code *should* work if you have only one ship the way it is now, but if you have a squadron of multiple ships the behavior is currently undefined. I was attempting to defeat the three French ships guarding Oxbay and sack the fort when my computer crashed. One previous attempt did not work because I had attempted to update the boarding code to a newer version based on known changes to the code, which is why I prefer to work from a specific unchanging version of the code.
If anyone makes changes to the current code, I will include them if they are relevant. I have to update the code to work with the newest version anyway, so evaluating changes will not add to my workload. I may also evaluate changes based off my newer boarding code, but this will be the last thing I do before the final tests before release.
It was my intention to understand completely every variable used, every value of those variables, and every calculation. I think I've gotten a handle on how everything works, and why. I will be more than happy to answer questions on my changes, but it will have to wait until I get my computer back from the shop, which should be in a few days.
Hook