Help with editing game files

First time poster and I’ve been playing the game for a few weeks now. I’m looking to get into creating my own mod and looking through the doc folder, editing the json files seem easy enough. However I have a question that I can’t find the answer to in the forums.

“pre_special”
“post_special”

Where do I find the different commands for these and what they do and how do I edit them? I’ve done a precursory text search in the .json files and have found various types but nothing on their definitions. Do I need to learn C++ to edit these?

pre_special is a check before construction. post_special is something that happens after.

So, like most of the pre_special entries I’ve seen are “check_empty” which just checks to make sure the tile is empty before construction begins.

post_special, I don’t know, exactly. I found the code for “done_wood_stairs” but am mostly confused as to why it’s being used instead of the regular json pre and post_terrain.

A lot of entries don’t have post_specials, so if your construction is just creating a different terrain, I don’t think you need them, just use “post_terrain” to make what you want.

EDIT: And in general, if you tell us what you’re trying to do, we can give more targeted feedback. I don’t know if this is even helpful because I’m not sure what you’re trying to do x_x

Ah sorry for being too vague, what I’m initally trying to do is first remove the completion message “You drill out a passage, heading to the surface.” from the Mine Upstair construction.

“post_special”: “done_wood_stairs”
“post_special”: “done_mine_upstair”

I might be wrong but the key here are these lines. If I can edit what “done_wood_stairs” or “done_mine_upstair” does I can possibly extend it into building walls with floors above them or two story walls so its possible to build up with z-levels. As of now I can only build a stair case up but since walls and floors can’t be built with only a stair case as support I’m stuck.

It’s in construction.cpp if you don’t mind compiling yourself and all that jazz. Line 1245. You won’t be able to make those changes in json, I don’t think, because you can’t print messages from the construction entry (or maybe you can and I just don’t know how).

 add_msg( _( "You drill out a passage, heading for the surface." ) ); 

That’s where that particular one is set up – it looks like it checks to make sure there’s no lava or water where the player’s trying to go. I don’t know enough of the code to help with how to check for floors or whatever is on the next level.

Where do I find construction.cpp? I can’t find it in the directory I installed the game in. I just started looking into modding yesterday so I don’t have a comprehensive understanding of everything yet.

It’s a c++ file, so you’ll need to download the code from the github rather than the pre-compiled version.

You’ll also need a compiler/IDE and some understanding of c++. It’d be easy to erase a line, but you could still mess something up.

And you need to understand that any changes to c++ that you make will only apply to your compiled version of the game unless you add them to the core game. It’s not as easy as json, where you can just make a mod file and distribute it. Additionally, it won’t persist in your game unless you make the change every time you update.

Ok so following the compiling guide at Github I think I did the setup mostly right. Barring the vcpkg step which I feel that I botched but I don’t know if I really did. My current problem is that when compiling with Visual Studio 2017 I run into this error.

I don’t use Visual Studio so I can’t help there.

Plus I’m basically incompetent when it comes to most stuff connected to coding/compiling . . . especially compiling.

No problem, you knew more than I did so you were really helpful. At least I now a have place to start.