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

Full Version: ERA III
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
(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 поддерживает только родной содовский диалог.
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.
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?
Hard coded without overflow check. more then 2147483647 gold overflows.
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?
Valery, use ERM hooker


Hi Igrik

Era has erm hooker active. Is this a script I only have to add in main script? What it does exactly?
Valery, a very strange question on your part! What you asked for, this script does.
It seems that you haven't even experienced it.
igrik, bruteGold — сколько прибавится золота после боя и это значение можно в хуке перезаписать?
Yepp Ab
Если я правильно понял, исправление должно быть следующим:

Ok, which one now?Bad

And in Igrik example there are two scripts, one in spoiler. Both are necessary?
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.
(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
Reference URL's