Skip to content

How to Create a Mod

Benedict Albrecht edited this page Jun 25, 2026 · 2 revisions

How to Create a Mod

This guide explains how to create a mod in the Patch Maker.

Open the app first: https://crodox-app.com/home


What is a mod

A mod is a single modification rule inside a condition. A condition decides when the mod is used. The mod defines what content should be written and where it should be applied.


Step 1 - Select the object you want to patch

Pick the extracted object in the editor, then open the Patch Maker.

Patch Maker overview

In this example, the selected condition is title==="component".


Step 2 - Create or pick a condition

In Condition Details, set a clear condition name.

Condition name

Example condition:

  • title==="component"

Use one condition per object type when possible. It keeps mods easier to maintain.


Step 3 - Add modifications to the condition

Add one or more mods under MODIFICATIONS.

Modification list

Example mods:

  • RouteList -> src/app/sidebar/sidebar.component.ts
  • routModule -> src/app/app.routing.ts

Tip:

  • Keep mod names short and specific
  • Group mods by target file

Step 4 - Use placeholders in mod content

Inside the mod content, use placeholders from the selected object.

Placeholder usage

Example snippet:

routeList: string[][] = [
  [ '<-name.0->' ]
];

name.0 means first item in the name array from the object context.


Step 5 - Verify available values

Check the extracted object values in the object panel before finalizing your placeholder.

Object values

If the object shows:

  • name[0] = "DashboardComponent"
  • name[1] = "OnInit"

then name.0 resolves to DashboardComponent.


Step 6 - Preview and test

After adding mods:

  1. Open preview or diff view
  2. Check file paths and generated content
  3. Validate that placeholders resolve correctly
  4. Run with a small selection first

Then scale to more components.


Troubleshooting

Placeholder is empty

  • Verify the object really contains that field (name, title, etc.)
  • Check index usage (name.0, name.1)

Mod writes to wrong file

  • Recheck target file path
  • Ensure the right condition is selected

Condition does not trigger

  • Compare condition text with actual object values
  • Test with one simple condition first

Recommended pattern

For stable mod setup:

  1. One condition per object type
  2. One mod per target responsibility
  3. Reuse placeholders from the object panel only
  4. Test with one component, then expand

Clone this wiki locally