The Last Week’s Efforts

So, the last week or so has been spent trying to smooth out the database import process. When the current M&F database is imported to a different server’s database, the code for the website encounters an error when loading some pages. I’ve worked around this before, but I’ve never gotten a good solid fix down, probably because I’ve never properly documented what I did. I just kept trying things, and eventually it just worked.

My efforts of late have been to document what does and doesn’t work. I’ve got three different sets of instructions that do not resolve the problem. And literally in the middle of typing this, literally between this sentence and the last, I figured out how to fix the major errors I’d been having. I don’t understand why they were a thing, but they’re fixed. Not that it was really a thing that needed “fixing”, it’s more there was a step I didn’t realize I needed.Let me explain though, M&F has gone through several updates. Some big, some small, some complex, and some simple. At least a few of those required database changes, and Symfony2, specifically Doctrine2 needs to know about those changes. I’m not exactly sure how it all happened, but somewhere how the game handles certain database columns got left off. All I needed to do was tell doctrine to look at its files of how the game’s database should work, and look at the database it now had, and to use those files to correct its understanding of the existing database. From what I can tell, it expected the columns to be in a different order.

Whether that was all it needed or not will require some extensive testing, but I can now reliably load the game’s database into a new server, and have the code on that server understand how to interact with that database, which should cut the preparation time down significantly.

On a different note, I’ve worked in fixes for a couple things. Firstly, you’ll no longer gain experience when fighting slumbered nobles. This also comes with a variable built into the existing battle code that will allow us to turn off experience gain across the board. Ideally, this will prevent people from experience farming against first ones as much. I’ve little doubt I’ll have to expand this in the future to include a few other variations, but the framework exists now. So, if down the line we need to add more rules on when experience isn’t given, there’s already a spot for it to be put in the code.

A previous fix I’d worked out but forgot to actually put in the repository was also properly inserted into the repository. Ruler elections should now trigger for realms that have no ruler but do have active first ones.

And the ability to exit settlements should now be complete. I’d forgotten about the page that happens after you click “Exit Settlement”. When I said I finished it before, uh, not entirely true. True now though, I hope. As long as you speak English.

Also, still while typing this, I worked in an update to the code that will allow the number of available bandits to fluctuate with the number of players–there’s supposed to be 1 per every 8 players, right now we’re at like 1 per 4–by only making bandits alive when we need them to exist.

Lastly, I plan on having a test version of the site functional by the end of the weekend. It should include all updates I’ve mentioned as being complete on here, and hopefully turns and a playable game world from a week or two before then. What I’ll need is for anyone who can to log in and test functionality of things so I can let Tom know that we’ve tested it extensively and that it’s good to go. Or that we discover through extensive testing that I still need to fix a bunch of stuff, which is also good, just not to go.