Specific scenario running slowly + bugs

Post Reply
Odenathus
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 287
Joined: Sat Jun 27, 2009 10:02 pm

Specific scenario running slowly + bugs

Post by Odenathus »

Hi, not sure this qualifies as a technical support issue, but is there any sort of checker than be run over my scenario Teutoburger Wald? I thought that it was running slowly when I was playtesting it, but put it down to my own PC being below par. However I've just played a full game with Hendrikcus and he confirmed that it runs slowly from his end too. There 's definitely something wrong with it as I've noticed two specific faults during play:

the already seen bug where a unit continues throwing its spears even after the target has moved off, and you get that 'pincushion' effect on the map - I know that was addressed in a much earlier post

I've modded the flags: in all other scenarios the modded standards show as double length when they're first opened, then immediately switch to normal as soon as any one unit is selected. However, in this scenario, the 'double' effect continues for the whole sequence of routs and follow-ups, and only disappears when the player's turn begins

The only thing I can think of is that I added to the BSF script in order to limit the Roman's LOS on the first turn.

It may just be that a combination of that, a lot of terrain, many units being used and their appearing from all directions is just overloading the engine, but if it's hampering player's enjoyment of the scenario, or putting them off altogether, it would be nice to be able to fix it. Apart from that it's perfectly playable.

Cheers
pipfromslitherine
Site Admin
Site Admin
Posts: 9707
Joined: Wed Mar 23, 2005 10:35 pm

Re: Specific scenario running slowly + bugs

Post by pipfromslitherine »

If you point me to a download I am happy to take a look, though does your opponent also have a lower-end machine?

Cheers

Pip
follow me on Twitter here
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28052
Joined: Sun Dec 04, 2005 6:25 pm

Re: Specific scenario running slowly + bugs

Post by rbodleyscott »

pipfromslitherine wrote:If you point me to a download I am happy to take a look, though does your opponent also have a lower-end machine?

Cheers

Pip
Teutoberger Wald Pip.
Richard Bodley Scott

Image
Paul59
General - King Tiger
General - King Tiger
Posts: 3808
Joined: Tue Jul 21, 2015 11:26 pm

Re: Specific scenario running slowly + bugs

Post by Paul59 »

Odenathus wrote:I've modded the flags: in all other scenarios the modded standards show as double length when they're first opened, then immediately switch to normal as soon as any one unit is selected. However, in this scenario, the 'double' effect continues for the whole sequence of routs and follow-ups, and only disappears when the player's turn begins
I have exactly the same issue in my mods and scenarios that use new flags. As you say, they normally revert to normal when the scenario starts, however someone reported that in an MP game the double length standards were visible for longer. I have not noticed it affecting frame rates.
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.

Field of Glory II Medieval Scenario Designer.

FOGII TT Mod Creator

Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
Odenathus
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 287
Joined: Sat Jun 27, 2009 10:02 pm

Re: Specific scenario running slowly + bugs

Post by Odenathus »

Thanks both. I've modded flags in several other MP scenarios and haven't had this issue, and the repeating javelins must (?) indicate that there's something else going on.

I've played another MP vs Hendrikus and it ran OK, so I think he must have a reasonable PC. Mine's an x64-based PC using Intel Core i7-6700 CPU @ 3.40 GHZ with 8GB RAM running Windows 10, if that makes any sense to anyone.
pipfromslitherine
Site Admin
Site Admin
Posts: 9707
Joined: Wed Mar 23, 2005 10:35 pm

Re: Specific scenario running slowly + bugs

Post by pipfromslitherine »

What video card do you(s) have? That is generally more important than the CPU.

Cheers

Pip
follow me on Twitter here
pipfromslitherine
Site Admin
Site Admin
Posts: 9707
Joined: Wed Mar 23, 2005 10:35 pm

Re: Specific scenario running slowly + bugs

Post by pipfromslitherine »

It is indeed the LOS setting, which happens (I assume) for the whole map every tick? I would imagine you only need to set the tile LOSes once. You can see a simple script profile (when in debug mode) using SHIFT+HOME to toggle, and SHIFT+END to reset. Note that the font is very small! Also note that he display will not show if the normal FPS counter is enabled.

Cheers

Pip
follow me on Twitter here
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28052
Joined: Sun Dec 04, 2005 6:25 pm

Re: Specific scenario running slowly + bugs

Post by rbodleyscott »

pipfromslitherine wrote:It is indeed the LOS setting, which happens (I assume) for the whole map every tick?
Is PostLOSActions() run every tick?
Richard Bodley Scott

Image
pipfromslitherine
Site Admin
Site Admin
Posts: 9707
Joined: Wed Mar 23, 2005 10:35 pm

Re: Specific scenario running slowly + bugs

Post by pipfromslitherine »

It is something of a feedback loop - changing the LOS forces an update which calls the post LOS function.

Cheers

Pip
follow me on Twitter here
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28052
Joined: Sun Dec 04, 2005 6:25 pm

Re: Specific scenario running slowly + bugs

Post by rbodleyscott »

pipfromslitherine wrote:It is something of a feedback loop - changing the LOS forces an update which calls the post LOS function.

Cheers

Pip
That being the case, where should the SetAreaLOS() command be put so that it runs once on the first turn?
Richard Bodley Scott

Image
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28052
Joined: Sun Dec 04, 2005 6:25 pm

Re: Specific scenario running slowly + bugs

Post by rbodleyscott »

With Pip's help I have fixed the above bug. v2 of the Teutoberger Wald scenario is now up on the FTP for in game download.

Note that you must finish any on-going Teutoberger Wald game before deleting the old version.

Note also that the bug that was fixed will only have caused lag on the first player's first turn. So if there is still lag there must be another cause. As I don't have lag even with the previous version, I cannot test it.

---------------------------------------

For future reference, if using this technique in other scenario scripts, the revised version of the script is as follows:

Function PostLOSActions()
{
if ((GetTurn()==0) && (GetUniversalVar("CustomLOSSet") < 2))
{
SetAreaLOS(16,16,65,65,0,0);

SetAreaLOS(23,30,28,62,0,1);

SetUniversalVar("CustomLOSSet", GetUniversalVar("CustomLOSSet") + 1);
}
}

This results in the code only being called twice, instead of endlessly over and over again. (For some reason running it only once did not hide the area to be hidden).
Richard Bodley Scott

Image
Post Reply

Return to “Field of Glory II: Tech Support”