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

Post Reply 
Threaded Mode | Linear Mode
ERA III
Author Message
XEPOMAHT Offline
Moderators

Posts: 2265
Post: #706

(09.12.2020 02:33)Panda Wrote:  при создании/старте рандомной карты получил вылет. После позапускал рандомки еще примерно 10 раз, вылета не было.

В функцию генерации монстра не ушла структура монстра. Всё таки запускать лучше с лаучера HD-мода, а не с "h3era HD.exe".
(This post was last modified: 09.12.2020 03:14 by XEPOMAHT.)
09.12.2020 03:08
Find all posts by this user Quote this message in a reply
Algor Away
Administrators

Posts: 3880
Post: #707

era iii changelog Wrote:[+] Added support for d- syntax in function parameters.
    !!FU(edu_Test):Pd-200; will pass -200, previously 200
Кто может пояснить механизм действия?
Емнип, при вызове функции x-переменные обнулены или равны переданному параметру. Если это всё еще так, какой практический смысл у d-модификаторов в данном случае?
Чем Pd-200 от P-200 отличаться будет?


BattleHeroes Rus/Eng | ERA scripts (+ReMagic) Rus/Eng
10.12.2020 16:38
Visit this user's website Find all posts by this user Quote this message in a reply
igrik Offline
Administrators

Posts: 2807
Post: #708

(10.12.2020 16:38)Algor Wrote:  при вызове функции x-переменные обнулены или равны переданному параметру.
Именно так.

(10.12.2020 16:38)Algor Wrote:  Если это всё еще так, какой практический смысл ...
Не знаю для чего Берс это сделал. Я такую конструкцию ещё не разу не использовал, и вообще не вижу в ней никакого логического смысла.


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

Posts: 1098
Post: #709

Hi Berserker, there is a crash report from a player, saying in Multiplayer game via LAN, there's always a crash when the first human player got attacked by the AI.

Debug (assembly+TUM+ACM)

Can you help with this issue?


Latest ERA mods and scripts in development - My GitHub
10.12.2020 17:32
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16449
Post: #710

igrik, Algor, поскольку функции уже давно могут проверять синтаксис, с которым передали параметр, то есть возможность реализовать ЕРМ-подобные команды, пусть и в ограниченном виде.

Code:
[+] Added possibility to query syntax, that was used for particular function parameter.
    !!FU:S#1/?$2;
    #1  - argument index
    ?$2 - syntax type (0 - get, 1 - set, 2 - add)
    Add syntax is applied via 'd' prefix like FU:Pd200.

    Using this receiver scriptmakers can write functions which act the same as normal ERM commands.
    For instance, one function to get/set/add dwelling population amount.

Скажем, если передали -200, вы установите -200 значение. А если d-200, то вычтите 200 из значения.
Пример из библиотеки Эры:
Archer30, the crash is in ReceiveCreatures function. TUM uses Amethyst, so it's majaczek issue, I suppose:
Code:
void ReceiveCreatures(int len,Byte *buf)
{
  #include "templ.h"
  int i,j,k,num;
  num=len/sizeof(_CrState_);
  if(len!=(int)(num*sizeof(_CrState_))){ MError("Wrong length of sent Modified Creatures"); RETURNV };
  if((num<0)||(num>MONNUM)){ MError("Incorrect number of Modified Creature"); RETURNV }
  for(i=0;i<len;i++) ((Byte *)CrState)[i]=buf[i];
  for(j=0;j<num;j++){
    i=CrState[j].Index;
    if((i<0)||(i>MONNUM)){ MError("Incorrect index of Modified Creature"); RETURNV }
    MonTable[i].Group=CrState[j].Group;
    MonTable[i].SubGroup=CrState[j].SubGroup; // CRASH
    MonTable[i].Flags=CrState[j].Flags;
    for(k=0;k<7;k++) MonTable[i].CostRes[k]=CrState[j].CostRes[k];
    MonTable[i].Fight=CrState[j].Fight;
    MonTable[i].AIvalue=CrState[j].AIvalue;
    MonTable[i].Grow=CrState[j].Grow;
    MonTable[i].HGrow=CrState[j].HGrow;
    MonTable[i].HitPoints=CrState[j].HitPoints;
    MonTable[i].Speed=CrState[j].Speed;
    MonTable[i].Attack=CrState[j].Attack;
    MonTable[i].Defence=CrState[j].Defence;
    MonTable[i].DamageL=CrState[j].DamageL;
    MonTable[i].DamageH=CrState[j].DamageH;
    MonTable[i].NShots=CrState[j].NShots;
    MonTable[i].HasSpell=CrState[j].HasSpell;
    MonTable[i].AdvMapL=CrState[j].AdvMapL;
    MonTable[i].AdvMapH=CrState[j].AdvMapH;
  }
  RETURNV
}


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

Posts: 3880
Post: #711

Berserker, я правильно понимаю, что любого из d#, d-#, d*#... ?$2 вернет 2 и практической пользы от него все равно нет?


BattleHeroes Rus/Eng | ERA scripts (+ReMagic) Rus/Eng
10.12.2020 19:03
Visit this user's website Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16449
Post: #712

Algor, да, практическая польза в различении SET/GET/ADD/SUB.
!!FU:Pd-(someVar), например, будет преобразован в ADD с обратным значением переменной.

Порой достаточно поддержки SET/GET. Все модификаторы при большом желании пилить можно было бы, но смысла в текущем варианте нет, так как даже для поддержки SET/GET/ADD код заметно усложняется. Вот если аналог Apply завести, который к любой переменной применит переданный модификатор, то да, стало бы просто и удобно. Подумаю над этим.


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

Posts: 3880
Post: #713

(10.12.2020 19:42)Berserker Wrote:  Вот если аналог Apply завести, который к любой переменной применит переданный модификатор, то да, стало бы просто и удобно. Подумаю над этим.
Berserker, может не стоит плодить, без необходимости?
А то скриптерам вообще скоро работы не останется.


BattleHeroes Rus/Eng | ERA scripts (+ReMagic) Rus/Eng
10.12.2020 20:03
Visit this user's website Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1098
Post: #714

(10.12.2020 18:50)Berserker Wrote:  Archer30, the crash is in ReceiveCreatures function. TUM uses Amethyst, so it's majaczek issue, I suppose:
Thanks, Berserker. Then I wouldn't expect it gets fixed soon 105


Latest ERA mods and scripts in development - My GitHub
10.12.2020 20:28
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16449
Post: #715

Archer30, at least, try to report it with the above mentioned code.

Algor, тоже так думаю. Нужно уже развивать что-то помимо ЕРМ.
Сейчас продвигаюсь в работе с цветным текстом. Задача — корректное разбиение на строки с корректным переносом/воссозданием тегов цвета и картинок.


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

Posts: 1098
Post: #716

Berserker, reported, majaczek did his attempt and failed Rolleyes

Here I'd like to raise another issue related to majaczek's work.
The latest Emerald plugin is not compatible with RoE and AB campaigns. The game crashes at loading (debug). To my understanding, that's becoz of special limits of artifacts (ie, a hero has only 4 misc slots, can't assemble combo arts) in these campaigns that conflict with Emerald. But it turns out moving these campaigns from Data to Maps folder for launching them through "Custom Campaign", problem solved. This says the problem basically has nothing to do with the map files, it is with the engine or hardcode instead.
Berserker, is it convenient for you to check whether the limit can be raised from ERA?


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 12.12.2020 08:51 by Archer30.)
12.12.2020 08:32
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16449
Post: #717

Quote:Berserker, is it convenient for you to check whether the limit can be raised from ERA?
I'm sorry, but I think it's better for me to concentrate on high priority tasks in the near future, because there can exist numerous things like this and fixing single one requires quite enough time. If there is a workaround like using custom campaigns, the issue is not critical for now. Buy anyway, thanks for detailed report.


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

Posts: 1098
Post: #718

Berserker, ofcoz, it's not with high priority at all, don't worry about that. 4


Latest ERA mods and scripts in development - My GitHub
12.12.2020 10:00
Find all posts by this user Quote this message in a reply
XEPOMAHT Offline
Moderators

Posts: 2265
Post: #719

(12.12.2020 08:32)Archer30 Wrote:  The game crashes at loading (debug).

Таблицу запрета артефактов кто должен расширять под новые артефакты? Например приватный Тифон 3 её расширяет вместо Emerald.

Так же мод "16 2-way teleports" без патчей тоже будет приводить к порче данных 1-сторонних телепортов (т.к. игра поддерживает только 8 телепортов), не используйте его.
(This post was last modified: 12.12.2020 12:57 by XEPOMAHT.)
12.12.2020 12:51
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16449
Post: #720

XEPOMAHT, не поделишься патчем на исправление телепортов? Хуже порчи данных в сохранении ничего нет.
Archer30, majaczek should extend banned artifacts table for his plugin of new artifacts.


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
12.12.2020 18:27
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