[MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
Re: [MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
You're determined not to let me test this from scratch, aren't you?
Re: [MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
Dang, and I swear I tested this.wahming wrote:You're determined not to let me test this from scratch, aren't you?
I'm pretty sure I know what is wrong though. Ugh.
Re: [MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
I'd be interested to know what the problem was when you fix it. It looked like your if !null check should have worked, why didn't it?
Re: [MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
If you are bored, open up libs/world.lua in Misanthrope and change this line https://github.com/Afforess/Misanthrope ... ld.lua#L17wahming wrote:I'd be interested to know what the problem was when you fix it. It looked like your if !null check should have worked, why didn't it?
It should be `global.mod_version = 40`.
I think that should fix it.
Long story short, the global.bases data structure is supposed to be created and initialized as part of the setup, but I set the default mod_version wrong, so it assumed the game was an existing save instead of a new save.
Re: [MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
It's very much still happening.
Re: [MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
Once I got home I was able to debug and fix it.wahming wrote:It's very much still happening.
https://github.com/Afforess/Misanthrope ... _0.4.2.zip
Re: [MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
Based entirely on the error message he is receiving, it's this line that's the problem:
https://github.com/Afforess/Misanthrope ... se.lua#L95
One of the variables that table.insert is looking for is not a table, and is expected to be a table, as "table expected, got nil" implies.
Since I can see "base" is a proper table, that means "global.bases" is not. Search your code for anywhere else "global.bases" is mentioned (also make sure you're not mixing up plural and singular), make sure it's a table; if you can't figure it out, I'd take the current line, which currently looks like this:
and replace it with something like this:
https://github.com/Afforess/Misanthrope ... se.lua#L95
One of the variables that table.insert is looking for is not a table, and is expected to be a table, as "table expected, got nil" implies.
Since I can see "base" is a proper table, that means "global.bases" is not. Search your code for anywhere else "global.bases" is mentioned (also make sure you're not mixing up plural and singular), make sure it's a table; if you can't figure it out, I'd take the current line, which currently looks like this:
Code: Select all
local base = { queen = entity, hives = {}, worms = {}, currency = 0, name = RandomName.get_random_name(14), next_tick = game.tick + math.random(300, 1000), history = {}, valid = true}
table.insert(global.bases, base)
Code: Select all
local base = { queen = entity, hives = {}, worms = {}, currency = 0, name = RandomName.get_random_name(14), next_tick = game.tick + math.random(300, 1000), history = {}, valid = true}
if global.bases == nil then
global.bases = {}
end
table.insert(global.bases, base)
Re: [MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
The data structures were supposed to be set up on_init in the world class, which was the source of the problem: https://github.com/Afforess/Misanthrope ... ld.lua#L34flabort wrote:Based entirely on the error message he is receiving, it's this line that's the problem:]
Anyway, 0.4.2 should initialize correctly.
Re: [MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
Running into some performance issues with 0.4.2. Getting pretty jerky. Performance completely restored once I removed the mod.
Re: [MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
Can you upload save + mods and I can look into it.wahming wrote:Running into some performance issues with 0.4.2. Getting pretty jerky. Performance completely restored once I removed the mod.
Re: [MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
Here you go
- Attachments
-
- Misanthrope.zip
- Save file
- (4.44 MiB) Downloaded 122 times
-
- mods.rar
- (118.03 MiB) Downloaded 161 times
Re: [MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
So I loaded your mod and saves up, and wandered around for ten minutes, killed a few biter bases, but I never saw script performance with 0.4.2 exceed 0.3, nowhere near 9ms. I figured maybe because I use a SSD, it was hiding the issue, so I also downloaded factorio to my standard slow hard drive and while performance was a tad worse, still nowhere near 9ms.wahming wrote:Running into some performance issues with 0.4.2. Getting pretty jerky. Performance completely restored once I removed the mod.
So was there anything in particular you were doing to trigger the issue? If you prefer, I should be around on #factorio IRC this weekend.
Re: [MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
I wasn't really doing anything special. I would note though, that I had been playing for a few hours straight. Any chance of a memory leak?
Re: [MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
So you didn't see the 9ms usage until after several hours? Hmmm.wahming wrote:I wasn't really doing anything special. I would note though, that I had been playing for a few hours straight. Any chance of a memory leak?
I dumped the mod saved memory first thing to see if I could spot anything unusual. There were some minor issues that I caught but nothing that I think accounts for the performance you saw.
Re: [MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
Ok, so I am going to work on a developer mode GUI which you should be able to toggle and flip on/off Misanthrope behaviors to hopefully allow you to debug if/when the issue with performance repeats.wahming wrote:I wasn't really doing anything special. I would note though, that I had been playing for a few hours straight. Any chance of a memory leak?
-
- Inserter
- Posts: 34
- Joined: Sat Jan 31, 2015 3:36 pm
- Contact:
-
- Inserter
- Posts: 34
- Joined: Sat Jan 31, 2015 3:36 pm
- Contact:
Re: [MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
Pretty silly but the problem there was that i didn't have a base yet. As in not a single building.
Edit: scrap that it also happens with buildings present (but maybe not in range of biters?)
The evolution problem however is real. Its going to 100 within 15 mins:
Edit: scrap that it also happens with buildings present (but maybe not in range of biters?)
The evolution problem however is real. Its going to 100 within 15 mins:
Re: [MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
I replied in the mod portal, but to repeat, I'll take a look and fix.
Re: [MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
How to exclude rails?
I know theres a mod for it, but it dont work for 1.3... and i cant find another one...
I know theres a mod for it, but it dont work for 1.3... and i cant find another one...
-
- Burner Inserter
- Posts: 6
- Joined: Mon Jul 11, 2016 2:00 pm
- Contact:
Re: [MOD 0.12.20+] Misanthrope 0.3.7 -- Better Biter Mechanics
seconded, it would be nice to have an option to make rails biter-proof, for those of us who want to make multiple semi-independent outposts rather than a single sprawling amoeba with nothing outside its borders except biters.nuhll wrote:How to exclude rails?
I know theres a mod for it, but it dont work for 1.3... and i cant find another one...