Hello!
I've been trying to figure out how to make multiple mods use the same classes but be able to be used either together or separately without Reflection, like some of the NRaas mods (and modules of mods) seem to do, and I feel like the reason I'm not seeing it is that I don't know the terminology for describing what I'm trying to learn how to do. Is there a technical term for what a mod and its modules are to each other? Or how all the mods in the NRaas suite that use the Common class or CommonSpace namespace are interacting?
I know the most straightforward way to accomplish what I'm aiming for is just to make a base mod containing the shared classes and have the others reference it, and that's probably going to be my preliminary solution; but it seems like the way NRaas mods handle this is a little simpler for downloaders, so I'd like to provide that kind of convenience if I can.
Question re: modules and cross-mod namespaces
- aede_ofThuul
- Reactions:
- Posts: 50
- Joined: April 26th, 2020, 5:37 am
- Chain_Reaction
- Site Admin
- Reactions:
- Posts: 7618
- Joined: December 30th, 2011, 6:00 pm
- Contact:
Question re: modules and cross-mod namespaces
There's no real magic going on here. The modules reference the base mod's DLL when they are built so it allows them to use it's classes.aede_ofThuul wrote: ↑November 10th, 2020, 6:54 pmIs there a technical term for what a mod and its modules are to each other?
Each mod uses it's own instance of the Common class. It's just a shared library for convenience sake. In the places they do interact, like Overwatch export/import, reflection is used.aede_ofThuul wrote: ↑November 10th, 2020, 6:54 pmOr how all the mods in the NRaas suite that use the Common class or CommonSpace namespace are interacting?
- aede_ofThuul
- Reactions:
- Posts: 50
- Joined: April 26th, 2020, 5:37 am
Question re: modules and cross-mod namespaces
Oh, that's less complicated than I was assuming! It sounds like base-mod-plus-modules really is the way to go, then - thank you!