I'm new to making mods but at the last part of the object file, I'm having trouble understanding what some of this is
This part is what drops from the fully grown crop. What can drop here is 1 Chili Seed, 1 Plant Fibre, and 1-3 Chili. It's not 100%, so sometimes you won't get the chili, in this example. I asked yesterday to no avail, but someone should come along eventually and help figure that out. "duration" : [2820, 2940], This part is the time it takes to grow. Between 2820 seconds and 2940 seconds. At minimum, that's 47 MINUTES for a CHANCE to grow. My suggestion is to copy the duration from wheat, as it's a much shorter time (300-420 seconds), for testing purposes.
I can add something to that: The line "command" : "die" will make the object break itself, this will always yield the seed used to plant it as far as I know Next the "growing"-body, inside there you can specify how the plant progresses through its stages each stage has a number to identify it, each stage also has its own duration "success" specifies the next stage if the growth was successful "failure" specifies the next stage if the growth failed (this never seems to happen in the current version)
Thanks, another thing in the frames section that is different for farmables. "names" : [ [ "default.0.0", "default.1.0", "default.2.0", "default.2.1", "default.2.2", "default.2.3", "default.2.4", "default.3.0" ] ] }, "aliases" : { "default.default.default" : "default.0.0" } } wheat seeds have different "finishing/success"stages from what i understand? and the last frame of wheat has a failed crop. and corrosponds with the stage numbers. except that "2" doesnnt have a success to failure rate? }, "stageAlts" : { "count" : 4, "2" : 5 }
O god the alternatives gave me so many headaches. Anyway I'll tell you what I understand about them. So the frames file for wheat shows us that wheat has four different stages (0 to 3) and the names of the frames show to which stage they belong. As you already figured out, "default2.0" to "default2.4" are 5 different frames representing alternative graphics for the wheats "2" stage, the fully grown stage. now, "stageAlts" is a confusing thing, despite its name it seems to me that you should always include the "stageAlts" part in your files even if none of your stages have alts. The reason is that "count" specifies the total number of stages. (So for wheat its 4 stages, 0-1-2-3) The game needs this "count" value to initialize the object correctly and it apparently needs it inside this "stageAlts". If you don't have this set to the correct number of stages your object has, the game might crash at different times without error message. The second entry "2" : 5 specifies that stage 2 has 5 different possible graphics in total. So when the plant grows to stage 2, the game will pick a random frame that belongs to stage 2 and show it. I reckon it's important that the information in the .frames and the .object files are consistent. So if "stageAlts" specifies 5 exchangeable frames for stage 2, the .frames file must specify which 5 frames belong to that stage.
Thanks that cleared up so much. So since my plant has only one stage, I should change that to "4" : 1 ? there are 5 stages with 5th being the failed stage frame like wheat. Also the drop chance part, if im understanding it correctly has different "packages" to chose from? what about the 0.3 just under drop options?
Hmm can you post an image of your plant so I can get a better understanding of it? Remember that the "failed" stage is its own stage too, so if you have one stage plus a "failed" stage thats two stages total.
Its supposed to be a cannabis plant that grows into the 4th stage. its not the most artfully drawn but the plant in real life is huge and has lots of detail and smaller leaves
Hmm if you want your plant to slowly progress through all these frames, then each frame is its own stage: first thing, under "growing" add stage 2 and set its "success" to 3, then set "failure" of all stages to 4, so it refers to stage number 4 with the spoiled plant.
Nope, as far as I can tell, crops never fail in this version of Starbound (They would fail an awful lot if success/failure was the actual ratio, when you think about it)
True, but it would be interesting to see some serious farming with more dedicated resources and a chance of failing or not yielding good harvest. some system that promotes large scale farms rather than todays "backyard gardens" And maybe it fails on icy or moon biomes, or on asteroids.
Ok so loot tables. I'm not 100% sure on them but here's what i think: the 0.3 at the beginning states that theres a 30% chance for one of the following packages to drop. it might not do anything on its own, I haven't tested it, but there are some effects once you start using more numbers. so it picks one of the following packages at random. packages are the things inside [ ] - only one of them will be dropped when you harvest the plant but a single package can contain multiple items and all items in the package will be dropped when it is chosen. an item and the amount in which it drops is specified inside { } going back to the numbers say you want to have a really rare drop, only 10% chance for example. In that case you can put that package at the lower end of the loot table and write 0.1 above it, then go back up to the top and change the 0.3 to 0.9 this will result in the rare drop appearing 10% of the time and all other possible drops showing up 90% of the time
also you might want to look out for the line "interactionTransition" : { "2" : { i noticed your plant is only fully grown at stage 3, so you might want to change that 2 to a 3
Thanks for everything I think that is it for that crop which will give a reference to the others in my mod