Abandoned mod idea: skyscrapers (0.16)

Topics and discussion about specific mods
Post Reply
CaveGrinder
Inserter
Inserter
Posts: 35
Joined: Fri Aug 24, 2018 7:42 pm
Contact:

Abandoned mod idea: skyscrapers (0.16)

Post by CaveGrinder »

Hi,

I was working for some time on an idea for a mod. However i recently don't have that much time again, therefore decided to abandon it.
But i think it would be a waste to just let it rot on my hard-drive so i want share it.
The code is released under the UNLICENSE, so you are free to do whatever you want with it, be it taking it apart, fixing, refactoring, releasing or anything else.
There is also an external inspect.lua which you can probably remove, i used it during development to debug some output.
The graphics however are taken from open sources so you have to check that yourself; for all you can find their origin links. Mostly i used them as placeholders due to a lack of art skills.
The mod should actually be fully playable although i never finished a full playthrough with it; i am not aware of game play related bugs. But there could be some.
I never tested the mod in multiplayer. Also the code is probably a mess, be warned lol.
Also i did not test it with other mods.
It depends on SantasNixieTubeDisplay in version 0.1.7, otherwise it won't load! Last time i tested it, it works with factorio 0.16.51.

This mod implements skyscrapers in factorio, which are big multi-floor buildings. It is similar to factorissimo in that you can belt and pipe items into them and out of them.
But it is not that much optimized for performance yet; i don't know whether megabases are feasible with or or when it becomes the bottleneck though.
However it focuses more on realism mainly addressing the 'it's larger on the inside' feeling. The building floor is pretty much as big inside as it is in the main world.
However there are stairs and elevators that can be used to get to higher floors. You can connect floors via long underground belts or long underground pipes.
Overall inside there is not that much space, so puzzling your way to a good layout is more important than on the open outside world.

The graphics use a trick: rather than having one huge image per skyscraper, which would be way to v-ram consuming, instead each floor is a tileable graphic and they are just stacked on top of each other.
So each skyscraper from the outside consists of 3 small graphics: a ground floor image, one repeated floor image, and one roof image.
(This doesn't really fit the rendering perspective of factorio but from performance point of view it seemed fine).
This allowed for creating quite large skyscrapers, the biggest one has 70 floors as of now. I never checked what the engine limit would be.

There is a configuration file that lists all skyscrapers and which can be extended. Each skyscraper has a different configuration:
the size in x,y; the number of floors, what can be built inside, if there is an elevator inside, if there is a beacon array inside, and if more than one building of that type can be placed.
All skyscraper costs are automatically calculated based on what the configuration specified as being inside.
so currently there are 3 regular tiers:
5 floors, no elevator, no beacon, restricted to different crating categories
25 floors, has elevator, no beacon, restricted to different crating categories
50 floors, has elevator, has beacon array, restricted to different crating categories
70 floors, has evelator, has beacon array, no restrictions. unique (only one can be placed). (it matches the specifications of the shinra headquarters.)

The elevator comes with a door on each floor. When you step onto the door and walk up, you enter the elevator if it is currently on that floor. Then you can select a floor to go to.
If the elevator is not currently on that floor and you step on the door, it is called to that position, so just wait till it arrives.
Currently it is just an invisible car where the player is made a passenger of. In 0.17 you should be able to change it to just a camera movement.
The nixie tubes are used to display the elevators current position.

The skyscraper beacon array is an alternative approach to beacons. You can call it broken if you want compared to vanilla, i just think it is a different perspective.
Rather than placing hundreds of beacons around your machines, there is one beacon controller on the ground floor. all modules placed inside of it affect all machines on all floors.
it does so using invisible beacons and scripting.

There is also a concept of pre-build skyscrapers: The way this works is that you can pre-craft the internal layout of skyscrapers.
Then when such a pre-build skyscraper is placed, it already comes with the internal entities placed.
There are some sample builds i used in testing (two skyscrapers for making gears with different efficiency, and two different smelting layouts).
There is a command 'create_skyscraper_template' with which you can create a template of the skyscraper you are currently in. It is located in the script output folder.
It would need to be manually adjusted, but could then be added to those to load automatically.
I am not sure how reliable this whole thing is though, i imagine that migrations would be painfull. Maybe deleting this feature would be better.

When you mine/destroy a skyscraper, it falls apart. But you can pick up the old ingredients. No guarantee if it works for everything though.

KNOWN BUGS:
sometimes the nixie tubes don't show the correct output. Their circuit network input is correct though.
You can jump out of the elevator while it travels, by pressing the enter/leave vehicle key.

If you made it till here: Have some screenshots from the outside, inside and crafting costs.
Thats probably all i can say for now, but if you have questions i can answer them.
ingame.png
ingame.png (3.29 MiB) Viewed 639 times
inside.png
inside.png (1.03 MiB) Viewed 639 times
crafting_1.png
crafting_1.png (449.92 KiB) Viewed 639 times
crafting_2.png
crafting_2.png (430.38 KiB) Viewed 639 times
crafting_3.png
crafting_3.png (228.45 KiB) Viewed 639 times
crafting_4.png
crafting_4.png (147.12 KiB) Viewed 639 times
Skyscrapers_0.1.1.zip
(1.82 MiB) Downloaded 29 times

Post Reply

Return to “Mods”