Export MapData.GetChecksum to ZScript

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Export MapData.GetChecksum to ZScript

Re: Export MapData.GetChecksum to ZScript

by Marisa the Magician » Tue Jan 09, 2018 6:34 pm

Wow... thanks.

Re: Export MapData.GetChecksum to ZScript

by Graf Zahl » Tue Jan 09, 2018 1:34 pm

Mark this a 'yes' now.

Re: Export MapData.GetChecksum to ZScript

by Marisa the Magician » Tue Jan 09, 2018 12:24 pm

I'll be using that until it's mainlined, thank you.

Re: Export MapData.GetChecksum to ZScript

by Rachael » Tue Jan 09, 2018 12:04 pm

Re: Export MapData.GetChecksum to ZScript

by Graf Zahl » Wed Nov 15, 2017 4:44 pm

... not to mention replacing them with 3D floors. Doing that will indeed improve performance quite a bit - but of course this cannot be from inside the engine.

Re: Export MapData.GetChecksum to ZScript

by Gutawer » Wed Nov 15, 2017 4:34 pm

You couldn't really use this to affect Frozen Time because this is a ZScript request and ZScript can't modify map data enough to remove parts of the map (you'd have to remove the copious amounts of double sided lines, which is what trips the renderer up) since that would require nodes to be rebuilt while the game is running.

Re: Export MapData.GetChecksum to ZScript

by ibm5155 » Wed Nov 15, 2017 4:31 pm

Wait, so with that we could finally fix the frozen time , remove the gross hack bridge and add a proper 3D floor for +100fps? :wub:

And also, people are already doing workarounds for doing the same thing (couf brutal doom came in mind) so why not add THE oficial way of checking what mods/iwads the player is playing (I never played with that feature but for map specific changes I'd get the map name + the player Spawn pos and angle, I don't think there would be maps with the same map name + the same player Spawn coord)

Re: Export MapData.GetChecksum to ZScript

by Marisa the Magician » Mon Nov 13, 2017 1:14 am

Honestly I'd rather have this than the dozens of gross hacks that exist because this doesn't.

(Please, I even attempted to torture myself by implementing MD5 in ZScript itself)

Re: Export MapData.GetChecksum to ZScript

by Xaser » Sun Nov 12, 2017 10:44 pm

Let's be real though: who doesn't enjoy looking at butts? 8-)

Re: Export MapData.GetChecksum to ZScript

by Kinsie » Sun Nov 12, 2017 5:28 pm

Rachael wrote:I think the important question is, what exactly are you trying to prevent by blocking this feature?

It's literally 7 lines of code that are copy-pasted and modified from another 7 lines (so about 2 min worth of work max), so there's something wrong with this that you think will actually happen if it's exposed.
Someone might make a mod that spawns an actor at the start of E1M1 that's just a big billboarded sprite of the text "XASER IS A BUTT AND ENJOYS LOOKING AT AND THINKING ABOUT BUTTS". Which is both libel and slander, for Xaser is a saint and incapable of impure thoughts and/or actions.

Re: Export MapData.GetChecksum to ZScript

by Rachael » Sun Nov 12, 2017 2:06 pm

Graf Zahl wrote:Wait until I slightly randomize the spawn positions of monsters and players... :twisted: :mrgreen: :laff: :flamethrower:
I think the important question is, what exactly are you trying to prevent by blocking this feature?

It's literally 7 lines of code that are copy-pasted and modified from another 7 lines (so about 2 min worth of work max), so there's something wrong with this that you think will actually happen if it's exposed.

Re: Export MapData.GetChecksum to ZScript

by Graf Zahl » Sun Nov 12, 2017 12:33 pm

Wait until I slightly randomize the spawn positions of monsters and players... :twisted: :mrgreen: :laff: :flamethrower:

Re: Export MapData.GetChecksum to ZScript

by phantombeta » Sun Nov 12, 2017 12:30 pm

I'm pretty sure people were doing hacks to check maps before ZScript was even a thing.
And Brutal Doom (as bad as it is) somehow checks maps, and that can't use ZScript, so that shows it's certainly possible to hackily check maps with DECORATE + ACS.

Re: Export MapData.GetChecksum to ZScript

by Major Cooke » Sun Nov 12, 2017 9:56 am

Already people are inventing ways of doing it too.

From DrByspy on Discord:

Code: Select all

Class PyCodeGen
{
    play string levelCode()
    {
        //G_PickPlayerStart(int pnum, int flags = 0);
        string checkcode;
        int playerposes[4];
        for(int i = 0;i<4;i++)
        {
            
            vector3 getvec = G_PickPlayerStart(i);
            playerposes[i] = getvec.x+getvec.y+getvec.z;
        }
        checkcode = level.MapName..checkcode..playerposes[0]..playerposes[1]..playerposes[2]..playerposes[3]..level.Sides[0].GetTexture(1);
        checkcode.ToUpper();
        Console.Printf("PyCode: "..checkcode);
        return checkcode;
    }
}

Re: Export MapData.GetChecksum to ZScript

by _mental_ » Wed Nov 01, 2017 5:36 am

Exactly. The idea is to expose level.md5 byte array and (maybe) to add a function that return a checksum as readable string like those we have in compatibility.txt file.

Sure this can be used by mods to stop functioning right on a particular map.
But this can be achieved via existing functionality even without reading lumps.
If somebody will create a mod that will explicitly refuse to work properly with some map(s) then player must blame such mod maker.

I agree that hash check is fragile. Although checking many properties of a map can break any moment too for the same reason.
At least this helps to stop the invention of more and more comprehensive hacks to detect an exact map.

Top