Skip to content

Asset Profiles And Fallbacks

When a template exposes AssetProfile, put paths there instead of patching UI nodes.

public sealed class MyCard : ModCardTemplate(1, CardType.Attack, CardRarity.Common, TargetType.SingleEnemy)
{
public override CardAssetProfile AssetProfile => new()
{
PortraitPath = "res://MyMod/images/cards/my_card.png",
EnergyIconPath = "res://MyMod/images/ui/energy_orange.png",
FrameMaterialPath = "res://MyMod/materials/card_frame_orange.tres",
};
}

RitsuLib reads only non-empty fields. Missing fields keep the base game value or the template fallback.

ContentProfile
CardCardAssetProfile
RelicRelicAssetProfile
PowerPowerAssetProfile
OrbOrbAssetProfile
PotionPotionAssetProfile
AfflictionAfflictionAssetProfile
EnchantmentEnchantmentAssetProfile
ActActAssetProfile
MonsterMonsterAssetProfile
EncounterEncounterAssetProfile
Event / ancient event layoutEventAssetProfile
Ancient map / run-history presentationAncientEventPresentationAssetProfile
Rest site optionRestSiteOptionAssetProfile
Epoch portraitEpochAssetProfile
CharacterCharacterAssetProfile

Use ContentAssetProfiles.*(...) only when you intentionally borrow a base-game path convention. For mod art, explicit res://MyMod/... paths are easier to review.

Character assets are grouped by purpose:

public override CharacterAssetProfile AssetProfile => new()
{
Scenes = new()
{
VisualsPath = "res://MyMod/scenes/characters/my_character_visuals.tscn",
EnergyCounterPath = "res://MyMod/scenes/ui/my_energy_counter.tscn",
},
Ui = new()
{
CharacterSelectIconPath = "res://MyMod/images/character/select_icon.png",
MapMarkerPath = "res://MyMod/images/character/map_marker.png",
},
Audio = new()
{
AttackSfx = "event:/MyMod/character_attack",
},
};

PlaceholderCharacterId lets a partial profile borrow missing fields from a vanilla character. Use it as a temporary scaffold, then replace important visible assets before release.

Check resource paths before release. If a path is missing, RitsuLib logs a warning and keeps a fallback where one exists. Character visuals have fewer safe base-game fallbacks than cards or relics, so treat character path warnings as release blockers.