Skip to content

Latest commit

 

History

History
193 lines (145 loc) · 5.03 KB

File metadata and controls

193 lines (145 loc) · 5.03 KB

maykr

maykr is a command line tool that can bootstrap various aspects of your classic doom mod.

Latest Release Build Status Platform Python Version

Installation

Download the standalone executable for your operating system:

(After downloading on macOS/Linux, remember to make the file executable: chmod +x maykr-*)

Developers

Clone the repo, install from requirements from requirements.txt, and run maykr/cli.py

Usage

Creating a New Mod

To create a new Doom mod, use the maykr new mod command:

maykr new mod --name <mod_name> [--path <path>] [--no-git] [--decorate] [--debug]
  • --name: The name of the mod (required).
  • --path: The path where the mod will be created (default: current directory).
  • --no-git: Do not initialize a Git repository.
  • --decorate: Use DECORATE instead of ZScript.
  • --debug: Enable debug logging.

This will bootstrap your mod into the path specified. Folders for various types of assets will be created, as well as files for mapinfo, zmapinfo, and the ZScript entry point.

An empty mod folder will look like this:
MyMod/
├── acs
├── colormaps
├── filter
├── flats
├── graphics
├── hires
├── items
├── maps
├── monsters
├── patches
├── music
├── sprites
├── textures
├── sounds
├── voxels
├── voices
├── weapons
├── mapinfo.txt
├── zmapinfo.txt
└── zscript.txt

Creating a New Weapon

To create a new ZScript weapon, use the maykr new weapon command:

maykr new weapon --name <weapon_name> [--extend <base_class>] [--mod-path <mod_path>] [--debug]
  • --name: The name of the weapon class (required).
  • --extend: The base class to extend (default: Weapon).
  • --mod-path: The path to the mod folder (required if not running from within the mod folder).
  • --debug: Enable debug logging.
Example: weapons/ChickenCannon9000.zs
class ChickenCannon9000 : Weapon {

    Default {
        Weapon.SlotNumber 3;
        Weapon.AmmoUse 1;
        Weapon.AmmoGive 30;
        Weapon.AmmoType "Clip";
        Weapon.Kickback 100;

        Inventory.PickupMessage "You got the ChickenCannon9000";
    }

    States {

        Spawn:
            Stop;

        Ready:
            TNT1 A 1 A_WeaponReady;
            Loop;

        Select:
            TNT1 A 1 A_Raise;
            Goto Ready;

        Deselect:
            TNT1 A 1 A_Lower;
            Goto Ready;

        Fire:
            TNT1 A 0 {
                A_Print("Firing ChickenCannon9000");
            }
            Goto Ready;

        Flash:
            TNT1 A 1 Bright A_Light1;
            TNT1 A 1 Bright A_Light2;
            Goto LightDone;

    }
}

Creating a New Sprite

To create a new sprite, use the maykr new sprite command:

maykr new sprite --name <sprite_name> --width <width> --height <height> [--anim] [--duration <duration>] [--mod-path <mod_path>] [--debug]
  • --name: The name of the sprite (without extension, required).
  • --width: The width of the sprite (required).
  • --height: The height of the sprite (required).
  • --anim: Add the sprite to ANIMDEFS for animation.
  • --duration: The animation frame duration (default: 4 tics).
  • --mod-path: The path to the mod folder (required if not running from within the mod folder).
  • --debug: Enable debug logging.

Creating a New Item

To create a new inventory item, use the maykr new item command:

maykr new item --name <item_name> [--extend <base_class>] [--mod-path <mod_path>] [--debug]
  • --name: The name of the item class (required).
  • --extend: The base class to extend (default: Inventory).
  • --mod-path: The path to the mod folder (required if not running from within the mod folder).
  • --debug: Enable debug logging.
Example: items/SuperClip.zs
class SuperClip : Inventory
{
    Default
    {
        Inventory.MaxAmount 1;
        +INVENTORY.PICKUPFLASH;
    }

    States
    {
    Spawn:
        TNT1 A 1;
        Loop;
    Pickup:
        TNT1 A 0
        {
            A_Log("Picked up SuperClip!");
            A_GiveInventory("SuperClip");
        }
        Stop;
    }
}