2 questions: Adding new ores & changing alien drops

Place to get help with not working mods / modding interface.
Post Reply
ATMunn
Inserter
Inserter
Posts: 37
Joined: Thu Jan 12, 2017 2:22 am
Contact:

2 questions: Adding new ores & changing alien drops

Post by ATMunn »

Hello there.
I have 2 modding questions that I'd like to know the answer to.
1) How do I add new ores to the game? I looked in the base mod files first, and I found some things, but it wasn't really clear what did what, and some things were just total nonsense. I then tried looking in the code of Bob's Ores, but that had some bobsmods specific stuff mixed in, whereas I just wanted to make a standalone mod that added the ores. I looked on this forum and the wiki, but nothing really helped. Can someone give me a basic idea of how to add ores? Even just a template I can copy and change the values myself.

2) I'd also like to change some of the alien drops to some new and different items, instead of the alien artifacts. Not just the alien bases, but the actual biters and spitters themselves too. I imagine it's not hard though.


If you have answers to either or both of these questions, that would be greatly appreciated! Thanks!

sore68
Fast Inserter
Fast Inserter
Posts: 123
Joined: Mon May 02, 2016 8:39 am
Contact:

Re: 2 questions: Adding new ores & changing alien drops

Post by sore68 »

2.
make item : alien-bone

data-final-fixes.lua

Code: Select all

loot = {count_max = 5, count_min = 1, item = "alien-bone", probability = 0.5}

for _, unit in pairs(data.raw["unit"]) do
  if unit.subgroup == "enemies" then
    if not unit.loot then
      unit.loot = {}
    end
    table.insert(unit.loot, loot)
  end
end

ATMunn
Inserter
Inserter
Posts: 37
Joined: Thu Jan 12, 2017 2:22 am
Contact:

Re: 2 questions: Adding new ores & changing alien drops

Post by ATMunn »

I see, thanks. Do you have any idea on creating ores or should I wait for someone else?

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: 2 questions: Adding new ores & changing alien drops

Post by daniel34 »

This should help you for adding new ores: viewtopic.php?f=25&t=37648&p=227328#p227328, the whole thread actually.
quick links: log file | graphical issues | wiki

Post Reply

Return to “Modding help”