Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a world data RMB block editor to Unity DFU tools #2497

Merged
merged 15 commits into from
Jan 29, 2024

Conversation

Podleron
Copy link
Contributor

@Podleron Podleron commented Feb 11, 2023

I created this modding tool to make editing RMB blocks easier. You can find more information on how it can be used here: https://forums.dfworkshop.net/viewtopic.php?t=6105

@Cliffworms
Copy link
Contributor

This is to inform you that I've been testing the tool for the last two hours. So far, it's working as intented and the interface is neat.
Adding new buildings creates a building entry in the block's json file and so it's recognized as such in the game.

If I run into bugs and editor errors, I will list them here.

This is a very promising tool for world data editing and a great companion to the building editor.

@Interkarma
Copy link
Owner

This sounds incredible! If Cliff and others creating world mods endorse it, then I'm on board.

From a quick read, looks to only be adding new editor behaviours and not touching anything in core game. That's a really good starting point. Even if it's not merged to core for a while, others can pull this PR to their own repos to use the tools.

@Cliffworms
Copy link
Contributor

There appears to be issues when using the Mod Builder with the RMB Editor loaded. Building a mod results in the following errors (picture attached) and the mod does not get built.

Removing the RMB Editor from the project's addons and then using the mod builder works as intended.

RMBEditor_ModBuilder_Error

@KABoissonneault
Copy link
Collaborator

It's possible the source files need to be added in an Editor subfolder. See how WorldDataEditor doesn't have this issue despite using the SceneView too

https://github.com/Interkarma/daggerfall-unity/tree/master/Assets/Game/Addons/WorldDataEditor

Another solution is to wrap the code in #if UNITY_EDITOR and #endif, but hopefully the first thing works

@Podleron
Copy link
Contributor Author

@Cliffworms, thanks for testing, I really appreciate it!
@KABoissonneault, thanks for the tips!

@Podleron
Copy link
Contributor Author

The Editor shouldn't cause the Mod Builder to crash anymore. I moved everything I could in the Editor subfolder, but I have some MonoBehaviours that I had to wrap in #if UNITY_EDITOR and #endif.

The other commit fixes a problem with importing 3d Objects from mods. It works like in the WorldDataEditor - you have to start the Startup scene and get to the main menu then return to the Scene view.

@ajrb
Copy link
Collaborator

ajrb commented Oct 21, 2023

@Interkarma I'd like to merge this into the codebase before 1.0 releases - is that okay? It shouldn't affect the build or game in any way. I will then fix the compiler warnings it throws as well as fixing a simple close bug where the gameobjects are not destroyed.

@Podleron ObjectPicker and BuildingDataElement both have warnings about async methods. I will be adding pragma's to suppress the warnings for these unless you can fix the issues. It seems to work correctly, but I don't understand the code here enough to know how to fix it another way.

@Interkarma
Copy link
Owner

@Interkarma I'd like to merge this into the codebase before 1.0 releases - is that okay? It shouldn't affect the build or game in any way. I will then fix the compiler warnings it throws as well as fixing a simple close bug where the gameobjects are not destroyed.

Hey mate - please wait until after 1.0 is released. I know this should have no effect on builds, but I don't want to risk merging such a large change right now. It's coming up soon though, so it won't be much longer.

@ajrb
Copy link
Collaborator

ajrb commented Oct 22, 2023

Sure that's no problem, makes sense. No rush on the release, I will not forget - I have left this one far too long.

@Podleron
Copy link
Contributor Author

@ajrb Hello, sorry for the late reply.
I haven't been active on this project for several months, but I am planning on coming back to it in mid-November. I can try to fix the warnings then, if that's ok with you.

Thanks for pointing out the issues and trying to get it merged! :)

@ajrb
Copy link
Collaborator

ajrb commented Oct 29, 2023

@Podleron Sounds good. Lets pick this up in a couple of weeks then.

Apply the RuntimeMaterials in editor for packaged mod models. This was already applied for dev mods, just missing for the package case
@KABoissonneault
Copy link
Collaborator

carademono found an issue where RuntimeMaterials had a workaround to show in the Editor preview for dev mods, but not for packaged mods.
image

We've just applied the RuntimeMaterials workaround for packaged mods too

@Podleron
Copy link
Contributor Author

@KABoissonneault, thanks for that fix!

@ajrb, I have added a commit that should clear the warnings related to the async code.

@ajrb
Copy link
Collaborator

ajrb commented Dec 5, 2023

Thanks @Podleron, I'll take a look during the xmas break.

@KABoissonneault
Copy link
Collaborator

This PR has been used for quite some time by the World of Daggerfall team, with success. The warnings have been fixed by Podleron in November. In any other case, all the changes are strictly within an addon folder, nothing within DFU is affected.

I think we should push to get this merged now. This will make it easier for new modders to get started with this, without having to change branches/forks all the time.

@Interkarma
Copy link
Owner

Agreed, Kab. This one has been pretty thoroughly tested by now, moreso than I could test by myself. I'm happy just to echo your approval at this stage.

@KABoissonneault KABoissonneault merged commit 686ccec into Interkarma:master Jan 29, 2024
@KABoissonneault KABoissonneault mentioned this pull request Feb 7, 2024
@ajrb
Copy link
Collaborator

ajrb commented Feb 11, 2024

I sat down today after finally finding some time to review this PR again. Seems I was beaten to it, sorry it took me so long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants