GearSwap-Jobs icon indicating copy to clipboard operation
GearSwap-Jobs copied to clipboard

Set selecting is complicated in JP client

Open nekonok opened this issue 10 years ago • 13 comments

When called set_language('japanese'), i have to name sets in English and Japanese like this:

  1. If i want to select gear for specific spells, i have to write that name in English. sets.precast["Provoke"]
  2. If i want to select gear for specific maps, i have to write that name in English. sets.precast.Cure
  3. If i want to select gear for specific types, i have to write that name in English. sets.precast.WhiteMagic
  4. If i want to select gear for specific skills, i have to write that name in Japanese. sets.midcast["強化魔法"]
  5. If i want to set custome class depends on buff, i have to write that name in Japanese because buff argument in job_buff_change() is Japanese.

I'm tired to check languages one by one. Is it impossible that put all logics in English? Or please tell me the variables affected by set_language(). I want to write only gear names in Japanese.

nekonok avatar Nov 14 '14 00:11 nekonok

Hmm.

I can change all instances of set construction using spell.english to spell.name. That will mean item 1 will use the Japanese name if you use set_language. This isn't actually what you're asking for, though, so I'll put that on hold.

For item 2, I'd need a full translation of all the items in Mote-Mappings.lua. If that can be provided, then all spell maps would work as well, and be set relative to the language selected. However if you want it to always use English rather than the set language, I can leave it alone for now.

For item 3, unfortunately spell.type is hard-coded into the resources. The resources would need to be updated before that would be changeable.

On the other hand, for item 4, spell.skill is language-dependent, so I can't make it not show up in Japanese if set_language has been used. The intent a while back was to make the same conversion for spell.type as was done for spell.skill. Still, fixing item 4 for your request, to put it in English, is doable. It will be transparent, regardless of how the user wants to use it.

For item 5, buff names are pulled from resources, so again they will be specific to the language chosen. Fixing item 5 will be more awkward. I can only provide one or the other.

In the case of resource names, reverse lookups for buffs are difficult. I'd have to get the buff id based on the buff name, and that's not guaranteed to be unique (for example, there are two or three separate buff IDs for Haste). Skills, on the other hand, I can ensure lookup the English name.

I'll put some more thought into this, and perhaps add a flag to distinguish between full Japanese and equipment-only Japanese.

Kinematics avatar Nov 20 '14 03:11 Kinematics

I see. Now not only Mote-libs, but also GearSwap doesn't work properly in Japanese, for example:

  1. gs equip sets.midcast["強化魔法"] will not work
  2. have to re-define elements, skillchain_elements and areas in Mote-Mappings (I did it User-Globals.lua)
  3. cancel_conflicting_buffs, refine_waltz and custom_aftermath_timers_precast will not work

and so on.

Are resources languages depends on client? If not, to avoid a lot of problems, how about translate Japanese equipment name to English in the time loading user file and treat the other in English? I really thank you to your considering for JP users, but translating all to Japanese is not useful because windower does not treat Japanese properly. (but translating thousands of item names JP to EN is painful...umm)

nekonok avatar Nov 20 '14 04:11 nekonok

language is a variable set to 'english' by default, but can be changed to 'japanese'. It's only explicitly used for outputting certain text strings, because the code page needs to be adjusted for the string to be properly formed for the client's language/font.

It's implicitly used in many other locations. Pretty much everything that refers to any resources (all the stuff in the Windower\Res directory) gets adjusted to match the current language setting. This includes item names, spells, buffs, elements, etc. So in order for GearSwap to use Japanese item names for gear, it has to have the language set to 'japanese'. Most of the other problems are because of hard-coding issues within my libraries.

Is it acceptable to make everything Japanese? Or is it important that there be a separation between gear names and all other named values?

On item 1 of your new list, I'll have to look into that to see how to fix it.

Kinematics avatar Nov 20 '14 18:11 Kinematics

Making names Japanese is ok if gs equip sets.midcast["強化魔法"] works properly. I don't stick to language, but I want making all the names either Japanese or English.

nekonok avatar Nov 25 '14 02:11 nekonok

gs equip sets.midcast["強化魔法"] will never work and that's not a GearSwap issue at all, it's a Windower issue. Try using ' instead of ", then it should work. If it doesn't, that means it's a GearSwap issue then.

z16 avatar Nov 25 '14 07:11 z16

result:

  • gs equip sets.midcast["強化魔法"] does not work.
  • gs equip sets.midcast['強化魔法'] does not work.
  • gs equip sets.midcast.強化魔法 does not work.
  • gs equip sets.midcast["Cure"] does not work.
  • gs equip sets.midcast['Cure'] works properly.
  • gs equip sets.midcast.Cure works properly.

nekonok avatar Nov 25 '14 13:11 nekonok

Did you enter those into the console? Can you try entering them into the chatlog (with // prepended) please?

z16 avatar Nov 25 '14 13:11 z16

To be clear, I mean this one only:

gs equip sets.midcast['強化魔法']

Because that command should work.

z16 avatar Nov 25 '14 13:11 z16

I tried it from chatlog. Full input was //gs equip sets.midcast['強化魔法'], it did not work.

nekonok avatar Nov 25 '14 13:11 nekonok

Ok, can you with the console then? If one works and the other doesn't, it's an encoding issue and we can fix that in LuaCore. If not... I'm not sure. But it will be a start to know that.

z16 avatar Nov 25 '14 13:11 z16

I don't know the way to input Japanese in console. It seems to can not enter or display multi-bytes. Are there some settings?

nekonok avatar Nov 25 '14 13:11 nekonok

No, you're right, I forgot it wasn't that simple... I'll have to experiment with this a bit, but I have some other issues queued up I'm working on right now, I'll try to get this done tonight.

z16 avatar Nov 25 '14 13:11 z16

gearswap received from FF11 client, 強化魔法 is SHIFT-JIS. but gearswap expected UTF-8. so this command dose not work. Ithink addon command equip 2nd parameter (in gearswap.lua nearby line 160..) splitup[2] should be translated from SHIFT-JIS to UTF-8.

for example

if splitup[2] then
    splitup[2] = windower.from_shift_jis(splitup[2])
end

amatsuno avatar Nov 25 '14 16:11 amatsuno