Merge branch 'main' of https://github.com/JustAGenericUsername/sandboxelsmodding
This commit is contained in:
commit
80f49c625d
|
|
@ -10,6 +10,7 @@
|
||||||
<meta name="copyright" content="R74n">
|
<meta name="copyright" content="R74n">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="robots" content="all">
|
<meta name="robots" content="all">
|
||||||
|
<link rel="canonical" href="https://sandboxels.r74n.com/mod-list" id="canonicalLink"/>
|
||||||
|
|
||||||
<!--Favicons-->
|
<!--Favicons-->
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="icons/apple-touch-icon.png?v=2">
|
<link rel="apple-touch-icon" sizes="180x180" href="icons/apple-touch-icon.png?v=2">
|
||||||
|
|
@ -22,21 +23,26 @@
|
||||||
<meta name="theme-color" content="#000000">
|
<meta name="theme-color" content="#000000">
|
||||||
|
|
||||||
<!--OpenGraph-->
|
<!--OpenGraph-->
|
||||||
<meta property="og:locale" content="en_US">
|
<meta property="og:locale" content="en_US">
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
<meta property="og:site_name" content="Sandboxels">
|
<meta property="og:title" content="Sandboxels Mod List">
|
||||||
<meta property="og:image" content="https://sandboxels.r74n.com/icons/wallpaper.png">
|
<meta property="og:description" content="Big list of mods for Sandboxels and a tutorial to enable them.">
|
||||||
<meta property="og:image:width" content="1980">
|
<meta property="og:url" content="https://sandboxels.r74n.com/mod-list">
|
||||||
<meta property="og:image:height" content="971">
|
<meta property="og:site_name" content="Sandboxels">
|
||||||
<meta property="og:image:type" content="image/png">
|
<meta property="og:image" content="https://sandboxels.r74n.com/icons/cover-3840x1240px-text.png">
|
||||||
<meta property="og:image:alt" content="A rainforest made in Sandboxels">
|
<meta property="og:image:width" content="3840">
|
||||||
|
<meta property="og:image:height" content="1240">
|
||||||
|
<meta property="og:image:type" content="image/png">
|
||||||
|
<meta property="og:image:alt" content="Magma falling into Water, forming Steam and Basalt. Pixel art style.">
|
||||||
|
|
||||||
<!--Twitter-->
|
<!--Twitter-->
|
||||||
<meta name="twitter:card" content="summary_large_image">
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
<meta name="twitter:site:id" content="1436857621827530753">
|
<meta name="twitter:title" content="Sandboxels Mod List">
|
||||||
<meta name="twitter:image" content="https://sandboxels.r74n.com/icons/card.png">
|
<meta name="twitter:description" content="Big list of mods for Sandboxels and a tutorial to enable them.">
|
||||||
<meta name="twitter:image:alt" content="A rainforest made in Sandboxels">
|
<meta name="twitter:site:id" content="1436857621827530753">
|
||||||
<meta name="twitter:creator:id" content="1436857621827530753">
|
<meta name="twitter:image" content="https://sandboxels.r74n.com/icons/cover-3840x1240px-text.png">
|
||||||
|
<meta name="twitter:image:alt" content="Magma falling into Water, forming Steam and Basalt. Pixel art style.">
|
||||||
|
<meta name="twitter:creator:id" content="1436857621827530753">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="style.css?nocache=3">
|
<link rel="stylesheet" type="text/css" href="style.css?nocache=3">
|
||||||
<style>
|
<style>
|
||||||
|
|
@ -56,6 +62,8 @@
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
background-color:#669e9e;
|
background-color:#669e9e;
|
||||||
color: black;
|
color: black;
|
||||||
|
font-family: 'Press Start 2P';
|
||||||
|
font-size: medium;
|
||||||
}
|
}
|
||||||
.deprecated {
|
.deprecated {
|
||||||
background-color: rgba(255, 0, 0, 0.125)!important;
|
background-color: rgba(255, 0, 0, 0.125)!important;
|
||||||
|
|
@ -123,6 +131,7 @@
|
||||||
<tr><td>classic_textures.js</td><td>Use textures from early versions of the game</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
<tr><td>classic_textures.js</td><td>Use textures from early versions of the game</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
<tr><td>color_everything.js</td><td>Allows every element to have a custom color</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
<tr><td>color_everything.js</td><td>Allows every element to have a custom color</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
<tr><td>death_count.js</td><td>Messages counting when Humans die</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
<tr><td>death_count.js</td><td>Messages counting when Humans die</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
|
<tr><td>devsnacks.js</td><td>Extra food ingredients and recipes; Only Tea stuff currently</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
<tr><td>devtests.js</td><td>Experimental features from the Sandboxels developer</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
<tr><td>devtests.js</td><td>Experimental features from the Sandboxels developer</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
<tr><td>edible_everything.js</td><td>Allows every element to be mixed into Batter and Dough</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
<tr><td>edible_everything.js</td><td>Allows every element to be mixed into Batter and Dough</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
<tr><td>fools.js</td><td>Re-adds FOOLS Mode</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
<tr><td>fools.js</td><td>Re-adds FOOLS Mode</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
|
|
@ -130,7 +139,9 @@
|
||||||
<tr><td>fools25.js</td><td>Re-adds the 2025 Element Modulator</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
<tr><td>fools25.js</td><td>Re-adds the 2025 Element Modulator</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
<tr><td>glow.js</td><td>[CHROME ONLY] Adds a cool lighting effect to many emissive pixels, like Fire</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
<tr><td>glow.js</td><td>[CHROME ONLY] Adds a cool lighting effect to many emissive pixels, like Fire</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
<tr><td>gravity_test.js</td><td>Test for altered gravity, makes all pixels move inward</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
<tr><td>gravity_test.js</td><td>Test for altered gravity, makes all pixels move inward</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
|
<tr><td>mustard.js</td><td>Mustard and Mustard Seeds</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
<tr><td>rainbow_cursor.js</td><td>Makes your cursor multicolored</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
<tr><td>rainbow_cursor.js</td><td>Makes your cursor multicolored</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
|
<tr><td>random_everything.js</td><td>Allows every element to be spawned with Random</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
<tr><td>smooth_water.js</td><td>Changes water mechanics so that it flows in one direction until it bounces off of something</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
<tr><td>smooth_water.js</td><td>Changes water mechanics so that it flows in one direction until it bounces off of something</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
<tr><td>souls.js</td><td>Human Souls, Ectoplasm, and Tombstones</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
<tr><td>souls.js</td><td>Human Souls, Ectoplasm, and Tombstones</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
<tr><td>spring.js</td><td>Many nature elements, like sakura trees, butterflies, beehives, and more</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
<tr><td>spring.js</td><td>Many nature elements, like sakura trees, butterflies, beehives, and more</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
|
|
@ -170,6 +181,7 @@
|
||||||
<tr><td>pixelResizeTool.js</td><td>Button to change pixel scale</td><td>feeshmaster</td></tr>
|
<tr><td>pixelResizeTool.js</td><td>Button to change pixel scale</td><td>feeshmaster</td></tr>
|
||||||
<tr><td>prompt.js</td><td>Primitive command console</td><td>Alice</td></tr>
|
<tr><td>prompt.js</td><td>Primitive command console</td><td>Alice</td></tr>
|
||||||
<tr><td>prop.js</td><td>Tool to edit the attributes of pixels</td><td>Alice</td></tr>
|
<tr><td>prop.js</td><td>Tool to edit the attributes of pixels</td><td>Alice</td></tr>
|
||||||
|
<tr><td>random_everything.js</td><td>Allows every element to be spawned with Random</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
<tr><td>replace_all.js</td><td>Way to replace every pixel of an element with another element <a href="https://github.com/R74nCom/sandboxels/commit/0066cea82345a5bc3a990df858239104e8ca9d44">[More Info]</a></td><td>Alice</td></tr>
|
<tr><td>replace_all.js</td><td>Way to replace every pixel of an element with another element <a href="https://github.com/R74nCom/sandboxels/commit/0066cea82345a5bc3a990df858239104e8ca9d44">[More Info]</a></td><td>Alice</td></tr>
|
||||||
<tr><td>replace.js</td><td>Tool that replaces every pixel of a specified element with another specified element [" to open]</td><td>Alice</td></tr>
|
<tr><td>replace.js</td><td>Tool that replaces every pixel of a specified element with another specified element [" to open]</td><td>Alice</td></tr>
|
||||||
<tr><td>save_loading.js</td><td>The ability to save and load scenes from files [See the info page of the element]</td><td>Alice</td></tr>
|
<tr><td>save_loading.js</td><td>The ability to save and load scenes from files [See the info page of the element]</td><td>Alice</td></tr>
|
||||||
|
|
@ -280,11 +292,13 @@
|
||||||
<tr><td>bananas.js</td><td>Bananas and banana plants</td><td>Alice</td></tr>
|
<tr><td>bananas.js</td><td>Bananas and banana plants</td><td>Alice</td></tr>
|
||||||
<tr><td>CherrySoda.js</td><td>Materials to make cherry soda</td><td>guzzo86</td></tr>
|
<tr><td>CherrySoda.js</td><td>Materials to make cherry soda</td><td>guzzo86</td></tr>
|
||||||
<tr><td>community_desserts.js</td><td>Various desserts from community suggestions</td><td>Tisquares</td></tr>
|
<tr><td>community_desserts.js</td><td>Various desserts from community suggestions</td><td>Tisquares</td></tr>
|
||||||
|
<tr><td>devsnacks.js</td><td>Extra food ingredients and recipes; Only Tea stuff currently</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
<tr><td>GrapeSoda.js</td><td>Materials to make grape soda</td><td>guzzo86</td></tr>
|
<tr><td>GrapeSoda.js</td><td>Materials to make grape soda</td><td>guzzo86</td></tr>
|
||||||
<tr><td>greenitemsandmore.js</td><td>Various green things, including apples and more food</td><td>zonneschijn7</td>
|
<tr><td>greenitemsandmore.js</td><td>Various green things, including apples and more food</td><td>zonneschijn7</td>
|
||||||
<tr><td>ketchup_mod.js</td><td>Many ketchup related elements, plus a few other condiments</td><td>Nubo318, Devi, Alice</td></tr>
|
<tr><td>ketchup_mod.js</td><td>Many ketchup related elements, plus a few other condiments</td><td>Nubo318, Devi, Alice</td></tr>
|
||||||
<tr><td>lemonade.js</td><td>Lemons and lemonade</td><td>personman, baconthemyth</td></tr>
|
<tr><td>lemonade.js</td><td>Lemons and lemonade</td><td>personman, baconthemyth</td></tr>
|
||||||
<tr><td>morefoodsmod.js</td><td>More foods</td><td>Clide4</td></tr>
|
<tr><td>morefoodsmod.js</td><td>More foods</td><td>Clide4</td></tr>
|
||||||
|
<tr><td>mustard.js</td><td>Mustard and Mustard Seeds</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||||
<tr><td>pizzasstuff.js</td><td>New animals, foods, and plants</td><td>_ilikepizza_</td></tr>
|
<tr><td>pizzasstuff.js</td><td>New animals, foods, and plants</td><td>_ilikepizza_</td></tr>
|
||||||
<tr><td>potato_chips.js</td><td>Potato chips and sunflower oil</td><td>guzzo86</td></tr>
|
<tr><td>potato_chips.js</td><td>Potato chips and sunflower oil</td><td>guzzo86</td></tr>
|
||||||
<tr><td>sbstuff.js</td><td>Many foods</td><td>stefanblox</td></tr>
|
<tr><td>sbstuff.js</td><td>Many foods</td><td>stefanblox</td></tr>
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,12 @@
|
||||||
v 0.1 added snake
|
v 0.1 added snake
|
||||||
v 0.11 "axolotl" eats fish
|
v 0.11 "axolotl" eats fish
|
||||||
v 0.2 crocodiles scales and axolotls actually eat fish now
|
v 0.2 crocodiles scales and axolotls actually eat fish now
|
||||||
|
v 0.3 chameleons + bugfixes
|
||||||
thats it for now
|
thats it for now
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
const defaultColors = ["#02c937", "#18d64a", "#09e644"];
|
||||||
|
|
||||||
// Only run this if the human, head, and body elements exist
|
// Only run this if the human, head, and body elements exist
|
||||||
if (elements.human && elements.head && elements.body) {
|
if (elements.human && elements.head && elements.body) {
|
||||||
// Human
|
// Human
|
||||||
|
|
@ -64,61 +66,66 @@ elements.human.reactions.snake =
|
||||||
{ attr1: { panic: 5 } }
|
{ attr1: { panic: 5 } }
|
||||||
|
|
||||||
elements.fish.reactions.toad_tadpole =
|
elements.fish.reactions.toad_tadpole =
|
||||||
{ elem2: null, chance: 0.25, func: behaviors.FEEDPIXEL },
|
{ elem2: null, chance: 0.25, func: behaviors.FEEDPIXEL }
|
||||||
|
|
||||||
elements.glue.reactions.scale =
|
if (!elements.glue.ignore.includes("scale")) {
|
||||||
{ elem1: null, elem2: "scale_plate" },
|
elements.glue.ignore.push("scale");
|
||||||
|
}
|
||||||
|
|
||||||
elements.lizard = {
|
danger = ["crocodile", "snake"];
|
||||||
color: ["#00ff1a", "#038f11"],
|
|
||||||
behavior: [
|
|
||||||
["XX", "XX", "M2%1"],
|
|
||||||
["XX", "FX%5", "M1%15"],
|
elements.lizard = {
|
||||||
["M2", "M1", "M2"],
|
color: ["#00ff1a", "#038f11"],
|
||||||
],
|
behavior: [
|
||||||
category: "life",
|
["XX", "XX", "M2%1"],
|
||||||
state: "solid",
|
["XX", "FX%5", "M1%15"],
|
||||||
reactions: {
|
["M2", "M1", "M2"],
|
||||||
"fly": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.5 },
|
],
|
||||||
"ant": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.3 },
|
category: "life",
|
||||||
"termite": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.3 },
|
state: "solid",
|
||||||
"worm": { elem2: null, func: behaviors.FEEDPIXEL },
|
reactions: {
|
||||||
"bee": { elem2: null, func: eatBee, chance: 0.05 },
|
"fly": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.5 },
|
||||||
"firefly": { elem2: null, func: eatBee, chance: 0.4 },
|
"ant": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.3 },
|
||||||
"fish": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.5 },
|
"termite": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.3 },
|
||||||
"oxygen": { elem2: "carbon_dioxide", chance: 0.5 },
|
"worm": { elem2: null, func: behaviors.FEEDPIXEL },
|
||||||
"pool_water": { chance: 0.001, elem1: "rotten_meat" },
|
"bee": { elem2: null, func: eatBee, chance: 0.05 },
|
||||||
"dirty_water": { chance: 0.0001, elem1: "rotten_meat" },
|
"firefly": { elem2: null, func: eatBee, chance: 0.4 },
|
||||||
"radiation": { elem1: ["ash", "meat", "cooked_meat", "rotten_meat", "snake", "crocodile", null], chance: 0.4 },
|
"fish": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.5 },
|
||||||
"mercury": { elem1: "rotten_meat", chance: 0.1 },
|
"oxygen": { elem2: "carbon_dioxide", chance: 0.5 },
|
||||||
"bleach": { elem1: "rotten_meat", chance: 0.1 },
|
"pool_water": { chance: 0.001, elem1: "rotten_meat" },
|
||||||
"infection": { elem1: "rotten_meat", chance: 0.025 },
|
"dirty_water": { chance: 0.0001, elem1: "rotten_meat" },
|
||||||
"uranium": { elem1: "rotten_meat", chance: 0.1 },
|
"radiation": { elem1: ["ash", "meat", "cooked_meat", "rotten_meat", "snake", "crocodile", "chameleon", null], chance: 0.4 },
|
||||||
"cyanide": { elem1: "rotten_meat", chance: 0.1 },
|
"mercury": { elem1: "rotten_meat", chance: 0.1 },
|
||||||
"chlorine": { elem1: "meat", chance: 0.1 },
|
"bleach": { elem1: "rotten_meat", chance: 0.1 },
|
||||||
"alcohol": { elem1: "meat", chance: 0.025 },
|
"infection": { elem1: "rotten_meat", chance: 0.025 },
|
||||||
"vinegar": { elem1: "rotten_meat", chance: 0.001 },
|
"uranium": { elem1: "rotten_meat", chance: 0.1 },
|
||||||
"poison": { elem1: "rotten_meat", elem2: null }
|
"cyanide": { elem1: "rotten_meat", chance: 0.1 },
|
||||||
},
|
"chlorine": { elem1: "meat", chance: 0.1 },
|
||||||
foodNeed: 5,
|
"alcohol": { elem1: "meat", chance: 0.025 },
|
||||||
temp: 20,
|
"vinegar": { elem1: "rotten_meat", chance: 0.001 },
|
||||||
tempHigh: 120,
|
"poison": { elem1: "rotten_meat", elem2: null }
|
||||||
stateHigh: ["cooked_meat", "scale"],
|
},
|
||||||
tempLow: -20,
|
foodNeed: 5,
|
||||||
stateLow: "frozen_meat",
|
temp: 20,
|
||||||
breakInto: ["blood", "scale"],
|
tempHigh: 120,
|
||||||
density: 1050,
|
stateHigh: ["cooked_meat", "scale"],
|
||||||
eggColor: "#ffffff",
|
tempLow: -20,
|
||||||
tick: function (pixel) {
|
stateLow: "frozen_meat",
|
||||||
if (pixel.poisoned !== undefined) {
|
breakInto: ["blood", "scale"],
|
||||||
pixel.poisoned--;
|
density: 1050,
|
||||||
if (pixel.poisoned <= 0) {
|
eggColor: "#ffffff",
|
||||||
deletePixel(pixel.x, pixel.y);
|
tick: function (pixel) {
|
||||||
return;
|
if (pixel.poisoned !== undefined) {
|
||||||
}
|
pixel.poisoned--;
|
||||||
|
if (pixel.poisoned <= 0) {
|
||||||
|
deletePixel(pixel.x, pixel.y);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
};
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -403,6 +410,15 @@ elements.crocodile = {
|
||||||
"body": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
"body": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||||
"head": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
"head": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||||
"human": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
"human": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||||
|
"chameleon": {
|
||||||
|
reactionFunction: function (pixel, otherPixel) {
|
||||||
|
let isNormalColor = defaultColors.includes(pixel.color);
|
||||||
|
if (otherPixel.threatened !== true || isNormalColor === true) {
|
||||||
|
behaviors.FEEDPIXEL(pixel, otherPixel);
|
||||||
|
deletePixel(otherPixel.x, otherPixel.y)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"slug": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
"slug": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||||
"snail": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
"snail": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||||
"bone": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.1 },
|
"bone": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.1 },
|
||||||
|
|
@ -426,7 +442,16 @@ elements.crocodile = {
|
||||||
tempLow: -10,
|
tempLow: -10,
|
||||||
stateLow: "frozen_meat",
|
stateLow: "frozen_meat",
|
||||||
breakInto: ["blood", "scale"],
|
breakInto: ["blood", "scale"],
|
||||||
density: 1100
|
density: 1100,
|
||||||
|
tick: function (pixel) {
|
||||||
|
if (pixel.poisoned !== undefined) {
|
||||||
|
pixel.poisoned--;
|
||||||
|
if (pixel.poisoned <= 0 && Math.random() <= 0.5) {
|
||||||
|
deletePixel(pixel.x, pixel.y);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.scale = {
|
elements.scale = {
|
||||||
|
|
@ -446,20 +471,157 @@ elements.scale = {
|
||||||
|
|
||||||
elements.scale_plate = {
|
elements.scale_plate = {
|
||||||
category: "solids",
|
category: "solids",
|
||||||
color: ['#044404', '#137a13', '#0aa00a'],
|
behavior: [
|
||||||
hardness: 0.8,
|
"XX", "XX", "XX",
|
||||||
breakInto: "scale",
|
"XX", "XX", "XX",
|
||||||
tick: function (pixel) {
|
"XX", "XX", "XX",
|
||||||
// 2 temp highs
|
],
|
||||||
const hot = ["scale", "dioxin", "cyanide_gas"];
|
movable: false,
|
||||||
const hotter = ["ash", "ash", "ash", "smoke", "stench", "stench", "stench", "dioxin", "cyanide_gas"];
|
state: "solid",
|
||||||
if (pixel.temp >= 475 && pixel.temp <= 900) {
|
color: ['#044404', '#137a13', '#0aa00a'],
|
||||||
let chosen = hot[Math.floor(Math.random() * hot.length)];
|
hardness: 0.8,
|
||||||
changePixel(pixel, chosen);
|
breakInto: "scale",
|
||||||
|
tick: function (pixel) {
|
||||||
|
// 2 temp highs
|
||||||
|
const hot = ["scale", "dioxin", "cyanide_gas"];
|
||||||
|
const hotter = ["ash", "ash", "ash", "smoke", "stench", "stench", "stench", "dioxin", "cyanide_gas"];
|
||||||
|
if (pixel.temp >= 475 && pixel.temp <= 900) {
|
||||||
|
let chosen = hot[Math.floor(Math.random() * hot.length)];
|
||||||
|
changePixel(pixel, chosen);
|
||||||
|
}
|
||||||
|
if (pixel.temp >= 900) {
|
||||||
|
let chosen = hotter[Math.floor(Math.random() * hotter.length)];
|
||||||
|
changePixel(pixel, chosen);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
elements.chameleon = {
|
||||||
|
color: ["#02c937", "#18d64a", "#09e644"],
|
||||||
|
category: "life",
|
||||||
|
breakInto: ["blood", "scale"],
|
||||||
|
temp: 18,
|
||||||
|
tempHigh: 100,
|
||||||
|
stateHigh: ["cooked_meat", "scale"],
|
||||||
|
tempLow: -10,
|
||||||
|
stateLow: "frozen_meat",
|
||||||
|
foodNeed: 10,
|
||||||
|
density: 1100,
|
||||||
|
reactions: {
|
||||||
|
'fly': { func: behaviors.FEEDPIXEL, chance: 0.5 },
|
||||||
|
"firefly": { elem2: null, func: eatBee, chance: 0.3 },
|
||||||
|
"bee": { elem2: null, func: eatBee, chance: 0.1 },
|
||||||
|
"radiation": { elem1: ["ash", "meat", "cooked_meat", "rotten_meat", "lizard", null], chance: 0.4 },
|
||||||
|
"oxygen": { elem2: "carbon_dioxide", chance: 0.5 },
|
||||||
|
"mercury": { elem1: "rotten_meat", chance: 0.1 },
|
||||||
|
"bleach": { elem1: "rotten_meat", chance: 0.1 },
|
||||||
|
"infection": { elem1: "rotten_meat", chance: 0.025 },
|
||||||
|
"uranium": { elem1: "rotten_meat", chance: 0.1 },
|
||||||
|
"cyanide": { elem1: "rotten_meat", chance: 0.1 },
|
||||||
|
"chlorine": { elem1: "meat", chance: 0.1 },
|
||||||
|
"alcohol": { elem1: "meat", chance: 0.025 },
|
||||||
|
"vinegar": { elem1: "rotten_meat", chance: 0.001 },
|
||||||
|
"poison": { elem1: null }
|
||||||
|
},
|
||||||
|
tick: function (pixel) {
|
||||||
|
|
||||||
|
if (pixel.poisoned !== undefined) {
|
||||||
|
pixel.poisoned--;
|
||||||
|
if (pixel.poisoned <= 0) {
|
||||||
|
deletePixel(pixel.x, pixel.y);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (pixel.temp >= 900) {
|
}
|
||||||
let chosen = hotter[Math.floor(Math.random() * hotter.length)];
|
|
||||||
changePixel(pixel, chosen);
|
const directions = [
|
||||||
|
[0, -1], [-1, -1], [1, -1],
|
||||||
|
[-1, 0], [1, 0],
|
||||||
|
[0, 1], [-1, 1], [1, 1]
|
||||||
|
];
|
||||||
|
|
||||||
|
pixel.threatened ??= false;
|
||||||
|
pixel.colorChange ??= 120;
|
||||||
|
pixel.dir ??= 1;
|
||||||
|
|
||||||
|
let changed = false;
|
||||||
|
|
||||||
|
// Copy color from nearby solids if threatened
|
||||||
|
for (let [dx, dy] of directions) {
|
||||||
|
let x = pixel.x + dx;
|
||||||
|
let y = pixel.y + dy;
|
||||||
|
if (!isEmpty(x, y)) {
|
||||||
|
let other = pixelMap[x]?.[y];
|
||||||
|
if (
|
||||||
|
other &&
|
||||||
|
pixel.threatened === true &&
|
||||||
|
elements[other.element]?.state === "solid" &&
|
||||||
|
elements[other.element]?.category !== "life" &&
|
||||||
|
other.element !== "egg"
|
||||||
|
) {
|
||||||
|
pixel.colorChange = 120;
|
||||||
|
pixel.color = other.color;
|
||||||
|
changed = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return to normal color if no color copied
|
||||||
|
if (!changed) {
|
||||||
|
pixel.colorChange--;
|
||||||
|
if (pixel.colorChange <= 0) {
|
||||||
|
pixel.color = defaultColors[Math.floor(Math.random() * defaultColors.length)];
|
||||||
|
pixel.colorChange = 120;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Vision-based threat detection
|
||||||
|
if (Math.random() < 0.25) {
|
||||||
|
let threatSeen = false;
|
||||||
|
let yOffset = Math.random() < 0.5 ? 0 : -1;
|
||||||
|
|
||||||
|
for (let x = 1; x < 10; x++) {
|
||||||
|
let x2 = pixel.x + (x * pixel.dir);
|
||||||
|
let y2 = pixel.y + yOffset;
|
||||||
|
|
||||||
|
if (!isEmpty(x2, y2, true)) {
|
||||||
|
let seen = pixelMap[x2][y2];
|
||||||
|
if (danger.includes(seen?.element)) {
|
||||||
|
pixel.threatened = true;
|
||||||
|
threatSeen = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only reset to false if no threat is seen
|
||||||
|
if (!threatSeen) {
|
||||||
|
pixel.threatened = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Math.random() < 0.05) {
|
||||||
|
pixel.dir *= -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Movement logic:
|
||||||
|
// Move only if NOT threatened OR if color is back to normal
|
||||||
|
let isNormalColor = defaultColors.includes(pixel.color);
|
||||||
|
|
||||||
|
if (pixel.threatened === false || isNormalColor) {
|
||||||
|
let moved = false;
|
||||||
|
|
||||||
|
if (Math.random() < 0.15 && tryMove(pixel, pixel.x + 1 * pixel.dir, pixel.y)) {
|
||||||
|
moved = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!moved && tryMove(pixel, pixel.x, pixel.y + 1)) {
|
||||||
|
moved = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!moved && Math.random() < 0.01) {
|
||||||
|
tryMove(pixel, pixel.x + 1 * pixel.dir, pixel.y - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
/*
|
||||||
|
herbs
|
||||||
|
heat into steamed herb
|
||||||
|
smash into tea powder
|
||||||
|
tea powder + hot water = colored tea
|
||||||
|
*/
|
||||||
|
|
||||||
|
elements.herb.tempHigh = 100;
|
||||||
|
elements.herb.stateHigh = ["steamed_herb","steamed_herb","steam",null];
|
||||||
|
|
||||||
|
if (!elements.herb.reactions) {
|
||||||
|
elements.herb.reactions = {};
|
||||||
|
}
|
||||||
|
elements.herb.reactions.steam = { elem1:"steamed_herb" }
|
||||||
|
|
||||||
|
elements.steamed_herb = {
|
||||||
|
color: ["#5a790c","#698f1f","#849d33","#b3c74d"],
|
||||||
|
reactions: {
|
||||||
|
"water": { elem2:"tea", tempMin:80 },
|
||||||
|
"salt_water": { elem2:"tea", tempMin:80 },
|
||||||
|
"sugar_water": { elem2:"tea", tempMin:80 },
|
||||||
|
"seltzer": { elem2:"tea", tempMin:80 },
|
||||||
|
"stench": { elem2:null, chance:0.25 },
|
||||||
|
"steam": { elem2:"fragrance", chance:0.1 },
|
||||||
|
"flea": { elem2:null, chance:0.01 },
|
||||||
|
"termite": { elem2:null, chance:0.01 },
|
||||||
|
"fly": { elem2:null, chance:0.01 },
|
||||||
|
"ant": { elem2:null, chance:0.01 },
|
||||||
|
"stink_bug": { elem2:null, chance:0.01 }
|
||||||
|
},
|
||||||
|
behavior: behaviors.POWDER,
|
||||||
|
tempHigh: 300,
|
||||||
|
stateHigh: ["fire","smoke","smoke","smoke","ash"],
|
||||||
|
tempLow: -2,
|
||||||
|
stateLow: "frozen_plant",
|
||||||
|
burn:10,
|
||||||
|
burnTime:300,
|
||||||
|
burnInto: ["fire","smoke","smoke","smoke","smoke","smoke","smoke","fragrance"],
|
||||||
|
category:"food",
|
||||||
|
state: "solid",
|
||||||
|
density: 1300,
|
||||||
|
isFood: true,
|
||||||
|
hidden: true,
|
||||||
|
breakInto: ["tea_powder",null]
|
||||||
|
};
|
||||||
|
|
||||||
|
elements.tea_powder = {
|
||||||
|
color: ["#C4CD3F","#B7C134","#97A328"],
|
||||||
|
grain: 2,
|
||||||
|
reactions: {
|
||||||
|
"water": { elem2:"tea", tempMin:80, elem1:null },
|
||||||
|
"salt_water": { elem2:"tea", tempMin:80, elem1:null },
|
||||||
|
"sugar_water": { elem2:"tea", tempMin:80, elem1:null },
|
||||||
|
"seltzer": { elem2:"tea", tempMin:80, elem1:null },
|
||||||
|
"tea": { tempMin:80, elem1:null, chance:0.01 },
|
||||||
|
"stench": { elem2:null, chance:0.25 },
|
||||||
|
"steam": { elem2:"fragrance", chance:0.1 },
|
||||||
|
"flea": { elem2:null, chance:0.01 },
|
||||||
|
"termite": { elem2:null, chance:0.01 },
|
||||||
|
"fly": { elem2:null, chance:0.01 },
|
||||||
|
"ant": { elem2:null, chance:0.01 },
|
||||||
|
"stink_bug": { elem2:null, chance:0.01 }
|
||||||
|
},
|
||||||
|
behavior: behaviors.POWDER,
|
||||||
|
tempHigh: 300,
|
||||||
|
stateHigh: ["fire","smoke","smoke","smoke","ash"],
|
||||||
|
burn:10,
|
||||||
|
burnTime:300,
|
||||||
|
burnInto: ["fire","smoke","smoke","smoke","smoke","smoke","smoke","fragrance"],
|
||||||
|
category:"food",
|
||||||
|
state: "solid",
|
||||||
|
density: 1200,
|
||||||
|
isFood: true,
|
||||||
|
hidden: true
|
||||||
|
}
|
||||||
|
elements.water.reactions.tea_powder = { elem1:"tea", chance:0.0002 }
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
elements.mustard_seed = {
|
||||||
|
color: ["#E8C096","#EDB470","#F6AE51","#CA8435"],
|
||||||
|
behavior: behaviors.POWDER,
|
||||||
|
tempHigh: 400,
|
||||||
|
stateHigh: "fire",
|
||||||
|
burn: 25,
|
||||||
|
burnInto: ["fire","smoke","ash"],
|
||||||
|
breakInto: ["mustard_meal",null],
|
||||||
|
category: "food",
|
||||||
|
state: "solid",
|
||||||
|
density: 1017,
|
||||||
|
isFood: true
|
||||||
|
};
|
||||||
|
|
||||||
|
elements.mustard_meal = {
|
||||||
|
color: ["#F2D072","#E1C75E","#D6AC37","#8E4E14","#65300B"],
|
||||||
|
behavior: behaviors.POWDER,
|
||||||
|
reactions: {
|
||||||
|
"water": { elem1:"mustard", elem2:"mustard", chance:0.05 },
|
||||||
|
"salt_water": { elem1:"mustard", elem2:"mustard", chance:0.05 },
|
||||||
|
"sugar_water": { elem1:"mustard", elem2:"mustard", chance:0.05 },
|
||||||
|
"vinegar": { elem1:"mustard", elem2:"mustard", chance:0.05 },
|
||||||
|
"juice": { elem1:"mustard", elem2:"mustard", chance:0.05 },
|
||||||
|
"alcohol": { elem1:"mustard", elem2:"mustard", chance:0.05 },
|
||||||
|
},
|
||||||
|
tempHigh: 400,
|
||||||
|
stateHigh: "fire",
|
||||||
|
burn: 25,
|
||||||
|
burnInto: ["fire","smoke","ash"],
|
||||||
|
category: "food",
|
||||||
|
state: "solid",
|
||||||
|
density: 1017,
|
||||||
|
isFood: true,
|
||||||
|
hidden: true
|
||||||
|
};
|
||||||
|
|
||||||
|
elements.mustard = {
|
||||||
|
color: "#d8c42e",
|
||||||
|
behavior: behaviors.LIQUID,
|
||||||
|
viscosity: 50000,
|
||||||
|
tempHigh: 260,
|
||||||
|
stateHigh: ["steam","steam","carbon_dioxide","methane"],
|
||||||
|
category:"liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 1111.64,
|
||||||
|
stain: 0.05,
|
||||||
|
isFood: true
|
||||||
|
};
|
||||||
Loading…
Reference in New Issue