News:

A forum for users of LackeyCCG

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - amcsi

#1
Plugins & Plugin Creation Forum / Re: Checksums unveiled?
December 11, 2019, 03:23:56 AM
8 years later, I want to also write a script that builds a plugin, and I need to be able to write the checksum myself :P

I also wanted to write this in PHP.
There is one thing I noticed: I had to subtract 1 to get the final result that would match the examples from e.g. here: https://pottertradingcardgame.webs.com/updatelist.txt

That's not covered in your algorithm...
But what's also not covered is how you get to big negative numbers in the case of seemingly larger files (like images).

How do I get larger images to emit the same large negative numbers, has the algorithm changed?

EDIT: never mind, I figured it out. I didn't realize C did funny conversions when adding a char casted to an unsigned into to a signed int. Chars with values 128 and up effectively got added as negative numbers according to the LackeyCCG algorithm. Here's the fix applied to my PHP code: https://github.com/amcsi/lycee-overture/commit/05599951f0c5f228c911df7f2ed6e674faf0960e
#4
Plugins & Plugin Creation Forum / Checksum algorithm?
December 08, 2019, 11:07:50 AM
I'm creating a plugin for Lycee TCG ( https://www.lycee-tcg.eu/ )

I'm writing a script to build all the plugin files necessary. One thing I'm stuck at currently though is that I don't know what algorithm is used to generate the checksums in upaatelist.txt.
Since this is an automated script, I can't make use of LackeyCCG's built-in tool, because a human would need to mess around with UI for that.

Could someone please let me know what algorithm is used to generate the checksums so I could do the same in my scripting language?