[posila] Making multiple beams from the same turrets / strange behavior

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 279
Joined: Thu Dec 21, 2017 8:02 am
Contact:

[posila] Making multiple beams from the same turrets / strange behavior

Post by ownlyme » Mon Jun 10, 2019 2:12 pm

When you create multiple beams from the same turret and at least 1 of the beam durations is equal to the cooldown, only 1 beam gets fired.
But when you set the cooldown to 1 higher than the beam durations, the target random offset gets randomized every shot.
At least it's not noticeable that the beam gets interrupted for 1 tick...
I don't really want to disable the target random offset either...

My other idea was to add the second beam to the action of the first beam, but that results in the second beam being active for 1 interval longer than the first beam...

I hope you can fix this, help me or implement the glow in the base game, cause it really improves visual aesthetics
unknown.png
unknown.png (260.28 KiB) Viewed 394 times

Code: Select all

data.raw["electric-turret"]["laser-turret"]. attack_parameters =
	{
		type = "beam",
		cooldown = 21,
		range = 24,
		source_direction_count = 64,
		source_offset = {0, -3.423489 / 4},
		damage_modifier = 2,
		ammo_type =
		{
			category = "laser-turret",
			energy_consumption = "1kJ",
			action =
			{
				{
					type = "direct",
					action_delivery =
					{
						type = "beam",
						beam = "laser-beam",
						max_length = 24,
						duration = 20,
						source_offset = {0, -1.31439 }
					}
				},
				{
					type = "direct",
					action_delivery =
					{
						type = "beam",
						beam = "laser-beam-light",
						max_length = 24,
						duration = 20,
						source_offset = {0, 0.0 }
					}
				}
			}
		}
	}
mods.factorio.com/user/ownlyme
My requests: Blueprint allies||Creeps forget command/ don't get removed||Grenade arc||Player Modifiers||Gui Root||textbox::selection||Better Heat IF||Singleplayer RCON||Serializing function refs in global table...

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 3619
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Making multiple beams from the same turrets / strange behavior

Post by Klonan » Mon Jun 10, 2019 2:21 pm

ownlyme wrote:
Mon Jun 10, 2019 2:12 pm
I hope you can fix this, help me or implement the glow in the base game, cause it really improves visual aesthetics
Why not just add the light to the base game beam? You can specify multiple layers for the light sprite

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 279
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: Making multiple beams from the same turrets / strange behavior

Post by ownlyme » Mon Jun 10, 2019 2:22 pm

then the glow would be around the beam and not on the floor under the beam.
https://mods.factorio.com/mod/laser_fix ... looks a bit weird
mods.factorio.com/user/ownlyme
My requests: Blueprint allies||Creeps forget command/ don't get removed||Grenade arc||Player Modifiers||Gui Root||textbox::selection||Better Heat IF||Singleplayer RCON||Serializing function refs in global table...

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 279
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: Making multiple beams from the same turrets / strange behavior

Post by ownlyme » Mon Jun 10, 2019 2:38 pm

just noticed that the two beams solution (at the turret) only works when it is shooting at the player... as soon as i change it's force and spawn a behemoth biter, i just get 1 beam again...

btw: the second beam shows up for 1 interval, but disappears then.
mods.factorio.com/user/ownlyme
My requests: Blueprint allies||Creeps forget command/ don't get removed||Grenade arc||Player Modifiers||Gui Root||textbox::selection||Better Heat IF||Singleplayer RCON||Serializing function refs in global table...

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 3619
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Making multiple beams from the same turrets / strange behavior

Post by Klonan » Mon Jun 10, 2019 2:39 pm

ownlyme wrote:
Mon Jun 10, 2019 2:22 pm
then the glow would be around the beam and not on the floor under the beam.
You can shift the sprite down in the sprite definition

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 279
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: Making multiple beams from the same turrets / strange behavior

Post by ownlyme » Mon Jun 10, 2019 2:44 pm

i know ;) didn't really try it but that would create a fixed offset, which would still be off when the turrets shoot at the feet (which in itself is also a bit weird ;) )
mods.factorio.com/user/ownlyme
My requests: Blueprint allies||Creeps forget command/ don't get removed||Grenade arc||Player Modifiers||Gui Root||textbox::selection||Better Heat IF||Singleplayer RCON||Serializing function refs in global table...

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 279
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: Making multiple beams from the same turrets / strange behavior

Post by ownlyme » Mon Jun 10, 2019 2:58 pm

Guess i'll decrease the damage interval of my beam to 1/4, that seems to make the delayed glow unnoticeable.
It will probably eat quite some ups, especially with mods that monitor the entity_damaged event ..

Still hoping for a better solution though ;)
mods.factorio.com/user/ownlyme
My requests: Blueprint allies||Creeps forget command/ don't get removed||Grenade arc||Player Modifiers||Gui Root||textbox::selection||Better Heat IF||Singleplayer RCON||Serializing function refs in global table...

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 279
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: Making multiple beams from the same turrets / strange behavior

Post by ownlyme » Mon Jun 10, 2019 7:12 pm

Guess the laser defense equipment defeated me...
The second beam in the beam prototype gets ignored and when added to the equipment, it flickers a bit...
mods.factorio.com/user/ownlyme
My requests: Blueprint allies||Creeps forget command/ don't get removed||Grenade arc||Player Modifiers||Gui Root||textbox::selection||Better Heat IF||Singleplayer RCON||Serializing function refs in global table...

posila
Factorio Staff
Factorio Staff
Posts: 3498
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Making multiple beams from the same turrets / strange behavior

Post by posila » Mon Jun 17, 2019 7:52 am

Thanks for the report.
It should be fixed for 0.17.50

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 279
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: [posila] Making multiple beams from the same turrets / strange behavior

Post by ownlyme » Tue Jun 18, 2019 12:16 pm

Thanks, i updated my mod.
Equipment beams also work perfectly now.
From the download count i'm getting i think you should have added it to the base game ;)
mods.factorio.com/user/ownlyme
My requests: Blueprint allies||Creeps forget command/ don't get removed||Grenade arc||Player Modifiers||Gui Root||textbox::selection||Better Heat IF||Singleplayer RCON||Serializing function refs in global table...

Post Reply

Return to “Resolved Problems and Bugs”

Who is online

Users browsing this forum: No registered users