Need help with modelling!

You could copy the stonehearth.smod file from your mod folder, paste it somewhere else, then rename it to a .zip. That will let you look at everything in it, which includes the models. Most of them will be in the entities folder. Is that what you meant by reference files?

There is this but its very basic… and rather incomplete.
here is a link to my own struggle working from that starter tutorial. It might have some code parts that you need (and the tutorial does not teach you.)
Other than that just ask here in the forums or use the search option, Good luck.

1 Like

Modelling in Magica is pretty much straightforward. It can import .qb files, so you can unpack your stonehearth.smod with any zip archiver and look into any models stored there. However there are a few tricks you should know if you choose Magica as your editor. For example, default model origin point (zero coordinate) in Magica is different from Qubicle, so when you add your models in a mod, you should consider that for correct positioning. As far as I know, there are currently no viewers to show origin point aside from the game and Qubicle. As for effects, SHED renders them just fine so you can position them coordinate-wise.
You can look into my mod files if you’d like to get the idea how to add your own items (there is also a palette for importing into Magica to maintain game color scheme, I update it from time to time). There are some differences, like if you add decorations, you won’t probably need particle effects and lighting attached to your models (mine are lanterns), and if you add weapons, you need two models, one of them an “equipable” one with an attach point.
As with complex models with different grids, I still don’t know much. Most animated objects like chests or NPCs have several voxel parts called grids that can move separately (like a chest base and a chest lid). As far as I know, MagicaVoxel can’t support grids, so while you can do basic editing in it, you’ll need another editor for advanced tech, like VoxelShop (free) or Qubicle (paid). I’m not really familiar with grids (yet), but perhaps @8BitCrab can help you. I would like to read about it, too.

1 Like

that is correct.

i try not to recommend Voxelshop, as i’ve had a lot of problems with any multi-matrix models i’ve made/exported with it…

first off, they’re called a matrix, not a grid :wink:

to be honest, i’m not really sure what you want explained about them… they’re pretty straight forward, they allow for a single model to have multiple parts, similar to thew way layers work in photoshop…

if you could expand on what you want explained, i would be more than happy to explain it for you guys :slight_smile:

[quote=“8BitCrab, post:6, topic:21672”]
to be honest, i’m not really sure what you want explained about them… they’re pretty straight forward, they allow for a single model to have multiple parts, similar to thew way layers work in photoshop…
[/quote] Ow. That helped a lot since I’m quite familiar with PS. That’s what I was talking about!
Let me elaborate. What I was talking about was instruments, mostly. Are there more voxel editors with matrix support that I don’t know of? Which one would you recommend?
I’m also curious about how is the animation done. Never tried it myself aside from some ancient attempts at specialized software. Does one use Blender for that? How is the animation attached to a model? I imagine there’s a skeleton involved. In what program is it done, if I want to create, say, a chest that opens (I imagine it is comparatively simple).
Threadstarter will need it, too, if he tries to model animals and other moving stuff.

1 Like

i was looking at some other free editors the other day, to see if i could find some other free editor to replace voxelshop, but none of them said whether they did or did not support multiple matrixes… so… i’m not sure, as i haven’t actually used anything other than Magicavoxel, VoxelShop, and Qubicle…

yes, you can use blender, there’s even a[ stonehearth add-on] (Stonehearth Add-On for Blender (Animation)) for it. though i’m not sure if it still works…

i believe there is some info in an entities .json that connects it to the anims… but not 100% certain on that

to be honest, i have not a clue how anims work, i’ve never needed them for a mod yet…

@Hyrule_Symbol (hope you don’t mind me paging you Hyrule) knows a lot more about the animation side of modding than i do, so maybe he could help answer your questions?

looking at my reply, i realize i’m actually the worst person to be answering these questions, as i barely know any of the answers to your them… :worried:

2 Likes

No i don’t mind @8BitCrab

I’m on mobile so i’m too lazy to use quotes on this

The add-on does work considering that i’m still using it till this point

The skeletons and such are all supported inside the add-on and it does work for moding

In a nutshell, a skeleton is a file that tells the game where the model’s matrixes are and what point it’ll move and rotate around

I’m planning on a vedio to help people start modding in some entities, but that seems like it’ll take a while, so i can explainit to you here or via PM

3 Likes

Many thanks. My interest currently is mostly encyclopedic so I don’t want to bother you. I still have some static models I’d like to finish first. Then I guess I’ll try figuring out things myself using your links. If that fails… well, then I’ll use your proposition, thanks :wink:
I’ve never tried Blender before so I don’t want to start detailed questioning before doing my homework first :sweat:

Upd: Discovered voxel_pirate’s channel with some tutorials. Guess it’s time to dig it.

1 Like

Um… Thing is… VoxelPirate doesn’t explain how to make skeletons at all.

You’ll have to figure it out by yourself, or just ask me if you can’t

It’s a little unintuitive for learning it at first, but if you get a hang of it, it starts to get really easy

1 Like

I’ve never created skeletons before but I’ve attached model vertices to premade skeletons. I’ll keep in mind your help offer when I get to it :wink:
Another question that popped to mind is about animation. I’ve previously made it in gifs and Flash. As far as I expect Blender should offer keyframe approach, not per-frame, right?

Yep, they have keyframes all around!

You can also use the curve editor after making keyframes to make the animations loop seamlessly by making the animaions carry on momentum after the loop rather than a halt and restart (whitch is useful as well, but not for continuouse loops like idle or run)

2 Likes

He actually did explained how to make skeletons. But I found out I don’t need them where I go.

Done entirely in Magica + Blender. Had to cut model in two and import in parts as Magica can’t do matrices.

Sadly I have no idea if I can actually make decorations moving in Stonehearth.

Edit: Wait a minute. I can. But only for some things, like doors. I suppose they are programmed to play animations when a hearthling passes through them.
I don’t think I can do it with chests, though.

1 Like

awesome!

i never seen him explain it, so i had to figure it out on my own
but good for you!

and i’m pretty sure there’s some way of doing that
the spindle and such does that as well

paging @Drotten as i think he’d have the best chance of knowing this

1 Like

well the bellows an the forge also have an anim, so maybe you could check that out…?

I’ll check it but I have a suspicion that animation is assigned only to items that have a “working” and “idle” state (crafting stations) and doors.

one question i have is, when do you want the chest to be “open” in-game?

Let’s see. If you’re looking at the doors, they are animated as soon as a hearthling comes close enough to one. You could copy that to the chest, but it would look weird for the chest to open itself without anyone taking something from it.

Better would be to accomplish what the crafting stations are doing: animating when used. However, that stuff is defined in the AI, and it’s also specific for crafting stations and not for any kind of object. So if you’re looking for the chest to work like that, you’d also have to extend the AI to also run the chest’s animation when the hearthling is taking something from it.

1 Like

There were more detailed explanations on the (currently unavailable) german fansite, and also the ones MelOzone found (I guess in the videos? There might be still some key points explained somewhere in the forum). But yeah, mainly by trial and error :sweat_smile: so it could be faster to ask here to people that do animations like Hyrule_Symbol. :slight_smile:

As Drotten explains, for using the chest more realistically you would probably have to delve into the AI.

Ideally, when a hearthling accesses the storage. But from the answers I deduce that won’t be an easy task. Perhaps I will stick to “open on approach”.

1 Like

Finally got myself to look at how it’s made. I now see your point.
For anyone else curious about this thing, I’ve made a quick lazy research.
In vanilla it’s basically made with mixins. Programmers will quickly get what I’m talking about. Basically:
Any door has several behaviour patterns assigned to it (programmers: think “interface” and multiple inheritance). Location: SH.smod/entities/…/your_door.json, “mixins” block.
There is a pattern “single door” which assigns a set of default small door animation triggered by an entity called “sensor” (which obviously has a trigger radius). Location: SH.smod/mixins/doors.
Another “destructable” pattern assigns door HP and aggro it generates. In our case it’s useless, but good to know. Location: SH.smod/mixins/…

Actual animations are suddenly assigned in another file. Location: SH.smod/entities/…/your_door_ghost.json, “mixins” block.
Location of animation mixin: SH.smod/mixins/doors/…_ghost.json.
It generally assigns a list of available animations (/data/rigs/) and default animation (closed).

I assume the logic is this:
Default “closed” animation (loop) > Hearthling enters sensor range > Door open animation (single) > Hearthling leaves sensor range, no other hearthlings in range > Door close animation (single) > Default “closed” animation (loop).

As of crafting stations, they have a defined “working” state, and the animation is tied to that state. Basically: item in the queue, heartling works on it > animate object. I see it as a more complicated way since it not only requires AI modification, but raises problems of its own. While crafting animation is looped. When dropping we need single playback without any loops (open - pause - close). Dropping to a container is almost instant while crafting never is. Ideally opening should be triggered a few moments before dropping (otherwise it would look silly), but trying to predict when is a guy going to drop a haul overcomplicates things.

So, as I’ve said - I’ll stick with the first option for now.