[Mod] Arcanism V 0.1.1 - Conjuration: Creation

I know it’s not as fancy, but consider using StoneVox 3D if your wand continues to explode. It’s what I used to make the armour, and as far as I’m aware, it should still work. Of course, if you’re less lazy than I am, you’ll probably want to sleuth out the issue in Qubicle Constructor, but if you really want to get your mod out there, you can take the shortcut with SV.

Glad to have another hands on modder on board.

1 Like

Stonehearth does not like compressed qb-files. Make sure to export qb-files uncompressed.
It is a toggable button that show up on the export window in Qubicle1. Not sure where that setting is in Qubicle2.

1 Like

Stayed up an extra few minutes to try to find the setting, which was under the Preferences menu. Got everything uncompressed and managed to spawn the item properly. Hooray! I don’t have any screenshots as I immediately shut my computer down after that and am now typing this from my bed about to drift off to sleep. @Miturion and @Moai, thank you both for your help tonight. Without y’all, I might have just not done anything. Night!

-Spoolicus

3 Likes

That is a great guide you have there. :+1:

3 Likes

Howdy there, good folks of the forum! I’ve spent a large chunk of today implementing the base for crafting the Sorcerer’s Wand! (which will end up being a class talisman in and of itself, but for now, just another weapon.) For now it is used by the Footman as just another weapon. Behold!


So, as you can see, I made a new ore! It was bit of a pain, honestly. I had to copy over a file from stonehearth (resources/shared/ore_rock.qb) and change a few paths for it to not be invisible. Fun times! In the future, I’m going to look into making it glow, maybe. Thoughts?

SIDE NOTE: Does anyone know if these would automatically drop from mining if I don’t have anything other than this being a resource, or do I have to mixin something else?


Here I added the second craftable item (which, with the sorcerer’s wand, is going to be moved to a new class soon) called Galanosium Essence. This is crafted from two Galanosium ores. I accidentally forgot to change the “Smelting” header into something more cool, but whatever. I’ll save that for moving it over to the new class.


Here, we have the updated Sorcerer’s Wand. Seeing as how it’s a basic magic weapon, it doesn’t cost all that much to craft. I plan for the Battlemage’s Staff to have Two Wood and Three Essence, seeing as how it’s basically two and a half wands put together haha.


Finally, we see the Footman carrying this wonderful equipment! There are probably some kinks to work out with combat, but I’ll get to those eventually.


Well, that’s it for today’s update, folks! I’ll have the new upload done in a few minutes. Feel free to poke around or see if there’s anything that I missed!

Questions, comments, and concerns are always welcome!

-Spoolicus

3 Likes

Take a look here:

4 Likes

Have a look at the link Relyss posted
If you get stuck, ape the code from my lightsabers mod and change it all up to drop Gadolinium instead

Good luck!

3 Likes

Thanks to you both for the awesome tutorial! I’ll work on adding that in either tonight or tomorrow.

Currently, I’m focusing on adding the Arcanist class to Stonehearth. Which, as it turns out, isn’t too difficult. Stonehearth automatically adds the necessary UI to the jobs menu to show a (really terrible) icon for the Arcanist, and I think the rest of the code is in place to make it workable shortly. Heck if I know, I’m barely a coder haha. I just have to figure out how to get the code to detect the promotion talisman, as right now I think it just sees it as a regular item right now. Is there any obscure .json or .luac that I might have missed? I have the job_helper file adapted to the Arcanist as well.

Secondly, is it terribly hard to set up a git? Might try that so I can push updates semi-automatically and have a central download.

-Spoolicus

I haven’t dabbled with adding jobs, I’m afraid. I would recommend looking at how some of the other modders managed to implement new classes, but I don’t think there’s a tutorial up for it (yet).

A lot of us here aren’t either! (Though SH-fan-programmer mods are always much more ambitious/interesting)

Keep working at it, looks good so far!

2 Likes

Hey, decided to take a look at how other modders had done class implementation, and the last example I can see is from back in February, and that was with the help of @RepeatPan’s Jelly mod, which I’m not entirely sure is active or up-to-date. Still, chugging along, though. The UI and everything seems to be in place (even dabbled withthe .less files that do the workshop skins. That was interesting.) but it just won’t recognize the talisman as a promotion item. I’m fairly certain I misspelled something somewhere, but I’m going to take a break for a few and come back with a fresher head.


Above, you can see the problem, kinda. The first screen is the carpenter talisman along with what should be a basic copy of the carpenter talisman, except “promote to arcanist” stuff instead of carpenter. The second screen shows the UI being done (automatically, might I add! Go Radiant!) and the Arcanist button not being filled. Hm.

Other than that, this experience has been really fun! I’m looking forward to updating this mod fairly frequently, depending on factors like college in a few months and when Alpha 11 (and 12, due to multiple workbenches per crafter) comes out. Thanks for all you guys’ help, seriously!

That being said, if I ever get a new class implemented (and I will, dangit!) I’m going to look into getting a modding tutorial set up for it, perhaps in the currently-being-updated wiki. We’ll see, though. It seems like a long way off haha. If anything changes tonight, I’ll let y’all know! Until then!

-Spoolicus

1 Like

Alright! So, I got the talisman to actually work as a talisman, sort of. However, the Promotion UI seems to hate me. I managed to narrow this problem down to something going wrong with promotion_tree.js in /ui/game/promotion_tree. Take a look:


Are there any code-savvy people out there willing to see what exactly is going wrong? This is incredibly perplexing to me, as I can’t really tell what’s going on. (Side note: I should really stop coding until midnight. I’m going to dream in code by the time I get out my first official release haha) If you need it, I can re-upload what I have so far as a .zip.

Edit: Looked around a bit on the internet, apparently this can be caused by typos? I’m going to go out on a limb and say that in my sleepless terror I messed something up. I’ll take a look at it in the morning (read: afternoon) though. I’m going to re-upload the .zip here so any of you coders can peak around and maybe see what I most likely messed up and/or any added redundancies in the code. Night everyone!

-Spoolicus

That is correct. There was at least one major UI overhaul in the meantime. I believe it doesn’t hurt to use it (shouldn’t really but I think there might be a blackscreen going on), but it definitely doesn’t offer anything fancy anymore.

They’ve added the stonehearthReady event, which is also used by the debug tools to modify views. It’s your go-to place for modifying views (or rather, controllers) nowadays, I would say. Haven’t used it personally yet, though.

2 Likes

Have you had a look at Froggy’s Stonehearth Cafe mod? He implements his own version of the Cook and it still works, so that’s probably a good bit to have a look at.

4 Likes

I don’t see any reference to the job itself in the manifest… The version you linked is the one with only the recipe for the wand weapon and the materials needed.

Oh, dear. I was incredibly tired last night, haha! Should be fixed ow, though. Let me know if there are any problems!

First, for some reason when the job is available the promotion UI breaks, I debugged and apparently there was a wrong alias (in arcanist_tome_talisman.json, the last key

"stonehearth:promotion_talisman": {
     "job": "arcanism:jobs:arcanist"
  }

I think it has “arcanist:jobs:arcanist” which is wrong. Despite changing this, still crashes. I’ll keep debugging a little more. =)

Edit: Seems that this fixed the unability to promote. The problem now is that when the promotion animation finishes, there’s the infinite spawn of talismans and eventually game crash :cold_sweat:

2 Likes

That’s extremely strange. I managed to get a screencap of the error if it helps any.


I’ll dig around in the lua code and see if I can come up with anything.

One thing I did notice is that the hearthling a) loses clothes and the arcanist outfit appears close but not on them and b) They never finish promoting. The errors also seem to never stop, so that’s not a good sign, haha.

Edit: it seems @Froggy’s Stonehearth Cafe mod had the same problem a few times. Guess I’ll dig around in there as well. Fun times are ahead! I think I’ve learned more about coding in the past three days than I have every time I’ve gone on Codecademy. :stuck_out_tongue:

Edit the Second: So, nothing I’ve done within the past few hours has shed any light on this situation, the closest I got was a Github link on the Stonehearth Cafe mod page linked above, which had a couple of lines changed in _description.json which were already changed in arcanist_description.json. So, back to the drawing board. It’s thundering here, so I might get an actual drawing board in case the power goes out. Woo!

Edit the Third: I’m offically out of ideas. If anyone is willing to take a look at some butchered code for me, I’d be grateful. What I have is here. Go nuts I guess, haha.

2 Likes

Heya, I found the issue you’re having.

Since this is a new job (with its own .lua code) you’ll have to add it among the controllers objects in the manifest. Just add this in there and you’ll be fine:

  "controllers" : {
    "class:arcanist" : "file(jobs/arcanist/arcanist.lua)"
  },

You might have to say arcanist.luac though since that’s what you named your file. Which I wouldn’t recommend since that’s for compiled lua files, though if you did compile the lua file then disregard that comment. :stuck_out_tongue:

Another thing i want to bring up. Within lua code; when you have to do a require to gain access to another lua file (like you’re doing in arcanist.lua), and the file you want to requre is part of another mod, in this case the stonehearth mod, then you can do something like this

local job_helper = radiant.mods.require('jobs.job_helper')

instead of

local job_helper = require('jobs.job_helper')

So you don’t have to copy over the entire job_helper file to your mod. :wink:

2 Likes

I think I tried that yesterday, but I tried again today to make sure. If I add that first bit of code, the game doesn’t even recognize I have a manifest anymore and gives errors based on what I was trying to spawn in. See:

As for the next bit, local job_helper = radiant.mods.require('stonehearth.jobs.job_helper') was already in the lua code for the arcanist class. However, does the code need to have stonehearth.jobs.job_helper or does it just need jobs.job_helper?

I’ll take a closer look tomorrow, though. Modding is an eye opening experience haha. Not sure if I envy Team Radiant or not anymore. :stuck_out_tongue:

Cheers!
-Spoolicus

Hmm that’s curious. How did you add it to the manifest? It’s supposed to be alongside with “alias”; “components”; “mixintos”; etc. You could also try validating the manifest over here.

Otherwise I’m stumped, I tested it myself with that change and it works for me. I did get another error though, which were because of a typo in arcanist_tome_talisman.json, which is the same error that @Relyss mentioned above.

It has to include “stonehearth.” since it’s going to look for a file belonging to another mod, so the engine needs to know which mod the file is located in.

1 Like