The Progress of V0.4: Performance and a Revamped Economy (Patreon)
Content
Greetings Conquerors!
Since it's been so long since the last progress update, I thought I'd share what exactly I've been prioritizing these past few months.
Performance
First, you may have noticed the pretty large amount of bug reports on the Nexus and Discord. Some of the bugs reported appear to be common, some appear to seem to only affect a few people, and a lot of these bugs seem to never show up for me and others. I believe the cause of these inconsistencies stem from one cause: the scripting.
Since this mod was my first mod, I implemented a lot of bad scripting practices in the mod as I was still learning. Additionally, I have a very beefy PC that plays Skyrim at 165 FPS. If you didn't know, the higher your FPS, the faster scripts run. Therefore, scripts that take a few seconds for my PC to run can potentially take tens of seconds for someone running the game in the 30-60 FPS range.
The game does not like running long scripts, especially at the same time as scripts from other mods. I have noticed scripts sometimes randomly stop running if they take too long (I believe this is why reloading often fixes problems in the mod), therefore a good scripting practice is to write the script to run as fast as possible to make room for other scripts to run.
Taking all of this into consideration, I have decided to focus on optimizing the scripts in the mod to run faster. To do this, I'm limiting my FPS to 30 and constantly testing the run time of the scripts to ensure they are written to run as quickly as possible. I imagine most people don't play Skyrim below 30 FPS so using this as a base should ensure good performance for everyone else.
Moving forward with new features, I will ensure the best scripting practices are implemented and optimize the scripts that are already in the mod.
A New Economy
Now, speaking of new features, since this update is focused on Diplomacy, it started becoming apparent while working on it that the current economic system would not have adapted well to diplomacy features. Therefore, I've been working on revamping it, which also gives me the opportunity to make new scripts that update the economy faster.
The new system primarily consists of a building system, in which buildings in the city all have specific functions to the economic system.
Resources
Firstly, resource production is completely changed. There are no longer the three general resources of "Food, Wood, and Metal" that are represented by numbers. Now, the resources you see are inventory items of the various resources you find in Skyrim. For example, mines now produce the specific ores that you can normally mine from them. So Embershard Mine will produce Iron Ores and send them to whichever faction/city owns the mine. The five buildings that produce these base resources are Farms, Fisheries, Hunting Lodges, Lumber Mills, and Mines.
Crafting
Now that you have these specific resources, you will probably want to use them for things. This is where crafting buildings come in. These buildings will take the resources the base buildings produce and convert them to items that the city or faction needs. So far, these buildings consist of Blacksmiths, Taverns, and Meaderies. A common need for the city are tools, which are used by the resource buildings to produce resources.
Building Owners
Now what does this have to do with diplomacy? Well, each building has an owner, whom you will be able to negotiate with in order to get a trade agreement to supply your faction. You will also be able to purchase their building from them directly and take complete control over where the resources go.
If you claim a building with no owner (like Embershard Mine), you will become the new owner and can decide to donate the building to the Jarl of the hold it is located in and earn political favor with them. These ownership features aren't implemented yet but they shouldn't take too long after I finish working on the economy itself.
There's a lot more to this system that I will discuss in future posts.
Anyway, I want to thank you all for being patient. I really want to update this more but it is getting increasingly difficult to find the time to write these up. However, know that I still work on this mod almost everyday before I go to work and have put way too much time in it to abandon it.