Wake of Gods Forum | Форум Во Имя Богов

Full Version: ERA II
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
My fault, it is wog revised, grrrr

So I will update the mod 147
Thank you ))
Code:
local era = require('era/era')

era.on('OnHeroScreenMouseClick', function (event)
  era.erm('HE-1:C0/0/9/100; UN:R3/-1')
end)
Пишу скрипты на Lua. Из плюсов:

- загрузка при OnBeforeWoG
- поддержка всех событий плагинов и ЕРМ
- доступ к ЕРМ-памяти
- jit-компиляция
- низкоуровневые АПИ через встроенное расширение ffi
- удобные переходники Эры для доступа к произвольной памяти, например mem.i32(0x887668, 70) — изменили v1 на 70 как целое знаковое 32-битное
- автосохранение и загрузка данных из глобальной таблицы (серилизатор bitser, подписка на события OnSaveGameWrite, OnSaveGameRead + Read/WriteSavegameSection)
- WinAPI, API Эры, огромная библиотека в сети
- запрет на создание глобальных переменных вне явного блока accessGlobals
- скрипты не сохраняются в сохранёнках и грузятся один раз
Пример. Установим перехватчик (потокобезопасный) на функцию загрузки геройских ресурсов. Отобразим сообщение с именем загружаемого ресурса:
Code:
era.bridge(0x4FACA0, function (context)
  local resName = mem.str(context:arg(1))
  era.sysmsg('Loading resource "' .. resName .. '"')
  
  return 1
end)
Sorry Split/unite armies doesn't works anymore in Era, with HD 5.9 beta 19. Works in vanilla so is not the tweaks. Hopefully we have the mod "army management" while waiting for a fix, I hope.
Bug report: Roland has wrong specialty picture, description is okay (swordsmen). I heard such reports in HC about wrong specialty picture but couldn't get the bug, now I get it, as he is the main hero in TEw3 map

@Edit: Kilgor too, weakness pic instead of behemots. text okay. Nagash too, pic archery. All other expansion heroes are okay.

in HC szaman fixed it by making mod from old era Un44.def, so looks like it is the def who wasn't correctly packed.
Уииии, я как раз месяц назад начал осваивать lua!
Valery, soon almost all HD features support will be dropped for non-SoD/Hota. But it's not critical in most cases.
I didn't restore valid un44.def? Will fix then!

feanor, это отлично ) Язык неплохой, быстро учится, легко пишется. И с luajit и расширением ffi можно описывать и использовать бинарные структуры данных, что в нашем деле здорово )
HD mod future releases will not work anymore with ERA? Well, then we shall stick to the latest version which worked with Era, why totally dismiss it, is non sense.

4.208 is just fine, works great, I will upload it permanently.
The will work, but without any non-core functionality. HD main purpose is high dimensions support.

Quote:4.208 is just fine, works great, I will upload it permanently.
Versions backups are always useful.
Well, no, is not a good solution imo. People will post daily questions on why this or that from HD mod doesn't work. If you know from reliable source that HD mod will drop wog functionality, then I propose to incorporate 4.208 in Era package, or course if Baratorch agrees. That way, people will get all important functionalities as army management, all others are fancy only.
Valery, baratorch wrote about it about 2 years ago and drops several features in each more or less important release, it's ok.

Valery, it's not a good idea. Many people can play HD as HD mod, not interface mod. And they need bug fixes and automatical updates.
Thats unfair (

You know what will happen, people will download latest HD version then will pop in HC yelling that it doesn't work. So its me who will have to endlessly repeat "you need 4.206, anything later sucks". 141

1 billion times, while you will be in Miami beach with Katiushka Bersekarokova
I guess with some work these features can be replaced by plugins.
Valery, people will download latest HD version and play with it. Official documentation says, that no extra features are planned for non SoD/Hota. Old users know, what HD version to use without questions.
Reference URL's