Check the types' folder for a snippet you can paste into your types.xml to get the item spawning. BuilderItems is a mod that allows server owners to have a much wider range of options when placing details on the map.
BuilderStatics is a mod for use with BuilderItems while editing only, not to be used on the server or client. If you believe your item has been removed by mistake, please contact Steam Support.
Bohemia Interactive Community Wiki provides some basic guides for getting started with mods for the game. Sadly the information provided on the site is full of gaps and spread across different pages.
Often they mention another page as an optional read, while in fact, it is mandatory; often they assume you have a knowledge of Area 3 mods, or simply they miss important information which cannot be found anywhere on the web. Such case for me was with file patching feature, and it has driven me to find the answers and write this text.
I researched the topic of setting up a modding environment and since part of it was impossible to find on the web I decided to gather them in this place. It shows how to set up the mod development environment from zero to hero.
I use wiki examples or explanations wherever possible to stay as close to their pages as possible and help you with moving forward later. But I am still a code developer and as such, I feel attracted to the new Enforce Script syntax, which is light years ahead of the previously used by Bohemia Interactive SF.
Note : this is described on the Community Wiki, though I see the authors assumed you know what P drive is. But for simplicity of this guide, I will use to reference files in the P:\ drive in the examples.
Open Settings from the menu and uncheck “Default” for the Path to the Project Drive (hence P). Provide a path to your selected directory and hit Apply.
Now go to the Tools menu and select Extract Game Data. For regular HDD it may take even 20 minutes, so relax, grab some food or drink and wait patiently.
Mind that there’s no official docs page for the standard available API, so you may need to go into the source files a lot in your work. Once your files are copied, from Tools select Mount Drive P.
Note : workbench setup is marked as optional in the wiki, but developing mods without it can be really time-consuming without automatic suggestions. And even though it does not support auto indentations and formatting yet, I would recommend using it for coding and especially debugging.
As a developer, I thought Workbench is able to create files for the project. Note that on the left in the Projects window you have sources of the standard Day scripts.
For now, open Day Tools again and select Add-on Builder button. It will start another app for building pro s. In the source directory input provide: P:\First.
The wiki also suggests to set up Path to project folder in the options. Pack the mod, and you will have a ready to use pro file as a result.
Inside put an empty mod.CPP file and a directory called Add-ons. Area 3 players who were having fun with its mission editor, know well how that works.
Open the file and place the breakpoint by clicking on the “6” number of the 6th line in the code. This will start a game (most likely in the window mode) with your mod and simple mission.
During the loading process in the bottom right corner of your screen, you should see a notification that the game has connected to the workbench. Now you can see in the Script Editor that the red dot has a yellow arrow that points to the location, where the breakpoint was caught.
In the Output window of Script Editor, you should see the printed string. Try changing the string in the print function, save file and jump in the game again.
Because the mod is packed, its pro’s source is used for the mission and anything you change in the editor, will not affect the game. We want to develop fast and be able to check results in the game at the same time.
In fact, it is currently not possible to find an answer on the web on how to make this work. But now I will give you my solution on this, as after the hours of trying different options, finally, I was able to find the right setup.
The easiest way to achieve this is to make a junction link via command line. With file patching Day allows you to use source code of your script instead of the pro’s ones.
This will update the game with a newly compiled version of the script. Wiki page on file patching gives a warning on using prefixes.
This is a good pattern, but from my recent experience and multiple tries, it looks like this functionality does not work for Day. I didn't dig deeper into this topic as my focus was to make this environment run with the simple mod for now.
But perhaps it requires further research to make our mods clean and free of any conflicts with the others. Sometimes, some answers can be found on the web, since wiki lacks details.
File patching is the only thing that had no real answers found neither on the wiki; nor on the web forums. I do not cover running mod for servers along with a client as this is a far more advanced topic and I haven’t been exploring it yet.
He also provides extra plugins for the Script Editor, so you have handy shortcuts for starting/stopping/restarting the server and the client. The mission it uses is really extensive compared to the simple one provided in the wiki.
I had issues with connecting to my localhost server as loading took so long it resulted in timeouts. Hope you enjoyed this guide and successfully ran your very first Day mod.
Kudos to Stack (Overfl0) for helping me with research on the topic and reverse engineering how the file patching actually should be used.