Berserker, is it correct that png for SN:R won't work if it's put in zip?
Quote:[+] Added support for separate DEF PNG frames redirections.
Command template: SN:R^defname.def:groupIndex_frameIndex.png^/^new path to png, relative to root directory.png^.
Prefer to use single backslashes as path separators in order to avoid "a\test.png" and "a/test.png" to be loaded and cached as different images.
Example:
!!SN:R^cefres.def:1_0.png^/^Data\Defs\cefres.def\5_6.png^;
My v1 returned 1, however, the code only works when I put my png to the root folder
Also SN:R for png requires the original png to be existing, it cannot be just def, right?
As far as I see, dlg_npc2.def:0_86.png should exist at least in zip in order redirection to be performed. I can fix it, I suppose.
Try this dll:
https://dropmefiles.com/0WVDA
Berserker, thanks! The fix is valid, now I can get rid of the original frames!
Btw the first question, I can't make it to work. My png's placed in
Code:
Mods\[my mod]\Data\wog scripts.zip - Data\Pcx\WS\mirror2d.png
It's detected by SN:F^PcxPngExists^/^mirror2d.pcx^ as my code shown above, but SN:R just failed.
At the moment only this works for me
Code:
Mods\[my mod]\mirror2d.png
Could you make a simpe test mod for me to debug?
Berserker, yes.
Please check this one here
Download for png testing mod
- Run the mod and press "1" when you enter the adv map. It gives 5000 exp and also makes the icon of
Fire Shield and
Death Stare visible in the commander level up dialogue.
- Close the game, remove the pics in Mods\png SNR testing\ and check again these two icons. They should be different from the first step.
- Conclusion: pics in Mods\png SNR testing\\Data\png testing.zip\Data\Pcx\ cannot be loaded by SN:R, while they can be detected by !!SN:F^PcxPngExists^/^mirror2l.pcx^;
Berserker, I wonder if it is new to you that MO:G could result in neutral stack size overflowed
With this code, the monster stack would be set to 4 (4100 - 4096), instead of a more reasonable number (4000?).
I belive it would be better if you can add a check before any MO:G execution. For example, correcting any number bigger than 4000 to 4000. What do you think?

I agree, that such check is necessary. Added to todo,thanks.
Berserker, Не знаю daemon_n вам написал или нет (мог и забыть

) по поводу метода Отзеркаливания боевых полей (ценой пары строчек кода было бы неплохо)
Идея превосходная - думаю нужно сразу делать в формате png и для сборки сделать оригинальные 8bit png а bmp сделать заглушками - чтобы не делать отдельно два скрипта на зеркала (bmp и png отдельно)
Вы писали что подобная функция есть, но для PCX ли она и если да как ей пользоваться?
Текущая версия: 3.8.9
[-] Исправлены проблемы с отрисовкой отражённых png-изображений. Спасибо helgtla за тест-моды и детализированные отчёты.
История изменений: (Click to Hide)
Код:
Version 3.8.9 (08/2021)
------------------------
[-] Fixed mirrored png pictures rendering issues.
------------------------
Подскажите пожалуйста как такое реализовать для сборки?
И ответ лучше писать сразу daemon_n
Тут вряд ли помогу. Если функция отрисовки pcx вызвана игрой без параметра горизонтального зеркалирования, то Эра будет рисовать картинку «как есть».
Berserker, Спасибо вам за долгожданное обновление!
Ваш труд просто бесценен для сообщества

, с новым генератором чисел игра станет куда приятнее
С этим всегда были проблемы - теперь же генерация карт и выпадения урона будут куда приятнее!

Пожалуйста

Твои работы не менее ценны

Спасибо за долгожданное обновление и вопрос:
как вызвать в плагине генерацию случайного числа этим новым методом xoroshiro128?
Геройская random (0x50C7C0) его будет использовать или нет?
daemon_n, здесь скорость тоже важна.
Я думаю, костыли в виде ExecErmCmd будут замедлять выполнение кода, там надо еще строку распарсить, это нехилая воговская функция такая.
Я обрадовался, когда увидел "xoroshiro", он значительно быстрее вихря Мерсенна должен быть по тестам, которые есть в сети.