[MOD 0.16] Helicopters

Topics and discussion about specific mods
User avatar
kumpu
Fast Inserter
Fast Inserter
Posts: 111
Joined: Wed Jun 07, 2017 10:10 am
Contact:

[MOD 0.16] Helicopters

Post by kumpu »

heli_big.png
heli_big.png (119.71 KiB) Viewed 21156 times
I don't think I need to explain this mod. It adds freaking helicopters to the game!

Name: Helicopters
Description: Adds a fully animated attack helicopter to the game. Ideal for getting from A to B quickly, exploring the map, building islands and nuking biters from the sky.
License: MIT
Version: 0.2.16
Factorio Version: 0.16.x
Category: Transportation
Author: Kumpu
Downloads: Mod portal
Github: https://github.com/kumpuu/factorio-helicopters


Long description

Tired of walking or waiting for trains? This quality mod adds a helicopter to the game.
Comes with custom animations and sounds, a machine gun, a rocket launcher, heli pads and a remote control.
The energy consumption is very high, so rocket fuel is recommended for max flight time and speed.

To start the engine, press Shift+E. To stop and land, press Shift+Q. You can also change these controls in the settings.
You can increase the flight height by using the up and down arrows.
The remote control works by placing it in your armor grid, a small button will appear in the top left corner that opens the remote gui.

Adds a new research that you have to unlock before you can build it.

Ideal for getting from A to B quickly, exploring the map, building islands and nuking biters from the sky.

You might wonder why it's called "Helicopters", when it only adds one model of heli to the game. Well, guess what, you can build multiple ones. There you go, helicopters :)
It also allows me to add more models if I decide to, without having to change the name.
Pictures
Version history
Known Issues
License
Last edited by kumpu on Tue Apr 24, 2018 7:30 pm, edited 9 times in total.
Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: [MOD 0.15] Helicopters

Post by Supercheese »

Get to da choppah!

Nice mod, some intense coding shenanigans to get things to animate the way you want to!
User avatar
kumpu
Fast Inserter
Fast Inserter
Posts: 111
Joined: Wed Jun 07, 2017 10:10 am
Contact:

Re: [MOD 0.15] Helicopters

Post by kumpu »

Supercheese wrote:Get to da choppah!

Nice mod, some intense coding shenanigans to get things to animate the way you want to!
Thanks and yeah, I had to get pretty creative in abusing entities...
chridder
Inserter
Inserter
Posts: 26
Joined: Sat May 20, 2017 2:26 pm
Contact:

Re: [MOD 0.15] Helicopters

Post by chridder »

Hi,

could it be that the default key binding (SHIFT+W and SHIFT+S) conflicts with vanilla settings?
My problem is, that in the past it was possible to hold down shift + w to place items in ghost mode while walking.
Since 0.15.xx it does not work anymore. Now it came to my mind, that with 0.15.xx I started a new game including your mod.

If it is the case, a different default key binding might be a good idea.
I will test (a different key binding) as soon as I am back in the game (hopefully today evening) and give an update.

Greetings,
Chridder
User avatar
kumpu
Fast Inserter
Fast Inserter
Posts: 111
Joined: Wed Jun 07, 2017 10:10 am
Contact:

Re: [MOD 0.15] Helicopters

Post by kumpu »

The key bindings are set to non-consume, which means they shouldn't block anything. But since we don't live in a perfect world were everything works as expected, its still possible they're causing this behaviour. Let me know what you find out! Also, maybe try a new map without the mod in the first place. :)
chridder
Inserter
Inserter
Posts: 26
Joined: Sat May 20, 2017 2:26 pm
Contact:

Re: [MOD 0.15] Helicopters

Post by chridder »

ok, I just tested it again.
It is not caused by your mod.

I am also not sure right now, if this happens all the time, that I cannot walk and place items in ghost mode at the same time.

Right now, it works perfectly fine. And I have changed nothing in factorio since yesterday where it was not working (no mod changes, no update, etc)

Just now I think it has nothing to do with factorio at all ...

But thanks for quick response!
User avatar
cpy
Filter Inserter
Filter Inserter
Posts: 839
Joined: Thu Jul 31, 2014 5:34 am
Contact:

Re: [MOD 0.15] Helicopters

Post by cpy »

Is it multiplayer safe?
User avatar
kumpu
Fast Inserter
Fast Inserter
Posts: 111
Joined: Wed Jun 07, 2017 10:10 am
Contact:

Re: [MOD 0.15] Helicopters

Post by kumpu »

cpy wrote:Is it multiplayer safe?
Didn't test it personally, but I saw a video of some guys using it on a server with no problems. So I'd say yes.
User avatar
kumpu
Fast Inserter
Fast Inserter
Posts: 111
Joined: Wed Jun 07, 2017 10:10 am
Contact:

Re: [MOD 0.15] Helicopters

Post by kumpu »

As suggested by kyoshiharu (mod portal), this version includes a remote control equipment item that lets you control your helicopters. Once you place it in your armor grid, a button will appear in the left top corner where you can access the remote gui.

It's not yet finished but I'd like some feedback. I fixed every issue I could find, but this was a pretty complicated piece of work. So if someone is interested - please give it a try and let me know if you have any problems. I'm sure there are some left. If you do, make a post here and please don't forget to include information on how to reproduce it. If you have any suggestions, let me know ;)

How to use:
Imo it's pretty self-explanatory. Things to mention are that left clicking the to-player button will let the heli follow you, while shift-clicking will send it to your CURRENT position. Right clicking the top of any window will close it.
remote.png
remote.png (795.24 KiB) Viewed 20838 times
Attachments
Helicopters_0.1.0.zip
(2.83 MiB) Downloaded 332 times
chridder
Inserter
Inserter
Posts: 26
Joined: Sat May 20, 2017 2:26 pm
Contact:

Re: [MOD 0.15] Helicopters

Post by chridder »

looks interesting... as soon as I have some time I will give it a try :)
Termak
Fast Inserter
Fast Inserter
Posts: 205
Joined: Mon Mar 27, 2017 10:47 pm
Contact:

Re: [MOD 0.15] Helicopters

Post by Termak »

kumpu wrote:The key bindings are set to non-consume, which means they shouldn't block anything. But since we don't live in a perfect world were everything works as expected, its still possible they're causing this behaviour. Let me know what you find out! Also, maybe try a new map without the mod in the first place. :)
Having the same issue, got fixed by changing the keybindings though, might be caused due to the even distribution mod.

Another thing though, this eats a lot of ups, anyway to reduce it?
User avatar
kumpu
Fast Inserter
Fast Inserter
Posts: 111
Joined: Wed Jun 07, 2017 10:10 am
Contact:

Re: [MOD 0.15] Helicopters

Post by kumpu »

chridder wrote:looks interesting... as soon as I have some time I will give it a try :)
Thanks! ;)
Termak wrote:
kumpu wrote:The key bindings are set to non-consume, which means they shouldn't block anything. But since we don't live in a perfect world were everything works as expected, its still possible they're causing this behaviour. Let me know what you find out! Also, maybe try a new map without the mod in the first place. :)
Having the same issue, got fixed by changing the keybindings though, might be caused due to the even distribution mod.

Another thing though, this eats a lot of ups, anyway to reduce it?
What are ups? Units per second? Updates per second? :?:
Termak
Fast Inserter
Fast Inserter
Posts: 205
Joined: Mon Mar 27, 2017 10:47 pm
Contact:

Re: [MOD 0.15] Helicopters

Post by Termak »

Nevermind the ups thing, i meant updates obviously, its not that bad.
About the mod, the current heli is a bit on the overpowered side compared to how easy its to get.
Propably should have some basic one for passenger use only at current tech level and higher research like with hitec and military bottles for the Apache.
User avatar
kumpu
Fast Inserter
Fast Inserter
Posts: 111
Joined: Wed Jun 07, 2017 10:10 am
Contact:

Re: [MOD 0.15] Helicopters

Post by kumpu »

Termak wrote: About the mod, the current heli is a bit on the overpowered side compared to how easy its to get.
Propably should have some basic one for passenger use only at current tech level and higher research like with hitec and military bottles for the Apache.
Valid point, and I might do that in the future. ;)
That is if I can find a good free model, because I suck at 3D modelling...
zumf
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Jun 29, 2016 11:26 am
Contact:

Re: [MOD 0.15] Helicopters

Post by zumf »

This is an amazing mod, Kumpu! It's incredible how superior this is to the other current flying vehicle mods.

I really hope you'll continue with this, and as others have suggested, make some variations (a more basic, slower, more lightly armed and armoured one, perhaps a cargo helicopter)

I read that you'd like some help producing the 3d models? I model in Blender, and think I can match the Factorio art-style - Just the materials and render settings I need to study. I'll have a play around and get back to you if I make anything decent!
User avatar
kumpu
Fast Inserter
Fast Inserter
Posts: 111
Joined: Wed Jun 07, 2017 10:10 am
Contact:

Re: [MOD 0.15] Helicopters

Post by kumpu »

zumf wrote:This is an amazing mod, Kumpu! It's incredible how superior this is to the other current flying vehicle mods.

I really hope you'll continue with this, and as others have suggested, make some variations (a more basic, slower, more lightly armed and armoured one, perhaps a cargo helicopter)

I read that you'd like some help producing the 3d models? I model in Blender, and think I can match the Factorio art-style - Just the materials and render settings I need to study. I'll have a play around and get back to you if I make anything decent!
Thank you very much!
If you could make a model that would be really awesome :shock:
Render settings I can do, but make sure to keep spinning parts as separate pieces. Also anything that is not aligned with the main z axis is very difficult to animate, since then you need to take the rotation of the body into account. For example the current models rear rotor - to get it animated you'd have to basically do 64 (body rotation frame count) different sets of animations and worry about draw order... Just not worth the effort imho.
But yeah let me know if you made anything, or if you have questions. 8-)
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.15] Helicopters

Post by Optera »

I really like where this mod is going and I'd have replaced planes with it if not for some annoying effects.
  • When landing in WE orientation the fake entity remains in NS orientation creating an invisible wall just south of the Heli.
  • The heli collision box in this orientation seems to be too far south for the sprite.
  • When the entities overlap it confuses my Inventory Sensor making fully automated refueling bays impossible.
    I could add an exception, but frankly I don't see what you even need that fake entity with collision box for.
2017-07-23-19-20-02-5349563.jpg
2017-07-23-19-20-02-5349563.jpg (72.87 KiB) Viewed 20704 times

I'd make the Heli's collision box match it's sprite better by changing it's size to 2x4 and get rid of the fake entity or at least make it have a 0,0 collision and selection box.
2017-07-23-19-39-08-4154970.jpg
2017-07-23-19-39-08-4154970.jpg (74.3 KiB) Viewed 20704 times
User avatar
kumpu
Fast Inserter
Fast Inserter
Posts: 111
Joined: Wed Jun 07, 2017 10:10 am
Contact:

Re: [MOD 0.15] Helicopters

Post by kumpu »

Optera wrote: When landing in WE orientation the fake entity remains in NS orientation creating an invisible wall just south of the Heli.
Yup, that's a bug. Didn't consider that create_entity does not support orientation. Fixed it, thanks!
Optera wrote: The heli collision box in this orientation seems to be too far south for the sprite.
Yeah they don't quite match, even with that fix. Same for selection box. Has to do with the center of rotation for the model, either that or I'm too stupid. I figured it was good enough so meh.
Optera wrote:When the entities overlap it confuses my Inventory Sensor making fully automated refueling bays impossible.
I could add an exception, but frankly I don't see what you even need that fake entity with collision box for.
That sounds a lot like the trouble I had/have with inserters you mentioned on the mod portal. I got so far as to make it work except if you build a new inserter, and then you can get around that by starting and landing again.
Why bother with a fake collision entity? Because I want collision, obviously. Sadly I couldn't find a way to toggle it for a given entity (which is kinda important when flying), that's why it has to be a separate entity. Ugly, but Wube is to blame for that :)

The entire mod is just a giant workaround to get what I want... So perfection is difficult to achieve, but if you or anyone knows how to improve on things.. Let me know and I'll include it in the next version.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.15] Helicopters

Post by Optera »

kumpu wrote:
Optera wrote: The heli collision box in this orientation seems to be too far south for the sprite.
Yeah they don't quite match, even with that fix. Same for selection box. Has to do with the center of rotation for the model, either that or I'm too stupid. I figured it was good enough so meh.
It's one of those tiny details that takes a bit of tinkering, but goes a long way to make something feel polished.
kumpu wrote:
Optera wrote:When the entities overlap it confuses my Inventory Sensor making fully automated refueling bays impossible.
I could add an exception, but frankly I don't see what you even need that fake entity with collision box for.
That sounds a lot like the trouble I had/have with inserters you mentioned on the mod portal. I got so far as to make it work except if you build a new inserter, and then you can get around that by starting and landing again.
Why bother with a fake collision entity? Because I want collision, obviously. Sadly I couldn't find a way to toggle it for a given entity (which is kinda important when flying), that's why it has to be a separate entity. Ugly, but Wube is to blame for that :)

The entire mod is just a giant workaround to get what I want... So perfection is difficult to achieve, but if you or anyone knows how to improve on things.. Let me know and I'll include it in the next version.
I wouldn't be surprised if Inserter internally call LUAsurface.find_entity to get pickup and drop targets.

I think having inserters and find_entity properly reporting the real entity is more important than hitting your head at the proper distance, if at all. For example until testing just now I never noticed planes have no collision at all ;).
In any case the fake entity should always be at least 0.5, better 1.0, inside the real entity collision box so the real entity is found before the fake, or better yet the fake is not found at all with a range of 1 tile.

PS:
It's impressive how well you managed to work around the limitations of the API.
User avatar
kumpu
Fast Inserter
Fast Inserter
Posts: 111
Joined: Wed Jun 07, 2017 10:10 am
Contact:

Re: [MOD 0.15] Helicopters

Post by kumpu »

Optera wrote:
kumpu wrote:
Optera wrote: The heli collision box in this orientation seems to be too far south for the sprite.
Yeah they don't quite match, even with that fix. Same for selection box. Has to do with the center of rotation for the model, either that or I'm too stupid. I figured it was good enough so meh.
It's one of those tiny details that takes a bit of tinkering, but goes a long way to make something feel polished.
Agreed.
Optera wrote:
kumpu wrote:
Optera wrote:When the entities overlap it confuses my Inventory Sensor making fully automated refueling bays impossible.
I could add an exception, but frankly I don't see what you even need that fake entity with collision box for.
That sounds a lot like the trouble I had/have with inserters you mentioned on the mod portal. I got so far as to make it work except if you build a new inserter, and then you can get around that by starting and landing again.
Why bother with a fake collision entity? Because I want collision, obviously. Sadly I couldn't find a way to toggle it for a given entity (which is kinda important when flying), that's why it has to be a separate entity. Ugly, but Wube is to blame for that :)

The entire mod is just a giant workaround to get what I want... So perfection is difficult to achieve, but if you or anyone knows how to improve on things.. Let me know and I'll include it in the next version.
I wouldn't be surprised if Inserter internally call LUAsurface.find_entity to get pickup and drop targets.

I think having inserters and find_entity properly reporting the real entity is more important than hitting your head at the proper distance, if at all. For example until testing just now I never noticed planes have no collision at all ;).
In any case the fake entity should always be at least 0.5, better 1.0, inside the real entity collision box so the real entity is found before the fake, or better yet the fake is not found at all with a range of 1 tile.

PS:
It's impressive how well you managed to work around the limitations of the API.
Yeah I tried playing around with the collider size before, didn't do anything tho... I'll try it again some time, maybe I can get it to work. I also thought about mirroring the real inventory in the fake one, and when a change is detected it would sync them. That's complicated and prone to glitching tho, also not very efficient.
Another idea is to use an entity that doesn't have an inventory in the first place, so inserters won't even consider it. Of course then it can't be rotated but eh. Maybe do two version for NS/WE.
Also, thanks :D
Post Reply

Return to “Mods”