Scott Hardie | March 24, 2012
Some players seem to get automatic battles all the time in Pirate Paradise. Others wait for extended periods before getting any. For the curious, I thought I'd state for the record how it all happens. (The process will probably evolve over time, so this is only a picture of how it works for the time being.)

The process, called a cron script, is activated by the server every hour on the hour. If something causes it to stop, it just deactivates and is started anew an hour later.

First, the cron chooses a random player, who has the "automatic battles" option set, to be the challenger. If that player hasn't played the game in over a month, or has less than 10k in his/her treasure chest, it stops. If that player is already the challenger in another auto-battle still underway, it stops.

Second, the cron chooses another random player (not the challenger), who has the "automatic battles" option set, to be the defender. Similarly, if that person hasn't played in a month or has less than 10k, it stops. If that player was the last person to play defense against the challenger in another auto-battle, it stops, as a means of encouraging variety.

If the same two players are currently engaged in another battle (auto or regular), regardless of who is challenger or defender, then the cron also stops, another way to encourage variety.

Third, the cron chooses five of the challenger's pirates at random, and five of the defender's pirates at random. If the sum of ranks is not equal, it discards the defender's set and selects five at random again and again, trying to find a match. After ten thousand random combinations, if it still hasn't found a set of five defender pirates that matches the challenger's five in sum of ranks, it stops.

Fourth, for each of the techniques known to both players, the cron has a 50/50 chance of adding that technique to the battle. If certain techniques cancel other ones (the way that Landmines used to cancel Undo in Rock Block), then it weeds those canceled techniques out of the final set. Certain techniques in the future will be unavailable in automatic battles because of the risk of losing a crew member or other danger, but we're probably a ways off from that. Until today, the techniques part of the cron wasn't working, but it should be functional now.

Finally, the cron saves all of this information to the database one field at a time, starting the battle. For the wager field, it fills in random number between 1000 and 9999. There is no email notification to players, since that happens as part of a nightly digest.

Feel free to ask me anything you wonder about, as always. Thanks.

Scott Hardie | September 16, 2012
If you ask me, automatic battles are one of the best aspects of Pirate Paradise, but there's room for improvement. I've just upgraded them: You can now set more specific terms for how you'd prefer to play automatic battles, like how often and how much you're willing to wager, or even to play dirty or random. If you'd like, you can take it a step further and set custom terms for each opponent, if you have different comfort levels with risking gold against different players. (The two forms are mutually exclusive, meaning if you fill out one it will erase your choices on the other.) Battles will also now be generated more frequently.

In each generated battle, the terms will be only what both parties have agreed to. Say that against me, you want at least 3 days off between battles, you're willing to wager up to 10k, and you never want to fight dirty. Against you, I want at least a week off between battles, I'm willing to wager up to 20k, and I'm willing to fight dirty sometimes. The generator will create a battle that is agreeable to both of us: We'll take at least week off between battles, we'll play for a random amount up to 10k, and we will not fight dirty. If two players choose incompatible terms (such as one always wants random and the other never wants random), then there won't be any automatic battles between them.

Let's continue to respect each other's choices. If someone does not want to play against you for much money, or very often, or even at all, that's a valid preference. You could take it as a compliment that you're too good at the game. :-)

The default choices in both forms are what the automatic battle terms used to be (explained exhaustively above). I've imported everyone's previous selections into the new system using these default choices, so your experience will continue to be the same if you leave it alone. Hopefully those of you who do want finer control over your automatic battles will be satisfied with these new options. Please let me know if you have any questions or issues.

The Automatic Battles option can now be found at the top of the Battles page, rather than the bottom of the My Crew page.

Erik Bates | September 17, 2012
[hidden by request]

Scott Hardie | September 18, 2012
Yes, you used it correctly. To me, it's a business-speak substitute for "fine" or "specific." I shy away from most business-speak on purpose, but I do say "granular" for some reason.


Want to participate? Please create an account a new account or log in.