Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
cybermind

XDRE RNG question

Recommended Posts

Hello there.
I have a question about combining 2 demos using XDRE. Few days ago I've been looking for some demos and found this: http://doomedsda.us/lmps/586/2/hr2_tasfinal.zip But it's split into 3 demos (part 1 - map01-15, part 2 - map16-24, part 3 - map25-30) and you could replay parts 2 and 3 with included exe only. So I decided to combine them into one demo so it could be playable in any port compatible with vanilla. I've merged parts 1 and 2 using HEX editor, but I ran into problem: different RNG index. The combined demo uses one RNG index at the start of map16 and separated part 2 uses another, which of course lead to desync. But XDRE allows you somehow to change RNG index with player-generated actions, so I've come to an idea: mess player movement at the end of map15 (the straight path to exit teleporter), so map16 will start with correct index and everything should be in sync.
The only thing is that I don't know how to use bruteforce function in XDRE and I haven't found any manuals about it. I've tried different approaches but XDRE refuses to do bruteforce and keeps telling me about "no cigar". So any help would be appreciated.

Share this post


Link to post

I see that the demo is in doom2.exe format, which means all you should need to do is sync the RNG numbers correctly.
I don't have any DRE/XDRE experience, so forgive me if I say something stupid here; and I know you probably know this already, but DOOM uses a fake RNG generator with a simple number array. The RNG number gets changed with each random event lookup(weapon damage, revenent fireball, etc...)
If I was approaching this problem, I would modify the prboom-plus source to output the current RNG to the stdout.txt output for both the end of the previous demo and the start of the next demo. Then, as you said, just get them in sync(not sure if this means it should end one number earlier or for them to be the same).

Share this post


Link to post

Afaik, you can merge them, but you just have to have the correct amount of wait tics between levels. Sometimes the revenant rocket is/isn't homing even with the same RNG. Can't remember for sure, but I think it was every 4th frame or so, so just keep adding one frame between the 15 and 16 levels and you should get it work eventually.

I have done the RNG manipulation by manually shooting air. Usually chaingun or SSG.

Share this post


Link to post

I have used merging extensively doing my built run (maybe someday it gets finished, being stuck on map29 for years.) You just try different things to get the correct rng and then add or remove tics on timescreen or intermission or whatever it's called, until it's original total tics mod 4 (or 2, can't remember which) to sync revenant rockets.

Might be time consuming but it's just brainless mechanical work.

Share this post


Link to post

Thanks for all the suggestions, guys, though I were asking for help with XDRE bruteforce function. Yes, I know that all I need to do is to sync RNG indices, and looks like XDRE allows you to do this automatically by means of bruteforcing instead of shooting in the air and making manual checks for RNG index. As I've understood, XDRE bruteforcing function allows you to set a RNG index check (and many other checks) for specific tic. You just set tic range it should modify, but I haven't got any luck with that, it just keeps telling me "no cigar" and I haven't found any manual how to use bruteforcing.

Share this post


Link to post

I'm still not sure what *exactly* you are asking about. So you are setting a range of tics and parameters for those and then check tic that checks for rng, run it, and after a while it returns with a negative result? If it isn't succesful with the parameters you gave it, then there is no solution for those parameters and you have to make other changes. Bruteforce is only a tool to help *some* tedious work. Btw, keep in mind that bruteforce, for now, leaves the demo "dirty" if no solution is found, so you have to reload the demo in complex cases. Make sure you are running latest xdre also as it was quite buggy for a long time. There probably aren't binaries though, as the author for some reason stopped providing them.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×