Search Unity

[Now Released] uMod 2.0 - Modding support made easy

Discussion in 'Works In Progress - Archive' started by scottyboy805, Feb 18, 2016.

  1. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    One thing I didn't find out was whether it had bindings for the stream workshop API?
     
  2. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Hi, here are the scripts:

    Feel free to dissect them - sorry I haven't commented. Basically, its a series of callbacks from the steam servers. This image simplifies it quite a lot:


    I would also recommend that you get access to the Steamworks API - you can access the documentation by signing in with a Steam account here.
     
  3. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Great, much appreciated. :)
     
  4. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    >Which Unity version are you using?
    5.3.4f1
    What should I do to be able to use newer verions of unity?
    (downgrade is not an option :))
     
    Last edited: Jul 29, 2016
  5. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    On the beta page there are 2 version of the exporter and uMod. You will need to download the version for 5.3.0 or greater. This wouldn't be an issue but Unity introduced a build breaking change with the new scene management (Thanks Unity!!) so we cannot be fully backwards compatible. It should just work out of the box then.

    Make sure you delete the package completely before importing the new version just to be safe.
     
    Last edited: Jul 29, 2016
  6. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    in that video I am using
    umodexporter_beta_2.0.0_530.unitypackage
     
  7. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    So your Unity version does not have access to the Unity scene management yet? It was my understanding that this was added in version 5.3.0. In that case the 5.0.0 version should work for you since the scene management was the only breaking change.
     
  8. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    well, I can update it to 5.4 right now and check once more
    BTW if you need you can any time contact me in skype ("anton.tril") to have a teamviewer session to debug directly on my PC
     
  9. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    ok let me know how you get on with 5.4.
     
  10. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
  11. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    plus when I am trying to switch External Script Editor to Mono I am getting strage error see image:
     
  12. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    I made mono project by clicking "Assets -> Open C# Project" and now I have this error:
     
  13. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    That error is a chain effect from the first build error and will go away when fixed. Are you certain you have the 530 version installed? I have just tried to build the spinning cube mod in Unity 5.3.0f4 and it worked without any problems :S.

    With the argument exception for the scene load call, does the call stack contain a call to 'EditorApplication.OpenScene'? If so then the plugin is using the old Unity API which indicate the wrong version is installed or that the wrong plugins have been included in the package
     
  14. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
  15. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
  16. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    That's OK, that just lists the supported version of Unity. It's not modified based on the target version. Could you check the call stack for the scene build error.
     
  17. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    > does the call stack contain a call to 'EditorApplication.OpenScene'?
     
  18. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Indeed it does. Well that is the problem. Give me a few minutes and I will see if I can find why it is called
     
  19. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    sure, I need to run right now, will get back in 3 hours :)
     
  20. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Well I have found the problem, it looks like a few symbols were not defined during the build process so it is using the old configuration. I will upload a new version and hopefully it will be problem sorted.
     
  21. loptrinho

    loptrinho

    Joined:
    Nov 21, 2015
    Posts:
    8
    Will we be able to mod mods? ;)

    e.g. mm_Ash created a mod for your game, but only in Spanish. Can I mod his mod to display english texts (or tweak variables or or or...)? Or make his rotating cube blue instead of pink? =)
     
  22. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    New exporter version released:

    -The exporter will attempt to recover the project if a build fails so you should never see renamed assets regardless of the build status
    -The supported unity version on the about windows now actually represent the target Unity release version.
    -The assets for the example spinning cube mod are now included.

    Many thanks to ASH for all the help.
     
    Stormy102 likes this.
  23. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    That's an interesting question. Unfortunately mods are not able to mod other mods, it would be up to the mod author to support multiple languages. Perhaps I can include some tools to make mod localization easier such as a basic string lookup. As a basic security measure, mods are not allowed to communicate with each other. All communication is done with the mod host so changing mod variables or assets from another mod is not possible sorry.

    Is there any particular reason you would like this feature or a use case where it could be used? Generally mods are not aware of each other, often leading to compatibility issues but that's another story.
     
  24. loptrinho

    loptrinho

    Joined:
    Nov 21, 2015
    Posts:
    8
    Well, it was mostly for localization reasons (when it comes to modding I always think of the Elder Scrolls series where this has been done quite often: translating other authors' mods). Another use case might be a mod that changes gameplay via script, but whose balancing doesn't meet my taste (in this case it might be awful to just have to change some variales values instead of reimplementing/reinventing the whole mod). But in a case like this it might be better if the author provided a menu to allow value changes.

    So no, there's no particular reason (apart from localization) why this would absolutely be needed (at least not for me) ;)
     
    Last edited: Jul 29, 2016
    scottyboy805 likes this.
  25. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    I can understand localization as a main concern so we will look into offering basic localization support to mod authors. Aside from that I think mod to mod communication should be left well alone. It sounds like a recipe for disaster to me.
     
  26. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    Great! Seems something changed :)
    I am still have this bugs from uMod 2.0 Exporter Window


     
  27. loptrinho

    loptrinho

    Joined:
    Nov 21, 2015
    Posts:
    8
    What exactly does happen now if multiple mods are loaded that try to modify the same content? Does the latest loaded mod overwrite all changes? If so, we do already have moddable mod support (well, kind of). If not, what's the result? Errors? Exceptions? Unpredictable behaviour?
     
  28. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Good news. Are you able to build now? Those other errors look like a problem creating the editor styles. I will look into it further
     
  29. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    At the minute modding game content has not been enabled. You can only call game scripts, load prefabs from the mod and load scenes from the mod. This was part of the reason it was not included since we couldn't decide yet how this should be handled.
     
  30. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    nope )

     
  31. loptrinho

    loptrinho

    Joined:
    Nov 21, 2015
    Posts:
    8
    I was thinking of implementing my main campaign as a mod (additional content) and then let this be modified. It's not a problem to develop the game as a standalone, though (and possibly the better approach)....
     
  32. loptrinho

    loptrinho

    Joined:
    Nov 21, 2015
    Posts:
    8
    Oh, that's a real pity. Modders love to change images, textures and models. That's a big part of the modding community in my eyes. I would greatly appreciate if modding game content was supported in a later update.
     
    Stormy102 likes this.
  33. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    I think I know what the problem is but I will be away from my work PC for a while now but I will make the changes as soon as I can.
     
  34. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    It will be added as soon as we have found a suitable way to override content. We need to find a way to decide which mod takes priority
     
  35. loptrinho

    loptrinho

    Joined:
    Nov 21, 2015
    Posts:
    8
    Glad to hear that. Load order sounds like a candidate to me. What else makes sense without inventing horrible algorithms to determine a mod's weight?

    This implies that only one mod can be active at any time (i.e. I can't load the TestLevelMod along with the TestAmmoMod). Right? And this would mean that mod is more about "modular" than about "modifying" (like in Neverwinter Nights 1&2)? Because if multiple mods are possible concurrently, there has to be a mechanism to decide what to do with the different mods' contents, or not (like TES series)? Or am I missing something here?

    No criticism in these questions, I just want to fully understand what's awaiting me with your asset... ;)
     
  36. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Unity 5.4 latest exporter having same problem as ASH
     
  37. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    I have finally been able to reproduce the error you are getting using 5.4.0 and am in the middle of fixing the issue. Hopefully have a working version soon.
     
  38. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    In the example you give, uMod will be able to load both mods because only the level mod will relay on assets. The ammo mod is purely scripted an will be able to run along side the level mod because they will not be fighting for priority. So you will be able to play a new level with an infinite ammo mod and all should be well.

    Loading multiple mods will be possible so long as different mods don't try to replace the same assets. This is when things get complicated and you need to decide the best way to handle mod priority.
     
    Stormy102 likes this.
  39. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Thanks for letting me know. i'm working on it ;)
     
  40. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    New uMod and exporter version released:

    -Fixed errors about editor styles when the exporter window is shown or refreshed.
    -Recreated, fixed and tested exporter bug regarding the editor scene manager in Unity 5.4.0.
    -Improved mono project location during build to support Unity 5.4.0

    @mm_ASH & @Stormy102: Let me know if you are still having problems exporting but there should be no issues now.
     
    Stormy102 likes this.
  41. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    seems now it exports well
    are you going to do something with this?

     
  42. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Have you made sure that the mono project has been created? Go to Assets->Open C# Project to be sure and then try to rebuild. Or check your project directory for a file like this: Screenshot.png
     
  43. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    and during loading this scene I have this (rotating script is not found, material on cube lost)
     
  44. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Yep that is just because the mono project was not found, Fix that and it will rotate fine.
    If the material is lost it will usually cause the cube to render in pink. Are you sure you assigned it before export because it seems to have gone back to default
     
  45. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    Well it could be nice if in case when project not found you just programmaticaly click on that menu item "Assets->Open C# Project " :)
     
  46. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    Perhaps something to take into consideration.. I suppose I could include a message on how to fix the issue in the warning
     
  47. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    nope, I am not so stupid :p
    of course I`ve compiled mod without errors, that`s happens because of something else, any ideas?
     
  48. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    How is your mod directory structured? is the material inside the directory otherwise it will not be exported.
     
  49. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    here is full splitscreen version of what i have now:
    (ok, let`s forget about materials for now, I`ve got idea, but it was just default material)
     
  50. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    1,193
    I assume that the cube prefab (If you use a prefab) is under the ModData folder along with the material you have applied to the cube. And if so I assume you are selecting to export the ModData folder.