RobertBeckebans / RBDOOM-3-BFG

Doom 3 BFG Edition source port with updated DX12 / Vulkan renderer and modern game engine features
https://www.moddb.com/mods/rbdoom-3-bfg
GNU General Public License v3.0
1.38k stars 247 forks source link

[WIP] Initial mod menu #361

Closed mattiascibien closed 2 months ago

mattiascibien commented 7 years ago

Hello,

after a year of hiatus I was able to port my mod menu back from my messy fork of Doom3 to RBDoom3-BFG.

The intent of this is to provide a way to load mod like it was possible in the original Doom 3 version.

TODO list:

I am opening as a WIP as I may need some help with populating the list of mods (loop through the folders alongside the exe, read the file description.txt inside those folders and add them to the list). I was not able to find a function to loop through the folders (maybe it is still possible to port the code that was used from the original doom source)

EDIT: found some code https://github.com/TTimo/doom3.gpl/blob/aaa855815ab484d5bd095f347163194ac569abcc/neo/framework/FileSystem.cpp#L1708-L1787

BielBdeLuna commented 7 years ago

this is great news!

one should be able to re-add fullscreen GUIs to the engine, all the code is there. some time ago I took a look to the code in order to re-add a fullscreen GUI for the map loading. it didn't seem difficult, it was just calling some classes that weren't called from the map loading code. all those classes are still there.

mattiascibien commented 7 years ago

@BielBdeLuna thanks. I am now working on how I can loop the folders as ListOsFiles is private. I am seeking also @RobertBeckebans support on this if he is available.

BielBdeLuna commented 7 years ago

the big barrier won't be the c++ but the flash system. although motorsep made some flash menus, i still think bringing back the fullscreen GUIs would benefit the most, and it is a project of mine in the future.

before you act on it I'd propose you to look at the GUI code in dhewm3, maybe the ListOsFiles is there so you don't have to do the work

mattiascibien commented 7 years ago

@BielBdeLuna ListOsFiles is already in BFG but is in a subclass (idFilesystemLocal) and therefore cannot be accessed from the filesystem variable I have inside the Menu file. I think that porting back the ListMods function from original doom3 will be nice.

The flash system itself does not have any problem as you can see the code to find and launch the mod is preetty complete at the moment. Whats is needed to d now is to populate the options var with the as many modOption_t as the number of folders found alongside the executable.

Not sure on how the whole game works on linux though (is the base directory still alongside the executable)?

BielBdeLuna commented 7 years ago

in linux it changes, the config files and the saved games is saved in the /home/'username'/.rbdoom3bfg/'modfolder'/ where 'username' is the name of the linux user and 'modfolder' is the name of the mod.

how has it changed from dhewm3? in dhewm3 ListOsFiles is in the idFileSystemLocal class?

mattiascibien commented 7 years ago

Yep I know. The fact is that to outside only idFilesystem is exposed, and casting it for my merge seem quite a hack :)

Edit: filesystem local is not exposed to the public I think.

mattiascibien commented 7 years ago

I guess I will go with something like the old ListMods inside idFilesystem as per original doom3 so the code will resemble the old doom3 code.

EDIT: so it will be used like this: https://github.com/TTimo/doom3.gpl/blob/aaa855815ab484d5bd095f347163194ac569abcc/neo/framework/Session_menu.cpp#L228-L243

BielBdeLuna commented 7 years ago

merda? shit? what? :)

mattiascibien commented 7 years ago

@BielBdeLuna ?

BielBdeLuna commented 7 years ago

I don't know what you said above... :)

BielBdeLuna commented 7 years ago

how different do you wish to do the mod menu?

besides the menu, you would need to separate the engine from the game code, how difficult will this be? is it just a matter to create a separate dll/so file from the cmake script or it will be more difficult than this?

mattiascibien commented 7 years ago

Well. The mod Selection menu will be almost the same as the dev One. Check that out. It should work with my latest commit.

Il 14 dic 2016 5:56 PM, Biel Bestué de Luna notifications@github.com ha scritto:

how different do you wish to do the mod menu?

besides the menu, you would need to separate the engine from the game code, how difficult will this be? is it just a matter to create a separate dll/so file from the cmake script or it will be more difficult than this?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/RobertBeckebans/RBDOOM-3-BFG/pull/361#issuecomment-267089425, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABPYyZGyz5C_Ghd0rgbR8NGiAZYgvxPWks5rIB_SgaJpZM4LMuS_.

BielBdeLuna commented 7 years ago

@mattiascibien can't compile your code:

CMakeFiles/RBDoom3BFG.dir/d3xp/menus/MenuScreen_Shell_Mods.cpp.o: In function idMenuScreen_Shell_Mods::HandleAction(idWidgetAction&, idWidgetEvent const&, idMenuWidget*, bool)': /home/biel/src/MattiascibienD3BFG/neo/d3xp/menus/MenuScreen_Shell_Mods.cpp:192: undefined reference toSys_Exec(char const, char const, char const, bool ()(), void ()(char const), int, unsigned int&)' collect2: error: ld returned 1 exit status

mattiascibien commented 7 years ago

not sure about this. I'll check.

Ottieni Outlook per Androidhttps://aka.ms/ghei36


From: Biel Bestué de Luna notifications@github.com Sent: Monday, May 1, 2017 9:08:00 PM To: RobertBeckebans/RBDOOM-3-BFG Cc: Mattias Cibien; Mention Subject: Re: [RobertBeckebans/RBDOOM-3-BFG] [WIP] Initial mod menu (#361)

@mattiascibienhttps://github.com/mattiascibien can't compile your code:

CMakeFiles/RBDoom3BFG.dir/d3xp/menus/MenuScreen_Shell_Mods.cpp.o: In function idMenuScreen_Shell_Mods::HandleAction(idWidgetAction&, idWidgetEvent const&, idMenuWidget, bool)': /home/biel/src/MattiascibienD3BFG/neo/d3xp/menus/MenuScreen_Shell_Mods.cpp:192: undefined reference toSys_Exec(char const, char const, char const, bool ()(), void ()(char const*), int, unsigned int&)' collect2: error: ld returned 1 exit status

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/RobertBeckebans/RBDOOM-3-BFG/pull/361#issuecomment-298405042, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABPYyZlzTok2L0FM_H8kNc1Y0rsZFCEXks5r1i2QgaJpZM4LMuS_.

mattiascibien commented 7 years ago

I guess the problem is Sys_Exec not being implemented in Linux as D3BFG was windows Only: https://github.com/id-Software/DOOM-3-BFG/search?utf8=%E2%9C%93&q=Sys_Exec&type=

I will have a look on porting the Linux version from the original doom 3 code.


Da: Mattias Cibien mattias.cibien@outlook.com Inviato: lunedì 1 maggio 2017 21.41 A: RobertBeckebans/RBDOOM-3-BFG; RobertBeckebans/RBDOOM-3-BFG Cc: Mention Oggetto: Re: [RobertBeckebans/RBDOOM-3-BFG] [WIP] Initial mod menu (#361)

not sure about this. I'll check.

Ottieni Outlook per Androidhttps://aka.ms/ghei36


From: Biel Bestué de Luna notifications@github.com Sent: Monday, May 1, 2017 9:08:00 PM To: RobertBeckebans/RBDOOM-3-BFG Cc: Mattias Cibien; Mention Subject: Re: [RobertBeckebans/RBDOOM-3-BFG] [WIP] Initial mod menu (#361)

@mattiascibienhttps://github.com/mattiascibien can't compile your code:

CMakeFiles/RBDoom3BFG.dir/d3xp/menus/MenuScreen_Shell_Mods.cpp.o: In function idMenuScreen_Shell_Mods::HandleAction(idWidgetAction&, idWidgetEvent const&, idMenuWidget, bool)': /home/biel/src/MattiascibienD3BFG/neo/d3xp/menus/MenuScreen_Shell_Mods.cpp:192: undefined reference toSys_Exec(char const, char const, char const, bool ()(), void ()(char const*), int, unsigned int&)' collect2: error: ld returned 1 exit status

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/RobertBeckebans/RBDOOM-3-BFG/pull/361#issuecomment-298405042, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABPYyZlzTok2L0FM_H8kNc1Y0rsZFCEXks5r1i2QgaJpZM4LMuS_.

BielBdeLuna commented 7 years ago

alongside this, could opening pk4 files be implemented again? I was looking at all this while working for the OTE (a derivative from the RBDoom3BFG, a OS platform for building games) and made a list of priorities related to mod folders and base folders, what do you think about this?

mattiascibien commented 7 years ago

Not sure about that. This was just a menu that in the end was supposed to reload the game using the correct +fs_game_path variable. I did not look into porting other features of OriginalD3 like pk4 loading.


Da: Biel Bestué de Luna notifications@github.com Inviato: lunedì 15 maggio 2017 17.00 A: RobertBeckebans/RBDOOM-3-BFG Cc: Mattias Cibien; Mention Oggetto: Re: [RobertBeckebans/RBDOOM-3-BFG] [WIP] Initial mod menu (#361)

alongside this, could opening pk4 files be implemented again? I was looking at all this while working for the OTE (a derivative from the RBDoom3BFG, a OS platform for building games) and made a list of priorities related to mod folders and base folders, what do you think about thishttps://github.com/OpenTechEngine/Discussions/issues/46?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/RobertBeckebans/RBDOOM-3-BFG/pull/361#issuecomment-301501962, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABPYyekkyv0E_1jMDR1BNd5LWmjuRSzcks5r6GhxgaJpZM4LMuS_.

BielBdeLuna commented 7 years ago

ok

mattiascibien commented 7 years ago

Pk4 loading should not be difficult to find inside Original D3 but making them work alongside resource files can be pretty difficult IMHO and also they can also have DLLs inside them.


Da: Biel Bestué de Luna notifications@github.com Inviato: lunedì 15 maggio 2017 17.05 A: RobertBeckebans/RBDOOM-3-BFG Cc: Mattias Cibien; Mention Oggetto: Re: [RobertBeckebans/RBDOOM-3-BFG] [WIP] Initial mod menu (#361)

ok

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/RobertBeckebans/RBDOOM-3-BFG/pull/361#issuecomment-301503696, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABPYyQgAuTXiak6LYpqDV-NPNE9xCY5xks5r6GmogaJpZM4LMuS_.

BielBdeLuna commented 7 years ago

which is the reason that makes it difficult to make them work alongside *.resources files? I mean, aren't the files inside pk4 treated the same as the files outside in a folder only that they are zipped inside the file?

mattiascibien commented 1 year ago

Sorry for updating this after this very long time.

RobertBeckebans commented 2 months ago

I close this because mods that require C++ changes are not covered by this and those mods need a new .exe anyway that can automatically set fs_game to the certain mod folder.