Page 1 of 23

[0.12.x] RSO Discussion thread

Posted: Fri Jul 17, 2015 4:55 pm
by orzelek
Download moved to announcement thread along with change log and mod header.

Re: [0.12.x] RSO Alpha

Posted: Fri Jul 17, 2015 5:56 pm
by ReijMan
Wow so quick!
I'm gonna start my new headless server and have a hell of a weekend!
Thanks

Re: [0.12.x] RSO Alpha

Posted: Fri Jul 17, 2015 6:24 pm
by WoodyDaOcas
Hi, thank you very much, but :(
control.lua:1204:LuaGameScript doesn't contain key on_init.
This happens in map generator, when starting a "new game"
Can you please advice on this one ? Thanks

Re: [0.12.x] RSO Alpha

Posted: Fri Jul 17, 2015 7:02 pm
by provet
--

Re: [0.12.x] RSO Alpha

Posted: Fri Jul 17, 2015 7:53 pm
by orzelek
WoodyDaOcas wrote:Hi, thank you very much, but :(
control.lua:1204:LuaGameScript doesn't contain key on_init.
This happens in map generator, when starting a "new game"
Can you please advice on this one ? Thanks
This version is for 0.12 - error would point to having 0.11 still.

Re: [0.12.x] RSO Alpha

Posted: Fri Jul 17, 2015 7:54 pm
by orzelek
provet wrote:Crashes in Multiplayer :(
I'd need a crash message - might be easy to fix. If not then someone with lua skills will need to test it on multiplayer.

Re: [0.12.x] RSO Alpha

Posted: Fri Jul 17, 2015 8:25 pm
by WoodyDaOcas
actually you are right, I am sorry for false alarm. It's that I did not update, I downloaded the new installer and installed into the same folder right after the release, b/c the update was not found I guess :) And I run the game by using the old shortcut, didn't bother to check the version, why would it not be overwritten, right ? :D Well, it wasn't :)
Thanks

Re: [0.12.x] RSO Alpha

Posted: Fri Jul 17, 2015 9:00 pm
by provet
Great mod :)

Re: [0.12.x] RSO Alpha

Posted: Sat Jul 18, 2015 2:50 am
by theamazingrando
The "chart a huge area" cheat (https://forums.factorio.com/forum/vie ... 184#p44184) doesn't seem to be working any more in 0.12. Anyone know how to do that now? The changelog mentions "Added LuaChart::chart_all (charts all the generated parts of the map)", but I'm not sure how to invoke it from the console.

Re: [0.12.x] RSO Alpha

Posted: Sat Jul 18, 2015 3:29 am
by theamazingrando
Ok so `game.forces.player.chart_all()` reveals a medium-sized portion of the map. `game.forces.player.chart({left_top = {x = -1024, y = -1024}, right_bottom = {x = 1024, y = 1024}})` returns with "bad argument #0 to 'chart' (Wrong number of arguments)". It looks like `chart()` now expects a surface:

Code: Select all

game.forces.player.chart(game.player.surface, {left_top = {x = -1024, y = -1024}, right_bottom = {x = 1024, y = 1024}})

Re: [0.12.x] RSO Alpha

Posted: Sat Jul 18, 2015 10:09 am
by Lime
Hi

After our recent discussion on balance I've messed with the RSO code in the 0.11, and ended up changing all the "generate ore" calls into "generate liquid" calls; also changing the ore spawn "size" config to be 1-2. And you know what? That turned out to be a very interesting challenge! You have infinite but depleting (like oil!) resource spawns, with max 4 miners on each; and 1 single resource patch for each type of resource in starting area.

That way you have unlimited but very slow resource flow from the start, but if you want to increase speed and flow, you have to expand. Though you're not forced to, you'll still have 1 unit of ore every 3 seconds in the end :)

What do you think of that? Would it make sense to add such a mode or config to RSO?

Re: [0.12.x] RSO Alpha

Posted: Sat Jul 18, 2015 10:11 am
by orzelek
Lime wrote:Hi

After our recent discussion on balance I've messed with the RSO code in the 0.11, and ended up changing all the "generate ore" calls into "generate liquid" calls; also changing the ore spawn "size" config to be 1-2. And you know what? That turned out to be a very interesting challenge! You have infinite but depleting (like oil!) resource spawns, with max 4 miners on each; and 1 single resource patch for each type of resource in starting area.

That way you have unlimited but very slow resource flow from the start, but if you want to increase speed and flow, you have to expand. Though you're not forced to, you'll still have 1 unit of ore every 3 seconds in the end :)

What do you think of that? Would it make sense to add such a mode or config to RSO?
I'd recommend two things:
- infinite resources mod
- modification of size multiplier in config
Should work like what your changes did :)

Re: [0.12.x] RSO Alpha

Posted: Sat Jul 18, 2015 3:25 pm
by ReijMan
Heya,
I run a headless server with mod installed.
I do not like the ore distribution on the map, there are to many small patches and I want to have fun with trains.
How do I go about?
From 'client' I try to call:

Code: Select all

remote.call("RSO", "regenerate")
but I get:
Cannot execute command. error: [string "remote.call("RSO","regenerate, true)"] Error when running interface function RSO.regenerate __rso-mod__/control.lua 147: attempt to index local 'surface' (a nil value)

Can you help us save the day and have a train-some evening :-D

Re: [0.12.x] RSO Alpha

Posted: Sat Jul 18, 2015 5:41 pm
by yeganer
Hey, after line 1022 add the following:

Code: Select all

		surface = surface or game.surfaces['nauvis']
that should fix it

Re: [0.12.x] RSO Alpha

Posted: Sat Jul 18, 2015 6:12 pm
by orzelek
Updating the first post with version that has this one fixed.

I'd also recommend calling it like this:

Code: Select all

remote.call("RSO", "regenerate", true)
It will force generation of new seed. No idea how it will behave in multiplayer with more then one client connected - desync is most likely.

Re: [0.12.x] RSO Alpha

Posted: Sat Jul 18, 2015 7:42 pm
by ReijMan
hhmz, game crashes when I call that function, no error to be found just freezes..
Tried in both single and multiplayer.
Should I wait long for the game to reload the map, got a high spec pc and server.

Re: [0.12.x] RSO Alpha

Posted: Sat Jul 18, 2015 8:50 pm
by orzelek
ReijMan wrote:hhmz, game crashes when I call that function, no error to be found just freezes..
Tried in both single and multiplayer.
Should I wait long for the game to reload the map, got a high spec pc and server.
Game crashes or just.. thinks?

For me it takes quite long with small explored map. If map is very large it might take long time to regenerate. Or it fails in multiplayer - haven't tried it there.

Re: [0.12.x] RSO Alpha

Posted: Sun Jul 19, 2015 12:56 am
by ReijMan
I do not wait, I automate. ;-) Game froze and after 10 or so seconds I killed it. Will give it longer tomorrow.

Re: [0.12.x] RSO Alpha

Posted: Sun Jul 19, 2015 10:55 am
by yeganer
To prevent that, one could register an ontick function that generates one chunk per tick. that way it wouldn't freeze.

Re: [0.12.x] RSO Alpha

Posted: Sun Jul 19, 2015 2:11 pm
by orzelek
It could look interesting - stuff disappearing at first then appearing again in similar or new configuration.

Adding new version that handles map generation settings.