Destroyed robots counter
Destroyed robots counter
Is it technically possible to make such a tool? Would help me (and everyone) a lot with speedrunning. Robots are sometimes destroyed by another robots and if that happens out of screen, then it is impossible to find evidence of it.
Re: Destroyed robots counter
I bet it could be done in DXX Rebirth. I'm not familiar with the source code, but I suspect when a robot is destroyed it can be written to a log file, then you can check the file and get a count. Maybe there is a debug mode with this already in place?
Re: Destroyed robots counter
Something like this? It's a small addition, the game already counts robot kills, which is any dying robot for single-player games.
I've zipped up my build in case you want to try it yourself (assuming you want it for d1x-rebirth on windows) https://www.arnedebruijn.nl/descent/d1x ... 581ar1.zip
(I once worked on the d1x predecessor d1djgpp, this was a nice excuse to get d1 building again )
I've zipped up my build in case you want to try it yourself (assuming you want it for d1x-rebirth on windows) https://www.arnedebruijn.nl/descent/d1x ... 581ar1.zip
(I once worked on the d1x predecessor d1djgpp, this was a nice excuse to get d1 building again )
- Attachments
-
- d1_robot_kills.patch.txt
- (1.74 KiB) Downloaded 334 times
Re: Destroyed robots counter
Yes, I need it for d1x-rebirth. Thank you very much for response. Can you explain what should I do to make it working?
Re: Destroyed robots counter
Oh wow, that's cool. I looked at player.h and totally did not see num_kills_level. Crazy. Very cool of you to create this patch. Maybe zico will pick it up and make an option?
Re: Destroyed robots counter
And is it possible to make it working also for demo file?
Thank you
Thank you
- Alter-Fox
- The Feline Menace
- Posts: 3164
- Joined: Thu May 24, 2007 12:49 pm
- Location: the realms of theory
- Contact:
Re: Destroyed robots counter
Well, I mean, D2X-XL already does it so it's definitely not impossible.
But maybe that means Rebirth doesn't want it.
But maybe that means Rebirth doesn't want it.
Ship's cat, MPSV Iberia: beware of cat.
...
Beware my original music, at http://soundcloud.com/snowfoxden.
...
Beware my original music, at http://soundcloud.com/snowfoxden.
Re: Destroyed robots counter
From your demo question I guess you got it working?
The counter wasn't recorded in the demo file, also not in D2X-XL. I've added code to record the counter in the demo file. That makes the recorded demo files incompatible with other Descent versions though, hopefully that's not a problem.
If it works good enough I'll try to make an option for the counter and maybe then it will be accepted in the official d1x rebirth.
New zip with binary: https://www.arnedebruijn.nl/descent/d1x ... 581ar2.zip
The counter wasn't recorded in the demo file, also not in D2X-XL. I've added code to record the counter in the demo file. That makes the recorded demo files incompatible with other Descent versions though, hopefully that's not a problem.
If it works good enough I'll try to make an option for the counter and maybe then it will be accepted in the official d1x rebirth.
New zip with binary: https://www.arnedebruijn.nl/descent/d1x ... 581ar2.zip
- Attachments
-
- d1_robot_kills_v2.patch.txt
- (8.82 KiB) Downloaded 343 times
Re: Destroyed robots counter
I greatly prefer this "number of kills" implementation to the "robots remaining" one though. The former doesn't give you any information you shouldn't have, and is still useful for speedruns. The latter is conceptually similar to the full map cheat code.
Re: Destroyed robots counter
Yes, it works. Thank you. That counter helped me to make sure my speedrun of L20 is valid (can't prove it tho, because I did it before counter for demo).
But as Sirius said, "robots remaining" version of it would be much better since levels with spiders always have different number of robots (because of randomly spawned baby spiders). Also, is it possible to make that counter ignoring bots from matcen? The rules were set that you can skip those bots in speedrun.
But as Sirius said, "robots remaining" version of it would be much better since levels with spiders always have different number of robots (because of randomly spawned baby spiders). Also, is it possible to make that counter ignoring bots from matcen? The rules were set that you can skip those bots in speedrun.
Re: Destroyed robots counter
I agree with Sirius that a remaining counter gives too much information about the level.
I've split up the counter in original bots + spawned bots and made a list with robot counts per level (spoiler ).
New zip with binaries: https://www.arnedebruijn.nl/descent/d1x ... 581ar3.zip
I've split up the counter in original bots + spawned bots and made a list with robot counts per level (spoiler ).
New zip with binaries: https://www.arnedebruijn.nl/descent/d1x ... 581ar3.zip
- Attachments
-
- d1_robot_counts.txt
- (431 Bytes) Downloaded 321 times
-
- d1_robot_kills_v3.patch.txt
- (16.15 KiB) Downloaded 316 times
Re: Destroyed robots counter
I will try how that new one works, when I will have time. Thanks for your time to make these!
The point is to make a tool for checking if the run is valid. I will be completely fine even if I have no counter info while playing, but I would like to check in demo. Sometimes it is not possible to valid an ok run, because lof lack of evidence.
The point is to make a tool for checking if the run is valid. I will be completely fine even if I have no counter info while playing, but I would like to check in demo. Sometimes it is not possible to valid an ok run, because lof lack of evidence.
Re: Destroyed robots counter
What if there were a speedrun mode that activated level timers, robots remaining, etc.?
Whatever I just said, I hope you understood it correctly. Understood what I meant, I mean.
#AllLivesMatter
#AllLivesMatter
- AlexanderBorisov
- DBB Ace
- Posts: 319
- Joined: Thu Apr 20, 2017 11:57 am
Re: Destroyed robots counter
Nice idea! One can have an option in game settings, this way it won't break Rebirth be-true-to-original-game paradigm...
Also, is it possible to make this thing for D2 (preferably for version 0.58.1 as it is known to be most stable, the latest has bugs with some missions like Apocalyptic Factor), and also "show the boss HP" option (D2 also) - I need it for vulnerable-at-the-back-only kind of bosses. I was unable to beat AF L12 boss without such a counter as you have ***just enough*** weapons to beat it (on Insane difficulty), and without the counter you cannot figure out when you did a full hit with a shaker or not (as well as with other weapons), and as I go for Insane no save no death runs it is important to abort early with a critical miss and when the boss cannot be killed. This counter would also help to figure out the most successful strategies against the boss and probably useful for level designers, so they can give the player enough weapons to kill the boss on all difficulties.
BTW D1 Rebirth latest version also had a problem with balance change compared to original game, homers were made easy to dodge (like in D2) and a bit slower, that's why I also use D1 0.58.1
Re: Destroyed robots counter
Something like this?
Binary: https://www.arnedebruijn.nl/descent/d2x ... 581ar1.zip
Binary: https://www.arnedebruijn.nl/descent/d2x ... 581ar1.zip
- Attachments
-
- d2_robot_kills_v1.patch.txt
- (23.2 KiB) Downloaded 358 times
Re: Destroyed robots counter
I finally tried that third version. It is better and better . Is it possible to split spawned bots to 2 categories? I mean spawned from matcen and spawned from other bots? Also is it possible to make something like announcement, when all original bots (+ spawned bots from other bots, since these are also required to destroy) are destroyed? Or that is not possible because total number of baby spiders is random?
Re: Destroyed robots counter
I think a global robot counter would be easier. As the mine loads, add one every time a robot is placed. When a robot dies, subtract one. When a robot spawns, check if it was not from a matcen; If not, add one, else add one to the spawned bots counter.
Also IMO there should be a numeric boss HP meter in addition to a graphic one.
Also IMO there should be a numeric boss HP meter in addition to a graphic one.
Whatever I just said, I hope you understood it correctly. Understood what I meant, I mean.
#AllLivesMatter
#AllLivesMatter
- AlexanderBorisov
- DBB Ace
- Posts: 319
- Joined: Thu Apr 20, 2017 11:57 am
Re: Destroyed robots counter
Thanks, will check the thing tomorrow, and I also agree that numeric boss HP counter should be present (as it will be hard to see whether an earthshaker did 900 or 1000 damage looking on the bar in the middle of the fight...).
- AlexanderBorisov
- DBB Ace
- Posts: 319
- Joined: Thu Apr 20, 2017 11:57 am
Re: Destroyed robots counter
Ok, thanks a lot! tested the boss HP counter, first thing - it does not appear immediately when I see the boss, probably only on the first hit? If so, it is ok. And yes, numeric counter is essential. I tried a fight against AF L12 boss, hit with all my missiles and stil did only 50% damage to it, when the other guy killed this boss exactly this way - and I can't see what I am doing wrong and which of my hits were not "direct hits" without the numbers... Breaking the demo file compartibility is not a good thing also (but not so critical if it is too hard to fix), maybe you can compute #of robots killed without saving it in the demo? Just by incrementing the counter each time the robot is destroyed during playback? And the option to show the counters during the game AND demo playback (2 separate options) would be nice - if it is not a speedrun, I don't want to see the counters in my recorded video (most of which I record from demos). However this option is of less importance than demo compartibility to me.
Edit : also there is no way to know when all robots spawned by other robot (not by matcens) are destroyed, which is important for 100% runs and speedruns. Maybe change spawn counter to non-matcens "remaining" spawn counter? Although it gives some advantage to know that some spawns are there to attack you - there is no way to validate 100% run without it especially in D2. Matcens robot counter can be an optional thing, but I don't need it at all.
Edit : also there is no way to know when all robots spawned by other robot (not by matcens) are destroyed, which is important for 100% runs and speedruns. Maybe change spawn counter to non-matcens "remaining" spawn counter? Although it gives some advantage to know that some spawns are there to attack you - there is no way to validate 100% run without it especially in D2. Matcens robot counter can be an optional thing, but I don't need it at all.
- Xfing
- DBB Fleet Admiral
- Posts: 2022
- Joined: Mon Jun 15, 2009 3:03 am
- Location: Ringing Satan's Doorbell
Re: Destroyed robots counter
Damn, I've wanted something like this for a long while now! But it won't open for me at all. It just waits for a few seconds and then fails to launch
I've gotten a new OS installation recently and 0.59 didn't work for me in much the same fashion, so I had to revert to 0.58, which works just fine. I wonder what the issue could be here.
I've gotten a new OS installation recently and 0.59 didn't work for me in much the same fashion, so I had to revert to 0.58, which works just fine. I wonder what the issue could be here.
Descent 1,5: Level layouts done: 52/54 Secret level layouts done: 1/6
- Xfing
- DBB Fleet Admiral
- Posts: 2022
- Joined: Mon Jun 15, 2009 3:03 am
- Location: Ringing Satan's Doorbell
Re: Destroyed robots counter
Ok nvm, I just replaced the executable, leaving the dll files be. It works now It's definitely a nice feature to have! I'm especially happy with the boss health meter, it's quite badass - though arguably the lack of it could constitute additional difficulty in and of itself, such as frustration and fear for having enough ammo to finish the job etc.
As for a countdown counter for robots - I disagree with the opinions that it gives too much information about the level. A speedrunner going for 100% will most likely have examined the level in the editor beforehand anyway, and know exactly where all the robots are. Knowing how many remain provides no essential info beyond that, nor does it affect gameplay in any way, or give the player any sort of advantage. For instance, everyone knows that D1L1 needs to be finished with 18000 points on the counter, otherwise you've missed something. I think a countdown-style counter would just encourage curiosity and thoroughness for regular play too.
I would personally postulate for a toggleable version where you can choose a kill count or a countdown, whichever you prefer. Spawned robots would of course stay as they are, with a positive counter (not much for other options here I suppose ). I can see this feature being cool in that it could allow creating new run categories, where you have to kill a certain quota of spawned robots to meet the run's criteria, for example. I think that could be a fun little challenge factor and add variety to recorded runs.
As for a countdown counter for robots - I disagree with the opinions that it gives too much information about the level. A speedrunner going for 100% will most likely have examined the level in the editor beforehand anyway, and know exactly where all the robots are. Knowing how many remain provides no essential info beyond that, nor does it affect gameplay in any way, or give the player any sort of advantage. For instance, everyone knows that D1L1 needs to be finished with 18000 points on the counter, otherwise you've missed something. I think a countdown-style counter would just encourage curiosity and thoroughness for regular play too.
I would personally postulate for a toggleable version where you can choose a kill count or a countdown, whichever you prefer. Spawned robots would of course stay as they are, with a positive counter (not much for other options here I suppose ). I can see this feature being cool in that it could allow creating new run categories, where you have to kill a certain quota of spawned robots to meet the run's criteria, for example. I think that could be a fun little challenge factor and add variety to recorded runs.
Descent 1,5: Level layouts done: 52/54 Secret level layouts done: 1/6
Re: Destroyed robots counter
Countdown counters can tell you that secret areas exist, as they would in D1 level 1 because there are robots behind optional secret doors. It's a minor advantage but it is an advantage, and you don't need to pick up a full map to get it.
- AlexanderBorisov
- DBB Ace
- Posts: 319
- Joined: Thu Apr 20, 2017 11:57 am
Re: Destroyed robots counter
I personally don't care about any advantage given by robot counter or boss HP counter, if I record any kind of 100% run I check the level in the editor anyway, otherwise I only care if I finished the level or not. When it gets too difficult, again I first check the editor if I missed important powerups or weapons, or use ASTRAL/full map cheat to find the stuff (this happens rarely; another reason is to find the secrets AFTER completing the level). Don't want to spend too much time peeking every wall. And yes you can call it "advantage", but it is like having good stereo sound to know enemy positions, or hi-res graphics, or good responsible controls/mouse - not having it does not make the game any better, but makes it more frustrating. I fully agree that both features are extremely useful, but would like to see boss HP in numeric form too. I remember frustration from my youth when I tried to kill CS L24 boss with shakers, and the bastard just didn't die... Ofc I did not knew that he is vulnerable from the back only, had no Internet those days, and probably did not even knew English so well at that time You can imagine how I was feeling about it, and the single number on the screen could give me the right idea what was happening!
- Xfing
- DBB Fleet Admiral
- Posts: 2022
- Joined: Mon Jun 15, 2009 3:03 am
- Location: Ringing Satan's Doorbell
Re: Destroyed robots counter
The L24 boss is vulnerable from the back, even though the glowing spot is best visible from the upper back. It's a bit misleading, but once you figure out the correct spot, even primary weapons can take care of him. From what I've noticed, he spawns cloaks spontaneously when damaged enough, I suppose that should help a big deal.
Descent 1,5: Level layouts done: 52/54 Secret level layouts done: 1/6
- AlexanderBorisov
- DBB Ace
- Posts: 319
- Joined: Thu Apr 20, 2017 11:57 am
Re: Destroyed robots counter
In fact he spawns (sometimes) cloaked diamond claws that drop the cloaks. Another misleading thing about this boss, I never figured out when a shaker hit counts as full direct hit (it is 1000 damage based on Calmarius AF L12 vid where he added numeric boss HP counter - quite easy for him as he plays it on Linux). Sometimes it does less damage (some bomlets fly away or smth else happens). So I need this numeric counter dearly (not as dearly as to install Linux however) - to figure out what is happening in my case. Yes when you have some extra shakers like for CS L24 boss (especially if you know all secrets in the level, have map editor etc), it is no problem, most times you kill it, but for AF L12 boss, it does not work, you need direct hit with all available missiles + some damage from primaries.
Re: Destroyed robots counter
Ok, here's a small tweak of the d2 version with a numeric boss shields indicator: https://www.arnedebruijn.nl/descent/d2x ... 581ar2.zip
BTW with msys2 it's almost as easy as in linux to build descent on windows, thanks to the included pacman package manager which has all the libs. I can write down some setup steps if you like.
BTW with msys2 it's almost as easy as in linux to build descent on windows, thanks to the included pacman package manager which has all the libs. I can write down some setup steps if you like.
- Attachments
-
- d2_robot_kills_v2.patch.txt
- (23.39 KiB) Downloaded 346 times
- AlexanderBorisov
- DBB Ace
- Posts: 319
- Joined: Thu Apr 20, 2017 11:57 am
Re: Destroyed robots counter
Thanks a lot Arne!! Will try it on weekends, having quite busy week... Would be nice if you can write a small instruction to compile D1/D2 on Windows (I have Windows 7 x64 if it makes any difference), starting from where to get 0.58.1 version code. Probably I will try it for figuring out one annoying bug that I found (some bosses refusing to teleport and make sound on rare occasions). And probably you can share the code for robot and boss HP counter, too...
Re: Destroyed robots counter
Here's the build guide: https://www.arnedebruijn.nl/descent/build-d2-win/
If you want to use my version replace the d2x-rebirth source url with: https://www.arnedebruijn.nl/descent/d2x ... src.tar.gz
If you want to use my version replace the d2x-rebirth source url with: https://www.arnedebruijn.nl/descent/d2x ... src.tar.gz
- AlexanderBorisov
- DBB Ace
- Posts: 319
- Joined: Thu Apr 20, 2017 11:57 am
Re: Destroyed robots counter
Ok thanks! I tried the numeric counter, great! Was able to beat the problematic AF L12 boss with it, only problem (very minor) is that in "no cockpit" mode the counter is not right at the top. But it does not really matter until someone really integrates it into dxx release. Instruction to compile the code seems clear but I still not tried it - but will certainly do it soon!
- AlexanderBorisov
- DBB Ace
- Posts: 319
- Joined: Thu Apr 20, 2017 11:57 am
Re: Destroyed robots counter
Arne, I tried it, first thing scons -j3 option does not work
scons: *** Do not know how to make File target `–j3' (/home/Sasha/d2x-rebirth_.58.1-src/–j3). Stop.
without -j3 it gives the following error
gcc.exe: error: ▒fwrapv: No such file or directory
Should be smth trivial, but I was unable to Google it quickly...
scons: *** Do not know how to make File target `–j3' (/home/Sasha/d2x-rebirth_.58.1-src/–j3). Stop.
without -j3 it gives the following error
gcc.exe: error: ▒fwrapv: No such file or directory
Should be smth trivial, but I was unable to Google it quickly...
Re: Destroyed robots counter
Oops, I drafted the guide in Word and it 'helpfully' converted minus-signs to en-dashes. I though I had recovered them all but missed those two
I've fixed the guide, you might have to reload the page in your browser. It should be -j3 and -fwrapv (both with regular minus sign). The -j3 is optional, just to make the build faster.
I've fixed the guide, you might have to reload the page in your browser. It should be -j3 and -fwrapv (both with regular minus sign). The -j3 is optional, just to make the build faster.
- AlexanderBorisov
- DBB Ace
- Posts: 319
- Joined: Thu Apr 20, 2017 11:57 am
Re: Destroyed robots counter
Thanks a lot! Although the page didn't changed when I reloaded it (probably cached or smth else), I changed dash to minus manually, it worked.
And I found that nasty boss bug at last, problem is that Last_teleport_time is never reset except in teleport_boss function, and as you restart the level, game time is reset to zero, and the condition (time > Last_teleport_time) in do_boss_stuff is false (unless you play the level for very long time, i. e longer than saved Last_teleport_time... And so the boss does not teleport. And probably this bug can also affect Last_gate_time, I did not checked it... Not sure how to fix it cleanly, obvious quick fix is to reset Last_teleport_time (and cloak start and end times, too) every time the level starts or you load a save; but it will slightly modify boss behavior on load (but for me this works nicely). And the best way is to save game time (still need to reset Last_teleport_time and some other variables in the level start function) - but it will modify saved game format.
And I found that nasty boss bug at last, problem is that Last_teleport_time is never reset except in teleport_boss function, and as you restart the level, game time is reset to zero, and the condition (time > Last_teleport_time) in do_boss_stuff is false (unless you play the level for very long time, i. e longer than saved Last_teleport_time... And so the boss does not teleport. And probably this bug can also affect Last_gate_time, I did not checked it... Not sure how to fix it cleanly, obvious quick fix is to reset Last_teleport_time (and cloak start and end times, too) every time the level starts or you load a save; but it will slightly modify boss behavior on load (but for me this works nicely). And the best way is to save game time (still need to reset Last_teleport_time and some other variables in the level start function) - but it will modify saved game format.
Re: Destroyed robots counter
Great to hear compiling works for you now!
Good find on the teleport bug. It appears somewhere in the d2x history a fix was made for >9 hours game time bugs and initialization of the Last_teleport_time / Last_gate_time / Boss_*_time variables got overlooked. They probably should be reset to 0 in init_robots_for_level in ai.c. They are already saved however, in ai_save_state in ai.c. But of course if Last_teleport_time was bugged at the start of the level the save game will also be bugged.
Good find on the teleport bug. It appears somewhere in the d2x history a fix was made for >9 hours game time bugs and initialization of the Last_teleport_time / Last_gate_time / Boss_*_time variables got overlooked. They probably should be reset to 0 in init_robots_for_level in ai.c. They are already saved however, in ai_save_state in ai.c. But of course if Last_teleport_time was bugged at the start of the level the save game will also be bugged.
Re: Destroyed robots counter
About that Kill counter for D1: I realised, if you play (or watch demo) with cam without cocpit and without bar at bottom, then kill counter is placed at same position as text saying you are invulnerable or cloaked. Can you please move the location a bit? Or is it possible to have option to hide that kill counter? I would like to upload new run to youtube and it would be good to not confuse spectator by unreadable mix of text. Thank you:).
Re: Destroyed robots counter
I finally got around to create a proper distribution on github for the patches and I've fixed the kill counter location and added an option to enable/disable the indicator (Speedrun Indicator in Graphics options). The option/location fix is D1 only for now.
Someday I hope to change the counter to include robot drops (I had misunderstood your rules), remove the second part, change to countdown and play a message beep when it reaches 0.
I've also found a way to keep the demo files compatible with other Descent versions so I can change that as well (the solution is to store event values with high bit set so the values are ignored as invalid events when the event is not recognized).
https://github.com/arbruijn/dxx-ar/rele ... 0.58.1-ar4
Someday I hope to change the counter to include robot drops (I had misunderstood your rules), remove the second part, change to countdown and play a message beep when it reaches 0.
I've also found a way to keep the demo files compatible with other Descent versions so I can change that as well (the solution is to store event values with high bit set so the values are ignored as invalid events when the event is not recognized).
https://github.com/arbruijn/dxx-ar/rele ... 0.58.1-ar4
Re: Destroyed robots counter
great, thank you