Question: How to offer customization in a mod?

I am somehow stucked and maybe someone else already spent some time thinking about the same challenge… so here we go.

Modders might want to offer some customization to the users of their mod. E.g. a mod which includes a craftable sword with different hilts to chose from, or a shield where gamers should be allowed to customize the logo shown on the shield. Stuff like that.

One way to achieve that could be to create one “model” for each option you want to offer. That might work fine for a couple of alternatives, but if you would like to let gamers combine options, like different parts of a logo, or different visible components, the amount of options just increases dramatically.

Radiant will offer some customization to at least the workers… but will we depend on them providing us an easy interface to offer the same customization options in our mods? Or has someone a clever idea, how this (in theory of course, as we do not know too much about interfaces, etc. of Stonehearth) could be solved?

My last thought was that it should be possible to write a Lua-Script which takes a “base model” and adds on top of it data saved in another “delta model”. So e.g. the “base hilt” would be overwritten by a “shiny golden hilt”, whatever. The script would afterwards generate the combined model “on the fly”. This way only one model per option would be required.

For sure this would only work for items which are not animated… but that’s better than nothing.

Maybe it is simply too early to think about…

Actually you may be on to something.

An animation is three things:

  1. The Actual Animation (Key Frames, mostly)
  2. The Model (Actual Voxels, bones, etc.)
  3. The Texture (Bump mapping and the actual coloring/shading)

The above may be a disgusting over-simplification, but because of that, depending on how @Tom and @Ponder code it, you may be able to swap textures on the fly, applying them to the same models and animations. They could make it so that you may only import fully textured models into the game, but it totally remains to be seen how that will work.

Now this is to say that changes to the model would probably not be modular. A longer sword, a more elaborate hilt, these would almost definitely require individual models, unless you figured out a way to code it for an on-the-fly assembly of the components, which would probably be possible but insanely complex. (Think positioning, rotation, bone extension, hitboxes, animations, etc.)

-bits

The UI is coded in html and can also be modded. This doesn’t mean it will be easy to offer customization of your items but it is theoretically possible.

i am a firm believer that “anything is possible through coding”, but i just dont know enough about the qubicle or animation side of the house to speak definitively… very interesting proposition though!

That’s what I got out of the video too. So, it seems to me that your colors and textures can change without having to create more than one animation.

And maybe ( I don’t really know what I’m talking about) you could create a simple in game voxel color changer using javascript so the user could cuztomize it.

Please inform me of my ignorance if such exists.

Given everything we’ve seen I’d say that there isn’t texturing in a traditional sense, voxels have colour but we haven’t seen anything to suggest there is texturing in the way of images for them instead of block colours. Shading we might be able to get at but it’s unlikely to be much control if any. On the fly modification of models should be possible and not to complex for simple things with clear patterns, something like chains on a drawbridge for example could be a lot easier with computer aid.

I also have the impression that there are no “textures” which can be exchanged. That’s why I came up with the “conclusion” that merging files on the fly could be something.

Hm… maybe I will give it a try and take a look into the file format of qubicle or .obj-files. The good thing is, that such a “customization”-module could be coded once and re-used by all mods which are requiring a similar feature.

I’m sure there would be a way to change the colour of voxels on the fly, even if it’s just for something like make them flash red that should be extensible. As for investigating format go for the exported .obj files, the .qb or whatever is owned by them and could lead to trouble while the .obj is open and you could find resources on it so you’d just have to figure out what qubicle makes.

Forgive for my use of the word “textures.” I simply meant that you could change the color of the voxels and you wouldn’t have to change the animation.

I will try to figure out how this could work for non-animated Qubicle-files. On the one side, this might be a small contribution to the work Tim did with Minddesk (in case it works out ^^) and on the other side, most people are still waiting for an agreement between Radiant and Minddesk, so they have the trial-version. Animations might be step two… or someone else might want to jump in on that one (I am not familiar enough yet with animations).