Sysvar

From WikiManual
Revision as of 20:13, 11 October 2014 by Botsareus (talk | contribs) (System variables you're likely to see in Robot DNA:)
Jump to: navigation, search


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

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

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

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

Population:

.totalbots 401
.totalmyspecies 402

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: