StoneLineDevTeam / UMod

GMod replacement project - Sandbox game based on Unreal Engine
BSD 4-Clause "Original" or "Old" License
16 stars 9 forks source link

Asset injecting, illegal... #5

Closed Yuri6037 closed 8 years ago

Yuri6037 commented 8 years ago

This message is intended for anyone that is interested into UMod development. I need to tell you, and I know how much unfortunate this is, but what I'm trying to achive with dynamic asset loading is illegal in the design of Epic Games EULA, by the simple fact what I want to do is called editing AssetRegistry.bin at runtime and forcing the engine to reload it. Changing this file is illegal when done at runtime : this file is intended to be generated by UE4 Editor Asset Cooking process. Importing this asset cooking process into a runtime module would be illegal, and so under those problems I can't continue the game like that, however some last options remains legal in the EULA.

Indeed if direct asset registry modification during runtime is illegal, there's still a way as to proceduraly generate meshes and textures using custom decoders and custom file formats. I think you'll understand that making custom formats and custom decoders is highly more complicated, and honnestly I need to tell you that I don't think I can do it.

I leave up to you C++ coders, better than me, if you can make a working implemention of FBX decoder inside UE4. Even if I can make FBX deconding myself, procedural mesh generation is unfortunatly impossible in UE4. Only procedural texture generation is possible. I'm sorry but I have not the knowledge to make it possible to proceduraly generate meshes with materials and UVs on UE4 C++.

Yuri6037 commented 8 years ago

Well, after a long speak on UE4 IRC, I might have find a solution to the issue.

DatCaptainHorse commented 8 years ago

What is the solution?

Yuri6037 commented 8 years ago

Wow ! Someone is still interested ! So well the solution is easy : content packs. That means all addons that have media content to inject will put a Content.pak file with their lua folder inside the add-on folder. GameModes will also have the same principe. And with that I will enable something that has been requested on gmod but not implemented due to engine limits : content pack injection dynamically in game ! (Note that while you will lua mount your pak you will "crash" the client as injection is done on the normal thread. Second note : models added before content pack mount will probably need reload... Third note : maps will unfortunately not be able to be dynamically injected while in game as the client must spawn somewhere and it wouldn't be playable if the map was missing).

Yuri6037 commented 8 years ago

Ok so now Asset Injection should be done but I can't test it right now... I need to figure out how to compile pak files to test it.

Yuri6037 commented 8 years ago

By the way it should work, I'll close that issue. When I'll be able to test the system, I'll open a new one if it does not work as intended.