|
Post by ITR on Feb 27, 2015 21:09:45 GMT
Humble and steam dlls aren't identical so you'll have to create 2 versions. However, you've already hit a problem. You created 2 small mods and users cannot install both at the same time. A modloader couldn't solve this either as your mods require modified assemblies, which can't be easily merged. I could easily just merge the code manually if needed. The only methods that overlap is BlockInfoController, if I remember correctly.
|
|
|
Post by Zeblote on Feb 27, 2015 21:11:49 GMT
Yes, but it can't be done automatically that easy. So you should just keep all your changes in a single mod until we found a better way
|
|
|
Post by ITR on Feb 27, 2015 21:16:58 GMT
Yes, but it can't be done automatically that easy. So you should just keep all your changes in a single mod until we found a better way Ah, the bomb mod was mainly because somebody wanted to change bomb power in the suggestions forum. Maybe a modloader where you can specify if the code is replacing/deleting or adding to a method? Then have some kind of search that adds the code (if additive) after some trademark of the original code? Though I guess that counts as complicated. EDIT: Oh, wait, I got an idea, what if the modloader could make the methods call an added method/class before returning? I think my mods at least could be re-written into methods/classes.
|
|
|
Post by spaar on Feb 27, 2015 21:23:35 GMT
EDIT: Oh, wait, I got an idea, what if the modloader could make the methods call an added method/class before returning? I think my mods at least could be re-written into methods/classes. That might work for some things, but I'm pretty sure that things like changing the rotation amount would be impossible with just that.
|
|
|
Post by Zeblote on Feb 27, 2015 21:29:21 GMT
Yes, but it can't be done automatically that easy. So you should just keep all your changes in a single mod until we found a better way Maybe a modloader where you can specify if the code is replacing/deleting or adding to a method? Then have some kind of search that adds the code (if additive) after some trademark of the original code? Though I guess that counts as complicated. Mono doesn't have any of the methods implemented that can modify the contents of the method. So you have to manually inject some code in every method that you want the modloader to be able to use EDIT: Oh, wait, I got an idea, what if the modloader could make the methods call an added method/class before returning? I think my mods at least could be re-written into methods/classes. That might work for some things, but I'm pretty sure that things like changing the rotation amount would be impossible with just that. You can easily set AddPiece.currentRotation (or similar) from another script, that's not a problem.
|
|
|
Post by spaar on Feb 27, 2015 21:36:32 GMT
You can easily set AddPiece.currentRotation (or similar) from another script, that's not a problem. Right, I forgot that actually existed as a variable. The point I was trying to make is that often, actually modifying stuff in the game won't be doable by just calling additional methods. Also, perhaps not as important, as you create more and more of these "callbacks" or "hooks" or whatever, updating the mod loader would get increasingly tedious wouldn't it ? Creating all those calls by hand.
|
|
|
Post by Zeblote on Feb 27, 2015 21:40:24 GMT
Well in your mod you can just do
class WheelControllerWithToggle : WheelController
and then replace the components in the prefab when a level is loaded. Every instantiated copy of the wheel will now use your custom component. The modloader could provide a delegate that is called when the level is loaded for this
However, as soon as 2 mods want to change something in the same class the modloader will have to provide an interface (not C# interface) for it
|
|
|
Post by spaar on Feb 27, 2015 21:43:37 GMT
Yeah. Maybe we could create a mechanism that would create and replace components in the modloader, with the mods specifying what they want... But I don't think that could be implented easily, could it ? And it would inevitably lead to conflics down the road once there are enough mods...
|
|
|
Post by Zeblote on Feb 27, 2015 21:46:20 GMT
Alternatively, you could have an external program that merges the mods. Every mod would contain info what il codes have to be injected where, and the modloader then uses Mono.Cecil to do just that and generate a new Assembly-UnityScript.dll
The only problem is that this cannot be done from inside the game, but it would certainly not be an easy task to write such a modding system from the ground up.
|
|
|
Post by spaar on Feb 27, 2015 21:51:58 GMT
It might be possible, yeah. But I think that's a while in the future, if it ever happens, looking at the state of modding right now
|
|
|
Post by Zeblote on Feb 27, 2015 21:52:34 GMT
We could also just wait for the devs to come up with their own modding api solution, and spend our time writing cool mods.
|
|
|
Post by ITR on Feb 27, 2015 21:57:49 GMT
We could also just wait for the devs to come up with their own modding api solution, and spend our time writing cool mods. We should make a block that can freeze (the too high up kind) other blocks. That would be cool
|
|
|
Post by spaar on Feb 27, 2015 21:59:07 GMT
That might be a more productive solution I'm just hoping they don't take too long, though there are of course things with higher priorities at the moment. Edit: An official API would also be nice because some things are just really tedious to do now, like adding buttons to the block selector bar... It's rather annoying
|
|
|
Post by Zeblote on Feb 27, 2015 22:05:09 GMT
I'm just hoping they don't take too long, though there are of course things with higher priorities at the moment. Look at how long it took space engineers or kerbal space program from first release to officially supporting dll mods. Multiply by at least 2 as they don't have as many people working on it / didn't start with modding in mind.
|
|
|
Post by spaar on Feb 27, 2015 22:08:42 GMT
I guess so. We'll just have to make the best out of what we have and produce the best mods we can.
|
|