• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Convert string to rawcode and rawcode to string

Status
Not open for further replies.
Level 24
Joined
Aug 1, 2013
Messages
4,657
Hi all.

Here I am, back again.

How can I convert "h000" and "i000" to integers of the units and items of that id?
(Note that they are "strings" and not 'codes'.)

I tried to search for normal algorithms but none come even close to what happens in WC3.
I think that the difference is that I searched on 0123456789abcdef and WC3 probably uses 0123456789abcdefghijklmnopqrstuvwxyz.
Is that true?
 

LeP

LeP

Level 13
Joined
Feb 13, 2008
Messages
539
Hi all.

Here I am, back again.

How can I convert "h000" and "i000" to integers of the units and items of that id?
(Note that they are "strings" and not 'codes'.)

I tried to search for normal algorithms but none come even close to what happens in WC3.
I think that the difference is that I searched on 0123456789abcdef and WC3 probably uses 0123456789abcdefghijklmnopqrstuvwxyz.
Is that true?

one of the many implementations i guess: http://www.hiveworkshop.com/forums/jass-resources-412/snippet-ascii-190746/
 
Status
Not open for further replies.
Top