Clearing assault "cache?"

Discussions about GameTypes
Terraniux
Masterful
Posts: 707
Joined: Mon Jan 05, 2009 8:08 pm
Personal rank: Banished member

Clearing assault "cache?"

Post by Terraniux » Sun Aug 30, 2020 9:07 pm

Hi there,


After many MH maps I'm trying something new before -> AS.
It's very fun as equal to MH, yet without monsters.....

Anyway, the question: How do you clear UT 'Assault match cache' ?

When you're in the editor, and fire up your AS map to test, and quit (regardless of defending or attacking first round),
you exit UT, and you make a few changes, UT starts the map where you left off :roll: Even though the map is changed.... :noidea

I've discovered a slow workaround though, that's by starting a different AS map, exit UT then go on with your map again.....


Any ideas? Maybe a setting I overlook?

Posted this on UnrealSP as well, to get a bigger public....
This member can only post when permitted.

User avatar
EvilGrins
Godlike
Posts: 8956
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA

Re: Clearing assault "cache?"

Post by EvilGrins » Sun Aug 30, 2020 9:25 pm

Terraniux wrote:
Sun Aug 30, 2020 9:07 pm
It's very fun as equal to MH, yet without monsters.....
Not entirely true, before MH a lot of AS maps had monsters. In fact, a number of AS maps got converted to MH.
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758

User avatar
OjitroC
Godlike
Posts: 3086
Joined: Sat Sep 12, 2015 8:46 pm

Re: Clearing assault "cache?"

Post by OjitroC » Sun Aug 30, 2020 11:16 pm

Terraniux wrote:
Sun Aug 30, 2020 9:07 pm
Any ideas? Maybe a setting I overlook?
This is a wild guess and may be completely wrong but ... UT creates an Autoplay.unr (in your /UT/Maps folder) when starting a map from the Editor (this is a copy of the map) - there is, for Assault maps, a property called something like AssaultInfo which may (or may not) record the last zone 'visited' when the map is played. Try deleting or moving the Autoplay.unr and see what happens.

User avatar
Barbie
Godlike
Posts: 2479
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Clearing assault "cache?"

Post by Barbie » Mon Aug 31, 2020 12:01 am

Terraniux wrote:
Sun Aug 30, 2020 9:07 pm
you exit UT, and you make a few changes, UT starts the map where you left off :roll: Even though the map is changed....
Can you see the changes in the map? If not I guess a read/write problem to the file.
OjitroC wrote:
Sun Aug 30, 2020 11:16 pm
there is, for Assault maps, a property called something like AssaultInfo which may (or may not) record the last zone 'visited' when the map is played
The complete code of AssaultInfo:

Code: Select all

class AssaultInfo expands Info;

var() texture ObjShots[8];
var() localized string ObjDesc[8];
var() int NumObjShots;

defaultproperties {
     bStatic=True
     bNoDelete=True
}
It looks like that it is just a container for the description of the assault objectives.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

User avatar
sektor2111
Godlike
Posts: 6030
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Clearing assault "cache?"

Post by sektor2111 » Mon Aug 31, 2020 6:20 pm

I think I'm disagree with you (any).
Let me see what says UT.ini

Code: Select all

[Botpack.Assault]
....
NumDefenses=0
CurrentDefender=0
bDefenseSet=False
bTiePartOne=False
....
I found variable bDefenseSet even in MapVotes for preventing votes to show up after first part, if game is not finished.

Code: Select all

...
function bool HandleEndGame()
{
	local Pawn aPawn;

	DebugLog("1");
	Super.HandleEndGame();
	if (  !bAutoOpen || CheckForTie() )
	{
		DebugLog("2");
		return False;
	}
	if ( Assault(Level.Game) != None )
	{
		DebugLog("4");
		if ( !Assault(Level.Game).bDefenseSet )
		{
			DebugLog("bDefenseSet false, Ending game normally.(First half end)");
			return False;
		}
	}
...
Definitely this is not cache is a simple variable controlling the two assault parts, and I think AS map does not store any data about matches, this would be map dynamically edited after each game, myths. Only EditorEngine is editing maps and has "SAVE" functions not GameEngine which has the control over game not over map's assets, Map-File stays the same on HDD, it is adjusted in memory during run-time not on the disk-drive.
However, as my two cents, I think you don't need to define gameclass in LevelInfo as follows:
- perhaps will cause some default data got from UT.ini when map is saved from Editor and is referencing "BotPack.Assault"- default properties in stage - I might be wrong here;
- perhaps BotPack.Assault is not that used, there are other Assault game-types, improved, as long as class "BotPack.Assault" is garbage.

User avatar
OjitroC
Godlike
Posts: 3086
Joined: Sat Sep 12, 2015 8:46 pm

Re: Clearing assault "cache?"

Post by OjitroC » Mon Aug 31, 2020 7:03 pm

sektor2111 wrote:
Mon Aug 31, 2020 6:20 pm
However, as my two cents, I think you don't need to define gameclass in LevelInfo as follows:
- perhaps will cause some default data got from UT.ini when map is saved from Editor and is referencing "BotPack.Assault"- default properties in stage - I might be wrong here;
- perhaps BotPack.Assault is not that used, there are other Assault game-types, improved, as long as class "BotPack.Assault" is garbage.
Certainly the four or five stock AS maps I've looked at don't have the gametype/gameclass defined in the LevelInfo.

Are you suggesting that the OP should ensure that no gametype is defined in the LevelInfo and see if that overcomes the problem?

Purely as a matter of interest, I have this in my UT.ini
Spoiler
Show
[Botpack.Assault]
Defenses=3
SavedTime=60.000000
NumDefenses=0
CurrentDefender=0
bDefenseSet=True
bTiePartOne=True
GameCode=CWuCE84m
Part=2

User avatar
sektor2111
Godlike
Posts: 6030
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Clearing assault "cache?"

Post by sektor2111 » Tue Sep 01, 2020 7:34 am

Game-Type declared has a few "default properties" maybe you should not cause any reference at these properties. Assault "knows" this way when first part was ended or not and such things should not be a part of map. Like I said, I did not find stock maps referencing game-types. Game-types have settings based on USER-PLAYER and not what a map says which needs to have a minimum modding support - mutators more exactly. I think custom games declared out of an INI file will react as map is referencing if I'm not mistaking... or using some plain game-type properties ? For me putting game-type there is way no go. People should not be forced to play BotPack.CTFGame or BotPack.Assault just because are stock. Why messing up with rushed and poorly written codes ?
File Default.INI has these:

Code: Select all

[Botpack.Assault]
bUseTranslocator=False
bCoopWeaponMode=True
Perhaps boolean variables undefined are False ? Well, what if they go suddenly True ?
Last edited by sektor2111 on Tue Sep 01, 2020 12:36 pm, edited 1 time in total.

Buggie
Godlike
Posts: 1763
Joined: Sat Mar 21, 2020 5:32 am

Re: Clearing assault "cache?"

Post by Buggie » Tue Sep 01, 2020 7:38 am

All easy. Go to System folder before clean run AS map. Copy whole folder to System1.
Play AS map. Exit. Go to any folder comparsion tool and compare System with System1.
I prefer total commander for this.
See what changes and how. Make conclusion.

-----

Also I can not reproduce issue. Open AS-HiSpeed, set game type to AS - play from editor = fine.
Open As-Mazon, set game type to AS - play from editor = fine.
UT v436.

User avatar
OjitroC
Godlike
Posts: 3086
Joined: Sat Sep 12, 2015 8:46 pm

Re: Clearing assault "cache?"

Post by OjitroC » Tue Sep 01, 2020 11:30 am

Buggie wrote:
Tue Sep 01, 2020 7:38 am
Also I can not reproduce issue. Open AS-HiSpeed, set game type to AS - play from editor = fine.
Open As-Mazon, set game type to AS - play from editor = fine.
UT v436.
To reproduce the issue you'd need to know what gametype, if any, the OP has set in LevelInfo? Then open the map in UEd, play it for a while, exit UT, do some changes to the map and then play it again in UEd.

User avatar
sektor2111
Godlike
Posts: 6030
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Clearing assault "cache?"

Post by sektor2111 » Tue Sep 01, 2020 12:40 pm

Buggie wrote:
Tue Sep 01, 2020 7:38 am
I prefer total commander for this.
Yep, but I think we talk about ini files, packages are not changed unless you are it for mismatch problems - exactly as for the map.

User avatar
OjitroC
Godlike
Posts: 3086
Joined: Sat Sep 12, 2015 8:46 pm

Re: Clearing assault "cache?"

Post by OjitroC » Tue Sep 01, 2020 1:10 pm

If I play an assault map for a while, then exit (before achieving any objective) and start the same map again (with the attack/defence the same as before), these are the variables in the UT.ini that change
[Botpack.Assault]
SavedTime=
bDefenseSet=
GameCode=
Part=
TimeLimit=

The values are different after playing the map again (for the same length of time as previously).

Buggie
Godlike
Posts: 1763
Joined: Sat Mar 21, 2020 5:32 am

Re: Clearing assault "cache?"

Post by Buggie » Tue Sep 01, 2020 1:21 pm

In any case no any problem with change map, as expected. I place Armor at AS-Guardia, start game, win, exit UT.
Delete Armor, place Udamage, start game, fly to spot and see UDamage. As expected.

Of course I set game type to AS in level info.

What changed - I started as defender.
Difference in UT.ini:
Image
So if OP mean start as Blue, not as Red, he need clear property Part, bDefenseSet, Savedtime, TimeLimit. maybe also GameCode.

----

GameCode just random string for connect two matches in Local and World log. So not relevant at all.

You can open Assault Game type and read code for understand what happened here.
No any cache for map here.
Map just restarted by Level.ServerTravel( "?Restart", false );
For reset all data for AS used next code:

Code: Select all

static function ResetGame()
{
	local int i;

	Default.bDefenseSet = False;
	Default.NumDefenses = 0;
	Default.CurrentDefender = 0;
	Default.SavedTime = 0;
	Default.GameCode = "";
	Default.Part = 1;
	Default.bTiePartOne = false;
	StaticSaveConfig();
}

User avatar
OjitroC
Godlike
Posts: 3086
Joined: Sat Sep 12, 2015 8:46 pm

Re: Clearing assault "cache?"

Post by OjitroC » Tue Sep 01, 2020 4:00 pm

Buggie wrote:
Tue Sep 01, 2020 1:21 pm
So if OP mean start as Blue, not as Red, he need clear property Part, bDefenseSet, Savedtime, TimeLimit.
Yes, that's what I thought. So the OP may as well continue with his method of starting another AS map and then exiting that map and starting the map he is working on (as this will alter the variables in [Botpack.Assault])?

Buggie
Godlike
Posts: 1763
Joined: Sat Mar 21, 2020 5:32 am

Re: Clearing assault "cache?"

Post by Buggie » Tue Sep 01, 2020 5:05 pm

Overkill. Just make .bat file for copy UT.ini from saved good version. And run it before each play map from UEd.

Also he can backup Botpack.u and edit Assault game Info code for disable this stuff. After testing just return original Botpack.u.

User avatar
OjitroC
Godlike
Posts: 3086
Joined: Sat Sep 12, 2015 8:46 pm

Re: Clearing assault "cache?"

Post by OjitroC » Tue Sep 01, 2020 5:55 pm

So the OP has three methods for overcoming the problem, which is good.