Best way to organize a game/universe framework for easy updating?

I am trying to have organization within my games universe. I want to be able to edit my framework that contains all of my scripts and assets in my testing place, and then easily update it to all of the places within my games universe instead of having to painstakingly go through every place and replace all of the newly changed scripts.

I have read about the Packages system and I believe this would be the best place to implement what I’m trying to do. The only issue is I don’t know how to properly unpack the packaged assets. IE. Putting all ServerScriptService scripts in ServerScriptService first, putting ReplicatedFirst scripts in ReplicatedFirst, etc. I am often met with errors. I would need to create a priority order to make sure everything is inserted properly.

Does anyone know of an existing system that does this or of a way to do it right? I couldn’t properly word it when searching on the DevForum for this issue.

1 Like

Ah, I was thinking of a way to do the same thing for my game because players are gonna have to travel between levels and such.
I suppose you could make a script that sets the package up. Make a folder with the name of each service and just parent everything from those folders into the real services.

for _,ServiceFolder in pairs(Package:GetChildren()) do
	for _,Child in pairs(ServiceFolder:GetChildren()) do
		Child.Parent = game:FindFirstChild(ServiceFolder.Name)
	end
end)

Now I might be wrong, because I didn’t use packages at all, so sorry if some things are incorrect.

I recall I did something exactly like this, the issue then became unpacking the packaged things to their appropriate folders. I ended up just writing a function to grab everything and put it into a folder, then I would manually go to each game and use another function to override all of the assets. It became quite tedious to do when all I wanted was to change just a few scripts or variables. I’m going to look around for a solution or possibly just tinker with the package system more. There isn’t that many examples of the package system in use, and searching it often ends up getting convoluted search results due to character packages, lol.

What do you mean by “Unpacking the packaged things to their appropriate folders”?

Sorry, I remember my issue now. I wanted to have everything organized in a single framework folder and then upon the game starting have everything in the framework folder be ungrouped in their respective places. ie. ServerScriptService folder would be ungrouped in ServerScriptService. I ended up getting errors due to scripts running even when disabled, and not prioritizing the order in which things were parented. I wanted to do it this way because it was getting annoying having to parent things manually or with a script. I believe I’ve seen this done in games before just not sure how I’d go about doing it properly.