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

Post Reply 
Threaded Mode | Linear Mode
Ошибки, баги и недочёты ERA
» crash logs / errors / bugs of era
Author Message
Archer30 Offline
Moderators

Posts: 1170
Post: #841

But useful garbage? As I understand, it is part of the seed still?


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

Posts: 16623
Post: #842

No, garbage means not useful. Era does not use C native PRNG state and the address original code used. So garbage is garbage ) And you don't need it at all. You want VR:T, something not predictable on reloading. Exactly the case. Just be sure, that this event will not influence multiplayer.


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

Posts: 1170
Post: #843

Berserker, no, I want it reproducible (possible to repeat result with Save & Load)
Check out the report, with a video. The issue we experience here without seed management is that every random specialty generated after a hero's defeat is the same when you spam battles (initiate the battle, defeat, recruit a new hero in the tavern and repeat) in the same location.

According to you, what I did is that I fetch garbage and set seed. However, for some reason, this satisfies what I need:
- When you spam battles in the same location, you get different specialties every time
- These results are reproducible when you Save & Load before the first battle you spam

VR:T doesn't have the second feature of my method.


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 30.08.2024 02:16 by Archer30.)
30.08.2024 00:56
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16623
Post: #844

I still do not understand the source of the issue. Better enable random generator tracking in heroes3.ini (console mode) or insert VR:R checks in onafterbattle. The solution seems to be "hacky" and "lucky". Normally VR:R shout be random in OnAfterBattleUniversal. We should report it as bug it it's not so.

For deterministic but quite random results you can use coordinates, current day and attacking hero ID and attacking hero move points to generate seed and then use it in script.



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

Posts: 1170
Post: #845

I have something working at the moment so I won't complain, we can leave it later Rolleyes

Critical issue: Interaction between !!EA (use on negative stack id) and Battle Replay

This is a critical issue in scripting that if a stack is set with !!EA and kill and transform into another stack, its stats will remain the ones after its transformation after battle replay.

Ok I understand this doesn't sound understandable. Let me show you my testing script:

And my testing video

In this video, I used raw ERA + GEM (for battle replay) + my testing script (see above). I picked a random fight and ran my script.

As you can see in the video,
- The gnoll had a standard HP stats initially
- It got killed with script, with (MON_FLAG_SUMMONED) added
- An Azure Dragon was summoned, due to the vacancy left by the Gnoll, it occupied the killed Gnoll's stack Id
- Set any !!EA on the summoned Azure Dragon
- Killed the Azure and Summoned again (optional)
- Ended the battle and replayed
- Found the Gnolls had 1000 HP

My guess is that !!EA for stack id has some cache that needs to be reset on Battle Replay. However, I don't know where to find them. I don't know how to fix.

Currently, the mechanism corrupts "Metamorph" script's behaviour.


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

Posts: 16623
Post: #846

Archer30, thanks for perfect detailed bug report. Seems like BattleReplay does not call CrExpoSet::StartAllBF(G2B_MArrA,G2B_MArrD) on replay.
It's inside Monsters.cpp (function G2B_Prepare)


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

Posts: 1170
Post: #847

Berserker, I've got the temporary solution thanks!

I want to know that when you restart ERA and launch the code above, does your speaker makes some funny noise when the stack is killed by pressing "K"? It happens to me and I don't know what to do except for temporarily setting the volume of H3 to 0. Like

____

Btw, any chance of releasing 3.9.16 in the near future?


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 14.09.2024 14:37 by Archer30.)
14.09.2024 12:10
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