Page 1 of 1

[Idea/Request] - Vehicle damage animation (smoke/fire)

Posted: Fri Mar 06, 2020 12:41 am
by AyleeJenn
dear modders,

I am coming to you with the idea/request for a very simple modification. Here is the TL;DR.

What I envision: When a vehicle is in yellow hull status, it should trail smoke to show that it is damaged. And when in red hull status it should trail smoke and fire to show it is in very bad condition.

I feel this would add some polish to the game, perhaps one of you can help me?

Thank you for reading at any case.

Re: [Idea/Request] - Vehicle damage animation (smoke/fire)

Posted: Fri Apr 17, 2020 6:48 am
by darkfrei
It's possible to replace the vehicle with another one, that was added on the data stage or just set the fire entity to the vehicle / fire animation to the vehicle.

Re: [Idea/Request] - Vehicle damage animation (smoke/fire)

Posted: Fri Nov 13, 2020 3:59 pm
by AyleeJenn
Hello!!!!

thank you so much for responding :shock: I had kind of given up on even getting a response from anyone at all. How would I go about this? Would I have to modify the entry for a vehicle in the entities-prototype?and if this is correct, what would I need to put there? I have the vision, the idea, but I don't know how what line to write ... how do I put the fire and smoke animation to the vehicle when hull is below fifty percent? :?

Re: [Idea/Request] - Vehicle damage animation (smoke/fire)

Posted: Fri Nov 13, 2020 9:19 pm
by darkfrei
AyleeJenn wrote:
Fri Nov 13, 2020 3:59 pm
Hello!!!!

thank you so much for responding :shock: I had kind of given up on even getting a response from anyone at all. How would I go about this? Would I have to modify the entry for a vehicle in the entities-prototype?and if this is correct, what would I need to put there? I have the vision, the idea, but I don't know how what line to write ... how do I put the fire and smoke animation to the vehicle when hull is below fifty percent? :?
There is few ways how to make it. I've used the info-mod, but you can just open the vanilla prototypes and find what you need.

1. Find the car prototype, find and understand the prototype definition. Here is several ways how to do what you need.
1a. add the fire to each sprite with some paint-dot-net
1b. add the fire as a layer by the animation
1c. add the fire as a layer by the turret_animation, actually almost the same as 1b
1d. add the fire as a action by the track_particle_triggers
1f. add the fire as smoke by the car's burner.
2020-11-13T22_12_59-_D__Factorio_1.0_factorio-current.log - Notepad++.png
2020-11-13T22_12_59-_D__Factorio_1.0_factorio-current.log - Notepad++.png (98.12 KiB) Viewed 1690 times
Fast 1f solution, but with extra smoke:

Code: Select all

data.raw.car.car.burner.smoke[2]  = 
{
	name = "car-smoke",
	deviation = {1, 1},
	frequency = 2000,
	position = {0, 1.5},
	starting_frame = 0,
	starting_frame_deviation = 60
}
2020-11-13T22_35_54-Factorio 1.0.0.png
2020-11-13T22_35_54-Factorio 1.0.0.png (203.06 KiB) Viewed 1672 times
or

Code: Select all

data.raw.car.car.burner.smoke[2]  = 
{
--	name = "car-smoke",
	name = "smoke",
	deviation = {1, 1},
	frequency = 200,
	position = {0, 0},
	starting_frame = 0,
	starting_frame_deviation = 60
}
2020-11-13T22_42_19-Factorio 1.0.0.png
2020-11-13T22_42_19-Factorio 1.0.0.png (756.77 KiB) Viewed 1667 times
or

Code: Select all

data.raw.car.car.burner.smoke[2]  = 
{
--	name = "car-smoke",
--	name = "smoke",
	name = "fire-smoke-without-glow",
	deviation = {0.2, 0.2},
--	frequency = 600,
	frequency = 200,
--	position = {0, 1.5},
	position = {0, 0},
	starting_frame = 0,
	starting_frame_deviation = 60
}
2020-11-13T22_49_51-Factorio 1.0.0.png
2020-11-13T22_49_51-Factorio 1.0.0.png (364.01 KiB) Viewed 1663 times
2020-11-13T22_51_49-Factorio 1.0.0.png
2020-11-13T22_51_49-Factorio 1.0.0.png (446.72 KiB) Viewed 1661 times
Cons: the smoke is by acceleration only.

Re: [Idea/Request] - Vehicle damage animation (smoke/fire)

Posted: Sat Nov 14, 2020 2:56 am
by AyleeJenn
my goodness, thats a very detailed response :shock: I am amazed. And feeling very grateful for your effort. The fact that you took all this time to write not only one way but several humbles me :oops: I want to say that I don't take that for granted. Thank you so much.

The idea was that a vehicle emits smoke or fire when it is below fifty percent hull. But I have not seen this in what you wrote. Is there a way to include that condition? Otherwise, the vehicle would just emit more smoke from what I understand :?