[MOD 0.13.15+] Surfaces 0.0.7

Topics and discussion about specific mods
flabort
Inserter
Inserter
Posts: 25
Joined: Wed May 11, 2016 2:57 am
Contact:

Re: [MOD 0.12.33+] Surfaces 0.0.2

Post by flabort »

Your most recent "release" on Github has a bug. This is 0.0.2, which I downloaded to try to get a handle for your code to get started on the above.
When I try to place a downwards powerpole (will test with an upwards pole in a moment) I get the following error:

Code: Select all

error when running the event handler:
__Surfaces__/script/lib/surfaces.lua:315:
bad argument  #-1 to "connect_neighbor"
(table expected, got nil)
All prior edits
Edit 7: It works. Just change the above segment in Events.lua to this:

Code: Select all

		elseif v.task==task_createpair then
			local paired_entity = create_paired_entity(v.data.entity, v.data.paired_surface)
			v.data.paired_entity = paired_entity
			if paired_entity==nil or paired_entity==false then
				table.insert(global.task_queue, v)
			else
				table.insert(global.task_queue, {task=task_finishpair,data=v.data})
			end
		elseif v.task==task_finishpair then
			finalize_paired_entity(v.data.entity, v.data.paired_entity)
		end
This will fix the error I've been getting.

Simcra
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Wed Apr 06, 2016 6:05 am
Contact:

Re: [MOD 0.12.33+] Surfaces 0.0.2

Post by Simcra »

flabort wrote:Your most recent "release" on Github has a bug. This is 0.0.2, which I downloaded to try to get a handle for your code to get started on the above.
...
Just finished restructuring and fixing minor bugs, have reuploaded 0.0.2 release. Tell me if the error still occurs.

flabort
Inserter
Inserter
Posts: 25
Joined: Wed May 11, 2016 2:57 am
Contact:

Re: [MOD 0.12.33+] Surfaces 0.0.2

Post by flabort »

No, error does not happen in new version, though I don't see what you did to fix it :P

Simcra
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Wed Apr 06, 2016 6:05 am
Contact:

Re: [MOD 0.12.33+] Surfaces 0.0.2

Post by Simcra »

flabort wrote:No, error does not happen in new version, though I don't see what you did to fix it :P
Well I accidentaly cut a line of code out in one of the changes, so I put it back. I make silly mistakes like this all the time, it's really frustrating.

EDIT: note that I've restructured most of the code so that each function and variable is referenced in a way that specifies where it comes from. For example, config variables are now referenced as "config.variable", surfaces functions are now referenced as "surfaces.function", and so on.

Simcra
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Wed Apr 06, 2016 6:05 am
Contact:

Re: [MOD 0.12.33+] Surfaces 0.0.2

Post by Simcra »

Also, if you have ideas that relate to the remote interfaces please let me know. I'm very interested in providing inter-mod communication, I just have no idea where to start or what would be useful, obviously I don't want to provide access to the raw pair-data and all remote interface calls should check validity of input data and structure. As for now, I will be working on the intersurface train stop for awhile so there is no need to fear any more sudden structure changes in the github repository. I hope this helps.

User avatar
StanFear
Fast Inserter
Fast Inserter
Posts: 236
Joined: Sun Dec 15, 2013 2:49 pm
Contact:

Re: [MOD 0.12.33+] Surfaces 0.0.2

Post by StanFear »

Simcra wrote:As for now, I will be working on the intersurface train stop for awhile so there is no need to fear any more sudden structure changes in the github repository. I hope this helps.
well, good luck with that ! if you have an idea on how to set it up, let me know, we could work on it together ! (And I would also implement it in Subsurfaces (if the idea match my criteria))

Simcra
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Wed Apr 06, 2016 6:05 am
Contact:

Re: [MOD 0.12.33+] Surfaces 0.0.2

Post by Simcra »

StanFear wrote:well, good luck with that ! if you have an idea on how to set it up, let me know, we could work on it together ! (And I would also implement it in Subsurfaces (if the idea match my criteria))
I'm more than happy to work with you! I have sent some info through on skype and will keep you in the loop as much as possible.

flabort
Inserter
Inserter
Posts: 25
Joined: Wed May 11, 2016 2:57 am
Contact:

Re: [MOD 0.12.33+] Surfaces 0.0.2

Post by flabort »

I am enjoying this mod very much. As for cliffs, I am making a separate mod using the API and code-hooks you've set up so far, it's far from complete or ready for testing, but I don't think there's much additional coding needed on your end to allow outside mods to use your code to make stuff that links up between levels.

That's assuming I understand what your pairdata_insert_array(<table>) command does properly, anyways.

(If I'm right, then if you enter data into this properly it links the things you entered up together, right?)

So the mod is dependent on Surfaces >= 0.0.2, which means I have access to all your scripts :P. I don't even need to use require(script-from-Surfaces), which means my control.lua can look like this:
mountains control.lua
Except I also want to make a script in there that spawns a cliff-minable entity each time a cliff-shadow is made, putting it in the same spot.
Mountains Entities
Like I said, though, this code is incomplete, and completely untested. There are likely some missing commas in there, and I haven't scripted the auto-place script yet - this will be relatively easy now that I have experience with this.
Also, haven't made any graphics. The few I have I stole from you :P


A useful bit of code in your mod that I could use some cross-mod scripting for would be a blacklist for entities that your sky-world removal script removes when a new chunk spawns. If I could make it ignore the items in my mod and leave them intact... Better yet, a just make the blacklist for tiles, and it ignores/doesn't remove anything that spawns on a blacklisted tile, and doesn't remove the tile either.
Also, it would be bad if cliff-shadows were to spawn underground. I think if I understood your scripts right what I already have will remove any cliff-shadows from underground, correct?

Edit: I have corrected some things, provided placeholder pictures, and built the autoplace controls. It compiles, time to test if it crashes when trying to spawn the cliff-shadows. If it doesn't crash, I'm going to try scripting the thing where it places cliff-minable.

Edit 2 : http://pastie.org/10870099 <-entities
http://pastie.org/10870100 <- tiles
http://pastie.org/10870101 <- control.lua doesn't place cliff-minable on cliff-shadow yet
data.lua is just requiring entities and tiles.
info.json requires Surfaces as part of it.
Current problem: When spawning a new world, I get the error "Invalid MapGenRichness" with no further information, and the game crashes.

Simcra
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Wed Apr 06, 2016 6:05 am
Contact:

Re: [MOD 0.12.33+] Surfaces 0.0.2

Post by Simcra »

flabort wrote:I don't think there's much additional coding needed on your end to allow outside mods to use your code to make stuff that links up between levels.
Yes, I've working on this among the other general structure with the surfaces mod, the current github version differs from my local version but I will push changes once I am happy with them and know that they work.
flabort wrote:That's assuming I understand what your pairdata_insert_array(<table>) command does properly, anyways.
Yes, the way you had written it was correct for the version currently on github. I have changed this to be a little more intuitive in my local version and will continue to show my face on IRC once in awhile to answer any questions you or anyone else may have.
flabort wrote:Except I also want to make a script in there that spawns a cliff-minable entity each time a cliff-shadow is made, putting it in the same spot.
Currently, this is not possible. I have not yet figured out a way to make this work, but it is planned. Although thinking about it now, I assume it would possible to do something similar to the way you register event handlers.
Example event handler
flabort wrote:Also, haven't made any graphics. The few I have I stole from you :P
Mentioning the graphics, they are truly terrible. Honestly, I wish I could find someone willing to make better ones.

flabort wrote:A useful bit of code in your mod that I could use some cross-mod scripting for would be a blacklist for entities that your sky-world removal script removes when a new chunk spawns.
Yes, though I may make it a little different as the sky-floor is on every collision mask (I think) meaning that they get removed even if they are not removed by the chunk generation function. A better way to do it would be like this: each cliff entity has a cliff tile and when you destroy the cliff-minable, it places another sky-floor where the cliff tile used to be. You would need to look at the prototype for sky-floor and make sure that your cliff tile had a lower layer so that it could be replaced. I can easily add the blacklist and will probably do by or before the 0.0.3 release.
flabort wrote:Current problem: When spawning a new world, I get the error "Invalid MapGenRichness" with no further information, and the game crashes.
I think it is this:
autoplace-control

Also, I am glad to hear you are enjoying my mod, I have worked hard to get it to where it is now.

Simcra
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Wed Apr 06, 2016 6:05 am
Contact:

Re: [MOD 0.12.33+] Surfaces 0.0.2

Post by Simcra »

Just uploaded my local changes to the github repo. I've put a few things in there that might be helpful, also modified a few things which will probably break your mod, sorry :(

Atria
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Sat Jul 09, 2016 10:25 am
Contact:

Re: [MOD 0.13.0+] Surfaces 0.0.5

Post by Atria »

This mod doesn't seem to work on my existing save. Do I need to generate new map to be able to travel to different surfaces? Or execute some command that creates different surfaces?

Also describing process of teleporting between surfaces would be nice. From scripts it whould seems the player only needs to be close to an entrance and he will be teleported automaticly. Am I correct?

User avatar
Hixie
Burner Inserter
Burner Inserter
Posts: 10
Joined: Mon Dec 29, 2014 7:26 am
Contact:

Re: [MOD 0.13.0+] Surfaces 0.0.5

Post by Hixie »

It doesn't seem to work. We just started a fresh game with this mod enabled and nothing happens when we go near the ladders.

Simcra
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Wed Apr 06, 2016 6:05 am
Contact:

Re: [MOD 0.13.0+] Surfaces 0.0.5

Post by Simcra »

Hixie wrote:It doesn't seem to work. We just started a fresh game with this mod enabled and nothing happens when we go near the ladders.
The platform access shafts are a bit buggy at the moment, try mining the ladder and replacing it where it was, then go near the ladder again.

Simcra
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Wed Apr 06, 2016 6:05 am
Contact:

Re: [MOD 0.13.0+] Surfaces 0.0.5

Post by Simcra »

Atria wrote:This mod doesn't seem to work on my existing save. Do I need to generate new map to be able to travel to different surfaces? Or execute some command that creates different surfaces?

Also describing process of teleporting between surfaces would be nice. From scripts it whould seems the player only needs to be close to an entrance and he will be teleported automaticly. Am I correct?
Yes, the sky access shafts are a bit buggy at the moment, you may need to remove it and re-place it. Mod does not have migration files at the moment so if you were using a previous version of the mod you will need to create a new save game.

funnysunnybunny
Inserter
Inserter
Posts: 46
Joined: Mon Jul 11, 2016 4:26 pm
Contact:

Re: [MOD 0.13.0+] Surfaces 0.0.5

Post by funnysunnybunny »

Would it be possible to impose the sky layer on the ground layer so you could still see everything below you?

Simcra
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Wed Apr 06, 2016 6:05 am
Contact:

Re: [MOD 0.13.0+] Surfaces 0.0.5

Post by Simcra »

funnysunnybunny wrote:Would it be possible to impose the sky layer on the ground layer so you could still see everything below you?
I have no idea how to do this, but I would like to do this.

funnysunnybunny
Inserter
Inserter
Posts: 46
Joined: Mon Jul 11, 2016 4:26 pm
Contact:

Re: [MOD 0.13.0+] Surfaces 0.0.5

Post by funnysunnybunny »

Simcra wrote:
funnysunnybunny wrote:Would it be possible to impose the sky layer on the ground layer so you could still see everything below you?
I have no idea how to do this, but I would like to do this.
hopefully some modder or dev appears that magically knows a possible solution, I also have no idea how to draw that surface below
I hope Klonan stumbles over this thread and has a magical solution

for some reason Squeak Through starts throwing errors if I use both together

Simcra
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Wed Apr 06, 2016 6:05 am
Contact:

Re: [MOD 0.13.0+] Surfaces 0.0.6

Post by Simcra »

funnysunnybunny wrote:for some reason Squeak Through starts throwing errors if I use both together
Thanks for the heads up, I will look into it.

User avatar
nucleargen
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Sat May 07, 2016 4:51 pm
Contact:

Re: [MOD 0.13.0+] Surfaces 0.0.6

Post by nucleargen »

Placing intersurface pole after 0.13.11 update causes next error:

Code: Select all

Error while running the event handler: __Surfaces__/script/lib/api.lua:322: An area of zero size is not supported. Either don't define area to search the entire surface or use 'position'.
And since 0.13.10 placing intersurface liquid tank on nauvis causes full deletion of stone walls underground (hopefully only on generated chunks)


-----
Solved:
update entity_pair_data object in control.lua - added non 0 clearance radius to all entities declaration.
The brightest future in the center of a nuclear explosion...2003©nucleargen

User avatar
nucleargen
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Sat May 07, 2016 4:51 pm
Contact:

Re: [MOD 0.13.0+] Surfaces 0.0.6

Post by nucleargen »

created pull request to repo: factorio 0.13.10+ patch fix and minor warehousing addon improvement dealing with items transporting speed depending on chest entity tilesize
https://github.com/nucleargen/Surfaces - my fork
The brightest future in the center of a nuclear explosion...2003©nucleargen

Post Reply

Return to “Mods”