[Mod] Arcanism V 0.1.1 - Conjuration: Creation

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

Managed to get it working! Had a comma where I wasn’t supposed to in the manifest where it wasn’t supposed to be, and after removing it the class works fine! Just need to get a few kinks worked out with the outfit not rendering on the model and an image file or two not displaying correctly. Other than that, the class works as intended! Score!

Don’t have much time today to work on it, but I’ll do what I can haha. Thanks for the help @Drotten!

EDIT: In case anyone wanted to see what the clothing bug I was/am currently experiencing, here it is:

As you can see, they decided to take up a healthy lifestyle of not wearing any clothes and…dragging them behind them. I don’t have much time right now to fix it but I can probably do that once I get home.

Cheers!
-Spoolicus

7 Likes

Did you make the clothes in Qubicle Constructor? Have you exported them with Z-Axis Right-handed? Also make sure that the matrices are named after the bones, or they won’t merge as expected.

3 Likes

Well, I guess that’s what the problem was, haha. I’ll take a look in a few and see if I can fix it! Thanks for the advice!

Edit: It seems this did the trick. I apparently have a lot to learn haha. Although now, things should be a bit easier since I have a class of my own under my belt, so (screenshots pending, look for those sometime tonight!) others should come mostly without a fight. Depending on how often I misspell the code :stuck_out_tongue: I feel like I have a bunch of edits on my posts about how this journey is the greatest thing ever, but I’m going to say it one last time: it’s the greatest thing ever. I’ll keep that to a minimum from now on. :smiley: My next official mod post should be about a new update, stay tuned!

-Spoolicus

2 Likes

Alright folks! The time you’ve all been waiting for! No, the Redskins did not make it to the Superbowl. Yet. Different thing. I present to you all…

Arcanism V 0.1.1 - Creation

Download here!


Here you can see the crafting interface sporting some pretty nifty custom UI graphics. That’s right, ladies. I edit my own .less files. :wink: swoon
I plan to update the graphics eventually. For now, though, it’s a first pass at a greater thing to come. I also need to redo the craft button to be more readable, but like I said, one step at a time haha.


Here’s something I wasn’t actually expecting to see: an iconic version of the Focus Station! I didn’t really know what I was expecting, but it was a fun surprise once I tried to move the workbench.


Next, we have a shot of a singular female hearthling as an Arcanist. My mod supports all genders! Well, all two, but still. :stuck_out_tongue:

In order to get all of these wonderful new recipes, though, you’ll need some Galanosium Ore, which is currently spawned while mining, like all other ores. At least, it was when I was testing it a few minutes ago. I’ll work on getting veins set up.


That’s it for today folks! Tell me all of the bugs you’re experiencing and I’ll figure out what to do with them!
Until next time!

-Spoolicus

11 Likes

I’m glad to see that you finally got the mod working! Good for you for sticking with it!

1 Like

I have no idea what I am doing wrong, but I installed the mod by unzipping the main folder into my mods folder. I cannot see anything at the carpenter bench to create the wand.

Hey,
You need to rename the .zip file into arcanism.smod

All of the mods in Stonehearth/mods are .smod. They’re all renamed .zip files. If this doesn’t help let me know!

EDIT: On second thought, I went ahead and changed the .zip to a .smod in the download, to ease everyone’s confusion with everything! Hope it helps!

3 Likes

Hey spoolicus i’m very happy becourse we walk on the same road.
I just began to create a druid , crafting things refining herbs and planting harvestable trees and bushes or that is my goal. I had the same issues about getting the workshop going, but solved it.

Can you give us a short description what the arcanist is going to be when it’s finished ?
(Or is there one i haven’t read ?)

I’m also going to create an “ordinal” 7 in the workshop which will be “crafting_materials” for inter-class crafting recipes maybe you all (class ceators) can do the same to add the next step in complexity

1 Like

Sounds exciting! I wish you the best of luck in this. It’s hard, but rewarding. As for a class description, lets see if I can’t whip one out right now…

The Arcanist is primarily a crafter who specializes in creating items from magical elements and ores, the primary one being Galanosium, which spawns semi-frequently in the world. These items can provide buffs or special abilities to those that equip them or are around them. In order to craft more recipes, the Arcanist will have to research them at a separate workstation. (Which isn’t implemented yet, so for now it’s just on level-up)

As for the mod itself, it seeks to add a large amount of magic lore and items to the world gen, magic enemy types, and many different scenarios, including two other combat classes (for now), the Sorcerer and the Battlemage, who use wands and staffs, respectively.

Wands are one handed ranged weapons capable of dealing a large amount of burst damage, but are very weak in close combat. Staffs, on the other hand, are used like quarterstsffs to get up close and personal. Staffs apply debuffs and AOE damage to enemies, but are more effective at close combat.

As for enemies and creatures, this mod will add multiple enemy and creature types, the primary one being magical. There are plans for these to be used in the mod by other classes, but this area has not been as fleshed out yet.

In the world gen will be multiple types of lore items that offer details as to the history of magic. I won’t know how deep this is until lore items are released in the coming alphas.

Finally, the scenarios I plan to add revolve around the consequences of playing with magic, such as an Arcanist accidentally creating some type of fell beast in his laboratory or teleporting a bunch of people to the Astral Plane. One idea is that he creates a potion at a brewing station that, when taken, turns a hearthling into a large titan, a la Attack of the 50 foot Hearthling!

This all sounds ambitions, doesn’t it? Well, that’s because it is. But I’m trying to take one step at a time. If you focus on the big picture you’ll cripple yourself into not doing anything. Focusing on one thing helps you to direct your time to doing that thing until its completed. Like I said above, good luck! And I just noticed you asked for a description on the Arcanist, not the entire mod. Oops :smile:

-Spoolicus

4 Likes