Known bugs of UA

For those of us who are curious and like to poke around in the game's data files and scripts as well as glitching. Caters to anything from unit/building stats to level data to telling how to glitch and stories of game errors.
User avatar
CharlotteLabyrinth
Turantul 2 Skorpio (Global Moderator)
Turantul 2 Skorpio (Global Moderator)
Posts: 531
Joined: Thu Mar 01, 2012 3:00 pm
Location: Schloss Charlottenburg..?

Re: Known bugs of UA

Post by CharlotteLabyrinth » Wed Jan 01, 2020 10:55 pm

Ormu wrote:
Wed Jan 01, 2020 8:04 pm
1) Game clock runs too fast

I measured the time of several missions using a stopwatch and noticed that the game time counter runs faster than it should. On this particular computer, which is pretty old, the difference was 3...7% depending on the level and game settings.

This happens in both software and hardware rendering mode so it's probably not related to the game speed issues that are sometimes encountered in software rendering mode. In fact, it might be worse in hardware rendering mode, at least on this computer. It also happens with both UA.exe and UA_xp.exe.

Example from Dark Valley (hardware rendering, UA_xp.exe):
Mission debriefing shows: 00:07:04
Stopwatch shows: 00:06:35.6

In this case, it was about 7% faster.
I have always noticed this as well, regardless of older and newer machines. The time computation algorithm in the game seems indeed faster compared to real-time.

Ormu wrote:
Wed Jan 01, 2020 8:04 pm
2) Game time counting is inconsistent when re-entering a completed level

This was originally noted when we discussed the Orillan campaign:
viewtopic.php?f=23&t=1821&start=10#p18097

If you re-enter a finished level, then exit via the beam gate, the overall playing time counter will be increased by the total time spent on that level. For example:

Exiting Command & Taerkast for the first time:
Playing time this mission: 00:10:29
Playing time overall: 00:50:32

Re-entering Command & Taerkast immediately and exiting it again:
Playing time this mission: 00:12:08
Playing time overall: 01:02:40

Re-entering Command & Taerkast again and exiting it for the 3rd time, this time using UA_xp.exe:
Playing time this mission: 00:12:55
Playing time overall: 01:15:35

This means that if you re-enter a level, which took a long time to complete, multiple times, the final game time statistics will be garbage. This might be of particular concern to speedrunners.
Confirmed this as well. Definitely a bug or an oversight from developers in my view...

Ormu wrote:
Wed Jan 01, 2020 8:04 pm
3) Stoudson bomb countdown is inaccurate

There are at least two problems related to the Stoudson bomb countdown.

I think the first one is rather well known. If you set the countdown to 60000, it does not become exactly 1 minute in the game. Is the correct multiplier for conversion actually 1024 instead of 1000?

The in-game Stoudson bomb timer also counts down too fast. This is from the same example as in case 1 - Dark Valley, UA_xp.exe, hardware rendering. I started another stopwatch when the countdown hit 2 minutes and stopped it when the bomb detonated. The actual time was 1:52. So the in-game timer was about 7% faster again, just like the mission completion time.
As I wrote somewhere around here before, the conversion factor denominator of Stoudson timer in miliseconds is 1024 instead 1000. An 1 hour timer defined in a level script (3600000) gives 58:36 in-game timer as soon as the level starts, which corresponds to 3600000/1024 = 3515.625 seconds.

I've also located a code line related to this in Zidane's OpenUA project once before, I'll add it here later when I can find it again...

Ormu wrote:
Wed Jan 01, 2020 8:04 pm
More information is needed about this bug:
Score counting does not work - this is related to your faction number and whether you're using UA.exe or UA_xp.exe. This bug needs to be characterized properly.
Would be interested in knowing more about this too, it happened consistently throughout Metropolis Dawn campaigns and initially I thought it was an inherent defect with Ua_xp.exe.
;--------------------------------------------------
;
; Vielleicht der niedlichste Hubi, Knuddel.
;
;--------------------------------------------------

„ Helfen - Wehren - Heilen “

Personal Declaration: I always use different usernames across different websites. Hence if you ever see my username is being used outside of Stoudson Corporation, I have absolutely no affiliation whatsoever with that!

Ormu
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 903
Joined: Fri Dec 26, 2008 4:59 pm
Location: Finland

Re: Known bugs of UA

Post by Ormu » Fri Jan 03, 2020 5:29 pm

Time bugs are now included in the first post.

I also added this bug:
CharlotteLabyrinth wrote:
Fri Aug 30, 2019 5:55 pm
I think the bug where you can (whether accidentally or deliberately) create vehicles below the ground should be added here too. Which usually happens when players are attempting to create multiple units at a close proximity near the ground surfaces. It seems to happen more easily around uneven surfaces.
Please correct me if there is misleading information in the first post. I may not remember all details related to this bug.

But this bug is actually quite funny because if you manage to create a plane underground, you can fly it wherever you want and then get back to the surface. Just don't descend below a certain level or you will be teleported back to the surface. I once created a broken sector that allows planes to get underground freely.
Im in ur base, stalkin ur hoststation

Ormu
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 903
Joined: Fri Dec 26, 2008 4:59 pm
Location: Finland

Re: Known bugs of UA

Post by Ormu » Fri Jan 03, 2020 6:46 pm

CharlotteLabyrinth wrote:
Wed Jan 01, 2020 10:55 pm
Ormu wrote:
Wed Jan 01, 2020 8:04 pm
More information is needed about this bug:
Score counting does not work - this is related to your faction number and whether you're using UA.exe or UA_xp.exe. This bug needs to be characterized properly.
Would be interested in knowing more about this too, it happened consistently throughout Metropolis Dawn campaigns and initially I thought it was an inherent defect with Ua_xp.exe.
I did a very quick test:

Playing as faction 1 (Resistance): Score counting and kill counting work with both UA.exe and UA_xp.exe.

Playing as faction 3 (Mykonians): Score counting doesn't work with either. Player kill counting works with UA_xp.exe only.

Can anyone confirm? Is there something I didn't take into account?
Im in ur base, stalkin ur hoststation

User avatar
CharlotteLabyrinth
Turantul 2 Skorpio (Global Moderator)
Turantul 2 Skorpio (Global Moderator)
Posts: 531
Joined: Thu Mar 01, 2012 3:00 pm
Location: Schloss Charlottenburg..?

Re: Known bugs of UA

Post by CharlotteLabyrinth » Wed Jan 08, 2020 6:30 pm

The list looks great so far! :D UA.exe and Ua_xp.exe scoring issues seem quite peculiar. Something worth investigating in future. (So after all, they are most likely caused by faction numbers?!)

Also here is the code snippet from UA:Source where Stoudson Bomb timer logics are defined; excerpted from 'yw_game.cpp' line #3887 to line #3908:

Code: Select all

void ypaworld_func64__sub19__sub3(_NC_STACK_ypaworld *yw, int id)
{
    if ( yw->GameShell )
    {
        supetItemProto *sitem = &yw->field_2d90->supetItems[id];

        int v4 = sitem->field_F8 / 1024;

        if ( v4 < 10 && v4 != sitem->field_100 )
        {
            SFXEngine::SFXe.startSound(&yw->GameShell->samples1_info, 3);
            sitem->field_100 = v4;
        }

        int v5 = v4 / 10;
        if ( v5 != sitem->field_FC )
        {
            SFXEngine::SFXe.startSound(&yw->GameShell->samples1_info, 3);
            sitem->field_FC = v5;
        }
    }
}
;--------------------------------------------------
;
; Vielleicht der niedlichste Hubi, Knuddel.
;
;--------------------------------------------------

„ Helfen - Wehren - Heilen “

Personal Declaration: I always use different usernames across different websites. Hence if you ever see my username is being used outside of Stoudson Corporation, I have absolutely no affiliation whatsoever with that!

User avatar
CharlotteLabyrinth
Turantul 2 Skorpio (Global Moderator)
Turantul 2 Skorpio (Global Moderator)
Posts: 531
Joined: Thu Mar 01, 2012 3:00 pm
Location: Schloss Charlottenburg..?

Re: Known bugs of UA

Post by CharlotteLabyrinth » Sun Feb 02, 2020 3:03 pm

Ormu wrote:
Fri Jan 03, 2020 6:46 pm
CharlotteLabyrinth wrote:
Wed Jan 01, 2020 10:55 pm
Ormu wrote:
Wed Jan 01, 2020 8:04 pm
More information is needed about this bug:
Score counting does not work - this is related to your faction number and whether you're using UA.exe or UA_xp.exe. This bug needs to be characterized properly.
Would be interested in knowing more about this too, it happened consistently throughout Metropolis Dawn campaigns and initially I thought it was an inherent defect with Ua_xp.exe.
I did a very quick test:

Playing as faction 1 (Resistance): Score counting and kill counting work with both UA.exe and UA_xp.exe.

Playing as faction 3 (Mykonians): Score counting doesn't work with either. Player kill counting works with UA_xp.exe only.

Can anyone confirm? Is there something I didn't take into account?
Just replayed some Metropolis Dawn missions through Ua_xp.exe, and the score calculation is indeed... absolutely incomprehensible. :evil: :twisted: I think after a certain point, the scoring counter just ceased to update at all as if there's some kind of memory leakage, but not sure about it. I may test this further later...
;--------------------------------------------------
;
; Vielleicht der niedlichste Hubi, Knuddel.
;
;--------------------------------------------------

„ Helfen - Wehren - Heilen “

Personal Declaration: I always use different usernames across different websites. Hence if you ever see my username is being used outside of Stoudson Corporation, I have absolutely no affiliation whatsoever with that!

User avatar
Zidane
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 209
Joined: Mon Nov 22, 2010 8:38 pm
Location: Novosibirsk, Russia

Re: Known bugs of UA

Post by Zidane » Sun Feb 02, 2020 3:49 pm

When I adds support for metropolis I found in some places still used "owner == 1" expression.
合体! ライオカイザー

User avatar
CharlotteLabyrinth
Turantul 2 Skorpio (Global Moderator)
Turantul 2 Skorpio (Global Moderator)
Posts: 531
Joined: Thu Mar 01, 2012 3:00 pm
Location: Schloss Charlottenburg..?

Re: Known bugs of UA

Post by CharlotteLabyrinth » Sun Feb 02, 2020 6:05 pm

Zidane wrote:
Sun Feb 02, 2020 3:49 pm
When I adds support for metropolis I found in some places still used "owner == 1" expression.
That seems to explain many things! Thanks for the revelation. I suspect it's a part of legacy routine directly inherited from UA.exe?

Incidentally, I've checked user.txt files for my recent playthrough of Metropolis Dawn; and they seem to track and store score numbers accurately without any errors! So apparently, it's only the score counter that appears during the debriefing sequence which displays wrong numbers.

How about ua_trial.exe? It's technically distinct from the other two executables, so perhaps the results might be different.
;--------------------------------------------------
;
; Vielleicht der niedlichste Hubi, Knuddel.
;
;--------------------------------------------------

„ Helfen - Wehren - Heilen “

Personal Declaration: I always use different usernames across different websites. Hence if you ever see my username is being used outside of Stoudson Corporation, I have absolutely no affiliation whatsoever with that!

User avatar
Zidane
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 209
Joined: Mon Nov 22, 2010 8:38 pm
Location: Novosibirsk, Russia

Re: Known bugs of UA

Post by Zidane » Mon Feb 03, 2020 7:31 am

I was slightly incorrect, it's not "owner == 1", it's just in debriefing code, like this:

"sprintf(buf_0,"%d",mb->LocalStats[1].Score);"


Also, about time:
In some places it's divided by 1000 and in other it's divided by 1024!

Like in debriefing it's 1024 and on save/load screen it's 1000!
合体! ライオカイザー

User avatar
CharlotteLabyrinth
Turantul 2 Skorpio (Global Moderator)
Turantul 2 Skorpio (Global Moderator)
Posts: 531
Joined: Thu Mar 01, 2012 3:00 pm
Location: Schloss Charlottenburg..?

Re: Known bugs of UA

Post by CharlotteLabyrinth » Tue Feb 04, 2020 8:42 am

Zidane wrote:
Mon Feb 03, 2020 7:31 am
I was slightly incorrect, it's not "owner == 1", it's just in debriefing code, like this:

"sprintf(buf_0,"%d",mb->LocalStats[1].Score);"
Thanks for the clarification! So the code for a debriefing module may contain clues about these calculation errors. Perhaps I should look into this on my own later, would be really great if a debugging method can be localised.

Zidane wrote:
Mon Feb 03, 2020 7:31 am
Also, about time:
In some places it's divided by 1000 and in other it's divided by 1024!

Like in debriefing it's 1024 and on save/load screen it's 1000!
... I knew it! Oh, my time flows at a different rate around and beyond the event horizon... No seriously, it comes off as a little strange however. :P Is there any practical or customary programming reason for why the developers would have done this?
;--------------------------------------------------
;
; Vielleicht der niedlichste Hubi, Knuddel.
;
;--------------------------------------------------

„ Helfen - Wehren - Heilen “

Personal Declaration: I always use different usernames across different websites. Hence if you ever see my username is being used outside of Stoudson Corporation, I have absolutely no affiliation whatsoever with that!

User avatar
Zidane
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 209
Joined: Mon Nov 22, 2010 8:38 pm
Location: Novosibirsk, Russia

Re: Known bugs of UA

Post by Zidane » Tue Feb 04, 2020 5:01 pm

Division by 1000 and just shift register by 10 bits to right.
Shifting is much faster, but it's in debriefing, where no 3d and other computations.... looks like that do by different people in different time.
合体! ライオカイザー

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests