### Author Topic: BatLib Ideas/Wishlist  (Read 28159 times)

0 Members and 1 Guest are viewing this topic.

#### Munchor

• LV13 Extreme Addict (Next: 9001)
• Posts: 6199
• Rating: +295/-121
• Code Recycler
##### Re: BatLib Ideas/Wishlist
« Reply #90 on: April 18, 2011, 11:37:22 am »
Yes you can However, I do not believe that I added protection against drawing off screen, so be careful to not let your x and y values to go off screen

I cannot wait to see the game !

I was coding the game and having some progress. However, I thought "Wow, let's make this in Axe!", and I started it and I've developed it a lot further in Axe. However, I'll try and make it BatLib after I finish don't worry

#### Xeda112358

• they/them
• Project Author
• LV12 Extreme Poster (Next: 5000)
• Posts: 4638
• Rating: +717/-6
• Calc-u-lator, do doo doo do do do.
##### Re: BatLib Ideas/Wishlist
« Reply #91 on: April 18, 2011, 11:39:31 am »
That is fine It is entirely up to you

#### Munchor

• LV13 Extreme Addict (Next: 9001)
• Posts: 6199
• Rating: +295/-121
• Code Recycler
##### Re: BatLib Ideas/Wishlist
« Reply #92 on: April 18, 2011, 11:41:29 am »
That is fine It is entirely up to you

I'll still make it in BatLib to learn and to teach others by sharing the source.

#### Xeda112358

• they/them
• Project Author
• LV12 Extreme Poster (Next: 5000)
• Posts: 4638
• Rating: +717/-6
• Calc-u-lator, do doo doo do do do.
##### Re: BatLib Ideas/Wishlist
« Reply #93 on: April 18, 2011, 10:26:08 pm »
Okay, so I have been using command 54 which is DBRead and I think it is about time that I fix it up. It is used when you are creating a database to extract certain "elements." Pretty much, think of a database as a list, except with data of a variable size. Okay, here is a better context: You want to read a line in a program.

A newline token is 3Fh or 63 in decimal. So, if you create a program where each line has a word or name or some other data, you can use dim(54 to read specific lines! The only real problem at the moment is that you need a newline at the end and it does not detect the end of the file.

Also note that it can read from the archive, currently and it isn't limited to newline tokens. If you wanted, you could read between spaces or whatever you feel like using I am using it in Samocal for item and monster names

Also, I want to add in InsertEntry, DeleteEntry, and ReplaceEntry as new commands

#### Munchor

• LV13 Extreme Addict (Next: 9001)
• Posts: 6199
• Rating: +295/-121
• Code Recycler
##### Re: BatLib Ideas/Wishlist
« Reply #94 on: April 20, 2011, 09:40:22 am »
Woah Woah Woah, is there appvar support?

#### Xeda112358

• they/them
• Project Author
• LV12 Extreme Poster (Next: 5000)
• Posts: 4638
• Rating: +717/-6
• Calc-u-lator, do doo doo do do do.
##### Re: BatLib Ideas/Wishlist
« Reply #95 on: April 20, 2011, 11:34:21 am »
Scout, one of the main selling points of BatLib is that it technically works with all variable types. Some types like lists and real numbers you will need to know the structure, but if a command asks for a var name, it can use any variable type.

For example, if I want to read 67 bytes of Pic7 from archive at an offset of 13:
Code: [Select]
dim(11,13,".Pic7",67That will return the data as a string in Ans. For an appvar, use a prefix byte of either U or 5. So for example:
Code: [Select]
dim(54,63,2,"5MEOWThat will read the second line in the appvar MEOW

Enjoy!
« Last Edit: April 20, 2011, 11:35:24 am by Xeda112358 »

#### Munchor

• LV13 Extreme Addict (Next: 9001)
• Posts: 6199
• Rating: +295/-121
• Code Recycler
##### Re: BatLib Ideas/Wishlist
« Reply #96 on: April 20, 2011, 11:34:58 am »
Ooh sweet, nice!

#### mrmprog

• LV7 Elite (Next: 700)
• Posts: 559
• Rating: +35/-1
##### Re: BatLib Ideas/Wishlist
« Reply #97 on: April 22, 2011, 08:59:04 pm »
I would kinda like more data structures and a randint( for recode

#### Xeda112358

• they/them
• Project Author
• LV12 Extreme Poster (Next: 5000)
• Posts: 4638
• Rating: +717/-6
• Calc-u-lator, do doo doo do do do.
##### Re: BatLib Ideas/Wishlist
« Reply #98 on: April 22, 2011, 09:34:35 pm »
For now, a method for randInt( in ReCode would be to use the fact that division stores the remainder in Ans'. Using Ans in your code will swap Ans with Ans' so what you can do for randInt(1,8 is:
Code: [Select]
rand/8       ;This will store a remainder of 0 to 7 in Ans'Ans+1        ;This will swap out Ans' with Ans, then add 1I hope this helps, but if I get time to program, I will try to add in a randInt( command
« Last Edit: April 22, 2011, 09:34:49 pm by Xeda112358 »