XCOM 2
RuntimeReskinAPI
31 条留言
SurferJay  [作者] 10 月 21 日 下午 1:31 
I've dropped another small update. This time, I've added support for reskinning UFOpedia's bestiary. Thank you to JM_Vegan for the idea!
SurferJay  [作者] 10 月 12 日 上午 5:05 
I've dropped the next big update for RRA: version 2 interfaces are out! With verison 2 interfaces, you can subscribe to post rules/mapping callbacks, letting you do advanced workflow tasks that pace themselves with various parts of the engine, like cleaning up special artifacts if you just lost or attaching mesh components AFTER the engine swaps the mesh if you just won. I've also added some CTD guards, such as making reskins get deferred until the pause menu closes, should it be open.

Check out Advent Angels' V2 providers for live examples of these features in use.
SurferJay  [作者] 10 月 9 日 下午 9:32 
@[AOC] Kageno: This mod is mainly for reskinning entire units using prebuilt Archetypes. If you want to add accessories, the cleanest approach is to kitbash them into your mesh, make a new Archetype with it, and point RRA to that.

You can attach accessories at runtime, but that’s a much more technical workflow - best used only for dynamic cases (e.g., the next Advent Angels update spawns random human heads). For most setups, the Archetype route is simpler, cleaner, and better.

RRA’s big advantage is that it lets multiple mods collaborate dynamically - via MCM toggles or dice-roll logic - making it far more flexible than old, hardcoded OPTC reskinning. So yes, you can reskin Advent troops with cosmetic mods - just do it through Archetypes for the best results.
MaXISerg 10 月 8 日 下午 2:15 
@SurferJay действительно все работает:steamhappy:. Спасибо.
[AOC] Kageno 10 月 3 日 下午 2:34 
Is it posible to use this mod to reskin advent troops with cosmetic mods?
SurferJay  [作者] 10 月 3 日 下午 2: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 10 月 3 日 上午 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 9 月 30 日 下午 6: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  [作者] 9 月 30 日 下午 6: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 9 月 30 日 下午 6: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  [作者] 9 月 30 日 下午 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  [作者] 9 月 29 日 下午 6: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 9 月 28 日 上午 12:09 
с этим модом у меня ломается игра каждый раз когда на карте сектойд поднимает зомби или появляется безликий из гражданского.
Отключение его все еще позволяет нормально играть с (Advent Angels - Steam Workshop)
Soul 9 月 26 日 上午 5:00 
Just saw your message (for some reason it didn't tell me in my notifications)
I'll do it next time I play (could be a bit,since I'm not on my modded pc so I play vanilla right now,and it suck lol but I'm oversea)
Tho can confirm that after disabling it,did basically 12h of gametime with 0 crash,so I'll def send you logs when I'm back to see what could be the conflict here.
SurferJay  [作者] 9 月 25 日 下午 10:13 
@Soul: Thank you for that report, sorry for your trouble. Sounds like it's occurring during rules evaluation. It would be very appreciated if you would do the following, you'd help a lot.
1. Enable this mod
2. Turn on Runtime reskins in Advent Angels MCM (relaunch if necessary)
3. Use the 'AdventAngelsSetLogMode 1' and 'RRASetLogMode 1' command
4. Play until a crash
5. Send me your Launch.log in a Discord PM.
Soul 9 月 23 日 下午 3:54 
Hmm so kinda throwing a rock in the dark here,but to explain,I use a lot of mods (+700,tho most are cosmetic/weapon looks) and so far I never had "consistent" crashing,to call them that,it would happen sometime,like once every 4 session maybe.

But after installing this mod (not the angel one,this one specifically) I do see a up in the crashes,easily 1-2 per sessions,and it seem to happen more when theres a Lancer around and its the Chosen turn,just wondering if others had the same unfortunate experience with it. (Will add that since removing that tho,no more crashes,but at least Angels still work fine)
Bobbitthehobbit 9 月 22 日 下午 3:30 
Yeah I had seen that LW does something different then the base game with the model variants. Think trying to do this on my own atm is a bit above my "pay grade".
SurferJay  [作者] 9 月 22 日 下午 2:41 
I've noticed that this is compatible in a sense with LW's config-driven modifications to units. They do things like changing the metallic or emissive color of a unit. I've noticed that anytime RRA reskins the unit (replaces the mesh and materials) that the unit retains the changes made by LW.

I've tested this with LW's Archon, by adding it to my unit replacement definitions and passing it my base Archon model with its gold metals. LW changes its metals to black and this persists even after restoring the mesh and then re-applying the reskin. So, in that sense, there is compatibility, since LW's override is neither destroyed nor overwritten. I'm not sure if the outcomes will be as expected with fully custom models.
Bobbitthehobbit 9 月 21 日 上午 6:18 
@SurferJay Thanks dude, I'll take a look!
SurferJay  [作者] 9 月 20 日 下午 10:08 
@Bobbitthehobbit: The Advent Angels update is finally released! Head on over and take a look at the live sample it offers. You can enable logging and try out the various trigger points: main menu, mission start, reinforcements/dropunit, and unit reveals (AKA matinees/cinema pawns). They're all rigged up and in use by Advent Angels, giving you various points to watch it as it drives.
Bobbitthehobbit 9 月 19 日 下午 1:07 
@SurferJay Cool! I'll keep an eye out :D
SurferJay  [作者] 9 月 19 日 下午 12:54 
@Bobbitthehobbit Totally fair — interfaces are abstract until you see a live example. The quick recipe for “ADVENT → B1 droids” with RRA is:

Rules Provider: when you want to reskin the passed-in unit, return true along with your outPriority.
Mapping Provider: return true and put the archetype path you want to use for the passed-in unit in the outArcPath (e.g., 'AdvStunLancerM1' to <Droid archetype path, as a string>).
Registration: Register your rules and mapping providers in your OPTC. See the sample code in the interfaces.

To validate registration, use the RRAShowRulesProviders and/or RRAShowMappingProviders console commands ingame. To view logging related to the rules and mapping evaluations, for troubleshooting, use the RRASetLogMode 1 console command.

If you’d rather learn from code, the next Advent Angels update will ship with working providers you can copy and adapt.
Bobbitthehobbit 9 月 19 日 下午 12:30 
I was hoping I would be able to use this to swap some of the LWOTC ADVENT units for droid variants from Cavily's "[WOTC]Star Wars B1 Battle Droid Cosmetics" mod, but alas the documentation went over my head. I do hope this mod makes other mod maker's lives easier.
SurferJay  [作者] 9 月 19 日 上午 11:47 
@PsyCHo: Well, in the mapping callback you have the unitState, so... I guess you really could do that when you win. I'd be surprised if the unitState can't be used for that purpose.
PsyCHo 9 月 19 日 上午 11:40 
My lack of knowledge about X2 coding shows up :D: I kinda hoped what you made could be used in a "if unit name = John 'Johnny' Smith, then pick from character pool John 'Johnny' Smith #1, John 'Johnny' Smith #2 or John 'Johnny' Smith #3" way.
SurferJay  [作者] 9 月 19 日 上午 10:59 
@PsyCHo: The template names aren't very unique per XCOM soldier, though you might be able to use the unitState to determine if it's that specific XCOM soldier. You'd then need to create an archetype that has the specs that you like.

I'm not sure that the first version of the interface is well suited for the granularity of configuration (all the slots, all the camos, all the colors, etc) that you want. It's more for swapping enemy meshes with modified variants wholesale. But feel free to experiment. You could even build an interface V2 (and the corresponding rules, mapping, and reskinning logic) for that granularity and submit it for consideration, if you're that passionate about it. ;)
PsyCHo 9 月 19 日 上午 10:40 
Could this be used to edit soldiers?
I would love my Agent 47 to change his suit on his own. Or Tommy Vercetti to sometimes run in his shirt and other times in his suit.
SurferJay  [作者] 9 月 19 日 上午 6:53 
@MrMister: It should work fine with LWOTC enemies, since we run at runtime, and after LWOTC. This will take its pawn and replace its mesh and materials with your chosen archetype's mesh and materials.

I don't know about flickering in the other mod, but it doesn't happen here. This API is tested and working. Stay tuned to see how Advent Angels integrates with it if you want a functional sample.

The V1 interfaces are based on an archetype-driven system, which suited my needs perfectly. I left it open to other implementations by versioning the interfaces. Who knows what the V2 interfaces might look like. Could be config driven! I have no need for that, but with collaboration it's definitely a possibility. The way I'd design it, any version could be used by any mod, simultaneously.

@PhatJoe: Of course! :) That was one of my requirements from the get-go. It even covers main menu actors. All that is mentioned in the mod's description in the first section under Features .
Phat Joe 9 月 19 日 上午 5:15 
Does this address the issue of enemies having different skins during reveal animations from their in game model?
MrMister 9 月 19 日 上午 2:57 
Sounds like Enemy Reskinner Redux but with rules and at dynamic runtime. Nice.

I assume that it won't work on units "decorated" using LWOTC's integrated config-based mechanism, like all LWOTC ADVENT variants, right?


FYI, the behaviour when using Enemy Skinner REdux on one such unit is that the new model is applied *ovelayed on top of the old*; you have to also remove their associated config entry on that array (can be done on another mod's .ini) in order for that to work without flickering.
Shaggoth (Ищезаяц) 9 月 19 日 上午 1:00 
in that context i guess "reskinning" means changing models? or textures/materials?