Page 1 of 1

[ACS/ZScript] Help with implimenting features for a mod

PostPosted: Fri Jul 17, 2020 4:08 pm
by cubebert
Greetings everyone, I'm a first time poster but I've been in the community for a few years. Right now, I'm nearly done with my music randomizer mod that's compatible with GZDoom and Zandronum, but I have a couple of questions to ask. I'm not very experienced with ACS or ZScript and I wanted to add a couple of features that use those languages. My mod is using Kinsie's Floppy Disk as a base for the randomizer (with his permission), so I'll provide a snippet of the code at the bottom of the post. Feel free to tell me if what I'm requesting is impossible within the boundaries of ZScript or Zandronum, because these features aren't really too important and I can exclude them if I have to.

One feature I wanted to implement was a way to manually play a song in the console, so that way it makes it easier for me to debug songs and that the user could choose tracks of their liking if they wanted. The way it would work is that the user would pull up the console and type "play" and then the track's filename, just like how Demonsteele's NTWICM does it. I've looked at the code for NTWICM and it doesn't seem like I can just port it over because of how differently the code works compared to Floppy Disk, so it may have to be rewritten for it to work.

Another feature I was hoping could be added in was a way to disable ZDoom's music changer actors so that it doesn't interfere with the song being played. An example of what I'm talking about is in Super MAYhem 17's MAP22, where going into the demon pit triggers the actor and causes the music to revert back to its default state. I've provided a picture below that shows the area that I'm talking about. There are other maps that do this, but this is just an example of a map with the music changer actors. Nevermind, I figured out how to get it to work. Now, any Boom or ZDoom map that uses the MusicChanger actor will work properly with the music player, as long as ACS isn't used.

The last thing I wanted is very likely a ZScript-exclusive feature, but I wanted the level's music that is defined in the MAPINFO to be overwritten by the track that the randomizer chooses or is changed to manually. This one isn't really a huge priority for me and it's just to fix some events in certain mods like after you fight Dark Marty in DoomRL Arsenal and the level plays the default music for the map instead of the song that was previously playing before the fight.

It's a fairly extensive list, but I wanted my music randomizer to be the best it can be since I replay a lot of maps and the soundtrack can end up feeling predictable at certain points (anyone who starts up MAP01 on vanilla Doom 2 knows what I'm talking about). I'll give credit to those who want to contribute and help out with the mod; as I've said before, please tell me if I'm being overambitious with my requests because this is my first project that I'll be releasing soon.

Here is the code I'm talking about. Thanks for reading all of this! (I hope this doesn't tank mobile posters...)