How to make ore mod compatible with RSO & Angel's Mods?

Place to get help with not working mods / modding interface.

How to make ore mod compatible with RSO & Angel's Mods?

Postby MadClown01 » Fri Dec 29, 2017 5:02 am

Hello, new mod maker here:

I am currently developing an ore extension mod to be used with Angel's Refining. Essentially I'm planning on adding 6 or so relatively rare ores (with refining recipes) to throw in some variety.

My question is - how can I most easily integrate my mod into Angel's Infinite Ores and RSO?

My temptation is to include inside the mod the necessary LUA files that ArchAngel666 and the RSO developer would then slip into their generation prototypes, and then PM these people. Is this an acceptable way of doing it?

Also, if my mod recipes have optional dependencies on other mods (Factorio Druglab, Yuoki Industries etc) would that be an issue? Is this something I should avoid?

Thanks heaps! :P
User avatar
MadClown01
Fast Inserter
Fast Inserter
 
Posts: 159
Joined: Fri Dec 22, 2017 12:38 am
Location: New Zealand

Re: How to make ore mod compatible with RSO & Angel's Mods?

Postby orzelek » Fri Dec 29, 2017 11:28 am

For RSO you can prepare file in format as in resourceconfigs directory and I'll add it. Vanilla file has some comments describing how config for resource works.
Or talk with Angel since he's the author of RSO configs for his mod set.
orzelek
Smart Inserter
Smart Inserter
 
Posts: 3173
Joined: Fri Apr 03, 2015 10:20 am

Re: How to make ore mod compatible with RSO & Angel's Mods?

Postby MadClown01 » Fri Dec 29, 2017 12:14 pm

orzelek wrote:For RSO you can prepare file in format as in resourceconfigs directory and I'll add it. Vanilla file has some comments describing how config for resource works.
Or talk with Angel since he's the author of RSO configs for his mod set.

Thanks man, appreciated. I'll get to it
User avatar
MadClown01
Fast Inserter
Fast Inserter
 
Posts: 159
Joined: Fri Dec 22, 2017 12:38 am
Location: New Zealand

Re: How to make ore mod compatible with RSO & Angel's Mods?

Postby steinio » Fri Jan 12, 2018 4:49 pm

Do you need to add the ressourceconfig to RSO? Would be nice, if mod authors could provide the settings via own mod or api.
ImageImage
Transport Belt Repair Man
My little mods: Link | My favourite mods: Bob's Mods | Angel's Mods | Yuoki Railway Core | EvoGUI | Logistic Train Network
Factorio Cheat Sheet by Denis Zholob

View unread Posts
User avatar
steinio
Smart Inserter
Smart Inserter
 
Posts: 1887
Joined: Sat Mar 12, 2016 4:19 pm
Location: Germany

Re: How to make ore mod compatible with RSO & Angel's Mods?

Postby MadClown01 » Fri Jan 12, 2018 6:40 pm

Yes we do need to add a resourceconfig file to RSO, it's not really too big a deal. I don't mind haha
User avatar
MadClown01
Fast Inserter
Fast Inserter
 
Posts: 159
Joined: Fri Dec 22, 2017 12:38 am
Location: New Zealand

Re: How to make ore mod compatible with RSO & Angel's Mods?

Postby orzelek » Fri Jan 12, 2018 6:48 pm

API for RSO has been discussed few times but it's a bit complex topic.
It would require pretty complex validation and could cause issues depending on when each mod would add it's ores.
I'm not daring to try and open this can of worms ;)
orzelek
Smart Inserter
Smart Inserter
 
Posts: 3173
Joined: Fri Apr 03, 2015 10:20 am

Re: How to make ore mod compatible with RSO & Angel's Mods?

Postby steinio » Fri Jan 12, 2018 10:30 pm

So ihope the Ice-ore guy/girl contacts you soon :)
ImageImage
Transport Belt Repair Man
My little mods: Link | My favourite mods: Bob's Mods | Angel's Mods | Yuoki Railway Core | EvoGUI | Logistic Train Network
Factorio Cheat Sheet by Denis Zholob

View unread Posts
User avatar
steinio
Smart Inserter
Smart Inserter
 
Posts: 1887
Joined: Sat Mar 12, 2016 4:19 pm
Location: Germany

Re: How to make ore mod compatible with RSO & Angel's Mods?

Postby orzelek » Fri Jan 12, 2018 11:18 pm

Just drop me a line in RSO forums with mod name and/or what game prints and I'll take a look.
orzelek
Smart Inserter
Smart Inserter
 
Posts: 3173
Joined: Fri Apr 03, 2015 10:20 am

Re: How to make ore mod compatible with RSO & Angel's Mods?

Postby darkfrei » Fri Jan 12, 2018 11:28 pm

orzelek wrote:API for RSO has been discussed few times but it's a bit complex topic.
It would require pretty complex validation and could cause issues depending on when each mod would add it's ores.
I'm not daring to try and open this can of worms ;)

I've just copied iron ore and make config file for IceOre
Code: Select all
function fillIceOreConfig()

   config["ice-ore"] = {
      type="resource-ore",
      allotment=100,
      spawns_per_region={min=1, max=1},
      richness=20000,
      size={min=20, max=30},
      min_amount=500,
   
      starting={richness=8000, size=25, probability=1}
   }
end

or file
iceore.lua
(263 Bytes) Downloaded 4 times


Please check this properties.
User avatar
darkfrei
Smart Inserter
Smart Inserter
 
Posts: 1169
Joined: Thu Nov 20, 2014 11:11 pm

Re: How to make ore mod compatible with RSO & Angel's Mods?

Postby MadClown01 » Fri Feb 23, 2018 2:25 am

Hi Orzelek,

I finally have the config function ready!

function
Code: Select all
function fillClownsMineralsConfig()
config["clowns-ore1"] =
{
   type="resource-ore",
   allotment=10,
   spawns_per_region={min=1, max=1},
   richness=15000,
   size={min=12, max=15},
   min_amount = 150,
   starting={richness=12000, size=20, probability=0},
}
config["clowns-ore2"] =
{
   type="resource-ore",
   allotment=30,
   spawns_per_region={min=1, max=1},
   richness=15000,
   size={min=15, max=20},
   min_amount = 150,
   starting={richness=12000, size=20, probability=0},
}
config["clowns-ore3"] =
{
   type="resource-ore",
   allotment=30,
   spawns_per_region={min=1, max=1},
   richness=15000,
   size={min=15, max=20},
   min_amount = 150,
   starting={richness=12000, size=20, probability=0},
}
config["clowns-ore4"] =
{
   type="resource-ore",
   allotment=30,
   spawns_per_region={min=1, max=1},
   richness=12000,
   size={min=15, max=20},
   min_amount = 150,
   starting={richness=12000, size=20, probability=0},
}
config["clowns-ore5"] =
{
   type="resource-ore",
   allotment=30,
   spawns_per_region={min=1, max=1},
   richness=12000,
   size={min=15, max=20},
   min_amount = 150,
   starting={richness=12000, size=20, probability=0},
}
config["clowns-ore6"] =
{
   type="resource-ore",
   allotment=20,
   spawns_per_region={min=1, max=1},
   richness=12000,
   size={min=15, max=20},
   min_amount = 150,
   starting={richness=12000, size=20, probability=0},
}
config["clowns-ore7"] =
{
   type="resource-ore",
   allotment=20,
   spawns_per_region={min=1, max=1},
   richness=12000,
   size={min=15, max=20},
   min_amount = 150,
   starting={richness=12000, size=20, probability=0},
}
config["clowns-resource1"] =
{
   type="resource-ore",
   allotment=30,
   spawns_per_region={min=1, max=1},
   richness=12000,
   size={min=15, max=20},
   min_amount = 150,
   starting={richness=12000, size=20, probability=0},
}
config["clowns-resource2"] =
{
   type="resource-ore",
   allotment=30,
   spawns_per_region={min=1, max=1},
   richness=12000,
   size={min=15, max=20},
   min_amount = 150,
   starting={richness=12000, size=20, probability=0},
}
config["clowns-resource3"] =
{
   type="resource-ore",
   allotment=30,
   spawns_per_region={min=1, max=1},
   richness=12000,
   size={min=15, max=20},
   min_amount = 150,
   starting={richness=12000, size=20, probability=0},
}
end


(alternatively
clownsores.lua
(2.13 KiB) Downloaded 5 times
)
I've tested this myself, and it works perfectly with RSO when
Code: Select all
if game.active_mods["Clowns-Extended-Minerals"] then
   fillClownsMineralsConfig()
end

is added to mainconfig.

Could you please add this to RSO? My extended minerals mod will be released soon, and is designed specifically to be used with RSO.

Cheers
User avatar
MadClown01
Fast Inserter
Fast Inserter
 
Posts: 159
Joined: Fri Dec 22, 2017 12:38 am
Location: New Zealand

Re: How to make ore mod compatible with RSO & Angel's Mods?

Postby orzelek » Fri Feb 23, 2018 11:17 am

I've added it to my local copy - can release it now but it would be a bit of a blind release.
I'd rather wait for your mod to be up to check stuff with it :)
Do you know if RSO will need optional dependency on it?
orzelek
Smart Inserter
Smart Inserter
 
Posts: 3173
Joined: Fri Apr 03, 2015 10:20 am

Re: How to make ore mod compatible with RSO & Angel's Mods?

Postby MadClown01 » Sat Feb 24, 2018 3:31 am

orzelek wrote:...

Hi Orzelek,
Thanks for the quick response!
Waiting until release is fine with me, or I can forward you a stable prototype copy if you'd like? (All generation coding is done, just need to tidy up some graphics and recipes)
No optional dependencies will be needed.
User avatar
MadClown01
Fast Inserter
Fast Inserter
 
Posts: 159
Joined: Fri Dec 22, 2017 12:38 am
Location: New Zealand

Re: How to make ore mod compatible with RSO & Angel's Mods?

Postby orzelek » Sat Feb 24, 2018 11:41 am

If you can post me pm with prototype I will check it and release the RSO with support.
I'm being careful since last time I thought "this dependency is no longer needed" suddenly bob's ores were not disabled properly ;)
orzelek
Smart Inserter
Smart Inserter
 
Posts: 3173
Joined: Fri Apr 03, 2015 10:20 am

Re: How to make ore mod compatible with RSO & Angel's Mods?

Postby MadClown01 » Sat Feb 24, 2018 12:55 pm

Hahaha fair call

I got bored with prototyping btw, it's out: viewtopic.php?f=185&t=58136&p=345448#p345448 :lol:
User avatar
MadClown01
Fast Inserter
Fast Inserter
 
Posts: 159
Joined: Fri Dec 22, 2017 12:38 am
Location: New Zealand


Return to Modding help

Who is online

Users browsing this forum: No registered users and 3 guests