Added some functionality to Platforms
Added some functionality to Platforms
So, I made a version of RSO which allows for partial or complete use of Straight World mod but only for platforms. You can adjust how blocky/organic the shapes are by adjusting a ratio which I added to the config. I prefer just a little bit of imperfection with an overall blocky shape. This makes them more useful and feel more like they're from some alien civilization long-past.
Anywho, made this for myself mostly, but figured others out there might like it too. Do what you will with it; if orzelek uses it I'd be honored and maybe he could stick my username in a corner of a file somewhere....or not It's not like I did a lot; just re-wrote the straight world code to only work for platforms if a config is changed in RSO.
Anywho, made this for myself mostly, but figured others out there might like it too. Do what you will with it; if orzelek uses it I'd be honored and maybe he could stick my username in a corner of a file somewhere....or not It's not like I did a lot; just re-wrote the straight world code to only work for platforms if a config is changed in RSO.
- Attachments
-
- rso-mod_2.2.9.zip
- Modded RSO file
- (39.24 KiB) Downloaded 142 times
-
- example
- Capture.PNG (2.09 MiB) Viewed 4953 times
Re: Added some functionality to Platforms
Looks promising
Since it integrates nicely I don't see any problems adding it to RSO permanently. On thing that might need tweaking is to disable the processing when platforms mod is not present to make sure it's not searching around when it doesn't need to.
I haven't played around with platforms mainly because the are kind of incompatibile with bobs+angels set.
Since it integrates nicely I don't see any problems adding it to RSO permanently. On thing that might need tweaking is to disable the processing when platforms mod is not present to make sure it's not searching around when it doesn't need to.
I haven't played around with platforms mainly because the are kind of incompatibile with bobs+angels set.
Re: Added some functionality to Platforms
I'm actually playing with Angels+bob's right now, though I did turn up the starting zone platforms a little, turned on a medium-cost recipe to make more platforms, added AAI, and a neutered version of Factorissimo(sp?) where I set them as always night, reduced their interrior size to 2/3 scale, and disabled the option for building-in-a-building. Oh, and I've added Rampant AI + Natural Evolution (because I'm a masochist who thinks the enemies should be deadly on top of all that crazyness...)
I'm almost to the point of automating platform manufacture in my first run through, so that'll help. I've been meaning to add No Handcrafting and Only Robots to make it into a proper sci-fi factory survival sim, but I'm getting my sea legs with Platforms before I do that I might end up disabling some of Angel's Petrochem buildings for placement inside Factorissimo buildings; mostly tanks and refineries. We'll see.
Anywho, glad you like the look of it Not bad for a few hours and having completely forgotten how to Lua (been wielding C# at my work, so takes a little getting used to a squishy language again). I would have implemented a check for if Platforms exist, but that's reliant on stuff I don't know, like what order mods are loaded in, when what is called, etc., so I decided to let the one more familiar with Factorio's mod API do that
I'm almost to the point of automating platform manufacture in my first run through, so that'll help. I've been meaning to add No Handcrafting and Only Robots to make it into a proper sci-fi factory survival sim, but I'm getting my sea legs with Platforms before I do that I might end up disabling some of Angel's Petrochem buildings for placement inside Factorissimo buildings; mostly tanks and refineries. We'll see.
Anywho, glad you like the look of it Not bad for a few hours and having completely forgotten how to Lua (been wielding C# at my work, so takes a little getting used to a squishy language again). I would have implemented a check for if Platforms exist, but that's reliant on stuff I don't know, like what order mods are loaded in, when what is called, etc., so I decided to let the one more familiar with Factorio's mod API do that
Re: Added some functionality to Platforms
There is a recent addition that gives a direct array for mods that are installed so it's not a problem to check for mod.
When you add Factorissimo all balancing goes away anyway - you are basically multiplying space and that has a lot of consequences for stuff like terrain grabbing and defense.
Not sure how much you can fit of angel's in one factory tho.
Your total set of mods seems.. ambitious. I got stuck on trying to do bob's+angel's with science cost tweaker to make science more costly.
When you add Factorissimo all balancing goes away anyway - you are basically multiplying space and that has a lot of consequences for stuff like terrain grabbing and defense.
Not sure how much you can fit of angel's in one factory tho.
Your total set of mods seems.. ambitious. I got stuck on trying to do bob's+angel's with science cost tweaker to make science more costly.
Re: Added some functionality to Platforms
Added this support to latest RSO version.
Thanks for preparing the code
Thanks for preparing the code
Re: Added some functionality to Platforms
@orzelek
I'm Building-Platform author, is there something I could add in my mod to help with the support of RSO with my mod or you have taken care of everything ?
Platform incompatible with angel+bob ? Because of space needed or because some building aren't blocked ?
I'm Building-Platform author, is there something I could add in my mod to help with the support of RSO with my mod or you have taken care of everything ?
Platform incompatible with angel+bob ? Because of space needed or because some building aren't blocked ?
Want more space restriction ? Or maybe you want to be forced to use train for other thing than ore and oil ? Try Building Platform Mod !
Re: Added some functionality to Platforms
Dreadicon did all the worka nd I integrated it already.Neemys wrote:@orzelek
I'm Building-Platform author, is there something I could add in my mod to help with the support of RSO with my mod or you have taken care of everything ?
Platform incompatible with angel+bob ? Because of space needed or because some building aren't blocked ?
And angel+bob and platforms is to hardcore. They would need to be much bigger - small output high grade smelting facility might need 3-4 chunks of space
Even then it would be a pain looking at sice of my sorting areas - and I didn't have petrochem then.
Re: Added some functionality to Platforms
Glad my code was useful!
Concerning the matter of Factorissimo, thanks to my nerfs and tweaks, it is about a 1:3 ratio of expansion, and I've disabled the power plant option (so no packing steam generators or solar panels in them). This means that where previously one had to scrunch their factory into convoluted shapes, now, one just has to have multiple factories and move goods between them. This gets balanced out thanks to Angels + Bob's, which demand a lot of process and space. Also I denied some of the Angel's buildings from being placed inside, such as Ore Sorter and the various Refineries. I play with a medium-expense platform placement option (custom one using stone, concrete, and iron sticks, to the tune of 100/30/80) so I can expand, but generally it's best to just make separate factories. Mostly the recipe is so that I can make better use of odd shaped platforms.
More than anything, imo the combo of (nerfed)Factorissimo + Platforms changes the gameplay from 'build mega busses' to 'build modular factories'. I'm still adapting, and eventually I plan to add no hand crafting, only robot building, and finally I will add one that slices your inventory to a single row (expandable via power suit to a small degree). I mean, really, what use are cars otherwise?
Concerning the matter of Factorissimo, thanks to my nerfs and tweaks, it is about a 1:3 ratio of expansion, and I've disabled the power plant option (so no packing steam generators or solar panels in them). This means that where previously one had to scrunch their factory into convoluted shapes, now, one just has to have multiple factories and move goods between them. This gets balanced out thanks to Angels + Bob's, which demand a lot of process and space. Also I denied some of the Angel's buildings from being placed inside, such as Ore Sorter and the various Refineries. I play with a medium-expense platform placement option (custom one using stone, concrete, and iron sticks, to the tune of 100/30/80) so I can expand, but generally it's best to just make separate factories. Mostly the recipe is so that I can make better use of odd shaped platforms.
More than anything, imo the combo of (nerfed)Factorissimo + Platforms changes the gameplay from 'build mega busses' to 'build modular factories'. I'm still adapting, and eventually I plan to add no hand crafting, only robot building, and finally I will add one that slices your inventory to a single row (expandable via power suit to a small degree). I mean, really, what use are cars otherwise?
Re: Added some functionality to Platforms
Hey Orzelek, encountered an error in the Platforms code I wrote when using my monstrous pile of mods; LuaTile API call when LuaTile was invalid.
Already tracked down the cause and fixed it; new straight_world_platforms.lua code below. Essentially in some cases tiles can be called before they are 'valid', or they can be null. Added a couple null checks and a (tile).valid check. Toss it in your next update if you would; not especially urgent as I think this is an edge case caused by one of my other mods. Thanks!
Already tracked down the cause and fixed it; new straight_world_platforms.lua code below. Essentially in some cases tiles can be called before they are 'valid', or they can be null. Added a couple null checks and a (tile).valid check. Toss it in your next update if you would; not especially urgent as I think this is an edge case caused by one of my other mods. Thanks!
Code: Select all
require("config")
local blocksize=6
local blockThreshold=straightWorldPlatformsThreshold
local blocksizem1=blocksize-1
local platformName = "building-platform"
function straightWorldPlatforms(surface, leftTop, rightBottom)
local lt = leftTop
local rb = rightBottom
if surface == nil then
return
end
for y0=lt.y,rb.y-1,blocksize do
for x0=lt.x,rb.x-1,blocksize do
--Check all blocks for platforms
local replaceBlocks = false
local blockCount = 0
for y1=y0,y0+blocksizem1 do
for x1=x0,x0+blocksizem1 do
local tileObj = surface.get_tile(x1,y1)
if tileObj ~= nil and tileObj.valid then
local tile=tileObj.name
if tile == platformName then
blockCount = blockCount + 1
end
if blockCount > (blocksize * blocksize) * blockThreshold then
replaceBlocks = true
break
end
end
end
if replaceBlocks == true then break end
end
--if enough platforms are found, replace the blocks
if replaceBlocks then
local tiles={}
for y=y0,y0+blocksizem1 do
for x=x0,x0+blocksizem1 do
table.insert(tiles,{name=platformName,position={x,y}})
end
end
surface.set_tiles(tiles)
end
end
end
end
Re: Added some functionality to Platforms
I add it along. I'm not sure if there will be any release before 0.15 - depends on how long devs will make us wait