Modifying .bb8 files with Notepad

In this page I will explain in a step by step process how to open .bb8 files using notepad, read and decode the config file by splitting it into 4 pieces (genes, nodes, synapses, immune system), selecting a synapse to be added to a bibite and then adding it in the correct location.

###note this tutorial is specific to windows as I do not own a mac or linux system.###

**Phase 0 (material acquisition)**

First, lets gather some things we will need.

Open an instance of File Explorer. Its the folder icon that you use to look at the files that are stored on your computer.

If you don’t know what it is, search for “Windows File Explorer” online and you will have about a million tutorials to choose from.

The default file path for TheBibites simulation is this: Windows (C:) → Users → (whatever username you're using) → AppData → LocalLow → The Bibites (or ~/.config/unity3d/The Bibibites/Bibites for Linux).

###If this file path does not exist, you can also learn the file path by going into the simulation itself, saving anything and then look at the top of the window that pops up to see the file path###

### AppData is normally a hidden folder and may not show up in your user folder. It’s definitely there its just hidden from you to prevent tampering. There are also a million tutorials online for how to show the AppData folder. Do not alter any other folders or files except the ones in the “The Bibites” folder, just to be safe. ###

Once you get to The Bibites folder you will see a few folders. Usually one for autosaves, one for SimulationSettings, one for Unity and a few log files perhaps. At this point I would recommend creating a new folder to keep your bibite files organized. Call it whatever you want, I called mine “My Bibites”. Note that I have a few extra folders in mine to help with other things, but they are not important for this guide.

Great, now we have a place to store the files for our test tube bibites. Now we need two things. A file of a totally blank bibite, and a file with a bibite who has something we want to use (a gene or a node/synapse combo are the main things).

In order to get a blank bibite, there is a very simple thing you can do. Run a simulation with these settings:

Under “Cheat Options” turn the “helpful initial connections” to 0. This makes all the virgin bibites spawn with absolutely no nodes or synapses. Make sure the random genes checkbox is unchecked, we want a 100% vanilla bibite with no randomness.

Leave the bibite spawning rate at normal, we don’t want to wait around, we want a bibite to spawn right away so we can save it and move on.

None of the other settings matter since we are just quickly saving that blank bibite to a file and then leaving. So go ahead, run the sim until one of these guys hatches. You should see a normal looking bibite with absolutely nothing in the brain tab. No nodes and no synapses.

It looks like a bug but its what we want. Go ahead and save this guy in your bibite folder with an appropriate name. I went with “NoBrain”.

Next we need a bibite with a characteristic or three we want. Lets say we want a bibite that always accelerates, can turn towards plants and digests food faster when full.

Conveniently, virgin bibites like this spawn in your basic vanilla sim all the time. Go ahead and run a sim with totally default settings and look around till you find a guy like this.

Make sure that the bottom left neuron is PlantAngle and not MeatAngle or something else, otherwise this might get confusing.

As a side note, the numbers you see when you hover over the synapses don’t matter. Negative, positive, helpful or detrimental, none of it matters. We just want a guy who HAS the nodes and connections we want.

So go ahead and save this guy as well. I call him “Seeks Plants” for simplicity but you can call it whatever you want.

**Phase 1 (opening the file)**

Okay, next lets see how to open the .bb8 files into notepad.

Now you go into File Explorer, to the folder with your bibites. You should see two files, one with your blank guys name and the file extension .bb8. and the other with your plant eaters name and .bb8.

Great, we have everything we need, now the fun can begin.

Go ahead and right click on the plant eater first. The dropdown menu will have an option listed there called “Open with…”. Click that option and either a new dropdown menu or a popup will show up. Either way you are looking for **“Notepad”**. This is a standard issue text editor that comes stock with every version of windows. If you don’t immediately see it click the “more options” and it should show up in the list that generates. Since .bb8 is basically a text file, notepad should be one of the top options since windows tries to suggest similar apps that should work with the file you are trying to open.

### Note: there might be other text editors that will also work but for the sake of this guide, Notepad is the only one I have tested and know works. Use a different text editor at your own risk ###

So now we have a notepad with a bunch of garbled symbols and numbers and chaos. It seems very impenetrable but there is an easy way to break it down into manageable chunks.

In contrast to what I just said, next we are going to open microsoft word or some other more advanced text editor (I'm using Libre Office, but word is just fine here). This time, anything should work, we only need something that we can move things around with, that isn’t the .bb8 file, which we want to keep nice and pristine. Basically, notepad is nice and compatible for programs to interact with but it sucks as an actual text editor so to make things easier to read, I opted for a better text editor. We still need to make the actual changes to the .bb8 files in notepad so they can be read back into the program correctly.

So, we have Notepad open with our precious .bb8 file, and Word open with a blank document. Go ahead and select all (ctrl+A) the text and copy it from the .bb8 file into word. Don’t cut it, just copy and paste. Were doing this step because it has an immediate benefit of spacing things out a bit better so we can see things more clearly.

**Phase 2 (reading the file)**

Alright, so we have two different text editors open, each containing basically the same information which is all the guts of our plant eating bibite. So lets look at our guts in Word and leave the notepad alone for now.

###Note: I’ll put actual landmarks in **BOLD** to help make it clear exactly where to look. If I use single quotations ‘’ its to point something out, don’t include the ‘’ single quotations in the actual file. Double quotations “” are actually part of the file and should be included. Separating things with commas is going to be a recurring pattern from here on out.

The first chunk is gonna be our genes. These are the config options that determine things like our bibites color, strength and defence, hatching, vision, herding and so on.

Go ahead and read through this big chunk till you see a closing bracket with a comma **},** followed by **“brain”:** Go ahead and put a few lines of space between the **},** and **“brain”:**

Like so:

Everything above the space we just made describes our genes. For now lets leave these alone.

The next section were looking at is the actual nodes of the bibite. Keep in mind this has nothing to do with the synapses yet, these are just the nodes themselves.

Also keep in mind that all bibites actually already posses every **non-hidden** node. They don’t show up in the brain during the simulation until there is a synapse that connects them to another node. That said, even nodes with no synapse links do still measure values and are set up with a default value.

Now, each node has its own small chunk of stuff which is encased between an open bracket ‘**{‘** and a close bracket ‘**}’** and are separated from each other with a comma ‘**,**’. For example, the first node is the constant node and it looks like this:

{"Type":0,"TypeName":"Input","Index":0,"Inov":0,"Desc":"Constant","Value":1.0,"LastInput":0.0,"LastOutput":0.0},

Lets just briefly explain a few of these bits that are important to what we’re doing. By the way, each of the bits are a pair of things on either side of a ‘**:**’ and separated from each other by a comma ‘**,**’. Words need “” double quotations, but numbers don’t.

1. "TypeName" determines what kind of node it is. Nodes can be either an Input which translates to a sense, something that the bibite can react to, or an output which translates to an action the bibite can take. Outputs all have crazy TypeNames like ReLu or TanH which describes the mathematical formula they use to compute information.
2. "Index" is the identifier for that node and it’s used when linking it via a synapse to another node.
3. "Desc" is the name of that node. This word is what shows up when you hover over a node in the simulation.

The rest of the bits are of no interest to us and can be more or less ignored.

###DO NOT ALTER ANY OF THE NODE BITS###

I’m not responsible if your bibite breaks the game because you changed something in one of the nodes. These are strictly LOOK, DON’T TOUCH. We only look at the nodes to help us create synapses.

Ok, so the default bibite has 48 nodes, 33 inputs or senses, and 15 outputs or actions it can take. That makes the last node, with index 47 and a Desc of ImmuneSystem our next break point. The next section controls the synapses.

This marks where the next spacing goes. Everything below this break point describes our current synapses. Put a new space right between this bit here ‘**}],**’ and **“Synapses”:** .

###Note, if you opened the blank bibites file by mistake, this entire section will not exist. A blank bibite has no synapses, thus the sim doesn’t generate any in the file. We will be copying stuff and modifying this section later on.

The synapses are written out pretty similarly to the nodes. Each bit is a pair of things on either side of ‘**:**’ and separated by a comma ‘**,**’.

For example, here is one of the synapses we should all be familiar with.

{"Inov":0,"NodeIn":0,"NodeOut":33,"Weight":0.4108731,"En":true},

This synapse determines the baseline speed for our bibite. Here are the important bits.

1. "NodeIn" this describes what **input** node the synapse originates from. In this case it’s connected to the Constant node (index 0).
2. "NodeOut" this describes what **output** node it connects to. In this case it is connected to the Accelerate node (index 33).
	1. I don’t know what happens if you connect an input to an input or an output to an output so don’t try. It likely breaks stuff.
3. Weight, this value is the “filter” that the number given to it by the input node is changed by in order to get the activation strength of the output or action node. In this example, it modifies the constant nodes value of 1 by multiplying it by 0.41….. to determine the final speed our bibite uses to move around the simulation.
4. "En" this determines weather or not a synapse is active. Inactive nodes still exist in the brain but will not actually send information from the input node to the output node. It is the “on/off” switch of the synapse. To turn a node on set it to true, to turn one off set it to false.

Every synapse we have is listed here, as far as I know the order doesn’t matter too much.

The last section controls the immune system. It starts after the ‘**]},**’ followed by **“immuneSystem”:** and makes up the rest of the file.

We don’t care about this section at all. Just leave it alone. Viruses are still being worked on at the time of writing this guide so just ignore it all together.

That's it! You are now able to read and understand a general idea of what’s going on in your bibites brains! And thusly armed with the powers of knowledge…. we proceed.

**Phase 3 (moving synapses)**

So now we can read and understand (somewhat) what we are looking at, and we know what landmarks to look for. We have all the tools we need to do some modifications.

To demonstrate this, we’re going to clone our plant eater onto our blank bibite. This blank bibite is loosely what I would call a template. If you decide to go further and create your own designer bibites, he's a great place to start.

So, to start with, lets make ourselves a clone. Go to the folder where the .bb8 files are stored and make a copy of your blank bibite file under a new name. You can name it whatever you want, I named mine Clone. Note that the name of this file doesn’t actually change the name your bibite will be read as by the simulation. To accomplish that, we need to edit some genes, but we’ll do that at the end.

We don’t need the actual blank bibite .bb8 file. Keep him for later and make new clones when you want to design a new bibite. Go ahead and open your clones .bb8 file In notepad, everything is condensed so you’re going to have to look through the weeds to find our landmarks. Lets go ahead and copy him into a fresh word document.

To keep track, you should have a Notepad and a Word document for your clone and just the word document of your plant eater bibite. The editing is done in word and then “surgically inserted” into the notepad .bb8 file. Since we are not altering the plant eater bibite, we can close the .bb8 file for him.

Rule 1: It might not matter but to be safe lets be sure not to add any spaces, just in case.

Lets also establish another rule while were at it.

Rule 2: Don’t try to write anything from scratch. Copy and paste another complete synapse and then change the values and nothing else. This will keep us from making any typos which are likely to make the bibite impossible for the simulation to read.

And a third rule, Rule 3: don’t do anything in the Notepad file until you’ve made sure it’s put together correctly in Word first. Just another safeguard against mistakes.

Now with the rules in place lets begin. First thing we need to do is look at the plant eater. Remember, no spaces this time. In the word document, go down the to bottom and find your **“Synapses”:** landmark just after the 47th node. There should be an open box bracket ‘[‘ and then the first synapse. It should be NodeIn: 0 and NodeOut: 33.

Like so: {"Inov":0,"NodeIn":0,"NodeOut":33,"Weight":0.4108731,"En":true},

Thats our speed synapse. Copy that whole thing from opening bracket ‘**{**‘ to closing bracket and comma ‘**},**’. Now we go to our bibite clone word document. Down at the bottom, you will find the same landmark, but it will look slightly different.

If there are no synapses, it will just look like this: **"Synapses":[]**

Go ahead and paste our copied synapse in between the box brackets. Make sure to include the comma, we need to separate every synapse with a comma or it wont work.

**"Synapses":[**{"Inov":0,"NodeIn":0,"NodeOut":33,"Weight":0.4108731,"En":true},**]}**

This is how it should look.

Feel free to change the weight value if you really want to. Be careful to change only the number and leave the ‘:’ and the ‘,’ exactly where they are, no spaces. 0 will mean the bibite cant move and 1 will make it very fast. I assume you can go above 1 but I would keep it closer to 0.5. If you make it too fast it will both struggle to get food in its mouth and burn energy on speed faster than it can digest its food. Once you’re done, copy just that synapse, open bracket ‘{‘ to closed bracket ‘}’ with the separation comma included.

Like so: {"Inov":0,"NodeIn":0,"NodeOut":33,"Weight":**0.5**,"En":true},

So, we have this new synapse, but it’s in a word file which does us no good. Now is the part where you have to be EXTREMELY CAREFUL not to erase or add anything but the synapse we just created, in the exact same place as it is in the word document.

Rule 4: Save after every change! That way if you do make a mistake, all you need to do is close the .bb8 file without saving and open it back up again. Boom, right back where you were, pre mistake. It can get messy if you start deleting stuff.

Open the clones Notepad. Find your landmark **"Synapses":[]**. It will likely be somewhere close to the end of the last line. Right before **“immuneSystem”:**.

Very carefully paste the new synapse between the open and close box brackets ‘[]’ just like you did on the word document. It should look just like it did above, inside the box brackets that come after **“Synapses”:** and before **“immuneSystem”:**.

First gene transfer successful! You didn’t touch anything else right? Great! Save the .bb8 file and lets test it!

Lets load up the sim and pop our little clone guy into a fresh world to check his brain. He should look more or less like this:

###Note, to insert a bibite from a file into the simulation, you need to be in a running simulation first. Click the dropper icon in the very bottom left and navigate to your new bibite folder where the .bb8 files are stored. Double click the .bb8 file and if you didn't make any mistakes it will read it and let you drop your little guy down.

Great, run it for a bit just to see him move around, then lets jump back in!

Now lets make him look for food. The next gene you want is gonna be this one here:

{"Inov":0,"NodeIn":12,"NodeOut":34,"Weight":1.2398324,"En":true},

This guy goes from plantAngle which is index 12, to rotate which is index 34. This looks at the angle from forward to what the direction of the nearest (or biggest?) plant pellet is, and passes that number, modified by the weight of the synapse, to the rotation node. A higher number makes it rotate faster. I would not go above 2 to start, but feel free to play with this value as you fine tune your clone later on.

{"Inov":0,"NodeIn":12,"NodeOut":34,"Weight":**1.2**,"En":true},

Transfer this one just like the last. Surgical precision, FOCUS, perfectly exact placement, no spaces, comma. Make sure the two synapses are separated with that comma!

Great! Save and bring up our test world to see how we did.

Note you don’t actually have to close the application, or even stop the simulation between gene transfers. The old bibite will still function and swim around with his updated brethren. Toss in our new Clone using the same file as last time and now it will look like this.

We’re modifying genes in real time! Lets continue with the third transfer, and make this one a double. Go back into the plant eater word file and grab these two synapses.

{"Inov":0,"NodeIn":0,"NodeOut":38,"Weight":-2.0,"En":true},{"Inov":0,"NodeIn":4,"NodeOut":38,"Weight":4.0,"En":true},

The first one connects the node constant: index 0 to the digestion: index 38 node. The negative weight value here is pretty important. It takes energy to fill the stomach with acid, so when we’re not digesting anything, we want the stomach acid to empty to conserve energy. So leave this one as it is. The second synapse links node fullness: index 4 to the same digestion node. This one sees how full or empty the stomach is and increases the level of stomach acid to digest the food faster. Because it is greater than 2, it will overpower the constant -2 synapse we have and fill the stomach with acid when there is food present. Then, food gone, acid gone, \*happy bibite sounds\*. Lets transfer!

All done? Great! Save and lets test it again.

And there you have it, you have successfully cloned a fully artificial plant eating bibite using a blank scaffold and your own brain. Congratulations! Run the sim for a bit and admire your work.

**Phase 3.1 (Custom synapses)**

But wait, there’s more! We don’t want to just make a copy of the same basic bibite we are already generating for free without any of this work involved right? RIGHT! Lets add one more, this time we’re going to make our first custom synapse. The ability to also look for meat pellets.

To start with, lets remember our second rule. “Don’t write anything from scratch!” This is just as true now as it was at the start. But instead of going and finding a new bibite with a gene we want to transfer, lets just take a shortcut, shall we?

Go into your plant eater word file. In the nodes section, you may recall that in fact, bibites all posess all **non-hidden** nodes, even if they aren’t using them. This means our bibites come complete with a menu we can use to order any synapse we want.

So lets look at the nodes and find this one: {"Type":0,"TypeName":"Input","Index":15,"Inov":0,"Desc":"MeatAngle","Value":0.0,"LastInput":0.0,"LastOutput":0.0},

This is Node index:15 aka MeatAngle aka Meat Vision. It is an **input node**(important) that is responsible for “seeing” meat pellets the same way that node index:12 sees plant pellets.

So now we have the index value of the node we want to connect to via a new synapse. The next step is to create the new synapse by cannibalizing an old one. SO go ahead and copy any complete synapse, it doesn’t matter which one since were tweaking the variables anyway, and paste it right after the last complete synapse, but still before that closing box bracket ‘**]**’. Do this in word first of course.

I picked this one randomly: {"Inov":0,"NodeIn":0,"NodeOut":38,"Weight":-2.0,"En":true},

He's our constant negative to digestion synapse from earlier.

First change we need to make is to hook it up to the right node, which is going to be our meat vision node we just found. Change the number that comes AFTER "NodeIn" and the ‘**:**’ but before the ‘**,**’ to the index number of the node we want to connect to, in this case that is 15.

So after the first alteration, our synapse looks like this: {"Inov":0,"NodeIn":**15**,"NodeOut":38,"Weight":-2.0,"En":true},

Right now this synapse says, “When I see meat, reduce the acid in my stomach”. So we are on the right track. Next lets hook up the correct action node. This node is one we are already using. Node index: 34 Rotate. Change the NodeOut value to our rotate node index number, 34.

Now it should look like this: {"Inov":0,"NodeIn":15,"NodeOut":**34**,"Weight":-2.0,"En":true},

So now it says, “When I see meat, rotate away from it”. Closer, just one last thing, which you’ve probably guessed already.

Lets just quickly alter our weight to be a positive number. And while we’re at it, lets make it higher than the weight of our seeks plants synapse.

Like so: {"Inov":0,"NodeIn":15,"NodeOut":34,"Weight":**1.5**,"En":true},

Now it says, “When I see meat, rotate towards it” and because we have a higher weight, the bibite will tend to turn towards meat, stronger than plants. It doesn’t shut off our rotation towards plants so the bibite will drift a bit when plant pellets are also nearby, but fixing that problem can now be left to you.

Save it again and lets toss him in and take a look.

Have fun testing out new synapses and combinations and seeing what works and what turns out to be a mess.

Now to close this off, lets briefly talk about the first section. These are all our genes. They describe what our bibites body is like. At the current moment we are only interested in one gene. The tag.

It can be found at the very end of the list, after **"GrowthMaturityExponent":** and right before **“isReady”** and **“gen”**.

The name of the bibite is whatever shows up between the double quotations here “” after the '**:**' so name yours whatever you want.

I went with: "tag":"seeks everything",

Make sure to include that comma. Now copy the whole bit including the “tag” on the left and the ‘,’ comma on the right.

Go into your clone .bb8 file. Because the blank bibite has no tag, it will not exist in this file, so we are just going to add it. Go ahead and scan for the place in between the **"GrowthMaturityExponent":**(random value here)**},** and the **“isReady”** landmarks. It will be close to the beginning, likely in the first line. Go ahead and paste your tag right there.

It will look like this:

And that’s it, this is our brand new, fresh out of the gene labs, artificially cloned bibite who can find and eat whatever he wants, complete with a custom synapse and a shiny new name.

Hope that all made sense! I can’t wait to see what crazy bibites people can come up with.

A few words of warning.

The most dangerous thing to your new, designer bibites is not lack of food, other bibites or even the void. The truth is they are not likely to stay viable past a few generations as mutation wreaks havoc on your carefully crafted synapses. The point is to give yourself a good starting point to breed from, not cheat straight to some super bibite. So craft your monstrosities with room to grow in mind. They will need to grow into their new brain and evolve new refinements to it over time to truly become stable.

Another note, I did not touch on Hidden nodes at all. Creating them works a lot like synapses, but I will have to come back with an update later on once I've had more time to play with the. A mathematician I am just not. You can make new ones by adding them to the list of nodes, connect them with synapses as if they were normal nodes, and I suspect you can even edit their names as well, but there is a real possibility of creating a bibite that the sim cant read so be warned.