Current time: 29.01.2022, 08:01 Hello There, Guest! (LoginRegister)
Language: english | russian  

Post Reply 
Threaded Mode | Linear Mode
ERA II
» WoG Era 2: Русская и Английская версии
Author Message
V_Maiko Offline

Posts: 577
Post: #4726

WoG campaigns will be backward compatible? (2.9.14-3.0) or will they have to be adapted specifically for each version?
(This post was last modified: 12.07.2020 02:51 by V_Maiko.)
12.07.2020 02:50
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 15675
Post: #4727

V_Maiko, they will remain the same, unless someone wants to improve/rewrite them as a standalone mod.


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

Posts: 740
Post: #4728

A question about WoG Native Dialog and WoG CN plugin
This has been unresolvable for the Chinese community for long...
WoG CN is a plugin developed for Chinese character support in H3.

Issue: Characters do not look well with wognativedialog.dll/wogcn.dll both loaded.

Downloads of WoG CN release, source and related: Google Drive

As from the screenshots, there is an issue with characters displaying with both WoG Native Dialog/WoG CN enabled. The brackets, the numbers seem to be lower than Chinese characters in position. Ideally, I would like all characters to be displayed like for vanilla H3 contents. Will this needs to be tweaked from WoG CN or WoG Native Dialogs? Since the author of WoG CN has gone for long, I have no choice but to seek help here...
(This post was last modified: 14.07.2020 07:19 by Archer30.)
14.07.2020 04:40
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 15675
Post: #4729

Archer30, I don't know, what's the reason, to say the truth, but perhaps it's Chinese fonts issue.


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

Posts: 740
Post: #4730

That doesn't explain the fonts works great without WoG Native Dialog. Smt has been changed there with WND enabled, but I have no idea what it might be...

Let it be then Rolleyes
15.07.2020 13:03
Find all posts by this user Quote this message in a reply
daemon_n Offline
Administrators

Posts: 3756
Post: #4731

Archer30, pcx position


Image: widget.png?style=banner2

Новейший Heroes 3 Launcher
15.07.2020 14:22
Visit this user's website Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 740
Post: #4732

daemon, doesn't think so. The Chinese characters and non-Chinese were align with different position, that's the problem.

Take a look at the bracket in the middle, that's where the worst part is:


Edit: I believe that WOG CN makes some tweaks to characters so that all character get along quite well. But since WoG Native were introduced, this was broken. It has to be resolved from WoG CN plugin anyway.
(This post was last modified: 15.07.2020 18:02 by Archer30.)
15.07.2020 14:32
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 15675
Post: #4733

Code:
posEnd:=i;
    startX:=x;
    startY:=y+FontHeight*Row;
    case mode of
      0,4,8 :startX:=x;
      1,5,9 :startX:=x+((Width-l) div 2);
      2,6,10:startX:=x+Width-l;
    end;
    case mode of
      0,1,2,3:startY:=y+(FontHeight)*Row;
      4,5,6,7:begin
                  if height<MaxRow*(FontHeight) then
                  begin
                    if height<(FontHeight+FontHeight) then
                      StartY:=y+(FontHeight*Row)+(height-FontHeight)div 2
                    else startY:=y+(FontHeight)*Row;
                  end                else startY:=y+(FontHeight)*Row+(height-MaxRow*(FontHeight))div 2;
              end;
      8,9,10,11:begin
                  if height<MaxRow*(FontHeight) then
                  begin
                    if height<(FontHeight+FontHeight) then
                      StartY:=y+(FontHeight*Row)+(height-FontHeight)
                    else startY:=y+(FontHeight)*Row;
                  end
                  else startY:=y+(FontHeight)*Row+height-MaxRow*(FontHeight);
                end;
    end;
Chinese plugin is written almost without comments.


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

Posts: 740
Post: #4734

Berserker, I would like to quote Valary's wise words here: This seems Chinese to me. Rolleyes

Are you suggesting that this is the part adjusting charaters' height?
15.07.2020 17:11
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 15675
Post: #4735

I didn't find anything special, concerning English characters top position adjustment from the first glance, to say the truth.


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

Posts: 223
Post: #4736

Я не знаю в правильную ли тему пишу, просто меня несколько утомило постоянно мышкой выбирать нужный пункт в диалогах с кучей чекбоксов нельзя ли в ЭРА добавить возможность выбора нужного пункта (чекбокса) в диалогах типа !!IF:G с помощью клавиатуры например клавишами [1]-[0],[-],[=]?
18.07.2020 20:34
Find all posts by this user Quote this message in a reply
wessonsm Online

Posts: 659
Post: #4737

Есть прекрасная опция "ErmLegacySupport" в ERA 2, но кажется, она не совсем работает так, как надо...
Я еще не проверял, но проверю.
y-переменные должны обнулятся, x-переменные должны наследоваться, и обнуляться должны только не объявленные, и только при вызове из триггера, а не из функции. При вызове из функции должны наследоваться, в !!DO должны обнуляться только в первом цикле при вызове из триггера (не из функции!!), в остальных случаях должны наследоваться...
Куча старых скриптов работает неправильно из-за этого...
18.07.2020 20:54
Find all posts by this user Quote this message in a reply
RoseKavalier Offline

Posts: 117
Post: #4738

@Archer30
Is hdmod being used? It might be a text filtering option.
CN plugin doesn't draw English characters, it lets the game handle it... which means hdmod would adjust its position if that's what is happening.
Code:
if (byte(str[i]) > 160) then begin
   [...]
else begin
        EngTextOut(hfont,byte(str[i]),Surface,cx,cy, ColorB + ColorSel);
        cx:=cx+GetEngCharWidth(byte(str[i]),hfont);
      end;

Other than that Native Dialogs use a custom font which doesn't line up with "normal" English fonts.
Image: Gyx8tXT.png
EDIT: in fact, medium font is 16 pixels high, the provided one is 15 pixels high.
(This post was last modified: 18.07.2020 23:22 by RoseKavalier.)
18.07.2020 23:17
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 740
Post: #4739

RoseKavalier, thanks for so much help! HD mod does nothing to my test results though. The performance are exactly the same with or without HD.

I agree that CN plugin only draws Chinese characters, but since ERA seem to have different way of handling characters, it makes some difference for different dialogs.

Check this out:

Image: 53CVtbf.png
non-ERA specific dialog (aka this dialog is also available in SoD) in ERA

As you might notice, the bracket from this dialog has different style comparing it in English SoD. All brackets for non-ERA specific dialogs look like this, much better than in WoG Native Dialogs. How does this work? This is the best result I would like to achieve with text in WND.

Hmmm, so my best bet would be editing all characters from custom fonts of WND? Can I appoint another font that combo with Chinese characters better?
(This post was last modified: 19.07.2020 00:43 by Archer30.)
19.07.2020 00:09
Find all posts by this user Quote this message in a reply
RoseKavalier Offline

Posts: 117
Post: #4740

To my eye those brackets look worse, lacks shadow and lack curvature (:

Try swapping out native dialog pac's fonts, see if that makes any difference. Also hdmod started inserting its own fonts at some point, they can be renamed or deleted safely.
igrik would be better placed to comment, but as far as I can tell his code doesn't change the way fonts are drawn, it just changes which fonts get selected.

gu7979gu's font 'detection' is not very safe, it checks 4 first characters or font name and compares against 'bigf' (BIGFONT) and then 'tiny' (TINYFONT) otherwise assumes MEDFONT. Native dialogs changes a lot of existing fonts, no idea if that can have an impact by failing to detect correct font.
Code:
procedure SetFont(hfont:integer;var Width,Height:integer);stdcall;
begin
  if pInteger(hfont+4)^=1718053218 then // bigf in hex
  begin
    Width:=Font24Width;
    Height:=Font24Height;
  end else
  if pInteger(hfont+4)^=2037279092 then // tiny in hex
  begin
    Width:=FontTinyWidth;
    Height:=FontTinyHeight;
  end else
  begin
    Width:=Font12Width;
    Height:=Font12Height;
  end;
end;
(This post was last modified: 19.07.2020 01:07 by RoseKavalier.)
19.07.2020 01:06
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-2022 MyBB Group