Current time: 25.11.2024, 00:21 Hello There, Guest! (LoginRegister)
Language: english | russian  

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

Posts: 1175
Post: #2401

Hah, I understand, Real-life life stuff comes first.

It seems like RD:I doesn't work at all on HD mod recruit dialog (the dialog called by clicking on the bottom left of town screen). #2/#3/#4 are always -1.
Possible to improve?

Btw I recommend adding a few constants. Came up idea while reading Era 2 Changelog


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 22.11.2023 05:13 by Archer30.)
22.11.2023 05:13
Find all posts by this user Quote this message in a reply
XEPOMAHT Offline
Moderators

Posts: 2356
Post: #2402

(22.11.2023 05:13)Archer30 Wrote:  It seems like RD:I doesn't work at all on HD mod recruit dialog (the dialog called by clicking on the bottom left of town screen). #2/#3/#4 are always -1.

В HD-моде совершенно другой диалог найма монстров. RD:I поддерживает только родной содовский диалог.
22.11.2023 06:49
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16657
Post: #2403

It's really a pity, that RD:I and HD mod are not compatible. Not easy to improve, because I cannot hook HD mod functions and examine data structures.


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

Posts: 2196
Post: #2404

There is a problem with brute commander after really big fights, instead of giving gold, it takes it, negative value. Is there anything I can do about with erm, or is hardcoded?
22.11.2023 20:39
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16657
Post: #2405

Hard coded without overflow check. more then 2147483647 gold overflows.


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

Posts: 2196
Post: #2406

So is it possible for me to intercept the overflow then add the maximum gold, like check gold right after last unit was killed then calculate fix in BA1 trigger, by restoring gold first value than add the maximum possible?

Or check player gold in BA0, then in BA1, restore if less then add the max, would that make sense? Commander gold comes before or after BA1?
(This post was last modified: 24.11.2023 01:06 by Valery.)
24.11.2023 01:03
Find all posts by this user Quote this message in a reply
igrik Offline

Posts: 2819
Post: #2407

Valery, use ERM hooker




game bug fixes extended.dll || My Plugins || My GitHub
24.11.2023 03:21
Visit this user's website Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #2408

Hi Igrik

Era has erm hooker active. Is this a script I only have to add in main script? What it does exactly?
24.11.2023 03:28
Find all posts by this user Quote this message in a reply
igrik Offline

Posts: 2819
Post: #2409

Valery, a very strange question on your part! What you asked for, this script does.
It seems that you haven't even experienced it.


game bug fixes extended.dll || My Plugins || My GitHub
25.11.2023 20:28
Visit this user's website Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16657
Post: #2410

igrik, bruteGold — сколько прибавится золота после боя и это значение можно в хуке перезаписать?


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

Posts: 2819
Post: #2411

Yepp Ab


game bug fixes extended.dll || My Plugins || My GitHub
25.11.2023 21:50
Visit this user's website Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16657
Post: #2412

Если я правильно понял, исправление должно быть следующим:



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

Posts: 2196
Post: #2413

Ok, which one now?Bad

And in Igrik example there are two scripts, one in spoiler. Both are necessary?
(This post was last modified: 26.11.2023 13:29 by Valery.)
26.11.2023 13:28
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16657
Post: #2414

Valery, try only the script from my code. Put it in a separate file. I didn't test it, but it should fix the issue. Need battle with huge exp.


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

Posts: 2356
Post: #2415

(26.11.2023 13:28)Valery Wrote:  And in Igrik example there are two scripts, one in spoiler. Both are necessary?

Опять костыли для бога костылей? Может быть стоит просто 1 проверку в воговскую функцию добавить:

Code:
void SetRes(int Player,int Nres,int Vres)
{
    STARTNA(__LINE__, 0)
    int *rp;

    if(Vres<0) RETURNV ; нельзя давать отрицательное количество ресурса игроку
    rp=GetResPo(Player,Nres);
    if(rp==0) RETURNV
    *rp=Vres;
    RedrawRes();
    RETURNV
}

Всего лишь подменить функцию по адресу 7100A3h
(This post was last modified: 26.11.2023 21:48 by XEPOMAHT.)
26.11.2023 21:47
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