XCOM 2
26 betyg
RuntimeReskinAPI
2
   
Utmärkelse
Favorit
Favoritmarkerad
Avfavoritmarkerad
Filstorlek
Lades upp
Uppdaterades
289.101 KB
18 sep @ 22:26
1 okt @ 13:27
7 ändringsnotiser ( visa )
Du behöver DLC för att kunna använda denna artikel.

Abonnera för att ladda ner
RuntimeReskinAPI

Beskrivning
Reskins that think for themselves.

Released as a utility of the popular Advent Angels - Steam Workshop mod, split for public use.

A lightweight, reusable framework for reskinning units at runtime.

This component lets mods dynamically reskin units and pawns while the game is running.
It is designed to be integratable — other mods can plug in their own rules and archetype mappings without conflicts.



Features
  • Supports all major contexts:
    • Starting spawns
    • Reinforcements
    • DropUnit
    • Cinematic pawns (reveals, matinees, cutscenes)
    • Main menu shell actors

  • Rule evaluation system:
    • Integrators define rules that can evaluate the context, template name, unit state, and game state.
    • Each rule can declare priority, allowing fair competition and cooperation between mods.
    • If a rule wins, the mod's corresponding mapping is evaluated immediately.

  • Mapping system:
    • Integrators define mappings that route template names to target archetypes.
    • If a rule wins, the corresponding mapping is used to designate an archetype for the unit's template
    • The chosen archetype’s mesh and materials are applied to the unit immediately.

  • Dynamic runtime logic:
    • Rules are resolved when units spawn, not at compile-time.
    • Enables coin-toss reskins, randomization, or context-aware swaps.
    • Example: Advent Angels uses this system to do a general coin toss and to give unisex enemies randomized genders.

  • Integration-friendly:
    • Any mod can register rules & a mapping via the API.
    • No need to fork or overwrite vanilla templates.
    • Clean, minimal overhead.
    • Does not require any hard dependencies; no CTDs for your subscribers.



For Players
This is a shared framework. By itself, it doesn’t alter visuals.
You only need to subscribe if another mod (such as Advent Angels) requires it.
If no dependent mods are installed, this mod does nothing.



For Modders
Want to reskin units dynamically in your own project?
  • Register your rules with the Runtime Reskin API.
  • Provide a mapping of templates (e.g. AdvTrooperM1) to archetype paths.
  • Register your rules and mappings in OPTCs. See the Registering Rules and Mapping Providers discussion.
  • The API handles runtime application and mesh/material swap.
  • Rules can include priority and runtime conditions, giving you fine-grained control.
  • Console Commands: RRASetLogMode 0|1, RRAShowRulesProviders, RRAShowMappingProviders
  • Explore advanced rule building, such as caching your reskin decisions for consistency between savegame loads. (See Advent Angels' implementation.)



Compatibility
  • Should override OPTC reskinners without conflict. No CTD, no failed RRA reskin.



Notes
  • Built for XCOM 2: War of the Chosen.
  • Requires the Community Highlander.
  • Safe to add or remove mid-campaign (reskins only affect active pawns).



Runtime Reskin API — a foundation for dynamic, collaborative reskinning in XCOM 2.
Populära diskussioner Visa alla (1)
3
18 sep @ 22:36
Registering Rules and Mapping Providers
SurferJay
28 kommentarer
SurferJay  [skapare] 5 okt @ 8:18 
@[AOC] Kageno: I'm not sure if I understand your question. Advent Angels is a cosmetic mod, it reskins the unit to a new model. Is this what you mean, or are you talking about adding XCOM accessories onto Advent? If you're talking about accessories, that sort of thing is relatively doable, as long as the target unit has the human skeleton (like Advent troops).

For instance, I edited AdventAngels to spawn random human heads and attach them to the units. This works, since they use the human skeleton. It's a very technical process, though. Others could likewise spawn accessories and attach them to Advent. You don't need RRA for that, though, to be honest.

I'm currently working on ironing out all the kinks, hopefully I'll have it releasable in the following weeks and then you can inspect the code.
[AOC] Kageno 3 okt @ 14:34 
Is it posible to use this mod to reskin advent troops with cosmetic mods?
SurferJay  [skapare] 3 okt @ 14:06 
@Samio: You should be able to use this to reskin xcom troops, yes. The next release is already setup to replace animations, though the current release is not. I don't know about armor sounds, unless they're tied to the animations. I would guess they are. The next release has a lot of cool features added, like post rules/mapping callbacks and the animations replacement.
Samio 3 okt @ 10:38 
Is it possible to use this mod to reskin my XCOM troops as advent soldiers automatically?
I know there are mods that add ADVENT armor but they don't also change the animations and Advent soldiers have slightly different ones. Plus I like the way their armor sounds when it clanks.
Hiperreal 30 sep @ 18:57 
@surferjay I was indeed unaware , can tell disabling angels and related mods did the tick so ur probably right, gonna try it, thanks !
SurferJay  [skapare] 30 sep @ 18:43 
@Hiperreal: Have you tried with the updated version? Since you didn't comment on it, it seems like you're unaware of the recent patch. Sounds like it's more than likely caused by the Chosen beginning their summon ability, causing my old OnUnitBeginPlay listener to trip a CTD. Download the patch and enjoy the fix! :)
Hiperreal 30 sep @ 18:38 
i came here beacuse im having the exact same issue soul reports, crashing as soon as chosen turn starts. and theres usually a lancer around, only chosen mod im playing is a better chosen and after being sure it was the culprit tought about his mod , and found him again also saw him comment there, so we both have those two mods
SurferJay  [skapare] 30 sep @ 12:35 
In the latest update to this API, the issue should now be resolved. Please be sure and snag the update so that you can continue to enjoy RRA's features without these pesky CTDs. Thanks again @MaXISerg!!!
SurferJay  [skapare] 29 sep @ 18:04 
@MaXISerg: Thank you for the report! I'll look into that and see if I can replicate the issue and isolate the root cause.

Note to self (translation): With this mod, my game crashes every time a Sectoid raises zombies on the map or a faceless appears from a civilian. Disabling it still allows you to play normally with (Advent Angels - Steam Workshop).
MaXISerg 28 sep @ 0:09 
с этим модом у меня ломается игра каждый раз когда на карте сектойд поднимает зомби или появляется безликий из гражданского.
Отключение его все еще позволяет нормально играть с (Advent Angels - Steam Workshop)