Hey, I'm developing a calculator wiki for the game Clash of Clans. It's in the planning stages right now. What I want to know is:

-Is it possible to create a matrix that uses a custom name other than just [A] through [J], i.e. [RE01], [DE02], [HE01] (Those are Barbarian, Hog Rider, and Barbarian King, in that order)?
-How can I call up such a custom matrix in a program?

The reason why I'm looking at using matrices is because the troops in the game are levelled, which means some troop stats such as Damage per Second, Hitpoints, training cost, etc, vary from level to level and are not fixed between levels.

Thx for reading.
Matrices cannot have custom names. Lists, however, can have custom names, and there are functions in the Matrix menu that can help convert said lists to a matrix for use with whatever you use them for. Matrix-to-list conversions are also available.

If possible, try to work directly with the lists.

EDIT: There's a technical reason why matrices cannot have custom names. Names of matrices are created as an identifying one byte number, which resolves to the tokens [A] thru [J]. Through some magic (which I will not explain), you can use the matrices past [J] since there are plenty of numbers between 10 and 255, though what you'll actually see if you attempt to use them will vary between nonsense and garbage, with a possibility of a calculator crash if you so much as glance at it.

Lists, on the other hand, *can* use the six given identifying tokens for its variable name, but since their filesystem entries are located in program/list VAT instead of symbol VAT, they can take an actual name (up to 5 characters long, since three bytes are reserved for other purposes). You define those by using the little "L" found in List >> Ops >> (very bottom of the list) followed by five alphanumeric characters of your choosing (so long as the first character isn't a number)

If you have to long(er) names, you can use external libraries (such as Celtic III) to read and write data from and to program files and appvars, tho this does limit you to what you can actually do with the data in a single statement.
Iambian wrote:
Matrices cannot have custom names. Lists, however, can have custom names, and there are functions in the Matrix menu that can help convert said lists to a matrix for use with whatever you use them for. Matrix-to-list conversions are also available.

If possible, try to work directly with the lists.

EDIT: There's a technical reason why matrices cannot have custom names. Names of matrices are created as an identifying one byte number, which resolves to the tokens [A] thru [J]. Through some magic (which I will not explain), you can use the matrices past [J] since there are plenty of numbers between 10 and 255, though what you'll actually see if you attempt to use them will vary between nonsense and garbage, with a possibility of a calculator crash if you so much as glance at it.

Lists, on the other hand, *can* use the six given identifying tokens for its variable name, but since their filesystem entries are located in program/list VAT instead of symbol VAT, they can take an actual name (up to 5 characters long, since three bytes are reserved for other purposes). You define those by using the little "L" found in List >> Ops >> (very bottom of the list) followed by five alphanumeric characters of your choosing (so long as the first character isn't a number)

If you have to long(er) names, you can use external libraries (such as Celtic III) to read and write data from and to program files and appvars, tho this does limit you to what you can actually do with the data in a single statement.


Thanks! I'll work around my problem using lists.
Awesome. That worked. Thank-you!
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement