Page 1 of 1
[MOD 0.12.x] Cannon Turret
Posted: Sun Aug 16, 2015 8:55 pm
by AmbulatoryCortex
Type: Mod
Name: Cannon Turret
Description: Adds a cannon turret and upgrades.
License: Do whatever you want, just don't claim it's yours.
Version: 0.0.1
Release: 8/16/2015
Tested-With-Factorio-Version: 0.12.4
Category: Turret
Tags: cannon, turret, defense
Warning! Cannon turrets will attempt to fire through you and your buildings. They're quite tough, so stick them out front where that won't be an issue.
Thanks to YuokiTani for the beautiful spritesheet!
Re: [0.12.X] Cannon Turret
Posted: Sun Aug 16, 2015 10:35 pm
by waduk
Nice, and i really like the sprite (great work by Yuoki Tani).
I'd like the idea of friendly fire, first time i test it, it obliterate the train track. It was awesome !
Then i move the turret encampment further, then this happen.
Can you make it that it won't fire under certain minimum range (15?).
Otherwise, this turret practically destroy itself and his company.
Re: [0.12.X] Cannon Turret
Posted: Mon Aug 17, 2015 12:46 am
by Peter34
That is the general problem with any Turrets firing area-of-effect damage projectiles.
I guess that's why popular mods such as TreeFarm add turrets that fire non-damaging projectiles, instead using ones that somehow slows down the target, that is they do no damage to structures, and instead of doing damage to mobile entities, the mobile entities get their mobility nerfed.
Re: [0.12.X] Cannon Turret
Posted: Mon Aug 17, 2015 1:44 am
by Ranakastrasz
Assuming it uses tank turret shells, its not the fact that it deals AOE damage, so much as the fact that factorio doesn't support filters on impact projectiles. Same thing as trying to shoot a shotgun through a wall. The walls gotta go first....
Re: [0.12.X] Cannon Turret
Posted: Mon Aug 17, 2015 1:58 am
by AmbulatoryCortex
Ranakastrasz wrote:Assuming it uses tank turret shells, its not the fact that it deals AOE damage, so much as the fact that factorio doesn't support filters on impact projectiles. Same thing as trying to shoot a shotgun through a wall. The walls gotta go first....
Pretty much. That's why I put the warning in the op. They'll one-shot anything short of a behemoth, but I don't have a way to keep them from shooting through stuff. That I know of anyway.
Re: [0.12.X] Cannon Turret
Posted: Mon Aug 17, 2015 2:46 am
by Ranakastrasz
AmbulatoryCortex wrote:
Pretty much. That's why I put the warning in the op. They'll one-shot anything short of a behemoth, but I don't have a way to keep them from shooting through stuff. That I know of anyway.
Same here. Tried to make a custom flame thrower and ran into issues.
That said, a rocket turret would work fine.
Also, you might be able to spawn the projectile further out, though it would look bad.
Lastly, at least make the turret 1k hp or so durable, so it is it's own wall.
That and note that it is collision with stuff and not the aoe which is the issue
Re: [0.12.X] Cannon Turret
Posted: Mon Aug 17, 2015 3:31 am
by AmbulatoryCortex
Ranakastrasz wrote:
Same here. Tried to make a custom flame thrower and ran into issues.
That said, a rocket turret would work fine.
Also, you might be able to spawn the projectile further out, though it would look bad.
Lastly, at least make the turret 1k hp or so durable, so it is it's own wall.
That and note that it is collision with stuff and not the aoe which is the issue
Others have already made rocket turrets, so I wasn't interested in that. Now that this is done, I might.
The turret has 1400hp already, and 50% physical damage reduction. Starting there, we'll see whether the thing needs nerfed or buffed.
I'll also fix the warning so it's more clear.
Re: [0.12.X] Cannon Turret
Posted: Mon Aug 17, 2015 8:56 am
by Krayt
The quote is from the topic for texture request:
https://forums.factorio.com/forum/vie ... 15&t=14825
AmbulatoryCortex wrote:DOSorDIE wrote:That turret is great, but it cant fire over walls ... so as base defend its useless.
Can you fix that?
You should bring discussion over to the mod thread. But to answer your question, no I cannot make it both use the existing cannon behavior and also not hurt friendly entities.
What about building a one block thick wall around the turret and then somehow changing the starting point of the fired cannon shell to a point outside this radius?
I don't know how to do this, but this would be the theoretical approach.
Re: [0.12.X] Cannon Turret
Posted: Mon Aug 17, 2015 9:17 am
by DOSorDIE
Sorry for the entry in the wrong thread ... too many windows where open.
Nice idea, but when i build a bigger wall 2 or 3 thick?
A normal turret can shoot over walls so why you change it like that.
Re: [0.12.X] Cannon Turret
Posted: Mon Aug 17, 2015 10:40 am
by Ranakastrasz
DOSorDIE wrote:Sorry for the entry in the wrong thread ... too many windows where open.
Nice idea, but when i build a bigger wall 2 or 3 thick?
A normal turret can shoot over walls so why you change it like that.
That was answered earlier.
Same reason tank cannon, shotgun and flameer can't
Re: [0.12.X] Cannon Turret
Posted: Mon Aug 17, 2015 6:57 pm
by Adil
attack_parameters.projectile_creation_distance = 5 allows turret to shoot over single wall. However this also shifts the position of fire explosion there. Maybe someone will squeeze the shooting explosion creation into turret parameters as well, so that there's still an explosion at the end of the barrel even though another one happens later.
Balancing wise I object that de facto the highest tier turret is made of shit'n'sticks that would be more fit to an early-game gun-tower. Being the stationary automatic analogue of a tank it should require appropriate ingredients: a comparable amount of engines, a load of steel, a bunch of red circuits, well, you get the idea.
Re: [MOD 0.12.x] Cannon Turret
Posted: Mon Sep 07, 2015 2:15 pm
by Imp0815
As i understand it the base problem is the collision code pared with bullets. Why not just use the base code of the other turrets and just use the cannon turret animation, graphics, sounds and stats? (with the lack of seeing the bullet actually fly)
EDIT:
Oke i just fixed it myself. You just take the projectiles.lua out of the data\base\prototypes\entity folder and put it in the prototypes\entity of the cannon mod folder.
Now go in there (best use Notepad++) and delete the following out of the "cannon-projectile" part:
collision_box = {{-0.05, -1.1}, {0.05, 1.1}},
and set
direction_only = false,
do it in both the explosion and the normal round.
Then open the data.lua file in the mod and add the following line at the end:
require("prototypes.entity.projectiles")
Now your cannons should be able to shot over walls.
EDIT #2:
When you change your projectiles file like this you your tank wont be able to hit that often anymore.
Re: [MOD 0.12.x] Cannon Turret
Posted: Wed Jan 27, 2016 9:45 pm
by Darloth
Can we make projectiles that spawn other projectiles now?
The comments (edit: and code) in the plasma shotgun thread suggests that we can, so...
How about the cannon turret fires a projectile that's very much like the cannon shell, except it has no collision, like the one Imp0815 suggests.
Then, after about 5 units of distance, THAT projectile splits into exactly one other projectile with the same target, heading and speed, that's a normal cannon shell.
In fact, tanks could do this too? - no more terrible friendly fire, for anyone?
Ooh, and we could make shotgun turrets, by making canister shells which split into normal shotgun blasts. Fun candy-tech upgrade to these turrets, and no reason tanks couldn't use those as well...
Re: [MOD 0.12.x] Cannon Turret
Posted: Mon Jun 06, 2016 6:43 am
by thereaverofdarkness
You do have to be careful how you place this turret, but I don't see that as a problem. Don't bother boxing them inside walls; the turret IS the wall.
I would suggest actually decreasing their hit points a bit and instead increasing their explosive resist. If they would stop killing themselves, they would stop dying. [s]20/50% explosion resist is a bit higher than the tank, and would make the explosive cannon shell deal 2.5 damage to the turret (assuming no damage upgrades).
As long as the turret has a bit of physical resist on top of that, it can remain on the outside of your perimeter.[/s]
edit: I must have been looking at the numbers for the explosive rocket. The explosive cannon shell deals 80 explosive damage and 30 physical damage, so the turret needs a lot of explosive and physical resist to keep from taking large amounts of damage.
Re: [MOD 0.12.x] Cannon Turret
Posted: Mon Jun 06, 2016 10:23 pm
by Ranakastrasz
Darloth wrote:Can we make projectiles that spawn other projectiles now?
The comments (edit: and code) in the plasma shotgun thread suggests that we can, so...
How about the cannon turret fires a projectile that's very much like the cannon shell, except it has no collision, like the one Imp0815 suggests.
Then, after about 5 units of distance, THAT projectile splits into exactly one other projectile with the same target, heading and speed, that's a normal cannon shell.
In fact, tanks could do this too? - no more terrible friendly fire, for anyone?
Ooh, and we could make shotgun turrets, by making canister shells which split into normal shotgun blasts. Fun candy-tech upgrade to these turrets, and no reason tanks couldn't use those as well...
Well, I know you can chain poison to shotgun shells and other impact weapons, and you can have them explode after a defined distance, applying that effect. I am not sure how to chain another projectile to that, but If you could, yea, that is feasible.
Re: [MOD 0.12.x] Cannon Turret
Posted: Mon Jul 04, 2016 8:25 pm
by lordvizer
so if i update the game to 0.13.x i will loss all modes so far , but what will do with that when they asked me for username and password to update modes ?
or i have to keep my game out dated in order to play with some cool modes ?
Re: [MOD 0.12.x] Cannon Turret
Posted: Fri Jul 15, 2016 12:37 pm
by sore68
Hi there~
I change?path? this mod in factorio 13 version.
and some pic
Re: [MOD 0.12.x] Cannon Turret
Posted: Sun Jul 17, 2016 11:11 am
by sore68
Oops..
change some entity.. enable this mod