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

Full Version: ERA BattleQueue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
IT'S DANGEROUS TO GO
BLIND! TAKE THIS.

[current version = 1.03]

Image: cJqNmKd.png Image: lR432pa.png

INSTALLATION
Download sfx from above links and install to ERA root folder.

WHAT
Creates an initiative panel on the right side of the combat dialog to show upcoming creatures' turn and the matching round number.
Provides additional information on cursor interaction.

Turret towers language available in English and Russian, with automatic detection based on presence of WoG Rus mod.

WARNING
For the mod to work, your game resolution must be at least 1076x630 pixels wide.
If you do not meet this requirement, the mod will not install and you will get a warning popup.




SCREENSHOT
Image: R4Si3g5.png

SOURCE CODE
No. Not now at least.

OTHER
It's a bit different from my SoD_SP version for those used to it but should work just as well(?)
Testing done with ERA 2.9.10 with no gameplay mods.

Consider this a beta version while customizations breaking the initiative bar pile up.

...it only took 5 months after friendly request to get it done, but here we are)
Это запредельно здорово!20
   Удобнее, чем другой мод Z Battle order

Image: 3ACv_0SqpoI.jpg
119 wow, RoseKavalier, 36Dance3Gamer1132
brilliant, mega respect for your work
espacialy from my wife Rolleyes
good work
Yes
Great work
Oh my God! Ну наконец-то! Dance3


upd: я нашел один маленький остаток от разработки:
1. Навести курсор меча на вражеский стек
2. Отвести курсор от вражеского стека на одну клетку
... в логе битвы будут отображаться цифры, а не надпись "лететь/идти сюда"

Image: 2b.jpg
Hi RK, great work!

Could you please tell how I can add Chinese localization to turrets, please?

I have WoG Chn mod (caption: 追随神迹汉化, language code: Cn_Simp). Edited BattleQueue.json but didn't work :/
RoseKavalier, 132

С BattleHeroes работает нормально.
Для использования дописать BattleQueue в Mods\BattleHeroes\BattleHeroes.mods
Только состав войск обновляется, иногда с небольшой задержкой (после действия?). Не сильно критично, но хотелось бы знать, к каким событиям привязано обновление полосы.

С ERA PLUS так же работает без глюков.

Единственное, что бросается в глаза - слишком большая задержка смены курсора при наведении на боевой отряд (на моём не шибко мощном ПК занимает больше секунды).

А так, BattleQueue - однозначно плагин года. 132
RoseKavalier, brilliant work!
I recomment to use only translation keys in json in English.
{
"caption": "have a nive day"
}
All other translations can be released by enthusiasts as standalone mods and they will virtually overwrite your file.

Or create Lang directory in your mod with *.json,
{
    "ebq": {
    all key value pairs
    }
}
And use

Code:
typedef char* (__stdcall *TTr) (const char* key, const char** params, int highParams);

  TTr _tr = NULL;

  /**
   * Returns translation for given complex key ('xxx.yyy.zzz') with substituted parameters.
   * Pass vector of (parameter name, parameter value) pairs to substiture named parameters.
   * Example: Mod\Lang\*.json file: { "eqs": { "greeting": "Hello, @name@" } }
   * Example: ShowMessage(tr("eqs.greeting", { "name", "igrik" }).c_str());
   *
   * @param  key    Key to get translation for.
   * @param  params Vector of (parameter name, parameter value pairs).
   * @return        Translation string.
   */
  std::string tr (const char *key, const std::vector<std::string> params = {}) {
    const int MAX_PARAMS = 64;
    const char* _params[MAX_PARAMS];
    int numParams = params.size() <= MAX_PARAMS ? params.size() : MAX_PARAMS;

    for (int i = 0; i < numParams; i++) {
      _params[i] = params[i].c_str();
    }

    char* buf = _tr(key, _params, numParams - 1);
    MemFree(buf);

    return buf;
  }

hEra                  = LoadLibrary("era.dll");
_tr                   = (TTr)                   GetProcAddress(hEra, "tr");
Me to wanna say "Thanks!!!"
Now ERA >> HotA in battlequeue
Baratorch's variant is incorrect still102

anyway - Great Job!!!
(spellsbinding Rolleyes)

UPD: posted in discord - i am responsible for this channel, so don't worryYes
@igrik
Round printing was done through h3_TextBuffer, I'll change it to something else to remove interference.

@Archer30
At this time the plugin only has Eng/Rus and swaps between if you have Rus mod or not.
I've not worked with CN text yet while modding h3; how is it handled by the game - unicode? utf8?

@Algor
Update comes after BattleAction is complete and is contingent on battle not being finished (which is why you will see stacks that are still alive at end of combat). It was the easiest solution to figure out when to stop updating.

I've never used BattleHeroes; there is a separate state considered during Tactics, maybe this is what happens here. I'll have to look at it sometimes.

@XEPOMAHT
Autotranslate failed to capture the exact essence of your words(
The "cursor" as in mouse cursor is being delayed?
This happens with hover on creature or panel?

I have a winXP virtual machine with limited ram/gpu, I'll have a look through that to see if anything shows up.

@Bersy
I'm sorry there are some things in that code snippet that don't work so I'm not sure how this works? Example in Pascal would be fine or another mod using said setup.
RoseKavalier, there is no tactical phase in BattleHeroes. All player actions occur between BG1 and BG0.
If it is possible to update the queue when updating the battlefield via !!BU:R, it will be great.
I'll take a look; don't know ERM-related addresses unfortunately, if anyone has a handy-list could be helpful.
RoseKavalier, last spoiler in message, if i did understand correctly
Link on message
Pages: 1 2 3
Reference URL's