(Solved) error when trees spawn on the map (I think)

Started by Igabod, December 23, 2014, 03:13:35 PM

Previous topic - Next topic

Igabod

I've got an error that keeps popping up periodically during game play in the newest version of my Xtra Plants mod that I'm working on. I can't seem to track down the actual cause of the problem, but Skullywag thinks it has to do with the seedShoot of the trees. I didn't have this problem in version 3.0 which is currently available, and the only trees I've added since then are exact copies of a tree that was in 3.0. Skully and I are unable to figure this out ourselves so I was hoping someone else might be able to help us. Here's a screenshot the error message.

Download the bugged version of it here
If there is any other info I need to provide to help diagnose the problem then let me know.

Malaras

I'm a noob modder, But to me it seems as it's says, The object isn't set to instance of an object. Might be the problem with it getting the file name as it's spammed all over the debug"file name unknown". So it might be a problem with the file it's pointing too? The object.

And also is this on largest map? Cause i've read in numerous threads/posts, That with the biggest maps there are problems with the edges. As they are not tested.

Igabod

it happens on all maps of all sizes. As for the rest of your answer, it made no sense to me at all. Objects don't point to files. And that's not the error message you would get if you set the file path for the texture wrong.

Loki88

Does it happen every time you generate a new map no matter what biome, or is it more specific with triggering conditions? Not like I can promise to be of much use but would you let me take a look and see what happens?

Loki88

Quote from: Loki88 on December 24, 2014, 08:37:01 AM
Does it happen every time you generate a new map no matter what biome, or is it more specific with triggering conditions? Not like I can promise to be of much use but would you let me take a look and see what happens?

I'm a dork, I didn't see the link up there :(

Igabod

it happens on all maps of all sizes and biome types as far as I can tell.

Haplo

It looks like it has problems spawning the seeds. The seed Def? may not be set?
But I don't know how that could be as I don't know anything about the plants code..

Igabod

Quote from: Haplo on December 24, 2014, 10:26:11 AM
It looks like it has problems spawning the seeds. The seed Def? may not be set?
But I don't know how that could be as I don't know anything about the plants code..

There is no def for seeds in XML. And if that was the case then I should have had this problem in the previous versions of the mod which work perfectly fine. It would have to be something I've added since V3.0. To help track the problem down, here is my change log for 4.0.


Added new trees:

Camellia
Japanese Maple

Added new flowers:

Pink Rimstalk - by Viperlol

Added new plants:

Wild Grape Vine (produce wild grapes)
Seedless Grape Vine (not an actual plant, a building that automatically produces seedless grapes every 5 days.)

Added new foods:

Wild Grapes (also useful for making low quality wine)
Seedless Grapes (also useful for making high quality wine)
Berry Wine (lowest quality wine, made from berries)
Low Quality Wine (made from wild grapes)
High Quality Wine (made from seedless grapes)

Added new resources:

Grape Seed (used to construct Seedless Grape Vines)

Added new work tables:

Wine Press (used to press berries and grapes into wine)

Textures replaced:

Bamboo - by Loki88
Seedless Grape Vine - by Plymouth

Loki88

I can't see anything different with the code for the camellia, pink rimstalk, or wild grapes. Lowering the commonality of the camellia in the biomes slowed the appearance of the error but I don't think that's useful. All I've got is eleminating additions one by one until it stops coming up, or rebuilding it one addition at a time from 3.0 though both would be a lot of work. Sorry for not being able to help :(

Igabod

Quote from: Loki88 on December 24, 2014, 11:40:07 AM
I can't see anything different with the code for the camellia, pink rimstalk, or wild grapes. Lowering the commonality of the camellia in the biomes slowed the appearance of the error but I don't think that's useful. All I've got is eleminating additions one by one until it stops coming up, or rebuilding it one addition at a time from 3.0 though both would be a lot of work. Sorry for not being able to help :(

Yeah I have already thought of rebuilding it 1 feature at a time. I figured I'd post this thread before I go to all that trouble just to see if a fresh pair of eyes could spot the problem. If nobody is able to find it in a few days I'll start the rebuilding process.

skullywag

remove everything bar the tree defs, im sure its in there, maybe def name length or reserved word or something. Get it down to just the trees and confirm that then start removing them 1 by 1
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

ItchyFlea

If it helps I encountered this with your 3.0 version, but didn't think anything of it at the time and as such didn't mention it anywhere.

Only thing I can suggest is keep the <seedShootRadius> at 15 for all trees. I suspect the game is coded to ensure that a radius of 15 or less doesn't shoot seeds off of the map edge, but any higher it sometimes fails, causing this error to occur.
All my mods are licensed under a Attribution-NonCommercial-ShareAlike 4.0 International
Ask for permission before using in ModPacks

Click here for a list of the mods I've created

Igabod

Unfortunately it doesn't help that this was present in 3.0 too. That makes it even harder to track down. And apparently it wasn't the seedshoot radius thing. I just changed them all to 15 and still got the error.


Tynan

It is a bit mysterious.

I would write a bit of code to log all the seed defs at runtime to make sure that every tree has a seed def as intended. All I can think of is that a seed def isn't being generated. Are you creating defs on the fly or something strange like that?
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Igabod

Quote from: Tynan on December 25, 2014, 08:19:23 PM
It is a bit mysterious.

I would write a bit of code to log all the seed defs at runtime to make sure that every tree has a seed def as intended. All I can think of is that a seed def isn't being generated. Are you creating defs on the fly or something strange like that?

As far as I was aware the base game already created the seed defs on the fly. I haven't done anything except copy the Poplar tree def and edit it. Then I just copied and edited the other trees from that.