[0.17.x] Bob's Mods: General Discussion

Some mods, made by Bob. Basically streaks every Factroio-area.

Moderator: bobingabout

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by bobingabout »

Airat9000 wrote: ↑Wed Apr 03, 2019 8:04 am
bobingabout wrote: ↑Wed Apr 03, 2019 7:52 am What did you try to do?
I wrote already - to increase the wealth of resources at the beginning before generating the map ..
It is necessary to raise the number, but I don’t see where to change the code.
Okay, lets see. you'll basically want to do the following:
Go to the file I mentioned (demo-resource.lua in the base game) and copy the autoplace definition for iron ore (I can't see the game code where I am, this is not exact code) for my example, I'll use one of the ores from my mod.
you will need to take note of the order the resources are called, because you'll need to manually re-use the index. iron ore is 0 because it's first, I think copper is next, so it's a 1. I don't remember the order of the other 4 base game ores.
in your copy of this code, edit base density. (I'm guessing)
set it again.

So...
you start with something that looks like this: (I'm using Bauxide, because I can see the code for it)

Code: Select all

  autoplace = resource_autoplace.resource_autoplace_settings{
    name = "bauxite-ore",
    order = "c",
    base_density = 8,
    has_starting_area_placement = false,
    resource_index = resource_autoplace.get_next_resource_index(),
    regular_rq_factor_multiplier = 1,
  },
You'd need to change it to something like this in your mod:

Code: Select all

data.raw.resource["bauxite-ore"].autoplace = resource_autoplace.resource_autoplace_settings{
    name = "bauxite-ore",
    order = "c",
    base_density = 800, --I increased it
    has_starting_area_placement = false,
    resource_index = 12, --This is a guess
    regular_rq_factor_multiplier = 1,
  },
It would be much easier if you could just edit the value you wanted, but, you can't, because that function resource_autoplace.resource_autoplace_settings generates a totally different set of data when it is called. your only option is to do the entire thing again.

Really though, I am totally guessing with all this, the current ore generation system is a fucking NIGHTMARE to work with.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by Airat9000 »

bobingabout wrote: ↑Wed Apr 03, 2019 8:41 am
Airat9000 wrote: ↑Wed Apr 03, 2019 8:04 am
bobingabout wrote: ↑Wed Apr 03, 2019 7:52 am What did you try to do?
I wrote already - to increase the wealth of resources at the beginning before generating the map ..
It is necessary to raise the number, but I don’t see where to change the code.
Okay, lets see. you'll basically want to do the following:
Go to the file I mentioned (demo-resource.lua in the base game) and copy the autoplace definition for iron ore (I can't see the game code where I am, this is not exact code) for my example, I'll use one of the ores from my mod.
you will need to take note of the order the resources are called, because you'll need to manually re-use the index. iron ore is 0 because it's first, I think copper is next, so it's a 1. I don't remember the order of the other 4 base game ores.
in your copy of this code, edit base density. (I'm guessing)
set it again.

So...
you start with something that looks like this: (I'm using Bauxide, because I can see the code for it)

Code: Select all

  autoplace = resource_autoplace.resource_autoplace_settings{
    name = "bauxite-ore",
    order = "c",
    base_density = 8,
    has_starting_area_placement = false,
    resource_index = resource_autoplace.get_next_resource_index(),
    regular_rq_factor_multiplier = 1,
  },
You'd need to change it to something like this in your mod:

Code: Select all

data.raw.resource["bauxite-ore"].autoplace = resource_autoplace.resource_autoplace_settings{
    name = "bauxite-ore",
    order = "c",
    base_density = 800, --I increased it
    has_starting_area_placement = false,
    resource_index = 12, --This is a guess
    regular_rq_factor_multiplier = 1,
  },
It would be much easier if you could just edit the value you wanted, but, you can't, because that function resource_autoplace.resource_autoplace_settings generates a totally different set of data when it is called. your only option is to do the entire thing again.

Really though, I am totally guessing with all this, the current ore generation system is a fucking NIGHTMARE to work with.
understand you - old file you not work in
ore-functions.lua to bobliblary
Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by Airat9000 »

:lol: :lol:
base_density = 8000,
2019-04-03_12-47-23.png
2019-04-03_12-47-23.png (1.68 MiB) Viewed 5971 times
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by bobingabout »

Airat9000 wrote: ↑Wed Apr 03, 2019 9:43 am understand you - old file you not work in
ore-functions.lua to bobliblary
Currently, ore-functions.lua in boblibrary is only used for Gem ore.
Everything else uses the new base game function.
Airat9000 wrote: ↑Wed Apr 03, 2019 9:48 am :lol: :lol:
base_density = 8000,
2019-04-03_12-47-23.png
That's a lot of copper. I'm happy you got it working.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
RocketManChronicles
Filter Inserter
Filter Inserter
Posts: 362
Joined: Mon Aug 01, 2016 2:38 pm
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by RocketManChronicles »

BlueTemplar wrote: ↑Wed Apr 03, 2019 8:08 am
RocketManChronicles wrote: ↑Tue Apr 02, 2019 8:00 pm , there are changes that make turrets very weak near nests. The two biggest things that affect this are the Spitters and the Worms spits. Before 0.17, they just hit and did damage. Now, 0.17+ not only do they hit, but their spit stays and does damage over time. So when a turret is hit by a spitter, it doesn't just take damage, it now takes damage and even more damage over time. The stationary nature of turrets makes them very weak when they are not in a permanent wall setting.
No they don't - turrets seem to be immune to acid puddle damage (over time).
(They do get affected by splash damage...)
After going back and checking, I set up some turrets to sacrifice (FOR SCIENCE!) to see how they interact. So, from what I observed, the acid does not affect the turrets, as you were correct. However, they do take damage over time from the fire enemies. Turrets definitely suffer splash damage and with enough projectiles coming their way, I could not keep up in repairs even. I tried repairs with bots from my personal roboport and also by hand. The bots would die from the damage over time of anything, plus suffer from splash damage greatly. By hand, I could probably keep one turret up while the others fall, then the one I am repairing will fall as it is the last one.

Now, the Rampant mod greatly affects how the biters approach the turrets. If one gets a hit in, others just flood to that turret and they will force themselves to overrun the turrets.

Ok, so we are talking about the first four hours. That means that you could be on the verge of unlocking tanks. If no tanks are available, then the best bet is to have a cluster of turrets to run to for repairing the car. You use a car loaded with AP ammo and a few hundred grenades. Use the car for hit and run tactics, drive in, take a spawner down, drive out. But you must zig-zag the whole time. And continually lobbing grenades out the window. Let about 200 enemies pile up behind you while you focus on taking out a spawner, then run around in circles kiting the enemies until they are thinned a bit, then drive to your turret cluster to allow them to clean up the last few chasing enemies while you repair the car. Rinse and repeat. This can be time consuming but with speed, you should be able to avoid catastrophic damage to the car.
Recon777
Filter Inserter
Filter Inserter
Posts: 267
Joined: Fri Jun 10, 2016 4:04 am
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by Recon777 »

MageKing17 wrote: ↑Wed Apr 03, 2019 5:17 am If that's not the way you want to play, why are you using Rampant at all?
Because it's the only way to get a challenge in the LATE game.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by bobingabout »

Recon777 wrote: ↑Wed Apr 03, 2019 12:22 pm
MageKing17 wrote: ↑Wed Apr 03, 2019 5:17 am If that's not the way you want to play, why are you using Rampant at all?
Because it's the only way to get a challenge in the LATE game.
if you really want a challenge, I could configure it so that the game sends you an ARMY of Leviathans.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Kamsta99
Inserter
Inserter
Posts: 26
Joined: Mon Jul 17, 2017 10:19 am
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by Kamsta99 »

Is it possible to make inserters from logistic mod to toggle overide reach distance by hotkey ? Because GUI have only one option also take space on my screen... It isnt nonsense :?
Anyway thanks for great mod :D
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by bobingabout »

Kamsta99 wrote: ↑Wed Apr 03, 2019 1:39 pm Is it possible to make inserters from logistic mod to toggle overide reach distance by hotkey ? Because GUI have only one option also take space on my screen... It isnt nonsense :?
Anyway thanks for great mod :D
That already exists. After placing an inserter, simply point to it and press Shift + L.
The GUI is more useful if you want to do a large batch of long handed inserters.

if you use Adjustable Inserters mod too, there's even more options with hotkeys.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
RocketManChronicles
Filter Inserter
Filter Inserter
Posts: 362
Joined: Mon Aug 01, 2016 2:38 pm
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by RocketManChronicles »

bobingabout wrote: ↑Wed Apr 03, 2019 1:38 pm
Recon777 wrote: ↑Wed Apr 03, 2019 12:22 pm
MageKing17 wrote: ↑Wed Apr 03, 2019 5:17 am If that's not the way you want to play, why are you using Rampant at all?
Because it's the only way to get a challenge in the LATE game.
if you really want a challenge, I could configure it so that the game sends you an ARMY of Leviathans.
I'm listening....
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by bobingabout »

RocketManChronicles wrote: ↑Wed Apr 03, 2019 4:33 pm
bobingabout wrote: ↑Wed Apr 03, 2019 1:38 pm
Recon777 wrote: ↑Wed Apr 03, 2019 12:22 pm
MageKing17 wrote: ↑Wed Apr 03, 2019 5:17 am If that's not the way you want to play, why are you using Rampant at all?
Because it's the only way to get a challenge in the LATE game.
if you really want a challenge, I could configure it so that the game sends you an ARMY of Leviathans.
I'm listening....
I already have it on my list to review enemies, changing the spawning shouldn't be an issue.

here is the spawner information as it is now:

Code: Select all

Biter spawner
    result_units = (function()
                     local res = {}
                     res[1] = {"small-biter", {{0.0, 0.3}, {0.6, 0.0}}}
                     if not data.is_demo then
                       -- from evolution_factor 0.3 the weight for medium-biter is linearly rising from 0 to 0.3
                       -- this means for example that when the evolution_factor is 0.45 the probability of spawning
                       -- a small biter is 66% while probability for medium biter is 33%.
                       res[2] = {"medium-biter", {{0.2, 0.0}, {0.6, 0.3}, {0.7, 0.1}}}
                       -- for evolution factor of 1 the spawning probabilities are: small-biter 0%, medium-biter 1/8, big-biter 4/8, behemoth biter 3/8
                       res[3] = {"big-biter", {{0.5, 0.0}, {1.0, 0.4}}}
                       res[4] = {"behemoth-biter", {{0.9, 0.0}, {1.0, 0.3}}}
                     end
                     return res
                   end)(),

Spitter spawner
    result_units = (function()
                     local res = {}
                     res[1] = {"small-biter", {{0.0, 0.3}, {0.35, 0}}}
                     res[2] = {"small-spitter", {{0.25, 0.0}, {0.5, 0.3}, {0.7, 0.0}}}
                     res[3] = {"medium-spitter", {{0.4, 0.0}, {0.7, 0.3}, {0.9, 0.1}}}
                     res[4] = {"big-spitter", {{0.5, 0.0}, {1.0, 0.4}}}
                     res[5] = {"behemoth-spitter", {{0.9, 0.0}, {1.0, 0.3}}}
                     return res
                   end)(),

Bob biter spawner
    result_units =
    {
      {"small-biter", {{0.0, 0.3}, {0.5, 0.3}, {0.7, 0.0}}},
      {"medium-biter", {{0.2, 0.0}, {0.6, 0.3}, {0.8, 0.0}}},
--      {"big-biter", {{0.6, 0.0}, {0.8, 0.4}, {0.9, 0.0}}},
-- Big enemies apear at 0.6, slowly become elemental between 0.7 and 0.8, and disapear by 0.9
      {"big-biter", {{0.6, 0.0}, {0.7, 0.4}, {0.8, 0.0}}},
      {"bob-big-piercing-biter", {{0.7, 0.0}, {0.8, 0.4}, {0.9, 0.0}}},
      {"bob-huge-acid-biter", {{0.7, 0.0}, {0.8, 0.2}}},
      {"bob-huge-explosive-biter", {{0.7, 0.0}, {0.8, 0.1}}},
      {"bob-giant-poison-biter", {{0.8, 0.0}, {0.9, 0.2}}},
      {"bob-giant-fire-biter", {{0.8, 0.0}, {0.9, 0.1}}},
      {"bob-titan-biter", {{0.9, 0.0}, {1.0, 0.3}}},
      {"bob-behemoth-biter", {{0.99, 0.0}, {1.0, 0.3}}},
      {"bob-leviathan-biter", {{0.99, 0.0}, {1.0, 0.05}}},
    },

Bob spitter spawner
    result_units =
    {
      {"small-biter", {{0.0, 0.3}, {0.25, 0.3}, {0.35, 0.0}}},
      {"small-spitter", {{0.25, 0.3}, {0.5, 0.3}, {0.7, 0.0}}},
      {"medium-spitter", {{0.4, 0.0}, {0.6, 0.3}, {0.8, 0.0}}},
--      {"big-spitter", {{0.6, 0.0}, {0.8, 0.4}, {0.9, 0.0}}},
-- Big enemies apear at 0.6, slowly become elemental between 0.7 and 0.8, and disapear by 0.9
      {"big-spitter", {{0.6, 0.0}, {0.7, 0.4}, {0.8, 0.0}}},
      {"bob-big-electric-spitter", {{0.7, 0.0}, {0.8, 0.4}, {0.9, 0.0}}},
      {"bob-huge-explosive-spitter", {{0.7, 0.0}, {0.8, 0.2}}},
      {"bob-huge-acid-spitter", {{0.7, 0.0}, {0.8, 0.1}}},
      {"bob-giant-fire-spitter", {{0.8, 0.0}, {0.9, 0.2}}},
      {"bob-giant-poison-spitter", {{0.8, 0.0}, {0.9, 0.1}}},
      {"bob-titan-spitter", {{0.9, 0.0}, {1.0, 0.3}}},
      {"bob-behemoth-spitter", {{0.99, 0.0}, {1.0, 0.3}}},
      {"bob-leviathan-spitter", {{0.99, 0.0}, {1.0, 0.05}}},
    },
As you can see, to start with, everything from big and higher should drop by 0.1, and Leviathan has a 0.05 rating where most others have around a 0.3, meaning it's a 6th as likely to spawn.

To make things harder, I could add options to change the spawning so that tougher enemies show up even earlier, or in higher numbers in late game, or both.
They would all have to be startup options though, as this information is all read only in runtime.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
Raphaello
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Fri Apr 21, 2017 7:04 pm
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by Raphaello »

bobingabout wrote: ↑Wed Apr 03, 2019 2:22 pm [The GUI is more useful if you want to do a large batch of long handed inserters.
Changing inserters in batch is possible? How to do it?
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by bobingabout »

Raphaello wrote: ↑Wed Apr 03, 2019 5:19 pm
bobingabout wrote: ↑Wed Apr 03, 2019 2:22 pm [The GUI is more useful if you want to do a large batch of long handed inserters.
Changing inserters in batch is possible? How to do it?
what I mean is. if you know you're going to need to place a lot of long handed inserters, it's best to turn the option on because every inserter you place will be long until you turn it off.
but if you're doing one offs, or toggling between long and short, it's easier to just place it first, then point to it and press Shift+L
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
mrvn
Smart Inserter
Smart Inserter
Posts: 5865
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by mrvn »

bobingabout wrote: ↑Wed Apr 03, 2019 8:41 am
Airat9000 wrote: ↑Wed Apr 03, 2019 8:04 am
bobingabout wrote: ↑Wed Apr 03, 2019 7:52 am What did you try to do?
I wrote already - to increase the wealth of resources at the beginning before generating the map ..
It is necessary to raise the number, but I don’t see where to change the code.
Okay, lets see. you'll basically want to do the following:
Go to the file I mentioned (demo-resource.lua in the base game) and copy the autoplace definition for iron ore (I can't see the game code where I am, this is not exact code) for my example, I'll use one of the ores from my mod.
you will need to take note of the order the resources are called, because you'll need to manually re-use the index. iron ore is 0 because it's first, I think copper is next, so it's a 1. I don't remember the order of the other 4 base game ores.
in your copy of this code, edit base density. (I'm guessing)
set it again.

So...
you start with something that looks like this: (I'm using Bauxide, because I can see the code for it)

Code: Select all

  autoplace = resource_autoplace.resource_autoplace_settings{
    name = "bauxite-ore",
    order = "c",
    base_density = 8,
    has_starting_area_placement = false,
    resource_index = resource_autoplace.get_next_resource_index(),
    regular_rq_factor_multiplier = 1,
  },
You'd need to change it to something like this in your mod:

Code: Select all

data.raw.resource["bauxite-ore"].autoplace = resource_autoplace.resource_autoplace_settings{
    name = "bauxite-ore",
    order = "c",
    base_density = 800, --I increased it
    has_starting_area_placement = false,
    resource_index = 12, --This is a guess
    regular_rq_factor_multiplier = 1,
  },
It would be much easier if you could just edit the value you wanted, but, you can't, because that function resource_autoplace.resource_autoplace_settings generates a totally different set of data when it is called. your only option is to do the entire thing again.

Really though, I am totally guessing with all this, the current ore generation system is a fucking NIGHTMARE to work with.
Or simply slide the slider in the new map settings towards richer.
Kargaros
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon Mar 25, 2019 6:16 pm
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by Kargaros »

bobingabout wrote: ↑Wed Apr 03, 2019 5:21 pm what I mean is. if you know you're going to need to place a lot of long handed inserters, it's best to turn the option on because every inserter you place will be long until you turn it off.
but if you're doing one offs, or toggling between long and short, it's easier to just place it first, then point to it and press Shift+L
So THAT's what I was doing wrong :o
I saw the shortcut in the control setting a few days ago, and I tried shift+L before placing an inserter, shift+L at the same time as placing an inserter, and some other combinations, but what I didn't try was placing the inserter first and pressing shift+L afterwards.
I have to try this out :D
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by bobingabout »

Kargaros wrote: ↑Wed Apr 03, 2019 6:16 pm
bobingabout wrote: ↑Wed Apr 03, 2019 5:21 pm what I mean is. if you know you're going to need to place a lot of long handed inserters, it's best to turn the option on because every inserter you place will be long until you turn it off.
but if you're doing one offs, or toggling between long and short, it's easier to just place it first, then point to it and press Shift+L
So THAT's what I was doing wrong :o
I saw the shortcut in the control setting a few days ago, and I tried shift+L before placing an inserter, shift+L at the same time as placing an inserter, and some other combinations, but what I didn't try was placing the inserter first and pressing shift+L afterwards.
I have to try this out :D
Yeah, I would have loved to have something like this, place an inserter while holding L to make it long.
unfortunately, pressing a key configuration can be made to trigger an event, but there's no "key released" or "key held" option, only a key press event. So, you have to work with what you have.
you can also read things like, what is in your hand, and what the cursor is pointing to, is it in range? so using these checks I can have stuff like... if you're pointing to an inserter, and it is in range, change the reach.
likewise, if the toggle is turned on, when the built entity event triggers, check what you're holding, if it matches (actually, it only checks to make sure it's not a blueprint or blueprint book) then apply the settings to the placed entity.

And that's how the 2 functions in boblogistics work.

bobinserter adds a lot more functions, but they're all based on those 2 event combinations. the menu that opens when you point to an inserter is just the keypress event and read what you're pointing to, and remembers the entity you were pointing to.
There's a new option that changes it so it opens on the left when you open the normal inserter GUI too.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
Raphaello
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Fri Apr 21, 2017 7:04 pm
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by Raphaello »

Thanks for answer. I only used shortcuts and GUI to adjust already placed inserters. TIL I can use GUI to set up the inserter before placing it :D
Kargaros
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon Mar 25, 2019 6:16 pm
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by Kargaros »

My initial assumption was actually that shift+L would toggle the option for long inserters in the GUI panel, but that quickly turned out to be wrong.
It would be nice to have a toggle shortcut so that you could do: *shortcut to enable long-inserter mode*, place a number of long inserters, *shortcut to toggle long-inserter mode off again*, place normal inserters.
I will however work with what is available, and I expect I will quickly get used to the way shift+L works :-)
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by bobingabout »

In theory, it is possible to add other shortcuts to toggle the pre-place, but if I tried to also implement this in bobinserters with all the functions, that would get complex fast.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: [0.17.x] Bob's Mods: General Discussion

Post by bobingabout »

bobingabout wrote: ↑Wed Apr 03, 2019 4:50 pm
RocketManChronicles wrote: ↑Wed Apr 03, 2019 4:33 pm
bobingabout wrote: ↑Wed Apr 03, 2019 1:38 pm
Recon777 wrote: ↑Wed Apr 03, 2019 12:22 pm
MageKing17 wrote: ↑Wed Apr 03, 2019 5:17 am If that's not the way you want to play, why are you using Rampant at all?
Because it's the only way to get a challenge in the LATE game.
if you really want a challenge, I could configure it so that the game sends you an ARMY of Leviathans.
I'm listening....
I already have it on my list to review enemies, changing the spawning shouldn't be an issue.

here is the spawner information as it is now:

Code: Select all

Biter spawner
    result_units = (function()
                     local res = {}
                     res[1] = {"small-biter", {{0.0, 0.3}, {0.6, 0.0}}}
                     if not data.is_demo then
                       -- from evolution_factor 0.3 the weight for medium-biter is linearly rising from 0 to 0.3
                       -- this means for example that when the evolution_factor is 0.45 the probability of spawning
                       -- a small biter is 66% while probability for medium biter is 33%.
                       res[2] = {"medium-biter", {{0.2, 0.0}, {0.6, 0.3}, {0.7, 0.1}}}
                       -- for evolution factor of 1 the spawning probabilities are: small-biter 0%, medium-biter 1/8, big-biter 4/8, behemoth biter 3/8
                       res[3] = {"big-biter", {{0.5, 0.0}, {1.0, 0.4}}}
                       res[4] = {"behemoth-biter", {{0.9, 0.0}, {1.0, 0.3}}}
                     end
                     return res
                   end)(),

Spitter spawner
    result_units = (function()
                     local res = {}
                     res[1] = {"small-biter", {{0.0, 0.3}, {0.35, 0}}}
                     res[2] = {"small-spitter", {{0.25, 0.0}, {0.5, 0.3}, {0.7, 0.0}}}
                     res[3] = {"medium-spitter", {{0.4, 0.0}, {0.7, 0.3}, {0.9, 0.1}}}
                     res[4] = {"big-spitter", {{0.5, 0.0}, {1.0, 0.4}}}
                     res[5] = {"behemoth-spitter", {{0.9, 0.0}, {1.0, 0.3}}}
                     return res
                   end)(),

Bob biter spawner
    result_units =
    {
      {"small-biter", {{0.0, 0.3}, {0.5, 0.3}, {0.7, 0.0}}},
      {"medium-biter", {{0.2, 0.0}, {0.6, 0.3}, {0.8, 0.0}}},
--      {"big-biter", {{0.6, 0.0}, {0.8, 0.4}, {0.9, 0.0}}},
-- Big enemies apear at 0.6, slowly become elemental between 0.7 and 0.8, and disapear by 0.9
      {"big-biter", {{0.6, 0.0}, {0.7, 0.4}, {0.8, 0.0}}},
      {"bob-big-piercing-biter", {{0.7, 0.0}, {0.8, 0.4}, {0.9, 0.0}}},
      {"bob-huge-acid-biter", {{0.7, 0.0}, {0.8, 0.2}}},
      {"bob-huge-explosive-biter", {{0.7, 0.0}, {0.8, 0.1}}},
      {"bob-giant-poison-biter", {{0.8, 0.0}, {0.9, 0.2}}},
      {"bob-giant-fire-biter", {{0.8, 0.0}, {0.9, 0.1}}},
      {"bob-titan-biter", {{0.9, 0.0}, {1.0, 0.3}}},
      {"bob-behemoth-biter", {{0.99, 0.0}, {1.0, 0.3}}},
      {"bob-leviathan-biter", {{0.99, 0.0}, {1.0, 0.05}}},
    },

Bob spitter spawner
    result_units =
    {
      {"small-biter", {{0.0, 0.3}, {0.25, 0.3}, {0.35, 0.0}}},
      {"small-spitter", {{0.25, 0.3}, {0.5, 0.3}, {0.7, 0.0}}},
      {"medium-spitter", {{0.4, 0.0}, {0.6, 0.3}, {0.8, 0.0}}},
--      {"big-spitter", {{0.6, 0.0}, {0.8, 0.4}, {0.9, 0.0}}},
-- Big enemies apear at 0.6, slowly become elemental between 0.7 and 0.8, and disapear by 0.9
      {"big-spitter", {{0.6, 0.0}, {0.7, 0.4}, {0.8, 0.0}}},
      {"bob-big-electric-spitter", {{0.7, 0.0}, {0.8, 0.4}, {0.9, 0.0}}},
      {"bob-huge-explosive-spitter", {{0.7, 0.0}, {0.8, 0.2}}},
      {"bob-huge-acid-spitter", {{0.7, 0.0}, {0.8, 0.1}}},
      {"bob-giant-fire-spitter", {{0.8, 0.0}, {0.9, 0.2}}},
      {"bob-giant-poison-spitter", {{0.8, 0.0}, {0.9, 0.1}}},
      {"bob-titan-spitter", {{0.9, 0.0}, {1.0, 0.3}}},
      {"bob-behemoth-spitter", {{0.99, 0.0}, {1.0, 0.3}}},
      {"bob-leviathan-spitter", {{0.99, 0.0}, {1.0, 0.05}}},
    },
As you can see, to start with, everything from big and higher should drop by 0.1, and Leviathan has a 0.05 rating where most others have around a 0.3, meaning it's a 6th as likely to spawn.

To make things harder, I could add options to change the spawning so that tougher enemies show up even earlier, or in higher numbers in late game, or both.
They would all have to be startup options though, as this information is all read only in runtime.
I updated, what do you think?

Code: Select all

    result_units =
    {
      {"small-biter", {{0.0, 0.3}, {0.5, 0.3}, {0.6, 0.0}}},
      {"medium-biter", {{0.2, 0.0}, {0.6, 0.3}, {0.7, 0.0}}},
-- Big enemies apear at 0.5, slowly become elemental between 0.6 and 0.7, and disapear by 0.8
      {"big-biter", {{0.5, 0.0}, {0.6, 0.4}, {0.7, 0.0}}},
      {"bob-big-piercing-biter", {{0.6, 0.0}, {0.7, 0.4}, {0.8, 0.0}}},
      {"bob-huge-acid-biter", {{0.6, 0.0}, {0.7, 0.2}}},
      {"bob-huge-explosive-biter", {{0.6, 0.0}, {0.7, 0.1}}},
      {"bob-giant-poison-biter", {{0.7, 0.0}, {0.8, 0.2}}},
      {"bob-giant-fire-biter", {{0.7, 0.0}, {0.8, 0.1}}},
      {"bob-titan-biter", {{0.8, 0.0}, {0.9, 0.3}}},
      {"bob-behemoth-biter", {{0.9, 0.0}, {1.0, 0.3}}},
      {"bob-leviathan-biter", {{0.95, 0.0}, {1.0, 0.05}}},
    },

    result_units =
    {
      {"small-biter", {{0.0, 0.3}, {0.2, 0.3}, {0.4, 0.0}}},
      {"small-spitter", {{0.2, 0.3}, {0.4, 0.3}, {0.6, 0.0}}},
      {"medium-spitter", {{0.4, 0.0}, {0.6, 0.3}, {0.7, 0.0}}},
-- Big enemies apear at 0.5, slowly become elemental between 0.6 and 0.7, and disapear by 0.8
      {"big-spitter", {{0.5, 0.0}, {0.6, 0.4}, {0.7, 0.0}}},
      {"bob-big-electric-spitter", {{0.6, 0.0}, {0.7, 0.4}, {0.8, 0.0}}},
      {"bob-huge-explosive-spitter", {{0.6, 0.0}, {0.7, 0.2}}},
      {"bob-huge-acid-spitter", {{0.6, 0.0}, {0.7, 0.1}}},
      {"bob-giant-fire-spitter", {{0.7, 0.0}, {0.8, 0.2}}},
      {"bob-giant-poison-spitter", {{0.7, 0.0}, {0.8, 0.1}}},
      {"bob-titan-spitter", {{0.8, 0.0}, {0.9, 0.3}}},
      {"bob-behemoth-spitter", {{0.9, 0.0}, {1.0, 0.3}}},
      {"bob-leviathan-spitter", {{0.95, 0.0}, {1.0, 0.05}}},
    },
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Post Reply

Return to β€œBob's mods”