Ever had one of those times where you achieve what you set out to accomplish and you end up not being totally sold on the results? That happened to me today in regards to the following “To Do List” points I was working on:
– Allow the player to purchase buildings that already exist in the world, where that is possible.
– Tie the option to the Structure Management Terminal and place one in each of the building templates.
I was able to do both of those things as well as making a droid who rents structures, learning a lot in the process, but it wasn’t exactly what I wanted after all, due some issues and convolution. The problems basically amounted to,
1. I had to put the Structure Management Terminals into the building style template, so they loaded for every building of that type – even if there were some that I didn’t want the player to buy. This was because I wasn’t able to get admin-spawned terminals and screenplay loaded terminals to find the parent structure that they were in, leaving the building style templates the only functional way to get the terminals into the buildings. Many fruitless hours there, but at least the template loaded ones worked great!
2. I was not able to separate the server loaded structures from the clientobjects database and put them into their own database, using the data in the same manner as player housing data is used. Given that I had to delete the clientobjects.db every time I needed to reboot the server while figuring out where the new house signs needed to be, I can easily envision a time down the road where I will need to delete it on my play server, so the last thing I want is for it be full of my house items. About placing a house sign… it’s SUPER ANNOYING, because you need to place it x/z/y distance from the center of the building’s main cell, but once you step outside of the building you loose that reference point, as it’s replaced by your world reference point, leaving you to eyeball and guess your way to success. I digress…
3. Lag. Using playing structures prevents lag, as the contents aren’t loaded by the client until the player steps inside. Unfortunately not so for the server loaded structures.
4. The poor rental droid… It took me many hours to get him working just right and all of a few seconds on the toilet a day or two later to realize he just wouldn’t work in the real world. I made him rent a structure by adding the player to the admin list for a time, then automatically removing him later on. Unfortunately, it didn’t occur to me until after I did all the work that as a building admin, the renter could just add all his other characters to the admin list and never need to rent again! Oops. I thought of various work-a-rounds, but the more I thought about it, the more the whole concept of renting a structure fell apart in my mind. Renting a room (programming cell) wouldn’t have the permission issues and can be done with the lua scripting, but, ultimately I think it is a little pointless.
So despite putting in a lot of time and effort on those features, I’ve removed them from git (because the branches got all freaky deeky weird on me so I cleaned them using dumpster approach) and have started working on a new approach. For posterity, I have kept the code for these features in zip files, which you can find on my MEGA storage in the newly created “Stuff_I_Did” folder.
So what am I going to do about those two “To Do List” points?
Well, I have decided that letting the player use player housing is not only better for data and lag management, but it’s also better for personal satisfaction, in that it allows the player to have a larger visual and practical impact on their environment. As such, I am going to clear out some of the default buildings around Mos Espa to make more room for placing structures. I’ve already gone through and removed most of the zoning restrictions, so I just need to finish that up and add some merchants who sell the housing deeds (I actually already did that last part). Then when that is finished, I will remove the city hall building deeds from Architect crafting to prevent the player city system from being used (as it’s totally pointless in a single player situation and over lapping NPC city/Player city regions can be problematic).
I’ve also successfully tested making a player housing deed out of an NPC only style structure, (the steps for which you can find in our discussions about Tarkin 2.0, another project I will be working on with some friends) and that’s something I may do for a couple of the unique Tatooine house styles, the large hospital, and any other building I can’t live without living in! lol…