Description
Creating Monster Types
This mod lets you use Content Patcher to create new monster types based on existing vanilla types. For example:
The above adds a new monster type MyCustomMonster based on the DinoMonster type, giving it a new sprite, new projectile sprite, new move sound, new projectile sound, and new drops on death.
Full documentation on possible dictionary fields is here.
Spawning Monsters
The above example also includes a reference to Dynamic Map Tiles Extended, which provides a means of spawning monsters in various ways using map properties. The above example spawns a monster when stepping on a specific tile.
C# Modders can use this mod's API to create defined custom monsters by accessing the mod's API, e.g.:
ICustomMonstersAPI should mirror the interface in this file.
9a978bd5-9508-41cc-93df-7c43bafd7c97
Technical
Source code is here.
This mod lets you use Content Patcher to create new monster types based on existing vanilla types. For example:
{
"Format": "2.9.0",
"Changes": [
{
"LogName": "Custom Monster Dictionary",
"Action": "EditData",
"Target": "aedenthorn.CustomMonsters/dict",
"Entries": {
"MyCustomMonster": {
"Type": "DinoMonster",
"Parameters":"position",
"MoveSound":"squid_hit",
"ProjectileSound":"yoba",
"Sprite":"{{ModId}}/CustomDino",
"ProjectileSprite":"{{ModId}}/CustomFire",
"Drops":[
{
"ItemId":"(O)74",
"MinQuantity": 1,
"MaxQuantity":4,
"Chance":10
}
]
}
}
},
{
"LogName": "Custom Monster Texture Load",
"Action": "Load",
"Target": "{{ModId}}/CustomDino,
"FromFile": "assets/{{TargetWithoutPath}}.png"
},
{
"LogName": "Monster Spawn Test",
"Action": "EditMap",
"Target": "Maps/Town",
"MapTiles": [
{
"Position": {
"X": 28,
"Y": 67
},
"Layer": "Back",
"SetProperties": {
"DMT/monster_On":"MyCustomMonster 1792 4288",
}
}
]
}
]
}
The above adds a new monster type MyCustomMonster based on the DinoMonster type, giving it a new sprite, new projectile sprite, new move sound, new projectile sound, and new drops on death.
Full documentation on possible dictionary fields is here.
Spawning Monsters
The above example also includes a reference to Dynamic Map Tiles Extended, which provides a means of spawning monsters in various ways using map properties. The above example spawns a monster when stepping on a specific tile.
C# Modders can use this mod's API to create defined custom monsters by accessing the mod's API, e.g.:
var cmapi = SHelper.ModRegistry.GetApi<ICustomMonstersAPI>("aedenthorn.CustomMonsters");
if(cmapi != null)
{
var monster = cmapi.CreateMonster("MyMonsterType", new Vector2(640, 320));
if (monster != null)
{
Game1.currentLocation.characters.Add(monster);
}
}
ICustomMonstersAPI should mirror the interface in this file.
9a978bd5-9508-41cc-93df-7c43bafd7c97
Technical
Source code is here.
