godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.07k stars 69 forks source link

Add a "PCK mode" to the editor for user-friendly mod creation, DLC creation, layered game development #6788

Open trollusk opened 1 year ago

trollusk commented 1 year ago

Describe the project you are working on

3D ARPG

Describe the problem or limitation you are having in your project

Godot games can be modded via PCKs. However, support for this from the user/modder side is poor. The editor can't do anything with PCK files directly, you have to download a third-party tool to extract a Godot project from them. This project can then be edited, but it is a partial "skeleton" that lacks any info about the underlying game - the modder just has to know about the game structure somehow, and create a PCK that will be compatible with the game without any help from the editor.

It also makes it difficult for game creators to make DLC for games, for the same reason. Currently the game author has to make the DLC as an entirely separate project with the same structure as the main game but no access to its data/assets.

The Bethesda games have a modding setup that has been extremely successful. The mod editor (Creation Kit) is also the tool used by Bethesda to make the games. On startup the editor loads all game data (the equivalent of loading all exported/baseline PCK files). The user then uses the editor to add or change game objects, assets, scripts etc. This feels like they are editing the game itself, but the changes are not actually made to the game's files, but are saved as a "diff", in the equivalent of a new PCK. When the game is actually run, the game loads these new PCKs after the baseline ones, in a defined order, so that the changes in the "mod" PCKs override the contents of the baseline PCKs where there is a conflict.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

This feature would:

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

File > Open PCK File > Create new PCK File > Close PCK

While in "PCK mode" (a PCK file is open):

Project Settings > PCKs tab This contains an ordered list of PCK files, similar to Autoloads tab. PCKs should reside in a defined folder or folders, which can be outside the project filesystem. All PCKs found in those folders should automatically appear on this list (where they can be reordered, disabled etc).

If there are PCKs in this list, then:

If this enhancement will not be used often, can it be worked around with a few lines of script?

No, this would be significant new editor and engine functionality .

Is there a reason why this should be core and not an add-on in the asset library?

Modding is more and more important to the success and longevity of games.

The Godot engine is tantalisingly close to being able to provide excellent modding facilities, but it is not there because of the rudimentary nature of PCK support.

This proposal would also make it much easier for game authors to make DLC, and to use a "layered" approach to adding new content to a game (initially create the content as a PCK, then when happy with it, de-PCKify it and merge it into the project).

Being able to advertise Godot as a game engine which can also be used as a Creation Kit-like mod creation tool for all created games, would provide it with a significant point of difference vs Unity and Unreal.

I think the broad array of benefits is compelling enough that this should be a core feature.

KoBeWi commented 1 year ago

It also makes it difficult for game creators to make DLC for games, for the same reason. Currently the game author has to make the DLC as an entirely separate project with the same structure as the main game but no access to its data/assets.

Not really. You can keep DLC together with the main project, but exclude it from export (using EditorExportPlugin for most flexibility). The PCK with DLC can be created using editor plugin.

trollusk commented 1 year ago

This feature could be presented as "layers". PhotoShop and 3D modelling tools have layers. Godot scenes have layers. Why not layers for computer programs themselves?

Exerionius commented 3 months ago

Not really. You can keep DLC together with the main project, but exclude it from export (using EditorExportPlugin for most flexibility). The PCK with DLC can be created using editor plugin.

How do you do that? Is there any examples?

amelkor commented 1 month ago

I think would be useful in not only DLC and modding. In my case I have 300k+ assets in the project which form the game's map. As they're complete, there's not really a need to keep them in the editor as source files, and having such amount of assets makes the editor extremely slow. I tried to look into packing all the assets into dedicated pck files and load them in the editor, while keeping only the core assets and programming the logic, but as I understand it's not supported. In such way huge projects could be split into separate projects to make programming and asset management much easier.