Page 593 of 972
Re: The "How do I..." Thread
Posted: Tue Sep 22, 2015 2:51 am
by Ozymandias81
Nevander wrote:I have a MIDI file I wish to use in my WAD and when I bring it into SLADE, it shows as an Unknown type. It refuses to play in-game but plays fine in Windows.

It was uncorrectly saved as a RIFF sound file, if I am not wrong. Fixed with UltraEdit32.
http://imgur.com/a/8gFO2
Re: The "How do I..." Thread
Posted: Tue Sep 22, 2015 7:07 am
by LanHikariDS
Galaxy_Stranger wrote:Yes, you can check the player's class and then warp them to wherever based on that.
How would I go about doing this?
Re: The "How do I..." Thread
Posted: Tue Sep 22, 2015 7:19 am
by Gez
Nevander wrote:I have a MIDI file I wish to use in my WAD and when I bring it into SLADE, it shows as an Unknown type. It refuses to play in-game but plays fine in Windows.
Here is said MIDI file:
d_map30.zip
It's an RMID file. It's a MIDI file embedded in a RIFF container.
It'll be supported by future versions of SLADE 3, after I merge my music branch.
Ozymandias81 wrote:It was uncorrectly saved as a RIFF sound file
It's not "uncorrect".
http://www.digitalpreservation.gov/form ... 0120.shtml
Re: The "How do I..." Thread
Posted: Tue Sep 22, 2015 4:35 pm
by Nevander
Gez wrote:It's an RMID file. It's a MIDI file embedded in a RIFF container.
It'll be supported by future versions of SLADE 3, after I merge my music branch.
Interesting. Is there any reason to do that instead of having it as a straight MIDI?
Ozymandias81 wrote:It was uncorrectly saved as a RIFF sound file, if I am not wrong. Fixed with UltraEdit32.

Thanks for fixing it!
Re: The "How do I..." Thread
Posted: Wed Sep 23, 2015 5:47 am
by Gez
It has uses for having programs automatically handle MIDI files (or whatever other sort of documents) without having to use ad-hoc code for each file format. All they need is a set of RIFF handling functions and then they can identify any sort of RIFF file, query metadata in a standardized way (by looking at the RIFF metadata, instead of the MIDI metadata), etc. The other feature is that it also allows to bundle a MIDI file with, for example, a sound font, so that a fully-compliant player will use the bundled sound font to play the MIDI song. Essentially turning a RMID file into a sort of module tracker file, in a way.
Unfortunately, that latter part won't be supported in SLADE 3, because the standard format for doing that was with DLS sound fonts, which aren't supported by FluidSynth or TiMidity or pretty much anything else that's open source. Besides, I have never actually found any RMID file with an embedded sound font anyway. There's none in Nevander's file, and there's none in the bunch of .rmi files that were included with old Windows versions (specifically, NT 4.0, 95, 98, 98SE, and 2000).
Re: The "How do I..." Thread
Posted: Wed Sep 23, 2015 7:05 am
by Ozymandias81
Gez wrote:It has uses for having programs automatically handle MIDI files (or whatever other sort of documents) without having to use ad-hoc code for each file format. All they need is a set of RIFF handling functions and then they can identify any sort of RIFF file, query metadata in a standardized way (by looking at the RIFF metadata, instead of the MIDI metadata), etc. The other feature is that it also allows to bundle a MIDI file with, for example, a sound font, so that a fully-compliant player will use the bundled sound font to play the MIDI song. Essentially turning a RMID file into a sort of module tracker file, in a way.
Unfortunately, that latter part won't be supported in SLADE 3, because the standard format for doing that was with DLS sound fonts, which aren't supported by FluidSynth or TiMidity or pretty much anything else that's open source. Besides, I have never actually found any RMID file with an embedded sound font anyway. There's none in Nevander's file, and there's none in the bunch of .rmi files that were included with old Windows versions (specifically, NT 4.0, 95, 98, 98SE, and 2000).
Thanks Gez to get the point with such stuff... man, I did some mods with Digitrakker & ModPlug Tracker for 10 years (1994/2004) and didn't know of such rmid thing... I always worked with s3m, mod, iti and xm files (and known of them since old beloved Amiga times - still try to catch Superfrog and Dune [menues] songs), my stuff is hosted here on zdforums (42 mods in total, several remixes + 8/10 done from scratch). Thanks anymore Gez and

Re: The "How do I..." Thread
Posted: Wed Sep 23, 2015 11:17 am
by foxx
Dumb question, but in a multiplayer game (coop if it matters) how can I have it announced to the server console and server log when the players' team steps into a secret area? It naturally comes up on the players' screen when they do but I don't see it in the log and I need this for a mod I'm working on.
Digging through the wiki I think there may be some way I can inherit a class for it to do the output but I'm pretty new to this so I'm not 100% sure of what I'm doing. Sorry if it's really obvious, I've had my head buried in ACS stuff for a few weeks now and don't think that's the right approach (or is it?).
Re: The "How do I..." Thread
Posted: Wed Sep 23, 2015 11:41 am
by Mikk-
Is there anyway to have a script skip a few lines if a certain condition isn't met? For example; I have a script which draws three icons on screen, based on an Actor's user variables. If say,
SContS1Q equals 0 then it skips the block of code labled
Small Container Item Slot 1 ? or if
SContS2Q is 0 it skips Container Slot 2's drawing code, etc. etc.
Code: Select all
SetHudSize(640,480,0);
SetFont("CONTBOX3");
HudMessageBold(s:"a"; HUDMSG_PLAIN,2031,CR_UNTRANSLATED,320.0,240.0,0.0);
//Small Container Item Slot 1
SetFont("confont");
HudMessageBold(d:SContS1Q; HUDMSG_PLAIN,2000,CR_WHITE,302.6,222.2,0.0);
SetFont(ItemArray[SContS1][2]);
HudMessageBold(s:"a"; HUDMSG_PLAIN,2001,CR_WHITE,303.6,223.2,0.0);
//Small Container Item Slot 2
SetFont("confont");
HudMessageBold(d:SContS2Q; HUDMSG_PLAIN,2002,CR_WHITE,333.6,222.2,0.0);
SetFont(ItemArray[SContS2][2]);
HudMessageBold(s:"a"; HUDMSG_PLAIN,2003,CR_WHITE,334.6,223.2,0.0);
//Small Container Item Slot 3
SetFont("confont");
HudMessageBold(d:SContS3Q; HUDMSG_PLAIN,2004,CR_WHITE,364.6,222.2,0.0);
SetFont(ItemArray[SContS3][2]);
HudMessageBold(s:"a"; HUDMSG_PLAIN,2005,CR_WHITE,365.6,223.2,0.0);
Re: The "How do I..." Thread
Posted: Wed Sep 23, 2015 1:25 pm
by jpalomo
Switch/Case is probably what you are looking for.
Re: The "How do I..." Thread
Posted: Wed Sep 23, 2015 4:22 pm
by Mikk-
Ah, it took some tinkering - see I thought a Switch/Case would break off after one pass but I guess not. Thanks very much!
Re: The "How do I..." Thread
Posted: Wed Sep 23, 2015 5:54 pm
by D2JK
In ACS, how do I retrieve information of a monster/actor the player is currently targeting? In decorate, I can use an actor pointer such as "AAPTR_PLAYER_GETTARGET" in certain action functions, but what would be the closest equivalent in ACS scripting, and how would I use it?
Specifically, I need to retrieve the current health and the spawnhealth of the targeted actor; this script would be called from within a state of a weapon. I know how to use GetActorProperty for APROP_HEALTH and APROP_SPAWNHEALTH, but again, I need to somehow point them at the actor currently targeted by the player.
Re: The "How do I..." Thread
Posted: Wed Sep 23, 2015 10:13 pm
by cocka
Here you are: [wiki]PickActor[/wiki]
Re: The "How do I..." Thread
Posted: Thu Sep 24, 2015 12:03 am
by Stardust
hiya there,
I was wondering is it possible to spawn an actor at one of the deathmatch start randomly (thing with editor number 11) ? (Deathmatches start don't have a ID or TID (?) so I'm not sure I can really use the Spawn, Spawn_Forced, etc... actions :'( )
thank you in advance

Re: The "How do I..." Thread
Posted: Thu Sep 24, 2015 12:33 am
by edward850
Deathmatch starts, let alone any kind of player start, do not exist as tangible objects. They are simply a list of spawns in an array.
Re: The "How do I..." Thread
Posted: Thu Sep 24, 2015 1:13 am
by CRxTRDUDE
Is there a way to make a hudmessage image into monochrome using translation or TEXTCOLO? Do I necessarily have to convert the image to my palette that I have in order to work?