movement_bonus into other equipment type?
movement_bonus into other equipment type?
I'm hoping to add a movement modifier to equipment items.
First is a "active-defense-equipment" type, I want to make the defense gun in my mod slow you down since it should be sorta heavy.
Other thing I want to do is make "extra plating" that occupies a 1x1 grid space and adds defensive bonus but also slows you a bit.
API says it only works if the equipment type is "movement-bonus-equipment". And I can confirm that just willy-nilly adding the line causes an error.
Is this hard-coded? Is there a way to add it?
Also the API doesn't list all the types.. how do we know what they all are?
First is a "active-defense-equipment" type, I want to make the defense gun in my mod slow you down since it should be sorta heavy.
Other thing I want to do is make "extra plating" that occupies a 1x1 grid space and adds defensive bonus but also slows you a bit.
API says it only works if the equipment type is "movement-bonus-equipment". And I can confirm that just willy-nilly adding the line causes an error.
Is this hard-coded? Is there a way to add it?
Also the API doesn't list all the types.. how do we know what they all are?
- DedlySpyder
- Filter Inserter
- Posts: 253
- Joined: Fri Jun 20, 2014 11:42 am
- Contact:
Re: movement_bonus into other equipment type?
Yes, it's hardcoded in. The prototypes aren't in the API, you can look them up on the wiki or check the base factorio files.
As for how to do this, I think the only way is to separate it into two pieces and use scripting to force the player to use both if them (like the automated defenses won't work until the player had a stabilizer or something)
As for how to do this, I think the only way is to separate it into two pieces and use scripting to force the player to use both if them (like the automated defenses won't work until the player had a stabilizer or something)
Re: movement_bonus into other equipment type?
Interesting.
Is there a way to make the movement modifier as an "invisible" paired second object that automatically follows the main object when equipped?
Is there a way to make the movement modifier as an "invisible" paired second object that automatically follows the main object when equipped?
- DedlySpyder
- Filter Inserter
- Posts: 253
- Joined: Fri Jun 20, 2014 11:42 am
- Contact:
Re: movement_bonus into other equipment type?
Not sure. I've not tried doing much with equipment. You can try to make a 0x0 equipment and spawn it in the grid. Or maybe try making them not use whole numbers (like the player places a 0.9x1, and you spawn in a 0.1x1 next to it)
Re: movement_bonus into other equipment type?
With the changes in 0.14 that just hit, do you guys think this is possible now?
- DedlySpyder
- Filter Inserter
- Posts: 253
- Joined: Fri Jun 20, 2014 11:42 am
- Contact:
Re: movement_bonus into other equipment type?
Not at home to check, but it sounds like they just added restrictions to the equipment. Kinda like how crafting categories make it so that engines can only be crafted in assemblers.AutoMcD wrote:With the changes in 0.14 that just hit, do you guys think this is possible now?
Re: movement_bonus into other equipment type?
Acording to FF'f it is.
Someone needs to make a mod and test it out
Someone needs to make a mod and test it out
- DedlySpyder
- Filter Inserter
- Posts: 253
- Joined: Fri Jun 20, 2014 11:42 am
- Contact:
Re: movement_bonus into other equipment type?
No? This thread was asking if you could combine equipment effects (shooting and speed modifier), which the fff doesn't really sayorzelek wrote:Acording to FF'f it is.
Someone needs to make a mod and test it out
Re: movement_bonus into other equipment type?
Ahh sorry I misunderstood the question.DedlySpyder wrote:No? This thread was asking if you could combine equipment effects (shooting and speed modifier), which the fff doesn't really sayorzelek wrote:Acording to FF'f it is.
Someone needs to make a mod and test it out
Looking at prototypes nothing changed there so not possible most likely.
Re: movement_bonus into other equipment type?
Why not make two items and have control.lua remove/add the other half, one being movement equipment and the other whatever you need? If you wanted to make it seamless you would need 3 items, though. A placement item, which gets converted into 2 items that look like one.
Basically you would insert for example a 4x8 item, the control.lua would replace it with 2 4x4's in the same area and when you remove one of the two it replaces the cursor item with the original item which is just a dummy. For the 1x1 plating that could be an issue, however.
Basically you would insert for example a 4x8 item, the control.lua would replace it with 2 4x4's in the same area and when you remove one of the two it replaces the cursor item with the original item which is just a dummy. For the 1x1 plating that could be an issue, however.
Re: movement_bonus into other equipment type?
Interesting idea. If you think it's possible to do that, then there's just a few other things to need to check:ShinyAfro wrote:Why not make two items and have control.lua remove/add the other half, one being movement equipment and the other whatever you need? If you wanted to make it seamless you would need 3 items, though. A placement item, which gets converted into 2 items that look like one.
Basically you would insert for example a 4x8 item, the control.lua would replace it with 2 4x4's in the same area and when you remove one of the two it replaces the cursor item with the original item which is just a dummy. For the 1x1 plating that could be an issue, however.
That a negative movement modifier will work (to slow you down),
That the piggyback equipment could be made a 0x0 invisible part,
And for the armor idea, I'm not sure it's even possible as none of the current equipment modifies the physical durability. But perhaps it can be some type of non-powered shield or something.
- adamwong246
- Fast Inserter
- Posts: 148
- Joined: Tue Dec 01, 2020 5:01 am
- Contact:
Re: movement_bonus into other equipment type?
I'm trying to do something similar- a reverse exoskeleton, that slows you down but charges your pack.
The problem is the prototypes don't easily allow for this. You have MovementBonusEquipment with the movement_bonus field and GeneratorEquipment with its power field.
So either you have to make a slow-exoskeleton with some extra scripting to charge the pack OR you can make a generator with some extra scripting to slow the player down.
I'm not sure which is more palatable.
The problem is the prototypes don't easily allow for this. You have MovementBonusEquipment with the movement_bonus field and GeneratorEquipment with its power field.
So either you have to make a slow-exoskeleton with some extra scripting to charge the pack OR you can make a generator with some extra scripting to slow the player down.
I'm not sure which is more palatable.