Consider helping out in updating the wiki for 3.6.0 - see Path of Exile Wiki:To-do list/3.6.0.

UserProfile:Illviljan

Jump to: navigation, search

User contributions

Recent Wiki Activity

Comment Archive

Recent Comments

You do not have permission to add comments or reply. Please make sure you are logged in, have validated your email address, and have performed at least one edit to an article.

Avatar for Ruba159753

Hello! Copied the last changes in the "Module:Item table‎" and there is a question: how to change the location of the displayed text? "Level_#_granted_skill" in Russian looks like this "granted_skill_#_level". I.e. how do I swap the text?

Avatar for Illviljan

That's unfortunate. It's the matched_string variable that needs to be changed.

Now it checks for "level]] 20" where the ] and whitespace ("[%]]*" and "%s*" respectively) is optional and returns the number ("(%d+)").

So swapping the pattern a little bit should do the trick:

local matched_string = string.match(stat_text:lower(), '(%d+)%s*[%[]*' .. i18n.item_table.granted_skills_level:lower() )

Maybe this pattern can be simplified a bit more? For example just searching if "level" is in the stat_text and returning whatever number that's inside the stat_text.

Avatar for Ruba159753

At the moment like this:

                local level = ''
                local stat_text = v['mods.stat_text_raw'] or ''
                local matched_string = string.match(
                    stat_text:lower(), 
                    '(%d+)%s*[%[]*' .. i18n.item_table.granted_skills_level:lower()
                )
                if matched_string then
                    level = string.format(
                        '%s %d ',
                        i18n.item_table.granted_skills_level,
                        matched_string
                    )
                end

It should be like this: http://dl4.joxi.net/drive/2019/03/31/0003/0405/197013/13/a7e927c9af.png

What else needs to be changed?

Avatar for Illviljan

Change:

level = string.format('%s %d ', i18n.item_table.granted_skills_level, matched_string)

and

tbl[#tbl+1] = string.format('%s%s[[%s|%s]]', level, img, link, label)

to

level = string.format(' %d %s', matched_string, i18n.item_table.granted_skills_level) 

and

tbl[#tbl+1] = string.format('%s[[%s|%s]]%s', img, link, label, level)

Avatar for Ruba159753

Thanks. But it didn't work on skill gems. Thanks to your tips I was able to fix it like this: https://pathofexile-ru.gamepedia.com/index.php?title=Модуль%3AItem_table&type=revision&diff=351677&oldid=351676

Still such question: and whether it was easier to make a separate column that indicated the skill level?

Avatar for Illviljan

Using separate columns gets difficult when you can have '''multiple''' granted skills. For example, making sure the level column and name columns are always sorted correctly requires making a new table within the cell from my testing and then you create new issues such as that column not being sortable (cough, |legacy=1 cough...).

There might be a smarter way to do this but since this column hasn't been available for years it's time to just get a solution out.

Changing the sentence structure would have been easier if we'd used named arguments instead of the positional arguments like in string.format. For example in Python you could have done i18n = f'{img} [[{link}|{label}]] {level}' which would have been very easy to change the phrasing.

87769 GP

Total Statistics

Wikis Edited
1
Contributions
Creations
996
Edits
9,299
Deletes
92
Patrols
120
Path of Exile Wiki Rank
(Leaderboard)
4
Gamepedia Rank
(Leaderboard)
250
Friends
2

Achievements

Path of Exile Wiki

Special Achievements

Gamepedia's 5th Anniversary
Gamepedia's 6th Anniversary