finding modified Actors in a map

Tutorials and discussions about Mapping - Introduce your own ones!
Post Reply
User avatar
Barbie
Godlike
Posts: 2808
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

finding modified Actors in a map

Post by Barbie »

Recently players got negative score in a map and idk why. I suspect wired setting for a pickup item somewhere but I don't want to look through hundreds items manually. So I got the idea to inspect the exported T3D file, because only modified settings are written to it. If unneeded lines were left out, there may be a result like
Begin Actor Class=Brush Name=Brush202
PostScale=(Scale=(X=0.515625,Y=0.484375,Z=1.159108),SheerAxis=SHEER_ZX)
Begin Actor Class=UT_ShieldBelt Name=ut_shieldbelt0
Charge=1000
...
which shows unusual setting.
Anyone willing to code such in any language?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Buggie
Godlike
Posts: 2749
Joined: Sat Mar 21, 2020 5:32 am

Re: finding modified Actors in a map

Post by Buggie »

Some grep line can help you. -A -B and -v.
-v for ignore some lines, like Location, -A and -B for show context if need.
Pipe of few grep to one. Save it somewhere in script or in notes and that must be it.
User avatar
Barbie
Godlike
Posts: 2808
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: finding modified Actors in a map

Post by Barbie »

I started this post after I've done
cat DM-Bathroom-Cow-Beta6.t3d |grep -v CsgOper=|grep -v "markedItem="|grep -v VisNoReachPaths|grep -v "upstreamPaths("|grep -v visitedWeight=|grep -v nextNavigationPoint=|grep -v Level=|grep -v Region=|grep -v Location=|grep -v OldLocation=|grep -v Name=|grep -v previousPath=|grep -v "PrunedPaths("|grep -v "Paths("|grep -v bestPathWeight=|grep -v Tag=|grep -v "End Actor"|grep -v myMarker=|grep -v "End Polygon"|grep -v "End PolyList"|grep -v "End Brush"|grep -v Brush=|grep -v Rotation=|grep -v "Begin Polygon "|grep -v "Origin "|grep -v "Normal "|grep -v "Vertex "|grep -v "TextureU "|grep -v cost=|grep -v "TextureV "|grep -v "Begin PolyList"|grep -v "PostScale=(SheerAxis=SHEER_ZX)"|grep -v "MainScale=(SheerAxis=SHEER_ZX)"
and didn't see an end. :loool:
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
Barbie
Godlike
Posts: 2808
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: finding modified Actors in a map

Post by Barbie »

Now using such (T3D file must have *nx line breaks ('LF', 0x0A, '\n'):

Code: Select all

#!/bin/sh

cat $1 \
|egrep -v "^Begin Map$" \
|egrep -v "^End Map$" \
|egrep -v "^ *MainScale=\(SheerAxis=SHEER_ZX\)$" \
|egrep -v "^ *PostScale=\(SheerAxis=SHEER_ZX\)$" \
|egrep -v "^ *Level=LevelInfo'MyLevel.LevelInfo0'$" \
|egrep -v "^ *Tag=\"Brush\"$" \
|egrep -v "^ *Region=\(Zone=" \
|egrep -v "^ *Location=\(.*\)$" \
|egrep -v "^ *SavedPos=\(.*\)$" \
|egrep -v "^ *SavedRot=\(.*\)$" \
|egrep -v "^ *oldRot=\(.*\)$" \
|egrep -v "^ *OldPos=\(.*\)$" \
|egrep -v "^ *ColLocation=\(.*\)$" \
|egrep -v "^ *Begin Brush Name=Brush[[:digit:]]+$" \
|egrep -v "^ *CsgOper=CSG_Add$" \
|egrep -v "^ *CsgOper=CSG_Subtract$" \
|egrep -v "^ *Brush=Model'.*'?$" \
|egrep -v "^ *Rotation=\(" \
|egrep -v "^ *PolyFlags=[[:digit:]]+$" \
|egrep -v "^ *PrePivot=" \
|egrep -v "^ *Begin PolyList" \
|egrep -v "^ *Begin Polygon" \
|egrep -v "^ *Origin *" \
|egrep -v "^ *Normal " \
|egrep -v "^ *TextureU " \
|egrep -v "^ *TextureV " \
|egrep -v "^ *Vertex   " \
|egrep -v "^ *Pan      " \
|egrep -v "^ *End Polygon" \
|egrep -v "^ *End PolyList" \
|egrep -v "^ *End Brush" \
|egrep -v "^ *Name=\"Brush[[:digit:]]+\"$" \
|egrep -v "^ *End Actor" \
|egrep -v "^ *OldLocation=\(" \
|egrep -v "^ *Begin Brush Name=Model[[:digit:]]+$" \
|egrep -v "^ *Name=\"[[:alnum:]]+\"$" \
|egrep -v "^ *Paths\([[:digit:]]*\)=[[:digit:]]*$" \
|egrep -v "^ *PrunedPaths\([[:digit:]]*\)=[[:digit:]]*$" \
|egrep -v "^ *VisNoReachPaths\(" \
|egrep -v "^ *previousPath=" \
|egrep -v "^ *nextNavigationPoint=" \
|egrep -v "^ *myMarker=" \
|egrep -v "^ *upstreamPaths\([[:digit:]]+\)=[[:digit:]]*+" \
|egrep -v "^ *markedItem=" \
|egrep -v "^ *bestPathWeight=" \
|egrep -v "^ *visitedWeight=" \
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Post Reply