Chars

Langues: JP EN DE FR
users online
Forum » Windower » General » Chars
Chars
 Phoenix.Zohno
Offline
Serveur: Phoenix
Game: FFXI
user: Zono
Posts: 83
By Phoenix.Zohno 2013-04-21 12:47:00
Link | Citer | R
 
A small and simple plugin :)
It lets you input special chars using simple tags (ex.: <note> for ♪). The available chars depend on the data gathered by the windower team (https://github.com/Windower/Lua/blob/master/addons/libs/ffxidata.json)

https://github.com/Windower/Lua/tree/master/addons/chars

[+]
 Leviathan.Arcon
VIP
Offline
Serveur: Leviathan
Game: FFXI
user: Zaphor
Posts: 660
By Leviathan.Arcon 2013-04-21 14:36:01
Link | Citer | R
 
Phoenix.Zohno said: »
[..] The available chars depend on the data gathered by the windower team (https://github.com/Windower/Lua/blob/master/addons/libs/ffxidata.json)

I actually just poked around blindly and found those icons (some of them are wrong too, like <and> and <or>, which I only now noticed). Feel free to correct those and add more.

Put this in a blank addon file ("Windower/addons/bla/bla.lua" for example) and load it:
Code
require 'luau'

function print_chars(loc)
	local str = ''
	for col = 0x00, 0x0F do
		str = str..'\t'..math.tobase(col, 16)
	end
	log(' '..str)
	str = ''
	for res = 0x00, 0xFF do
		if res < 0x1F or res == 0x7F or res > 0xFC then
			str = str..'\t '
		else
			str = str..'\t'..string.char(loc, res)
		end
		if (res + 1) % 0x10 == 0 then
			log(math.tobase(math.floor(res/0x10), 0x10), str)
			str = ''
		end
	end
end


Then type this into the chatlog:
//lua i bla print_chars 0x81

That will print all chars with the lead byte 0x81 (SE uses a 2-byte encoding for Japanese and other special characters, see below). That's where almost all of those icons are. Unfortunately there's no easy way to indent them properly, but you can still figure out what's what.

This may also help:
http://en.wikipedia.org/wiki/Shift_JIS#Shift_JIS_byte_map

This chart (and the page in general) shows the encoding SE are using, however, they modified it a bit. So while not all chars are the same, you can use it as a base to play around. For example, if you call it with 0x82, you'll get a different set of characters. There's also some values that will crash you, just fyi. If you want some more info, can PM me or find me on IRC (irc.ffochat.com, #lua).
 Phoenix.Zohno
Offline
Serveur: Phoenix
Game: FFXI
user: Zono
Posts: 83
By Phoenix.Zohno 2013-04-21 14:45:52
Link | Citer | R
 
thanks for the heads-up. i'll see what i get out of it :)
Log in to post.