drygnfyre Posted April 15, 2019 Given the release of the source code and presumably the portions of the code that determine the psuedo-RNG values, can these be changed to other numbers? I realize it would drastically change aspects of the game, but that would be the fun (for me, anyway). 1 Share this post Link to post
Dark Pulse Posted April 15, 2019 (edited) I know for some source ports you can simply hex edit the table if you've got a hex editor, but I'm not sure if that applies to every port. Theoretically it should, you'd just have to find the 256 bytes of the EXE that store the table. Give this video a watch, I've cued it up to the part relevant to your interests. Note that the addresses will change depending on port, so you're better off searching for the end sequence of 0x88 0x78 0xA3 0xEC 0xF9. I do think it'd be a bit interesting to have a customizable RNG as a feature for an engine though. 2 Share this post Link to post
drygnfyre Posted April 15, 2019 2 minutes ago, Dark Pulse said: I know for some source ports you can simply hex edit the table if you've got a hex editor, but I'm not sure if that applies to every port. Theoretically it should, you'd just have to find the 256 bytes of the EXE that store the table. Give this video a watch, I've cued it up to the part relevant to your interests. Interesting, that seems to answer my question. One thing I had long been interested in doing was modifying values in such a way that instead of having a fixed range of numbers that get picked, instead any number within a range can be picked (i.e. instead of 3, 6, 9, or 12, anything between 3-12 is picked). The idea was I wanted to make things even more random to an extent. I guess it is possible to a degree. 0 Share this post Link to post
Empyre Posted April 16, 2019 49 minutes ago, drygnfyre said: One thing I had long been interested in doing was modifying values in such a way that instead of having a fixed range of numbers that get picked, instead any number within a range can be picked (i.e. instead of 3, 6, 9, or 12, anything between 3-12 is picked). The idea was I wanted to make things even more random to an extent. You can do that with DECORATE. For projectiles, instead of Damage 3, which would result in the damage being 3 * Random(1, 8), use parentheses to specify your exact formula, like this: Damage (Random(3,24)) or even better, Damage (Random(1,8)+Random(1,8)+Random(1,8)), which would give the same 3 - 24 range, but weighted so the middle numbers are more likely than the high and low ends, as if you rolled three 8-sided dice. For hitscan, you need to use the FBF_NORANDOM flag to tell it to use the exact damage forumula you specify. https://zdoom.org/wiki/A_FireBullets 2 Share this post Link to post
drygnfyre Posted April 16, 2019 32 minutes ago, Empyre said: You can do that with DECORATE. For projectiles, instead of Damage 3, which would result in the damage being 3 * Random(1, 8), use parentheses to specify your exact formula, like this: Damage (Random(3,24)) or even better, Damage (Random(1,8)+Random(1,8)+Random(1,8)), which would give the same 3 - 24 range, but weighted so the middle numbers are more likely than the high and low ends, as if you rolled three 8-sided dice. For hitscan, you need to use the FBF_NORANDOM flag to tell it to use the exact damage forumula you specify. https://zdoom.org/wiki/A_FireBullets Cool, thanks for the info. My goal was to make a more RPG-like environment where certain weapons are clear upgrades over another (i.e. something like an auto shotgun always outputs damage in a higher range than the standard shotgun). I guess kind of like how there are weapon upgrades in Brutal Doom/Project Brutality. I'll look into this. 1 Share this post Link to post
LadyVader1138 Posted April 16, 2019 5 hours ago, Dark Pulse said: I know for some source ports you can simply hex edit the table if you've got a hex editor, but I'm not sure if that applies to every port. Theoretically it should, you'd just have to find the 256 bytes of the EXE that store the table. Give this video a watch, I've cued it up to the part relevant to your interests. Note that the addresses will change depending on port, so you're better off searching for the end sequence of 0x88 0x78 0xA3 0xEC 0xF9. I do think it'd be a bit interesting to have a customizable RNG as a feature for an engine though. Beaten to the punch! 0 Share this post Link to post
Cruduxy Pegg Posted April 16, 2019 You can edit the RNG tables in the source code and re-compile it. Works with almost everything as long as they are open source. 0 Share this post Link to post
Hell_Pike Posted August 5, 2019 I would like to modify the random values to decrease randomness, allowing for more skill in games. Specifically to decrease the randomness to the movement of the monsters. Should I instead write my own movement functions for the monsters? 0 Share this post Link to post
Graf Zahl Posted August 5, 2019 On 4/16/2019 at 12:27 PM, Pegg said: You can edit the RNG tables in the source code and re-compile it. Works with almost everything as long as they are open source. It should be noted that no relevant advanced port uses the RNG table for normal gameplay anymore. Even Boom replaced it with a more standard random number generator when not playing back demos and that has filtered down to nearly everything that derives from it. Depending in any way on the original RNG's quirks is simply no longer a viable option with the current set of ports. 5 hours ago, Hell_Pike said: I would like to modify the random values to decrease randomness, allowing for more skill in games. Specifically to decrease the randomness to the movement of the monsters. Should I instead write my own movement functions for the monsters? The term "Decreasing randomness" lacks context. Just altering the RNG's output does not guarantee anything because the code using these values is doing various different things with them and uses different formulas to process it. So yes, you'll have to write your own functions. 0 Share this post Link to post
Ancalagon Posted August 5, 2019 6 hours ago, Hell_Pike said: I would like to modify the random values to decrease randomness, allowing for more skill in games. From this post I get that you like to blame the rng for your own mistakes, doom has a pretty high skill ceiling already and the randomness adds to it cause the player has to adapt to the different situations on the spot, yet from my experience cases where you depend on rng to beat something are extremely rare, and far more rare than this forum usually suggests. And for the topic, it seems what you really want is to modify the weapons, as modifying the rng table wont make a pellet be able to do 4 dmg, but yes with decorate or dehacked for classic ports you can do any weapon you want. 3 Share this post Link to post
Spectre01 Posted August 5, 2019 I would be interested in trying a mod which averages out the damage ranges into single, consistent, values just to see how the game feels. I'm actually surprised that hasn't been done yet, last time I checked. 2 Share this post Link to post
Jon Posted August 6, 2019 Years ago I played around with the rng table being either all on (255) or off (0). It had some interesting results. Details of how to do it https://jmtd.net/log/deterministic_doom/ Video https://jmtd.net/log/deterministic_doom/2/ 0 Share this post Link to post