Author Topic: Questions on Sysvars File  (Read 2171 times)

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Questions on Sysvars File
« on: April 04, 2005, 06:09:27 PM »
I was goofing around with the sysvars file and found that I could add my own sysvar to the file and could latter reference it. Like def but no extra code required ;)

Example:

myvar
50

I was wondering what were the rules exactly for editing the file further.

Endy B)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7714
    • View Profile
Questions on Sysvars File
« Reply #1 on: April 04, 2005, 06:35:13 PM »
Yep, you can do that.  Of course that makes sharing your bot difficult.

The sysvars file currently can only hold 200 sysvars.  Other than that, play around to your heart's content.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2554
    • View Profile
    • http://kuro-tejina.com
Questions on Sysvars File
« Reply #2 on: April 04, 2005, 07:17:27 PM »
Like Num said, the problem is that your bot would be uncompatible with anyone else's sims unless you also share the sysvars file.

Just imagine how messy that would get  :blink:
There are 10 kinds of people in the world

Those who understand binary.

and those who don't

:D PY :D

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Questions on Sysvars File
« Reply #3 on: April 04, 2005, 11:22:04 PM »
Cool. :) I was planning on just changing some of the main memvals I use. They're easy enough to change back with notepad's "replace" ability.

Endy B)

Offline Old Henk

  • Bot Destroyer
  • ***
  • Posts: 229
    • View Profile
Questions on Sysvars File
« Reply #4 on: April 05, 2005, 09:55:40 AM »
? It's possible to define specific memlocs in the DNA right? So if I want a dutch version of main sysvars I could do:

def voor 1
def achter 2
def schiet 7

Because these are translations...

Is that possible or can one only define undefined memlocs?

Henk  :help:

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2554
    • View Profile
    • http://kuro-tejina.com
Questions on Sysvars File
« Reply #5 on: April 05, 2005, 11:29:48 AM »
You can only define memory locations that are not already used by the sysvars list.
There are 10 kinds of people in the world

Those who understand binary.

and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7714
    • View Profile
Questions on Sysvars File
« Reply #6 on: April 05, 2005, 03:26:52 PM »
Quote
? It's possible to define specific memlocs in the DNA right? So if I want a dutch version of main sysvars I could do:

def voor 1
def achter 2
def schiet 7

Because these are translations...

Is that possible or can one only define undefined memlocs?

Henk  :help:
That should work actually.  The sysvar defines what words are turned into what numbers.  I don't think there's anything that would stop that from working.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2554
    • View Profile
    • http://kuro-tejina.com
Questions on Sysvars File
« Reply #7 on: April 05, 2005, 05:12:43 PM »
Quote
Quote
? It's possible to define specific memlocs in the DNA right? So if I want a dutch version of main sysvars I could do:

def voor 1
def achter 2
def schiet 7

Because these are translations...

Is that possible or can one only define undefined memlocs?

Henk  :help:
That should work actually.  The sysvar defines what words are turned into what numbers.  I don't think there's anything that would stop that from working.
It will work and it won't work!

What actually happens is that you will be allowed to define system variables in this way but when the program decodes it to display the DNA in the robot details window or saves the DNA file then all instances where you used your defined variable instead of the sysvars equivalent, will be shown as the sysvars version.

For example try running this simple little test bot.

Code: [Select]
def testword 1

cond
start
10 .testword store
stop
end

Run it and you will see the robot moves forward just as if you had stored the value into .up
Now double click a robot and look at its DNA. It looks like this now.

Code: [Select]
cond
start
10 .up store
stop
end

Your custom variable has been translated back to the sysvar equivalent automatically.
There are 10 kinds of people in the world

Those who understand binary.

and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7714
    • View Profile
Questions on Sysvars File
« Reply #8 on: April 05, 2005, 06:11:02 PM »
Imagine translating the actual sysvars file.

Doing that should work, because the words themselves are only referenced through the sysvars.

Open up sysvars and rename "up" as "ooglbat".  Make a bot that uses "ooglbat" instead of "up".

It should work exactly as a bot that uses up would.
« Last Edit: April 05, 2005, 06:11:27 PM by Numsgil »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2554
    • View Profile
    • http://kuro-tejina.com
Questions on Sysvars File
« Reply #9 on: April 05, 2005, 09:15:15 PM »
Right.
That would work perfectly until you try to share the bot with someone who has a normal sysvars file. Then the whole thing will just stop working and replace all the non-standard sysvars in the DNA file with "0"s
There are 10 kinds of people in the world

Those who understand binary.

and those who don't

:D PY :D

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Questions on Sysvars File
« Reply #10 on: April 05, 2005, 11:11:11 PM »
DB translated to other languages. :lol:

Just kidding.

Endy B)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7714
    • View Profile
Questions on Sysvars File
« Reply #11 on: April 05, 2005, 11:51:02 PM »
Yeah, it would make sharing incredibly difficult.  But I'm just saying you _can_ do it.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Questions on Sysvars File
« Reply #12 on: April 06, 2005, 02:33:05 PM »
hmm , I have been searching for somthing like that:

Disassembly into vb, for a while, no luck yet...

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2554
    • View Profile
    • http://kuro-tejina.com
Questions on Sysvars File
« Reply #13 on: April 06, 2005, 02:39:04 PM »
You would be surprised at how much of it already is in more than one language. A whole bunch of the code and most of the forms are in Italian. They get translated to English by use of resource files containing all the form headings and text output messages.
There are 10 kinds of people in the world

Those who understand binary.

and those who don't

:D PY :D