Roboport recharging animations (colors)

Place to get help with not working mods / modding interface.
Post Reply
User avatar
AyleeJenn
Inserter
Inserter
Posts: 37
Joined: Mon Oct 01, 2018 6:11 am
Contact:

Roboport recharging animations (colors)

Post by AyleeJenn »

dear modding community,

I am coming to you with a "riddle me this" because I think I have come across a very interesting phenomenon. I tried building a small modification that features a custom roboport with its own custom colored recharging animation. Don't worry the modification works just fine, the game loads and everything. However, here is the thing:

When the new roboport (with the custom colored charging animation) is equipped alone then it works correctly and the new custom charging animation displays as it should. No issues.

But when a new roboport and a standard roboport is equipped at the same time, ... then the robots seem to default to the standard cyan/teal colored charging animation.

I am wondering if there is any way I can have both animations display when two roboports of different types are equipped in the player's power armor? Or is it hard-coded that the robots have to decide which personal roboports charging animation they display? (they seem to favor standard over custom when there is a choice from what I can tell)

I am looking for advice and I am hoping that I have come to the right place and one of you can offer me advice on this.

Thank you in advance and have a happy new year in advance.

I hope you had a lovely few holidays ^.^

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2384
Joined: Fri Nov 06, 2015 7:41 pm

Re: Roboport recharging animations (colors)

Post by Deadlock989 »

I am guessing that for the purposes of animation at least, the game treats multiple roboport equipments under the control of a character as one big roboport. If you have a grid with 4 roboports in it with 2 charging points each, the positions taken by charging bots are the same as 1 roboport with 8 charging points. If you have roboports in both your armour's grid and a driven vehicle's grid as well then the same seems to apply. So the question is, what determines which roboport's recharging animation is used?

I don't know the answer. I tried manipulating item order, equipment order, position in the equipment grid, and the charging rate of the custom roboport. The vanilla MK2 roboport overrode the custom animation in the modded roboport every time.
"If Stalin had a good writeup on programming, would linking that be dangerous?"

PFQNiet
Fast Inserter
Fast Inserter
Posts: 234
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

Re: Roboport recharging animations (colors)

Post by PFQNiet »

Kind of surprised to hear that item/equipment order didn't affect it. That would seem to suggest that it's based on item ID, which as far as I know is incremental. Perhaps try "deleting" the vanilla roboport and then re-adding it? That night result in a different ID.

User avatar
AyleeJenn
Inserter
Inserter
Posts: 37
Joined: Mon Oct 01, 2018 6:11 am
Contact:

Re: Roboport recharging animations (colors)

Post by AyleeJenn »

Oh yeah, good ideas all around. I have tried these. I tried changing positions. Equipping, un-equipping. Shuffling the order of the roboports. And so on ... the result was always the same. The vanilla roboport charging animation overrides any custom made charging animation so long as a single vanilla roboport is present in the equipment grid.

pleegwat
Fast Inserter
Fast Inserter
Posts: 191
Joined: Fri May 19, 2017 7:31 pm
Contact:

Re: Roboport recharging animations (colors)

Post by pleegwat »

Further research: What happens with 2 modded roboports with different visualisation?

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2384
Joined: Fri Nov 06, 2015 7:41 pm

Re: Roboport recharging animations (colors)

Post by Deadlock989 »

pleegwat wrote:
Wed Dec 30, 2020 12:03 pm
Further research: What happens with 2 modded roboports with different visualisation?
When you have two modded roboports with identical properties, only the name and tint of the (non-vanilla) animation different, then it appears to favour whichever roboport was placed in the grid first. You can switch between the animations by clearing all the roboports from the grid and adding them back in a different order. But as soon as you add a vanilla roboport, the blue electric animation takes over, even mid-charge. Clearly it is depending on some property but I don't have the patience to test them all, someone with source code access will need to check.
"If Stalin had a good writeup on programming, would linking that be dangerous?"

User avatar
AyleeJenn
Inserter
Inserter
Posts: 37
Joined: Mon Oct 01, 2018 6:11 am
Contact:

Re: Roboport recharging animations (colors)

Post by AyleeJenn »

The plot thickens. Thank you for going testing and looking into it :shock:

Post Reply

Return to “Modding help”