Current time: 23.03.2024, 04:18 Hello There, Guest! (LoginRegister)
Language: english | russian  

Post Reply 
Threaded Mode | Linear Mode
ERA BattleQueue
» Move order for combat / очерёдность хода в битве
Author Message
RoseKavalier Offline

Posts: 118
Post: #1
Фото 
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)
(This post was last modified: 31.12.2021 07:31 by RoseKavalier.)
16.06.2020 08:24
Find all posts by this user Quote this message in a reply
Grossmaster Offline
Moderators

Posts: 564
Post: #2

Это запредельно здорово!20
   Удобнее, чем другой мод Z Battle order

Image: 3ACv_0SqpoI.jpg


Новая графика для WoG
(This post was last modified: 16.06.2020 14:08 by Grossmaster.)
16.06.2020 08:46
Visit this user's website Find all posts by this user Quote this message in a reply
Bes Offline

Posts: 5422
Post: #3

119 wow, RoseKavalier, 36Dance3Gamer1132
brilliant, mega respect for your work
espacialy from my wife Rolleyes
16.06.2020 10:07
Visit this user's website Find all posts by this user Quote this message in a reply
planetavril Offline

Posts: 87
Post: #4

good work
Yes
16.06.2020 10:29
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #5

Great work
16.06.2020 10:43
Find all posts by this user Quote this message in a reply
igrik Offline
Administrators

Posts: 2807
Post: #6

Oh my God! Ну наконец-то! Dance3


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

Image: 2b.jpg


game bug fixes extended.dll || My Plugins || My GitHub
16.06.2020 10:45
Visit this user's website Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1098
Post: #7

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 :/


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 16.06.2020 16:31 by Archer30.)
16.06.2020 11:35
Find all posts by this user Quote this message in a reply
Algor Away
Administrators

Posts: 3880
Post: #8

RoseKavalier, 132

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



BattleHeroes Rus/Eng | ERA scripts (+ReMagic) Rus/Eng
16.06.2020 11:43
Visit this user's website Find all posts by this user Quote this message in a reply
XEPOMAHT Offline
Moderators

Posts: 2265
Post: #9

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

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

А так, BattleQueue - однозначно плагин года. 132
16.06.2020 13:42
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16449
Post: #10

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");


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
16.06.2020 13:47
Find all posts by this user Quote this message in a reply
daemon_n Offline
Administrators

Posts: 4333
Post: #11

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


Image: widget.png?style=banner2

Новейший Heroes 3 Launcher
16.06.2020 16:43
Visit this user's website Find all posts by this user Quote this message in a reply
RoseKavalier Offline

Posts: 118
Post: #12

@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.
16.06.2020 17:08
Find all posts by this user Quote this message in a reply
Algor Away
Administrators

Posts: 3880
Post: #13

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.


BattleHeroes Rus/Eng | ERA scripts (+ReMagic) Rus/Eng
16.06.2020 17:41
Visit this user's website Find all posts by this user Quote this message in a reply
RoseKavalier Offline

Posts: 118
Post: #14

I'll take a look; don't know ERM-related addresses unfortunately, if anyone has a handy-list could be helpful.
16.06.2020 22:39
Find all posts by this user Quote this message in a reply
daemon_n Offline
Administrators

Posts: 4333
Post: #15

RoseKavalier, last spoiler in message, if i did understand correctly
Link on message


Image: widget.png?style=banner2

Новейший Heroes 3 Launcher
16.06.2020 23:02
Visit this user's website Find all posts by this user Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Forum Jump:

Powered by MyBB Copyright © 2002-2024 MyBB Group