Allow setting if a SpiderLegPrototype rotates with its connected body or not

Izzabelle
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Nov 23, 2021 7:17 pm
Contact:

Allow setting if a SpiderLegPrototype rotates with its connected body or not

Post by Izzabelle »

I was experimenting with the early stages of a mod that lets you "domesticate" pentapods, and found out that whether the leg rotates with the body or not is hardcoded depending on if it's a SpiderVehiclePrototype or SpiderUnitPrototype. More control over this would be excellent, as I can see plenty of cases where people would want either spider vehicles with legs that rotate with the body or spider units with fixed leg placement.

My personal suggestion is to let each leg individually define if it rotates or not, as that'd allow for some very fancy looking units.
Potentially there could even with some sort of rotation_rate value that lets you precisely control the rotation. A value of 1 makes it follow the body, 0 makes it stay in place, 2 makes it twice as fast and -1 goes reverse.

I understand that might be incredibly wishful thinking since I have no idea how the source code is set up. But even just a true/false on the spider_engine itself would be good enough for what I'm doing.
MrSmoothieHuman
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sat Aug 05, 2023 1:20 am
Contact:

Re: Allow setting if a SpiderLegPrototype rotates with its connected body or not

Post by MrSmoothieHuman »

+1
coder? i hardly know her!
berggen
Inserter
Inserter
Posts: 22
Joined: Tue Sep 01, 2020 7:12 pm
Contact:

Re: Allow setting if a SpiderLegPrototype rotates with its connected body or not

Post by berggen »

Mecha dogs from mods? +1
StrangePan
Factorio Staff
Factorio Staff
Posts: 238
Joined: Fri Dec 07, 2018 3:41 pm
Contact:

Re: Allow setting if a SpiderLegPrototype rotates with its connected body or not

Post by StrangePan »

Ok, this is implemented in 2.0.61. Rotation is defined by the SpiderVehiclePrototype's SpiderTorsoGraphicsSet::base_animation number of rotations. In other words, if a SpiderVehicle's torso has a base sprite with NO rotation frames, then the legs will not rotate either. If the base sprite has 64 rotations (same as the head), then the base sprite and the legs will rotate with the head. If the base sprite is not defined, then the legs fall back on the head sprite's rotations. Docs will also be updated.
Post Reply

Return to “Implemented mod requests”