So I need few things JSONized


#1

I’ll try to explain my situation first.
I’m working on a mod which will add 4 new mutation trees: Crab, Rabbit, Snake and Chameleon. Actually, it is almost ready. Dreams, mutagens, recipes in different lab journals, item spawns, categories and mutations themselves are basically done and mostly balanced, as well is crossing thresholds. However, I’ve run into some problems with Snake and Chameleon. Because my aim is to make them stealthy in some degree, I tried giving them Crafty mutation from the Mouse category, which reduces the mobs’ spotting range. The problem is that I can’t prevent Snake and Chameleon from getting Little/Tiny mutations. Trying to remove prerequirements from Crafty doesn’t fix the issue, because mods can’t override core json files (i.e. you can add things just fine, but you can’t remove them). So what I now need to do is to jsonize the damn Crafty’s effect and make a Pull Request to have it integrated into the game, or have it jsonized by someone else.

How do I jsonize it? More jsonized stuff would allow me to make a much better mod. I need the Crafty’s effect the most, but other things would also be great (skill increase, speed/movement speed, or even fake items like some bionics use to allow ranged attacks). I have VERY little coding experience (only few scripts in python), and I feel I may no to be up to the task.


#2

When I needed climate control JSONized to a clothing flag the first thing I did was look at an older pull request that JSONized something else, which told me what I needed to do and where it all was, so I’d recommend doing the same.
For your crafty mutation, it sounds like it might be easier, in the short term, to make another mutation (Stealthy maybe?) that reuses the same code but doesn’t have the same prerequisites.

If you want to know how to do pull requests the best advice I can give is to wander around Github a bit until you find the documentation on how to do PRs. It’s pretty well written.

I wish I could help more but I’m not that familiar with the code.


#3

I’ve tried looking looking at older pull requests, but it’s beyond me. i just don’t have enough coding experience, and it’s not something I can simply copy-paste.

Even If I knew how to reuse Crafty’s code to make Stealthy, I doubt that it would ever be merged. What’s the point of adding a new mutation to the core game, if it’s only going to be used by a mod?


#4

Developers add support for mod stuff all the time.


#5

Huh, that’s interesting. But still, jsonizing would be much better, and I think it should be preferred method of mod support.


#6

It’s basically the only mod support there is.

There are (relatively, compared to most games) frequent changes made to make modding more accessible, and most of that starts with people looking at the code or pointing it out on github.

For instance, monster groups were recently changed to allow for easy editing/overriding in json. There was also recently a discussion about doing the same thing for itemgroups. mlang added “looks_like” pretty recently, which was a small but really great tool for people modding.

As for the coding, I don’t know how that’s done, precisely. I spent maybe 2 dedicated weeks trying to learn c++ (until my attention span failed) and it was enough that I understand a lot of what I look at, just not how to write it all myself. If you put in a little effort you can probably do it yourself, looking at previous code changes and asking for input as you go. There seems to be no shortage of coders in this forum and they all seem like pretty helpful sorts.


#7

slightly off topic but I’m going to/need terrain un-hard coded and made to support inheritance soon…


#8

Things get jsonized all of the time, it’s more of a matter of this game being huge, and it’s sometimes a lot of code to jsonize some small things because of how hardcoded they are.

It will come with time, I guess demand doesn’t hurt tho :stuck_out_tongue:


#9

Three of my recent/current projects have been all about mod support:

  • looks_like, as you noted, gives mod writers an easy way to tell tilesets that something can use the tile for another thing. It’s a band-aid, but it’s good enough that Chesthole is returning to 90+% coverage despite no updates to Chesthole in a while.
  • fuels in JSON (and to a lesser extent the PERPETUAL flag for fuel types) mean that you can define all kinds of weird engines in a mod. Want an engine that consumes zombie blood in your mod? You can do it now, it’s very easy.
  • the npctalk refactor is going to move 90% of the NPC dialogue in the game into JSON, and give mod writers the tools to have NPCs check your strength, mutations, inventory, and a bunch of other things, both for the things they say and the things you can say in response. All that stuff is in the game now, but only in C++ code, and I’m moving a lot more of it into JSON.

I would really like to help move more of mutation support into JSON, but I am too busy already with vehicle and NPC projects. Still, if someone with some minimal coding experience wants a mentor while they trying moving more mutation support into JSON - which shouldn’t be too hard - I would be happy to help.