Differences From
Artifact [fff344db38]:
275 275 -- firstborn ("god-tier"): exceptional
276 276
277 277 local batteryTiers = {
278 278 makeshift = {
279 279 name = 'Makeshift'; capacity = .5, decay = 3, leak = 2, dischargeRate = 1,
280 280 fab = starlit.type.fab {
281 281 element = {copper=10};
282 + cost = {power = 0.3};
283 + time = {print = .25};
282 284 };
283 285 desc = "Every attosecond this electrical abomination doesn't explode in your face is but the unearned grace of the Wild Gods.";
284 286 complexity = 1;
285 287 sw = {rarity = 1};
286 288 };
287 289 imperial = {
288 290 name = 'Imperial'; capacity = 2, decay = 2, leak = 2, dischargeRate = 2;
289 291 fab = starlit.type.fab {
290 292 element = {copper=15, iron = 20};
291 293 size = { print = 0.1 };
294 + cost = {power = 2};
295 + time = {print = .5};
292 296 };
293 297 desc = "The Empire's native technology is a lumbering titan: bulky, inefficient, unreliable, ugly, and awesomely powerful. Their batteries are no exception, with raw capacity and throughput that exceed even Usukinwya designs.";
294 298 drm = 1;
295 299 complexity = 2;
296 300 sw = {rarity = 2};
297 301 };
298 302 commune = {
299 303 name = 'Commune'; capacity = 1, decay = .5, leak = .2, dischargeRate = 1;
300 304 fab = starlit.type.fab {
301 305 element = {vanadium = 50};
302 306 metal = {steel=10};
303 307 size = { print = 0.05 };
308 + cost = {power = 1};
304 309 };
305 310 desc = "The Commune's proprietary battery designs prioritize reliability, compactness, and maintenance concerns above raw throughput, with an elegance of engineering and design that would make a Su'ikuri cry.";
306 311 complexity = 5;
307 312 sw = {rarity = 3};
308 313 };
309 314 usukwinya = {
310 315 name = 'Usukwinya'; capacity = 2, decay = 1, leak = 1, dischargeRate = 1.5,
311 316 fab = starlit.type.fab {
312 317 element = {argon=10};
313 318 metal = {vanadium=30};
314 319 size = { print = 0.07 };
320 + cost = {power = .8};
315 321 };
316 322 desc = "A race of consummate value engineers, the Usukwinya have spent thousands of years refining their tech to be as cheap to build as possible, without compromising much on quality. The Tradebirds drive an infamously hard bargain, but their batteries are more than worth their meagre cost.";
317 323 drm = 2;
318 324 sw = {rarity = 10};
319 325 complexity = 15;
320 326 };
321 327 eluthrai = {
322 328 name = 'Eluthrai'; capacity = 3, decay = .4, leak = .1, dischargeRate = 1.5,
323 329 fab = starlit.type.fab {
324 330 element = {beryllium=20, platinum=20, technetium = 1};
325 331 metal = {cinderstone = 10};
326 332 size = { print = 0.03 };
333 + cost = {power = 10};
334 + time = {print = 2};
327 335 };
328 336 desc = "The uncompromising Eluthrai are never satisfied until every quantifiable characteristic of their tech is maximally optimised down to the picoscale. Their batteries are some of the best in the Reach, and unquestionably the most expensive -- especially for those lesser races trying to copy the designs without the benefit of the sublime autofabricator ecosystem of the Eluthrai themselves.";
329 337 complexity = 200;
330 338 sw = {rarity = 0}; -- you think you're gonna buy eluthran schematics on SuperDiscountNanoWare.space??
331 339 };
332 340 firstborn = {
333 341 name = 'Firstborn'; capacity = 5, decay = 0.1, leak = 0, dischargeRate = 3;
334 342 fab = starlit.type.fab {
335 343 element = {neodymium=20, xenon=150, technetium=5};
336 344 metal = {sunsteel = 10};
337 345 crystal = {astrite = 1};
338 346 size = { print = 0.05 };
347 + cost = {power = 50};
348 + time = {print = 4};
339 349 };
340 350 desc = "Firstborn engineering seamlessly merges psionic effects with a mastery of the physical universe unattained by even the greatest of the living Starsouls. Their batteries reach levels of performance that strongly imply Quantum Gravity Theory -- and several major holy books -- need to be rewritten. From the ground up.";
341 351 complexity = 1000;
342 352 sw = {rarity = 0}; -- lol no
343 353 };
344 354 }
345 355
346 356 local batterySizes = {
347 - small = {name = 'Small', capacity = .5, dischargeRate = .5, complexity = 1, matMult = .5, fab = starlit.type.fab {size={print=0.1}}};
348 - mid = { capacity = 1, dischargeRate = 1, complexity = 1, matMult = 1, fab = starlit.type.fab {size={print=0.3}}};
349 - large = {name = 'Large', capacity = 2, dischargeRate = 1.5, complexity = 1, matMult = 1.5, fab = starlit.type.fab {size={print=0.5}}};
350 - huge = {name = 'Huge', capacity = 3, dischargeRate = 2, complexity = 1, matMult = 2, fab = starlit.type.fab {size={print=0.8}}};
357 + small = {name = 'Small', capacity = .5, dischargeRate = .5, complexity = 1, matMult = .5,
358 + fab = starlit.type.fab {size={print=0.1},cost={power=.5},time={print=25}}};
359 + mid = { capacity = 1, dischargeRate = 1, complexity = 1, matMult = 1,
360 + fab = starlit.type.fab {size={print=0.3},cost={power=1},time={print=40}}};
361 + large = {name = 'Large', capacity = 2, dischargeRate = 1.5, complexity = 1, matMult = 1.5,
362 + fab = starlit.type.fab {size={print=0.5},cost={power=2},time={print=60}}};
363 + huge = {name = 'Huge', capacity = 3, dischargeRate = 2, complexity = 1, matMult = 2,
364 + fab = starlit.type.fab {size={print=0.8},cost={power=8},time={print=120}}};
351 365 }
352 366
353 367 local batteryTypes = {
354 368 supercapacitor = {
355 369 name = 'Supercapacitor';
356 370 desc = 'Room-temperature superconductors make for very reliable, high-dischargeRate, but low-capacity batteries.';
357 371 fab = starlit.type.fab {
358 372 metal = { enodium = 5 };
359 373 size = {print=0.8};
374 + cost = {power = 1e3};
360 375 };
361 376 sw = {
362 377 cost = {
363 - cycles = 5e9; -- 5 bil cycles
364 - ram = 10e9; -- 10GB
378 + cycles = 48e9; -- 48 bil cycles
379 + ram = 4e9; -- 10GB
365 380 };
366 381 pgmSize = 2e9; -- 2GB
367 382 rarity = 5;
368 383 };
369 384 capacity = 50e3, dischargeRate = 1000;
370 385 leak = 0, decay = 1e-6;
371 386
................................................................................
373 388 };
374 389 chemical = {
375 390 name = 'Chemical';
376 391 desc = '';
377 392 fab = starlit.type.fab {
378 393 element = { lithium = 3 };
379 394 size = {print=1.0};
395 + cost = {power = .5e3};
380 396 };
381 397 sw = {
382 398 cost = {
383 - cycles = 1e9; -- 1 bil cycles
384 - ram = 2e9; -- 2GB
399 + cycles = 16e9; -- 16 bil cycles
400 + ram = 1e9; -- 1GB
385 401 };
386 402 pgmSize = 512e6; -- 512MB
387 403 rarity = 2;
388 404 };
389 405 capacity = 200e3, dischargeRate = 200;
390 406 leak = 0.2, decay = 1e-2;
391 407 complexity = 1;
................................................................................
393 409 carbon = {
394 410 name = 'Carbon';
395 411 desc = 'Carbon nanotubes form the basis of many important metamaterials, chief among them power-polymer.';
396 412 capacity = 1;
397 413 fab = starlit.type.fab {
398 414 element = { carbon = 40 };
399 415 size = {print=0.5};
416 + cost = {power = 2.5e3};
400 417 };
401 418 sw = {
402 419 cost = {
403 - cycles = 50e9; -- 50 bil cycles
404 - ram = 64e9; -- 64GB
420 + cycles = 256e9; -- 256 bil cycles
421 + ram = 16e9; -- 64GB
405 422 };
406 - pgmSize = 1e9; -- 1GB
423 + pgmSize = 4e9; -- 4GB
407 424 rarity = 10;
408 425 };
409 426 capacity = 100e3, dischargeRate = 500;
410 427 leak = 0.1, decay = 1e-3;
411 428 complexity = 10;
412 429 };
413 430 hybrid = {
................................................................................
416 433 capacity = 1;
417 434 fab = starlit.type.fab {
418 435 element = {
419 436 lithium = 10;
420 437 carbon = 20;
421 438 };
422 439 size = {print=1.5};
440 + cost = {power = 10e3};
423 441 };
424 442 sw = {
425 443 cost = {
426 - cycles = 65e9; -- 65 bil cycles
427 - ram = 96e9; -- 96GB
444 + cycles = 512e9; -- 512 bil cycles
445 + ram = 24e9; -- 96GB
428 446 };
429 - pgmSize = 5e9; -- 5GB
447 + pgmSize = 7e9; -- 7GB
430 448 rarity = 15;
431 449 };
432 450 capacity = 300e3, dischargeRate = 350;
433 451 leak = 0.3, decay = 1e-5;
434 452 complexity = 30;
435 453 };
436 454 }
437 455
456 +--[[
438 457 local function elemath(dest, src, mult)
439 458 dest = dest or {}
440 459 for k,v in pairs(src) do
441 460 if not dest[k] then dest[k] = 0 end
442 461 dest[k] = dest[k] + v*mult
443 462 end
444 463 return dest
445 -end
464 +end]]
446 465
447 466 for bTypeName, bType in pairs(batteryTypes) do
448 467 for bTierName, bTier in pairs(batteryTiers) do
449 468 for bSizeName, bSize in pairs(batterySizes) do
450 469 -- elemath(elementCost, bType.fab.element or {}, bSize.matMult)
451 470 -- elemath(elementCost, bTier.fab.element or {}, bSize.matMult)
452 471 -- elemath(metalCost, bType.fab.metal or {}, bSize.matMult)
................................................................................
764 783 })
765 784 end)
766 785
767 786 -- in case other mods want to define their own tiers
768 787 E.chip.tiers = lib.registry.mk 'starlit_electronics:chipTiers'
769 788 E.chip.tiers.meld {
770 789 -- GP chips
771 - tiny = {name = 'Tiny Chip', clockRate = 512e3, flash = 4096, ram = 1024, powerEfficiency = 1e9, size = 1};
772 - small = {name = 'Small Chip', clockRate = 128e6, flash = 512e6, ram = 512e6, powerEfficiency = 1e8, size = 3};
773 - med = {name = 'Chip', clockRate = 1e9, flash = 4e9, ram = 4e9, powerEfficiency = 1e7, size = 6};
774 - large = {name = 'Large Chip', clockRate = 2e9, flash = 8e9, ram = 8e9, powerEfficiency = 1e6, size = 8};
790 + tiny = {name = 'Tiny Chip', clockRate = 512e3, flash = 4096, ram = 1024, powerEfficiency = 1e10, size = 1};
791 + small = {name = 'Small Chip', clockRate = 128e6, flash = 512e6, ram = 512e6, powerEfficiency = 1e9, size = 3};
792 + med = {name = 'Chip', clockRate = 1e9, flash = 4e9, ram = 4e9, powerEfficiency = 1e8, size = 6};
793 + large = {name = 'Large Chip', clockRate = 2e9, flash = 8e9, ram = 8e9, powerEfficiency = 1e7, size = 8};
775 794 -- specialized chips
776 - compute = {name = 'Compute Chip', clockRate = 4e9, flash = 24e6, ram = 64e9, powerEfficiency = 1e8, size = 4};
777 - data = {name = 'Data Chip', clockRate = 128e3, flash = 2e12, ram = 32e3, powerEfficiency = 1e5, size = 4};
778 - lp = {name = 'Low-Power Chip', clockRate = 128e6, flash = 64e6, ram = 1e9, powerEfficiency = 1e10, size = 4};
779 - carbon = {name = 'Carbon Chip', clockRate = 64e6, flash = 32e6, ram = 2e6, powerEfficiency = 2e9, size = 2, circ='carbon'};
795 + compute = {name = 'Compute Chip', clockRate = 4e9, flash = 24e6, ram = 64e9, powerEfficiency = 1e9, size = 4};
796 + data = {name = 'Data Chip', clockRate = 128e3, flash = 2e12, ram = 32e3, powerEfficiency = 1e6, size = 4};
797 + lp = {name = 'Low-Power Chip', clockRate = 128e6, flash = 64e6, ram = 1e9, powerEfficiency = 1e11, size = 4};
798 + carbon = {name = 'Carbon Chip', clockRate = 64e6, flash = 32e6, ram = 2e6, powerEfficiency = 2e10, size = 2, circ='carbon'};
780 799 }
781 800
782 801 E.chip.tiers.foreach('starlit_electronics:genChips', {}, function(id, t)
783 802 id = t.id or string.format('%s:chip_%s', minetest.get_current_modname(), id)
784 803 local circMat = t.circ or 'silicon';
785 804 starlit.item.chip.link(id, {
786 805 name = t.name;
................................................................................
792 811 flag = {
793 812 silicompile = true;
794 813 };
795 814 time = {
796 815 silicompile = t.size * 24*60;
797 816 };
798 817 cost = {
799 - energy = 50e3 + t.size * 15e2;
818 + power = 50e3 + t.size * 15e2;
800 819 };
801 820 element = {
802 821 [circMat] = 50 * t.size;
803 822 copper = 30;
804 823 gold = 15;
805 824 };
806 825 };