20.01.2015, 15:18
Quote:
I also wanted my admin-system, housing and business systems, refuelling system and alot more inside a filterscript, and only hold the job/class systems inside my gamemode.
I didn't want to extract all those systems in case I want to create a new gamemode later on, so it was my plan to have all the systems I would need later inside a filterscript. But it was too hard to maintain and both scripts needed to communicate too much between them. Even some values needed to be shared and both scripts would eventually hold almost identical data to prevent too many CallRemoteFunction calls to transfer all the data all the time. Even some commands needed to be split between both scripts (as I have alot of in-game editing commands), because I didn't want to make 2 separate commands to edit data about the same thing (vehicles for example). The filterscript held fuel-tank size, fuel consumption, current fuel, and a few other values. The gamemode held values such as cargobay size, the products inside the cargobay and also a few other values. I had an /editv command, where I could adjust the fuel-values from inside the filterscript. But because the data was split between both scripts, the gamemode would need an /editv2 command to modify data about the cargobay. Admins would need to know which values are in which script and execute the proper command to access the right data, where the interface is nearly identical. And making one command to edit everything would mean I had to move all data to one script and modify it there and make many CallRemoteFunction calls to transfer the data when the gamemode needed them. Or share dialogs between both scripts to go back and forth between them, so the user doesn't even notice he's working with 2 scripts. My head was nearly exploding while figuring out how I could make it as painless as possible for myself, keep the code simple, edit as much data as possible, get the best flexibility, have the ability to do whatever I wanted and whatever else. I eventually decided to merge the filterscript and gamemode, since both scripts need eachother anyway to work properly, and because of this, I have to start from scratch (again), copying code and modify it to get it to work. I was only making things harder then needed. |