Difference between revisions of "Sysvar"

From WikiManual
Jump to: navigation, search
(System variables you're likely to see in Robot DNA:)
 
(81 intermediate revisions by 10 users not shown)
Line 1: Line 1:
*up/1
+
__NOTOC__
dn/2
 
sx/3
 
dx/4
 
aimdx/5
 
aimsx/6
 
shoot/7
 
shootval/8
 
robage/9
 
mass/10
 
maxvel/11
 
aim/18
 
setaim/19
 
bodgain/194
 
bodloss/195
 
velscalar/196
 
velsx/197
 
veldx/198
 
veldn/199
 
velup/200
 
vel/200
 
hit/201
 
shflav/202
 
pain/203
 
pleas/204
 
hitup/205
 
hitdn/206
 
hitdx/207
 
hitsx/208
 
shang/209
 
shup/210
 
shdn/211
 
shdx/212
 
shsx/213
 
edge/214
 
fixed/215
 
fixpos/216
 
depth/217
 
daytime/218
 
xpos/219
 
ypos/217
 
kills/220
 
repro/300
 
mrepro/301
 
sexrepro/302
 
nrg/310
 
body/311
 
fdbody/312
 
strbody/313
 
setboy/314
 
rdboy/315
 
tie/330
 
stifftie/331
 
mkvirus/335
 
dnalen/336
 
vtimer/337
 
vshoot/338
 
genes/339
 
delgene/340
 
thisgene/341
 
sun/400
 
trefbody/437
 
trefxpos/438
 
trefypos/439
 
trefvelmysx/440
 
trefvelmydx/441
 
trefvelmydn/442
 
trefvelmyup/443
 
trefvelscalar/444
 
trefvelyoursx/445
 
trefvelyourdx/446
 
trefvelyourdn/447
 
trefvelyourup/448
 
trefshell/449
 
tieang/450
 
tielen/451
 
tieloc/452
 
tieval/453
 
tiepres/454
 
tienum/455
 
trefup/456
 
trefdn/457
 
trefsx/458
 
trefdx/459
 
trefaimdx/460
 
trefaimsx/461
 
trefshoot/462
 
trefeye/463
 
trefnrg/464
 
trefage/465
 
numties/466
 
deltie/467
 
fixang/468
 
fixlen/469
 
multi/470
 
readtie/471
 
trefbody/472
 
memval/473
 
memloc/474
 
tmemval/475
 
tmemloc/476
 
reffixed/477
 
treffixed/478
 
trefaim/479
 
tieang1/480
 
tieang2/481
 
tieang3/482
 
tieang4/483
 
tielen1/484
 
tielen2/485
 
tielen3/486
 
tielen4/487
 
eye1/501
 
eye2/502
 
eye3/503
 
eye4/504
 
eye5/505
 
eye6/506
 
eye7/507
 
eye8/508
 
eye9/509
 
refmulti/686
 
refshell/687
 
refbody/688
 
refxpos/689
 
refypos/690
 
refvelscalar/695
 
refvelsx/696
 
refveldx/697
 
refveldn/698
 
refvel/699
 
refvelup/699
 
refup/701
 
refdn/702
 
refsx/703
 
refdx/704
 
refaimdx/705
 
refaimsx/706
 
refshoot/707
 
refeye/708
 
refnrg/709
 
refage/710
 
refaim/711
 
reftie/712
 
refpoison/713
 
refvenom/714
 
refkills/715
 
myup/721
 
mydn/722
 
mysx/723
 
mydx/724
 
myaimdx/725
 
myaimsx/726
 
myshoot/727
 
myeye/728
 
myties/729
 
mypoison/730
 
myvenom/731
 
  
out1/800
+
Sysvars (System Variables) are named memory address for variable integers.
out2/801
 
in1/810
 
in2/811
 
  
mkslime/820
+
Every Bot has its own memory to store its situation and what actions it will do every cycle.
slime/821
+
 
mkshell/822
+
*Most of them cause an action each cycle if they store a number that is not 0, like "commands".
shell/823
+
*Some store actual information each cycle, so they are basically "read only". Because even if you write in that address, many things will automatically overwrite this value each cycle.
strvenom/824
+
*A Few of them cause no actions and only change by command, like [[Free Variables|free "variables"]].
venom/825
+
 
strpoison/826
+
==System variables you're likely to see in [[Robot DNA]]:==
poison/827
+
{| border="0"
waste/828
+
{{Reproduction}}
pwaste/829
+
{{Movement}}
sharenrg/830
+
{{Chloroplasts}}
sharewaste/831
+
{{Population}}
shareshell/832
+
{{Shooting}}
shareslime/833
+
{{Shot}}
ploc/834
+
{{Position}}
vloc/835
+
{{eye}}
venval/836
+
{{Gain and loss}}
poisoned/838
+
{{Body}}
backshot/900
+
{{Virus}}
aimshoot/901
+
{{Defense}}
 +
{{Memloc and Memval}}
 +
{{in and out}}
 +
{{Tie}}
 +
{{Multibot}}
 +
{{Sharing}}
 +
{{Myvar}}
 +
{{RefVar}}
 +
{{TrefVar}}
 +
|}
 +
 
 +
==Also see:==
 +
*[[Operator]]s listing Algorithms.
 +
*[[Racial memory]] gets copied through the birth tie.

Latest revision as of 21:03, 11 October 2014


Sysvars (System Variables) are named memory address for variable integers.

Every Bot has its own memory to store its situation and what actions it will do every cycle.

  • Most of them cause an action each cycle if they store a number that is not 0, like "commands".
  • Some store actual information each cycle, so they are basically "read only". Because even if you write in that address, many things will automatically overwrite this value each cycle.
  • A Few of them cause no actions and only change by command, like free "variables".

System variables you're likely to see in Robot DNA:

Reproducing:

.robage 9
.mass 10
.timer 12
.repro 300
.mrepro 301
.sexrepro 302
.fertilized 303

Movement:

.aimsx 6 .aimdx 5
.up 1
.sx 3 Veggietransparent.gif .dx 4
.dn 2
.aim 18 .setaim 19
.maxvel 11
.setboy 314 .rdboy 315

Forwards compatibility note:

aimdx is the old name for aimright

aimsx is the old name for aimleft

Chloroplasts:

.chlr 920 .mkchlr 921
.rmchlr 922 .availability 923
.sharechlr 924

Forwards compatibility note:

light is the old name for availability

None of the chloroplast commands are supported in versions pre 2.46

Population:

.totalbots 401
.totalmyspecies 402

Shooting:

.shoot 7 .shootval 8
.kills 220
.backshot 900 .aimshoot 901

Shot:

.shflav 202
.shang 209 .shup 210
.shsx 213 Veggietransparent.gif .shdx 212
.shdn 211

Position:

.velscalar 196
.vel 200 .velup 200
.velsx 197 Veggietransparent.gif .veldx 198
.veldn 199
.edge 214
.fixed 215 .fixpos 216
.xpos 219 .ypos/.depth 217
.daytime 218
.sun 400

Eyes:

.eye1 501 .eye2 502 .eye3 503
.eye4 504 .eye5 505 .eye6 506
.eye7 507 .eye8 508 .eye9 509
.eyef 510
.focuseye 511
.eye1dir 521 .eye2dir 522 .eye3dir 523
.eye4dir 524 .eye5dir 525 .eye6dir 526
.eye7dir 527 .eye8dir 528 .eye9dir 529
.eye1width 531 .eye2width 532 .eye3width 533
.eye4width 534 .eye5width 535 .eye6width 536
.eye7width 537 .eye8width 538 .eye9width 539

Gains & Losses:

.bodgain 194 .bodloss 195
.pain 203 .pleas 204

Body & Waste:

.nrg 310 .body 311
.fdbody 312 .strbody 313
.waste 828 .pwaste 829

Viruses:

.mkvirus 335 .thisgene 341
.dnalen 336
.vtimer 337 .vshoot 338
.genes 339
.delgene 340

Defense:

.hit 201 .hitup 205
.hitsx 208 Veggietransparent.gif .hitdx 207
.hitdn 206
.mkslime 820 .slime 821
.mkshell 822 .shell 823
.strvenom 824 .venom 825
.strpoison 826 .poison 827
.ploc 834 .vloc 835
.venval 836 .paralyzed 837
.poisoned 838 .pval 839

Forwards compatibility note:

strvenom is the old name for mkvenom

strpoison is the old name for mkpoison

Memloc & Memval:

.memval 473 .tmemval 475
.memloc 474 .tmemloc 476

In and Out:

.out1 800 .in1 810
.out2 801 .in2 811
.out3 802 .in3 812
.out4 803 .in4 813
.out5 804 .in5 814
.out6 805 .in6 815
.out7 806 .in7 816
.out8 807 .in8 817
.out9 808 .in9 818
.out10 809 .in10 819

Ties:

.tie 330
.stifftie 331
.numties 466
.tiepres 454
.tienum 455
.readtie 471
.deltie 467
.tieloc 452
.tieval 453
Multibot

Multibots:

.tieang 450 .tielen 451
.multi 470
.fixang 468 .fixlen 469
.tieang1 480 .tielen1 484
.tieang2 481 .tielen2 485
.tieang3 482 .tielen3 486
.tieang4 483 .tielen4 487

MB Sharing:

.sharenrg 830
.sharewaste 831
.shareshell 832
.shareslime 833

MyVar:

.myup 721
.mysx 723 .mydx 724
.mydn 722
.myaimdx 725 .myaimsx 726
.myshoot 727
.myeye 728
.myties 729
.mypoison 730
.myvenom 731

RefVars:

.reftype 685
.refmulti 686
.refshell 687
.refbody 688
.refxpos 689 .refypos 690
.refvel 699 .refvelup 699 .refvelscalar 695
.refvelsx 696 .refveldx 697
.refveldn 698
.refnrg 709
.refage 710
.refaim 711
.refpoison 713
.refvenom 714
.refkills 715
.reffixed 477
.refup 701
.refsx 703 .refdx 704
.refdn 702
.refaimdx 705 .refaimsx 706
.refshoot 707
.refeye 708
.reftie 712

TrefVars:

.trefbody 437
.trefxpos 438 .trefypos 439
.trefvelmyup 443
.trefvelmysx 440 .trefvelmydx 441
.trefvelmydn 442
.trefvelscalar 444 .trefvelyourup 448
.trefvelyoursx 445 .trefvelyourdx 446
.trefvelyourdn 447
.trefshell 449
.trefup 456
.trefsx 458 .trefdx 459
.trefdn 457
.trefaimsx 461 .trefaimdx 460
.trefshoot 462
.trefeye 463
.trefnrg 464
.trefage 465
.treffixed 478
.trefaim 479
.tout1 410 .tin1 420
.tout2 411 .tin2 421
.tout3 412 .tin3 422
.tout4 413 .tin4 423
.tout5 414 .tin5 424
.tout6 415 .tin6 425
.tout7 416 .tin7 426
.tout8 417 .tin8 427
.tout9 418 .tin9 428
.tout10 419 .tin10 429

Also see: