Differentiate the tombstones

well, if you want to get a go at modding this in the game, you can make work in progress modding thread for it, with these models.

However, the idea of a mod gets all kinds of questions in my mind. If you are making them through a recipe that uses the personal thombstone as an ingedient, then:

  • How do you spawn these recipe’s in the masons workshop, upon the death of a hearthling, upon him being spawned in game? How would you configure that code-wise? would this be able to be done using only json-files?
  • is it even possible to undeploy a gravestone anyways? (never tried to do it) If not, then it can’t even be used as ingredient for a recipe.
1 Like

Had I made a mod for this, I would replace the regular tombstone spawned when a Hearthling die with one of my custom ones upon the very death of the Hearthling; but, technically I suppose I could make it a recipe for the Mason that would require a tombstone, yes.

  • I’ve seen mods which simply add some items to the workbench of your Mason, Carpenter, or any other class. I’m sure I can figure out how to do this, too.
  • One way to add the recipe could be to make it like a “Quest”, similar to Township. Once you’ve had a Hearthling die on you, the recipe will appear in the Masons library. This should be possible via .json alone if this is how Radiant did it.
  • The tombstones are undeployable; I’ve moved them around before and I don’t expect there to be any difference now days.

No matter what, @Gaddiel put forward an idea that I really like: that you should be able to order extra special tombstones (for your most beloved Hearthlings) from your Mason. This is something I would look into adding into this hypothetical mod of mine :slight_smile:

2 Likes

I have been modding a little bit myself, and I believe that you idea of just changing the model on the spawned in thomb should be easier than using a recipe. Then however, there is the question of whether you can tell the game (via .json preferably) to detect which class the hearthling had, to spawn a differnt thombstone model in depending on the class, and then what model to put in for every class.

For the last one,m were the coding in place, I believe that that would be possible, like this:

{ “spawned_models” : {
“worker” : file(worker_thombstone)
“carpenter” : file(carpenter_thombstone)

}}
or something like that. But the first two, as well as telling the game to check in a json for the variables “spawned_models” : “worker” or something like that, I believe would need fancier coding.

Then, again, I’m not at that level, maybe some more experienced modder knows.

2 Likes

I will head-butt it once I get to the point of actually working on a mod :slight_smile:
I’ve never worked with .json-files as far as I can remember, so it will be a new adventure; I used to work with C, C++, and some JAVA though - hopefully I’m able to figure out what’s going on.

I’m sure there are still if-statements and such when working in .json-files; we’ll make this happen sooner or later
(most likely later, lol)

Thank you for your feedback and help so far, @nikosthefan!

json is a data format, so it doesn’t have control-flow logic like if statements. Here’s a very programmer-centric overview of json: http://www.json.org/

Tombstones are generated in memorialize_death_action.lua in the run method, so I think you could mixin to the MemorializeDeathAction class with your mod’s Lua script, override it with your own run method that checks the Hearthling’s job and instantiates the corresponding tombstone.

3 Likes

Ah, I see - thanks a bunch for info and link! :smile:
However, if I read it correctly an object contain a string and a value; the value can be (among other things) true or false. Does this not imply there is some kind of logic handling after all?

Hey this is EXCELLENT information right here! Thank you @jamiltron for providing this; as soon as I’m back from my vacation I will take a look at this in more detail <3

1 Like

Nope, it’s just a data representation. It exists so that data can be shared between other machines, other programs, other programming languages, or even humans. It was created to be a subset of Javascript that is human readable/writable and translatable as a data structure to/from almost any C-like language.

True and false exists to indicate that a particular key is true or false (or whatever other value you want) - the logic you apply to that value is handled by whatever program/script/whatever you use to ingest this data with.

3 Likes

Oh, I see! This is really nifty.
Once again, thank you @jamiltron for your feedback - much appreciated and ever so helpful :blush:

1 Like

I’m finally back from vacation and I’ve been able to put some additional time into “my tombstone models” - I believe I have something that could achive what have been suggested by you, @TheRedBaron91.
Would you mind if I use your idea to create a mod regarding paying repsect to passed Hearthlings?

As I have not been trying my hand at moding anything previously it might take me a while to get it working properly; but I believe the information provided by @jamiltron should be enough to help me achive a working mod. :slight_smile:

2 Likes

go for it man, best of luck!

2 Likes

Awesome - thanks!
I’ll keep you posted :slight_smile:

1 Like

Has this mod been worked on since 2017?

I would guess no, given the sheer age of it.

But there’s some good news! @Pawel_Malecki has successfully implemented “model variants” in his mod LostEms, which would be perfect for making variant tombstones – chances are that most players want to move their tombstones together to form a graveyard anyway, and when the tombstone is placed in its new position there would be a chance to select the variant in use. So it’s quite possible to create the intended effect of this suggestion, and to give the player full control over the tombstone’s style.

Nice, I’m no modder and I don’t have the game but sometime in the future I would like to start making mods for the game.

Hello!

This mod was actually worked on a bit in 2017 and 2018 - it was just never released for various reasons. Mainly, I could never figure out how to implement transparency into my models.

Funnily enough, yesterday I started working on my mod again; and I am hopeful I will figure out transparency soon™!
If/when I’m able to release an update, I will update the post for my Commemorative Items mod.

Ps. I hope you will find your way into modding, too!

1 Like

if you need help about transparancy, you know where to find me :stuck_out_tongue:

1 Like

Welcome back.
For your specific issue with color effects, here: Color and material maps
It assumes knowledge in other areas, so if you don’t get it from that page alone, browse through previous sections too

1 Like

Thank you, Bruno!
I believe the main issue was that I used to be working in a software that did not allow for different layers in my models. I tried to solve it by combining different models into one - but with no success.
This guide will ensure my success, I am sure of it :slight_smile:

It was probably magicavoxel then, it is the only software out there without layer support (I think the newer versions can use it, but I’m not sure if it will work in game)

Dear Hamnisu,

    Thanks for your kind words! I hope to begin modding under the expert guidance of Wouter! Hope you can release your mod soon and best of luck!
1 Like