Coder Social home page Coder Social logo

bilka2 / abandonedruins Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 7.0 397 KB

"The Ruins Mod" is a mod for the game Factorio that adds factory ruins to the map.

Home Page: https://mods.factorio.com/mod/AbandonedRuins

License: MIT License

Lua 99.87% Shell 0.13%
mod factorio-mod factorio

abandonedruins's Introduction

The Ruins Mod

You weren't the first to come here... you won't be the last...

Ruins adds randomly spawns ruins in the world. These ruins are destroyed fragments of bases, forts, small oases, and more. There are three categories of ruins, small, medium, and large, with respective decreasing spawn chance per generated chunk.

Explore them for loot, adventure, or entertainment, but beware, some still have running defenses from the last player that landed on the planet, with more successful colonies having better defenses. The biters have deactivated these defenses towards themselves, but the turrets won't recognize you...

You have to claim ruins before you can deconstruct them. The "Claim ruin" tool can be obtained with Shift + C or from the shortcut bar. After claiming a ruin, you can deconstruct it as expected. Additionally, you can hold Shift while using the "Claim ruin" tool to remove all remnants (corpses of structures) in the area.

The ruin defenses can be set to be non-hostile in the mod settings. The spawn rates of ruins are also configurable. Other mods can add their own set of ruins.

Want to add your ruins to this mod?
Check out the ruin maker mod, the contributing guidelines and the documentation of the ruin data format.

Want to make your own ruin set?
Check out the links above, the ruin set documentation and The Ruins Mod - Krastorio2 as an example mod.

The remote interfaces that this mod provides are described with comments at the end of control.lua.

abandonedruins's People

Contributors

astorin avatar bilka2 avatar sinsinewave avatar sublimelime avatar tsukkomist avatar zomis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

abandonedruins's Issues

1.1.5 pumpjack fix = Bug

After the fix to not make the pumpjack ruin spawn with oil nodes stopes nodes to spawn in general as i don't have any new nodes spawn.

So the fix for u is to re enable the spawning of oil nodes but remove any/all pumpjack ruins.

image
I explored all this to test if what i mentioned here was true and so far i can confirm that.

Calls surface.set_tiles with an empty array of tiles

The mod The Ruins Mod (1.1.6) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event AbandonedRuins::on_tick (ID 0)
The mod NiceFill (0.1.20) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event nicefill-scriptfix::script_raised_set_tiles (ID 83)
__nicefill-scriptfix__/control.lua:370: attempt to index field '?' (a nil value)
stack traceback:
	__nicefill-scriptfix__/control.lua:370: in function <__nicefill-scriptfix__/control.lua:366>
stack traceback:
	[C]: in function 'set_tiles'
	__AbandonedRuins__/spawning.lua:117: in function 'spawn_tiles'
	__AbandonedRuins__/spawning.lua:173: in function 'spawn_ruin'
	__AbandonedRuins__/spawning.lua:184: in function 'spawn_random_ruin'
	__AbandonedRuins__/control.lua:58: in function <__AbandonedRuins__/control.lua:53>

https://mods.factorio.com/mod/nicefill-scriptfix

Old ideas for more big ruins

From the old mod discussion

Basically anything that most players build.And with a defect,of course.
1.Mining sites(normal ore,oil rig or uranium ore)
2.Assembly lines(can be bot powered or even 8-8 beaconed)
3.Smelter lines(can be stone,steel or electric)
4.Power plants(coal or nuclear)
5.Solar fields(probably with some robots and roboports)

Additionally,
1.There can be laser defenses,or even flamethrowers.
2.Ruins with train stations will be great.
3.Some ruins can be still functional when you find them.
4.Some ruins can be powered by solar.
5.Some ruins can be friendly,instead of belong to the enemies.

Conflict with Ghost On Water mod

Overview

Ruins are selecting the wrong prototype entities when the Ghost On Water mod is active

Enviroment

  • Factorio [1.1.70]
  • AbandonedRuins [1.1.6]
  • GhostOnWater [0.10.0]
  • Krastorio2 [1.3.6]
  • space-exploration [0.6.90]
  • FortressRuins [1.0.1]
  • AbandonedRuins-Krastorio2 [0.1.2]
  • Silly-AbandonedRuins [0.1.1]

Screenshot 2022-11-14 131857
Screenshot_2022-11-14_131426

Pumpjack ruins: Don't spawn oil with them or spawn them only at normally generated oil

First, I really like the additional atmosphere this mod adds. It can also be great to explore a little around outside your starting area to grab a few slightly advanced things to help you along. cough :) That said, I have a slight issue with the ruins that spawn as the pumpjack connected to 2 tanks, a pump, and some pipes.

It appears as though the spawning logic for this ruin type has it so that they will also get an oil patch spawned with them. This causes an excess in oil patches on the map that are difficult to predict and counter-act with the oil generator slider.

I think it might be best if these ruins didn't spawn oil patches with them (similar to how miners will spawn without ores), or instead use different logic on these ruins so that they only have a chance to spawn where ever the game normally generates oil patches (though mods that take over resource generation from the game, like RSO, should be taken into consideration).

I think the second of those two options would be best, but of course if the logic behind that becomes too complex, then obviously the first one would be preferable to leaving it as it is now.

Thank you!

Rails in large ruins are one tile off (because 2x2 grid)

These ruins aren't shifted when spawning, so rails in the right position in the "template" always spawn in the right position in-game. So, fix the rail position in the ruin "template". Alternatively, just convert all the rails to remnants. This may work well for smaller ruins that have entities next rails.

Decon planner on ruins doesn't visibly select but still works

This is because the player never actually selects the entities and I am using a workaround (on_player_deconstructed_area) to be able to select neutral entities.

Possible solution would be to move the entities to the player force so the workaround is not needed. This may provoke enemies to attack the entities. Looking for better solutions.

Ruins as only source of things

Add some new material and/or processes to the tech tree without a way to construct the buildings needed for them. This would simulate a "lost technology" or "alien materials" etc. The only way to use it would be to build a base around those special ruins.

The intent would be to make exploration necessary for advancement and adding those ruins to the logistics of the existing base.

Ability to "Name" Ruins

So basically what I would like to see is the ability to "Name" a ruin and when that ruin spawns automatically place a map marker with that ruin's name on the map. (Thinking something similar to how [Resource Map Label Marker](https://mods.factorio.com/mod/resourceMarker does it) Might be a niche use case but it would be really usefull for a project I'm going to be working on. Thanks for your hard work and consideration!

Power Poles Causing Lag

While this isn't necessarily the fault of this mod, many disconnected power poles can cause a significant impact on game UPS. If it is possible to either blacklist them from being placed by this mod, or have them placed as dummy entities, that could really help,

For a bit of an example, on my current save, after running a command to delete only the poles the Electric network update went from ~8 to ~1.4.

The command I ran:

/c local surface=game.player.surface
for key, entity in pairs(surface.find_entities_filtered({force="neutral", type="electric-pole"})) do
	entity.destroy()
end

Bug

I have the bug that I cant claim ruins to dismantle them.

Error with RealisticReactors

I'm pretty sure this is RealisticReactors' fault and already reported it on their mod page, but they don't seem very responsive, so I thought I'd report it to you also just in case you knew of the solution, because choosing between these is hard for me. Sorry if I'm wasting your time. Thank you for all your efforts.

The mod The Ruins Mod (1.1.6) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event AbandonedRuins::on_tick (ID 0)
The mod Realistic Reactors (3.1.4) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event RealisticReactors::script_raised_built (ID 79)
RealisticReactors/scripts/heat/buffer.lua:64: attempt to perform arithmetic on field 'y' (a nil value)
stack traceback:
RealisticReactors/scripts/heat/buffer.lua:64: in function 'vecadd'
RealisticReactors/scripts/heat/buffer.lua:69: in function 'for iterator'
RealisticReactors/scripts/heat/network.lua:488: in function 'add_entity_to_network_cell'
RealisticReactors/scripts/heat/network.lua:618: in function 'add_heat_pipe'
RealisticReactors/scripts/events/construct.lua:35: in function 'on_heatpipe_added'
RealisticReactors/scripts/events/construct.lua:104: in function 'entity'
RealisticReactors/control.lua:51: in function <RealisticReactors/control.lua:50>
stack traceback:
[C]: in function 'create_entity'
AbandonedRuins/spawning.lua:45: in function 'spawn_entity'
AbandonedRuins/spawning.lua:94: in function 'spawn_entities'
AbandonedRuins/spawning.lua:172: in function 'spawn_ruin'
AbandonedRuins/spawning.lua:184: in function 'spawn_random_ruin'
AbandonedRuins/control.lua:58: in function <AbandonedRuins/control.lua:53>

Claim and deconstruct at once (setting?)

Hey I'm currently playing with a mod sett icluding your mod. Tho i don't rally keep/use the ruins as a setup. So my question is could ther be a setting to make the button have a deconstruction planner included. Disabled by default or what u self prefere.

Hopefuly explaind better here: Insted for using both claim and decon. Go in setting enable my suggestion ^. Then all u need to use are claim & deconstruct in one button.

image

img=info in mod setting names shows up twice

As of 1.1.61, the game automatically adds the icon if the setting has a description. So now it is duplicated. Solution: Remove it from the locales. Remember to do it for all languages.

Errors reported by other mods

Disco science reports a lab from this mod is not registered properly
Water as a resource reports pumps from this mod don't have a last player set

weird you don't allow discussions on the mod page, makes no wonder you get few bugs reports ...

Crashes on Load-in with Factory Inspector

If I have the Factory Inspector mod enabled, I consistently crash on load-in with the error below.

Thank you for your time!!


The mod The Ruins Mod (1.1.6) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event AbandonedRuins::on_tick (ID 0)
The mod Factory Inspector (1.1.9) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event factory-inspector::script_raised_built (ID 79)
factory-inspector/script/event-handlers.lua:7: attempt to index field 'created_entity' (a nil value)
stack traceback:
factory-inspector/script/event-handlers.lua:7: in function <factory-inspector/script/event-handlers.lua:6>
stack traceback:
[C]: in function 'create_entity'
AbandonedRuins/spawning.lua:45: in function 'spawn_entity'
AbandonedRuins/spawning.lua:94: in function 'spawn_entities'
AbandonedRuins/spawning.lua:172: in function 'spawn_ruin'
AbandonedRuins/spawning.lua:184: in function 'spawn_random_ruin'
AbandonedRuins/control.lua:58: in function <AbandonedRuins/control.lua:53>


image


Edit: Forgot to include full mod list for troubleshooting in case it isn't the Factory Inspector's fault:
https://i.imgur.com/m8nRZFp.png

Decon planner from library on ruins does not respect filters

on_player_deconstructed_area provides only an item name, not a LuaItemStack where the filters could be read. So, I am reading them from the cursor stack if that is the item the player used, but that does not work for deconstruction records (deconstruction planners from the library).

Possible solution would be to move the entities to the player force so the workaround is not needed. This may provoke enemies to attack the entities. Looking for better solutions.

Epic ruin

  • bigger than a chunk, 1 per game (surface?)
  • rocket silo?
  • crashed ship?
  • nuke site?

ruins + IR3 = overlapping mining machines

I'm playing IR3 + ruins. In 4h playtime I have found three cases where mining machines (5x5) overlap each other or the crate that they are unloading into. Not a show stopper, just ... odd.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.