Ent that the truth!
amen brother!
knows whatâs next on @Froggyâs âto doâ list⌠and is beyond excited!
amen
Looks at froggyâs thread
What have I missed?!
My play on âAint that the truthâ has nothing to do with my to do list, but rather radiants.
whereas my comment had everything to do with @Froggyâs WIPâŚ
Well, I was wondering, is the current way of adding things into the game, ie mixintos, going to be the only way of doing such?
I was imagining (and hoping) to be able to make some sort of lua script with a function that you specify the path to the model and stuff. Is using mixintos to put things in the game just temproary? Or will this be the official way of doing things in the future?
You can already do this but it has to be a json, of course.
Mixintos and overrides are only to be used if you actually want to extend or modify existing content, not to put in new one.
Mixintos and overrides are here to stay, but there are certainly other ways of adding content to the game. If you look at candledark, youâll see that though our startup order API is still completely hacked together, there is a candledark_server.lua file that, after X in-game seconds, force-spawns a scenario, which in turn creates skeletons etc that are created all new for candledark. You could do anything else lua-related here, like start your own services, etc.
Ok cool. I guess my problem could be solved by using a lua script to generate a manifest.json. dunno if that would work. There is just something about JSON that scares me. I have nightmares. Itâs just so organised yuck
Hello there,
strange question, maybe, and not sure if Iâm in the right place hereâŚ
Donât fully understand modding in Stonehearth yet, but I tried to make a little, tweak I would say. I got suprised when it only took me like a minute to find and edit the actual code. Basically what I did was deleting a few lines.
I would like to make this into a mod you could turn on or off like others. Even with it being a very small one, because well it makes things easier. And I think other people would like this aswell, so I could share it more easily.
Now question;
I found that modding is very focused on adding or changing existing content. But how about adding a mod which excludes part of the main code?
Iâve been struggling trying to override an entire lua file with the same one except for the few missing lines, without succes.
thanks!
Hello there, @Nex!
Itâs not a strange question, at all - quite the opposite Iâd say for someone whoâs somewhat new to modding
If it is the âcorrect placeâ or not, however, I do not know.
AnywhoâŚ
You will have to create a folder-structure containing your mod; this is, the files you are adding/modifying, and a file called manifest.json.
You can check existing mods to see examples of how this is done
(in case you are not aware of it already, your current mods .smod-files are nothing else than .zip-files which where renamed from mod_name.zip into mod_name.smod)
The manifest-file is where you probably want to write something like this:
{
"info" : {
"name" : "your_mods_name",
"display_name": "Mod Name",
"version" : 3
},
"overrides" : {
"stonehearth/ai/actions/memorialize_death_action.lua" : "file(ai/actions/memorialize_death_action.lua)"
}
}
In my example above, the Stonehearth-version of action âmemorialize_death_action.luaâ will be replaced with my version of the same file.
So, simply tell what file you want to override, and point to your file which should replace it
I hope this help at least a little bit!
Exactly what I did, created a main folder inside âmodsâ, containing a manifest with your exact example, and a subfolder containing the tweaked script. Correct references and no syntax errors (I am familiar with coding in general).
It works when I edit the original lua file. But not with this mod extension, for some reasonâŚ
When you start Stonehearth, in the top-right there is a settings-button.
If you click this and go to the âModsâ-tab, do you see your mod here? If there is no error, does your mod have a tick in the box?
oops, I forgot to mention that. Yes I am aware of the mod handler I believe itâs called? And I was about to say I turned it on but actually, just right now I notice that every time I quit to main menu, or reboot the game entirely itâs reset to off?
Now thatâs weird⌠as if something is turning it off without giving any errors.
Not too sure what could cause this
Try adding "default_enabled": true
into the info-section of your Manifest. IIRC it should be âtrueâ if nothing else is stated, but worth a shot I guess.
When manually activating your mod, does it work or are your changes still nowhere to be found?
I actually just tried giving it the ârequiredâ statement, so it was forced on. Still no result.
Are you sure that -in this case- by âoverridingâ a file it gets replaced entirely? Even if the new one has less code?
What do you mean by manually activating? If I edit (remove a few rows) in the original file it all works perfectly.
I ment if you manually âtick the boxâ that tells Stonehearth it should use your mod
From my understanding of âoverridesâ, the file will be replaced no matter if there is less or more code, yes.
Iâm not too sure, but there might also be a âreplacesâ you could try instead of âoverridesâ in the Manifest.
Perhaps you will have to create a new thread for your mod and share your code there - this way we can continue the conversation without making me feel like weâre âstealingâ this thread
Not sure if this is the issue here, but the mod manager doesnât like special characters (like [, ] etc). If these are included in the mod name, each time the manager is accessed from the menu, those mods are disabled.
Created a seperate thread for this one: