Difference between revisions of "MB Sharing"
m (Fixed typos) |
|||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | A bot can share substances with another bot if they are connected a through tie. There are DNA commands that allow sharing of energy, slime, shell, and waste. These are called ''sharing commands''. They can be useful for multibots trying to keep the members of their multi-celled organism alive and well. | |
− | |||
− | A bot can share | ||
− | |||
− | |||
+ | == The commands == | ||
Share commands and the effects | Share commands and the effects | ||
− | *sharenrg - This lets | + | *sharenrg - This lets bots share [[energy]]. There is no need to address a specific tie reference number, since I'll be sharing from all bots I'm permanently tied to. The number stored in here becomes the percentage of total energy that I receive. The values possible are in the range [1,99]. This command is commonly executed by parasites and tiefeeders. Although the command says 'share', in the case o tie feeders and parasites, it is more like 'steal' than 'share'. |
− | *sharewaste - This lets | + | *sharewaste - This lets bots share [[Waste]]. |
− | *shareshell - This lets | + | *shareshell - This lets bots share [[shell]]. |
− | *shareslime - This lets | + | *shareslime - This lets bots share [[slime]]. |
− | + | == Example == | |
− | Example | ||
Suppose there are two bots connected by a tie. First bot has 40 waste (or any other shared material) and the second one has 60. If first bot executes command | Suppose there are two bots connected by a tie. First bot has 40 waste (or any other shared material) and the second one has 60. If first bot executes command | ||
− | + | 10 .sharewaste store | |
Then the total amount of waste (100) will be redistributed so that the first bot receives 10% of that total. The final outcome is that the first bot will have 10 waste and the second bot will have 90 waste. | Then the total amount of waste (100) will be redistributed so that the first bot receives 10% of that total. The final outcome is that the first bot will have 10 waste and the second bot will have 90 waste. | ||
− | Uses | + | |
+ | == Uses == | ||
A useful way to use these with combat bots is shown below. | A useful way to use these with combat bots is shown below. | ||
cond | cond | ||
− | + | *.multi 1 = | |
start | start | ||
99 .sharenrg store | 99 .sharenrg store | ||
Line 30: | Line 27: | ||
stop | stop | ||
− | In this gene 99% of the total energy is taken by a bot. This is useful to feed in case a bot | + | In this gene 99% of the total energy is taken by a bot. This is useful to feed in case a bot accidentally becomes a MB while tie feeding. |
+ | |||
+ | The code ".sharewaste inc" forces the enemy to take 99% of the attacker's [[waste]], which is useful to dump waste without having to shoot it away. Also, plants will convert this waste to energy over time, allowing bots to recoup some energy. | ||
+ | |||
+ | Optionally, you can selectively force inverse sharing through certain ties: | ||
+ | |||
+ | cond | ||
+ | *.trefeye *.myeye != | ||
+ | start | ||
+ | .sharenrg .tieloc store | ||
+ | 1 .tieval store | ||
+ | stop | ||
− | + | This code will check if the tied bot is non-friendly, and then store the value 1 in its .sharenrg memory location. |
Latest revision as of 20:41, 14 February 2014
A bot can share substances with another bot if they are connected a through tie. There are DNA commands that allow sharing of energy, slime, shell, and waste. These are called sharing commands. They can be useful for multibots trying to keep the members of their multi-celled organism alive and well.
The commands
Share commands and the effects
- sharenrg - This lets bots share energy. There is no need to address a specific tie reference number, since I'll be sharing from all bots I'm permanently tied to. The number stored in here becomes the percentage of total energy that I receive. The values possible are in the range [1,99]. This command is commonly executed by parasites and tiefeeders. Although the command says 'share', in the case o tie feeders and parasites, it is more like 'steal' than 'share'.
- sharewaste - This lets bots share Waste.
- shareshell - This lets bots share shell.
- shareslime - This lets bots share slime.
Example
Suppose there are two bots connected by a tie. First bot has 40 waste (or any other shared material) and the second one has 60. If first bot executes command
10 .sharewaste store
Then the total amount of waste (100) will be redistributed so that the first bot receives 10% of that total. The final outcome is that the first bot will have 10 waste and the second bot will have 90 waste.
Uses
A useful way to use these with combat bots is shown below.
cond *.multi 1 = start 99 .sharenrg store .sharewaste inc stop
In this gene 99% of the total energy is taken by a bot. This is useful to feed in case a bot accidentally becomes a MB while tie feeding.
The code ".sharewaste inc" forces the enemy to take 99% of the attacker's waste, which is useful to dump waste without having to shoot it away. Also, plants will convert this waste to energy over time, allowing bots to recoup some energy.
Optionally, you can selectively force inverse sharing through certain ties:
cond *.trefeye *.myeye != start .sharenrg .tieloc store 1 .tieval store stop
This code will check if the tied bot is non-friendly, and then store the value 1 in its .sharenrg memory location.