Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

Adding new statuses or new area objects.

A topic by AgentCucco created May 23, 2019 Views: 347 Replies: 2
Viewing posts 1 to 4

I was wondering, is there a way for me to add new status effects, or add new elements to the area (such as medkits or wep chests) without necessarily modifying the source code, like via a mod.
I was thinking on adding a custom character that required for you to get stuff through the level or something like that, as a test, but I don't know if there's a way of doing it without having to edit the main code for the mod.

Yeah, you can make a .mod.gml file in your DW mod's folder.

You can push your own status effects like this:

#define init
var statuses = mod_variable_get("mod", "dungeonobjects", "statuses");
var mystatus = {
    name: "DUMMY",
    displayname: "Dummy",
    sprt: sprRad,
    color: make_color_rgb(252, 184, 0),
    desc: "This status effect does nothing",
    sound: sndClick
mod_variable_set("mod", "dungeonobjects", "statuses", statuses);

Chests and pickups can also be created (the example below will make you spawn a weapon chest with the floor 3 items when pressing B):

#define step
with Player {
    if (button_pressed(index, "horn")) {
        // chest_create(_x, _y, _floor)
        mod_script_call("mod", "dungeonobjects", "chest_create", mouse_x[index], mouse_y[index], 3);

You can check the dungeonobjects file for all _create functions

(4 edits)

Thanks, it works perfectly, although one thing I don't really get, even after checking the area setup code, is how to randomize the positions of my custom pickups, like make them appear in a random tile within the floor layout, without overlapping with enemies or other pickups.
Also how exactly do I define what my status effect does on the start of an enemy's/my turn? I really don't see a way on how I could interact with that code without having to modify it from the source, which isn't a big deal, but I want to eventually release the mod without actually replacing yours :P

Edit: I think I figured out how to do the status effect thingy, I could basically just replicate the setup I used for some of the stuff I did on my rebalance pack like regenerating Frog's hp. 


Edit2: Still haven't figured out the floor generation thing though, the chest setup I have on that mod is far from ideal.