Page 1 of 1
Discrete nanoparticles
Posted: 17 Feb 2007, 12:26
by KDR_11k
I'm not sure if everybody knows this already but here it goes:
Spring thinks it runs at 32 frames per second (actually 30 but that's another discussion). The minimum interval between two consecutive events is 1 frame or 1/32 of a Spring second. Nanospray is spawned once per frame if sudfficient ressources are available. A nanoparticle always costs the same to make for a construction and always contributes the same to the construction. That means if the buildtime of a unit is not an integral multiple of the builder's workertime divided by 32 the construction costs more than the fbi says it does. For many mods that rounding error is of no consequence but for some it could be important (e.g. if you have a fixed ressource allocation for a given time and want to make sure that allocation covers exactly a set of built units).
This means that if you need there to be zero overpaying you should set your workertimes to integral multiples (or fractions) of 32 and similarily set the build times. If you want something to be built in one frame (i.e. instantly) make sure it takes exactly 1/32 of the workertime to build, using e.g. 1/100 would mean it costs a lot more than it should. If something needs less than one nanoparticle to be finished (whether that's the whole construction or just the last bit of it) you still pay for the whole nanoparticle.
Posted: 17 Feb 2007, 14:52
by bwansy
Does it mean that the nano-particles are not merely visual effects, and that the resouces are not transfered directly to the nano-cloud, but instead, the resource is used for making nano-particles, and the nano-cloud receives the resource when being hit by the nano-particles?
Posted: 17 Feb 2007, 14:59
by chlue
Fly with a damaged plane over a nanotower on patrol. They plane will get the repair instant and the particleflow is only a visual effect.
I understand KDR_11k is saying, that the generated amout is quantized. The effect will still apply instant.
Posted: 17 Feb 2007, 15:52
by smoth
bwansy wrote:Does it mean that the nano-particles are not merely visual effects, and that the resouces are not transfered directly to the nano-cloud, but instead, the resource is used for making nano-particles, and the nano-cloud receives the resource when being hit by the nano-particles?
no, in gundam units are built by the whitebase before particles ever arive.
Posted: 17 Feb 2007, 15:54
by Decimator
The construction appears to be applied when the nanoparticle is created. If you want to see it in action, try forcing a stall and then building something with the commander.
Posted: 17 Feb 2007, 15:57
by Saktoth
You know, i was using multiples of 32 for
everything when i first started messing with mods. Force of habit. Then i just started using rounded numbers since i figured there wasnt any point. I guess i should have stuck to old habits.
the nano-cloud receives the resource when being hit by the nano-particles?
No. The nanoparticles themselves dont do anything. Resources are received instantly by the nanoframe. Just happens that nanoparticles correspond to the rate at which the 'packets' of resources are sent. Its really these instantly recieved packets which KDR is talking about.
Posted: 17 Feb 2007, 16:10
by smoth
Decimator wrote:The construction appears to be applied when the nanoparticle is created. If you want to see it in action, try forcing a stall and then building something with the commander.
I would say that is true but what about factories with multiple nanolathes? For example the federation level1 has 2 and the zeon level1 has one. However, this gives no construction speed boost. I personal know it is just a graphical effect as I have disabled them in the past.
I think what kdk is trying to say is just the emission rate. I am not sure what in particular he is getting at.
Posted: 17 Feb 2007, 16:19
by KDR_11k
Mostly the rounding errors, I've been wondering in the past how much of the ressources a builder drains go into each chunk and why some units cost 51 instead of 50 as they should, etc.
Aren't multiple nanolathes just one beam that gets emitted from a different piece each frame?
Posted: 17 Feb 2007, 20:08
by bwansy
I see. Thanks everyone for telling me about it. I haven't played Spring for quite some time.
About the problem, is it like you buy something for, say, $3.56, no change, but you only have 1 dollar bills so that you are forced to pay $4? And does this rounding error happen at the end of the construction or does it happen every second?
Posted: 17 Feb 2007, 20:25
by KDR_11k
I think it only happens at the end but if you're using numbers that are hard to divide you may end up with a large accumulated error due to float accuracy, too.
Posted: 17 Feb 2007, 21:27
by AF
When resources are taken away a nanoparticle is emmitted. The nanoparticle doesnt cost anything, but rather its showing that the transaction took place.
And since nanoparicle speed is regardlesss of how quickly you build, buildings will finish before the particles reach them.
Posted: 17 Feb 2007, 22:40
by Yatta
Im doing a mod where units are instantly built for a certain ammount of metal.
Ive met a problem with the settings of the factory building those units.
If you set the factory WorkerTime to a high value, and the unit to be built dont cost much, the "nano chunks" sent will cost more metal than used for the unit.
I could somewhat attenuate this effect by tweaking workertime of the factory and Buildtime of the units, but theres still some metal spent.
Also, when you're out of metal, and its slowly refilling, the builder/factory wont continue building until the "minimum metal ammount to spray nanolathe" is reached. I guess workertime and this "minimal ressources ammount" are linked.
Posted: 18 Feb 2007, 07:13
by KDR_11k
As I said, the minimum amount is the size of one chunk and one chunk is 1/32 of the workertime. Dozerz has instant building and by using a workertime of 32 with a buildtime of 1 it charges exactly the right amount.
Posted: 18 Feb 2007, 20:00
by Argh
Interesting. I'll have to incorporate that fix into NanoBlobs, among other things. Now that I think about it, it's probably one of the things causing the economic sim to behave so bizarrely... hmm...
Posted: 19 Feb 2007, 15:55
by AF
also, if your factory builds the untis at a rate of 1 per secondand you add a builder ot assist, that builder will till consume resources and the unit will not build faster.
A unit is built every 32 frames. Any more builders you add will be a waste of time and resources.
For proof, use .nocost and look at the build speed, they popout and second intervals, when they have zero buildtime and cost.
Posted: 19 Feb 2007, 16:00
by KDR_11k
Is that one second interval really between beginning of constructions or between the end of one and the beginning of the next construction? Also what about the time to clear the factory yard?
Posted: 19 Feb 2007, 16:25
by Saktoth
Most OTA constructors have a 'unpacking' time anyway. They waste ages getting their nano thingy out and dont start consuming resources until they do.
Surely if you assisted instant construction with an OTA based con, he wouldnt even open up in time to help.