Супергерой
Регистрация: 21.09.2012
Адрес: Ижевск
Возраст: 31
Сообщений: 227
Отблагодарили 354 раз(а)
|
Редактирование interface.xdat
Давно уже хотел запилить редактор, но все руки не доходили разобрать структуру interface.xdat.
И вот, более-менее готова первая версия с поддержкой пока одного клиента - High Five.
При запуске обновляет схему через интернет.
Я не реверсил клиент, структуру подбирал на глаз, советую при использовании делать бекапы.
Если кто-то хочет помочь с разбором неизвестных полей - пишите.
Cкачать:
java8u60
win64
Собрать:
GitHub
Свернуть ↑
1. Shortcuts
Создадим хоткей на WeatherWnd. Вещь функционально бесполезная, но для баловства сойдет.
Добавляем новый элемент в группу GamingStateShortcut
Назначаем клавиши и указываем действие
Профит
2. Windows
Основной блок информации о гуи.
Окно WeatherWnd на корейском языке, с дефолтным шрифтом текст не отображается.
С помощью гугл транслейта можно привести к более понятному виду
3. Fonts
Информация о подгружаемых шрифтах.
location: windows - ищет в системе, при пустом грузит из систем.
Свернуть ↑Развернуть ↓
Свернуть ↑
Для автоматизации в приложении есть скриптовая консоль. Язык как и у схемы - Groovy.
Примеры:
Свернуть ↑
PHP код:
//see http://docs.oracle.com/javase/8/docs/api/java/awt/event/KeyEvent.html def keycode1 = VK_A def keycode2 = VK_ALT def wndName = "WeatherWnd" def action = "ShowWindow Name=${wndName}"
println "Add ${wndName} shortcut keys=${[keycode1, keycode2]}"
xdat.shortcuts["GamingStateShortcut"].actions.add( new Shortcut.Action( keycode_1:keycode1, keycode_2:keycode2, action: action, unk8: 1 ) )
println "done!"
Свернуть ↑Развернуть ↓
Свернуть ↑
PHP код:
println "Remove Kamael race from char create window"
def raceList = xdat.windows["CharacterCreateSetupWnd"].children["cbRace"].values if (raceList.size() == 6){ raceList.remove(5) println "done!" }
Свернуть ↑Развернуть ↓
Свернуть ↑
PHP код:
def buttonWidth = 98 def buttonHeight = 27 def padding = 7 def spacing = 1
def window = xdat.windows["LoginMenuWnd"] window.anchor_parent = Alignment.BOTTOM_CENTER window.anchor_this = Alignment.BOTTOM_CENTER window.anchor_x = 0 window.size_absolute_width = 2*padding+window.children.size()*(buttonWidth+spacing) window.size_absolute_height = 2*padding+buttonHeight window.children.eachWithIndex{button, ind-> button.size_absolute_width = buttonWidth button.size_absolute_height = buttonHeight button.anchor_x = padding+ind*(buttonWidth+spacing) button.anchor_y = padding } println "done!"
Свернуть ↑Развернуть ↓
Свернуть ↑
PHP код:
def board = xdat.windows["BoardWnd"] def html = board.children["HtmlViewer"]
board.children.removeIf({obj-> obj != html })
println "Old:\tx=${html.anchor_x}\ty=${html.anchor_y}\tw=${html.size_absolute_width}\th=${html.size_absolute_height}"
def dy = html.anchor_x - html.anchor_y html.anchor_y += dy html.size_absolute_height -= dy
println "New:\tx=${html.anchor_x}\ty=${html.anchor_y}\tw=${html.size_absolute_width}\th=${html.size_absolute_height}"
Свернуть ↑Развернуть ↓
Свернуть ↑
PHP код:
void print(ui, n){ print "\t"*n println ui if (ui instanceof Iterable) ui.each{child-> print(child, n+1) } }
xdat.windows.each{window-> print(window, 0) }
Свернуть ↑Развернуть ↓
Свернуть ↑
Текстура
PHP код:
def inventory = xdat.windows["InventoryWnd"] inventory.size_absolute_width = 410 [ "BtnRotateRight", "BtnRotateLeft", "ObjectViewport", "ObjectViewportDispatchMsg", "EquipBg", "TalismanAllow", ].each { rem -> inventory.children.removeIf({ el -> el.name == rem }) } [ EquipSlotBg : [anchor_x: 4.0, anchor_y: 32.0, size_absolute_width: 124, size_absolute_height: 356, unk100: 'OldInventory.IconSlot'], EquipItem_Underwear: [anchor_x: 10.0, anchor_y: 76.0], EquipItem_Head : [anchor_x: 49.0, anchor_y: 38.0], EquipItem_Hair : [anchor_x: 10.0, anchor_y: 38.0], EquipItem_Hair2 : [anchor_x: 88.0, anchor_y: 38.0], EquipItem_Chest : [anchor_x: 49.0, anchor_y: 76.0], EquipItem_Cloak : [anchor_x: 88.0, anchor_y: 76.0], CloakSlot_Disable : [anchor_x: 88.0, anchor_y: 76.0], EquipItem_Gloves : [anchor_x: 10.0, anchor_y: 114.0], EquipItem_Legs : [anchor_x: 49.0, anchor_y: 114.0], EquipItem_Feet : [anchor_x: 88.0, anchor_y: 114.0], EquipItem_RHand : [anchor_x: 10.0, anchor_y: 163.0], EquipItem_Waist : [anchor_x: 49.0, anchor_y: 163.0], EquipItem_LHand : [anchor_x: 88.0, anchor_y: 163.0], EquipItem_REar : [anchor_x: 88.0, anchor_y: 212.0], EquipItem_Neck : [anchor_x: 49.0, anchor_y: 212.0], EquipItem_LEar : [anchor_x: 10.0, anchor_y: 212.0], EquipItem_LFinger : [anchor_x: 88.0, anchor_y: 250.0], EquipItem_LBracelet: [anchor_x: 49.0, anchor_y: 250.0], EquipItem_RFinger : [anchor_x: 10.0, anchor_y: 250.0], EquipItem_RBracelet: [anchor_x: 10.0, anchor_y: 302.0], EquipItem_Talisman1: [anchor_x: 64.0, anchor_y: 300.0], EquipItem_Talisman2: [anchor_x: 84.0, anchor_y: 300.0], EquipItem_Talisman3: [anchor_x: 104.0, anchor_y: 300.0], EquipItem_Talisman4: [anchor_x: 64.0, anchor_y: 320.0], EquipItem_Talisman5: [anchor_x: 84.0, anchor_y: 320.0], EquipItem_Talisman6: [anchor_x: 104.0, anchor_y: 320.0], Talisman1_Disable : [anchor_x: 65.0, anchor_y: 301.0], Talisman2_Disable : [anchor_x: 85.0, anchor_y: 301.0], Talisman3_Disable : [anchor_x: 105.0, anchor_y: 301.0], Talisman4_Disable : [anchor_x: 65.0, anchor_y: 321.0], Talisman5_Disable : [anchor_x: 85.0, anchor_y: 321.0], Talisman6_Disable : [anchor_x: 105.0, anchor_y: 321.0], HennaItem : [anchor_x: 25.0, anchor_y: 355.0, size_absolute_width: 84, size_absolute_height: 26, cols: 3, rows: 1, spacing_horizontal: 4, spacing_vertical: 0, cellWidth: 24, cellHeight: 24], InventoryItembkg : [anchor_x: 136.0, size_absolute_width: 252], InventoryItem : [anchor_x: 137.0, size_absolute_width: 267, cols: 7], QuestItem : [anchor_x: 137.0, size_absolute_width: 267, cols: 7], InventoryTab : [anchor_x: 139.0] ].each { k, ps -> def element = inventory.children[k] ps.each { p, v -> element."$p" = v } } inventory.children.each { el -> if (el.name == "tabbkg") { el.anchor_x -= 73 el.size_absolute_width += 36 } } inventory.children["CrystallizeButton"].anchor_x -= 72 [ "TrashButton", "adenabk", "AdenaText", "AdenaIcon", "WeightIcon", "InvenWeight" ].each { name -> def element = inventory.children[name] element.anchor_x -= 37 }
Свернуть ↑Развернуть ↓
Свернуть ↑Развернуть ↓
Последний раз редактировалось acmi; 02.10.2017 в 20:17.
|