The "How do I..." Thread

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
Ozymandias81
Posts: 2068
Joined: Thu Jul 04, 2013 8:01 am
Graphics Processor: nVidia with Vulkan support
Location: Mount Olympus, Mars
Contact:

Re: The "How do I..." Thread

Post 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. :cool:

http://imgur.com/a/8gFO2
d_map30.zip
(21.07 KiB) Downloaded 14 times
User avatar
LanHikariDS
Posts: 179
Joined: Tue Aug 04, 2015 11:30 pm
Location: Playing in the snow

Re: The "How do I..." Thread

Post 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?
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: The "How do I..." Thread

Post 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
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Re: The "How do I..." Thread

Post 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. :cool:
Thanks for fixing it!
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: The "How do I..." Thread

Post 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).
User avatar
Ozymandias81
Posts: 2068
Joined: Thu Jul 04, 2013 8:01 am
Graphics Processor: nVidia with Vulkan support
Location: Mount Olympus, Mars
Contact:

Re: The "How do I..." Thread

Post 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 :rock:
foxx
Posts: 1
Joined: Wed Sep 23, 2015 10:08 am
Contact:

Re: The "How do I..." Thread

Post 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?).
User avatar
Mikk-
Posts: 2274
Joined: Tue Jun 30, 2009 1:31 pm

Re: The "How do I..." Thread

Post 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);
 
User avatar
jpalomo
Posts: 772
Joined: Mon May 17, 2010 9:45 am

Re: The "How do I..." Thread

Post by jpalomo »

Switch/Case is probably what you are looking for.
User avatar
Mikk-
Posts: 2274
Joined: Tue Jun 30, 2009 1:31 pm

Re: The "How do I..." Thread

Post 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!
D2JK
Posts: 545
Joined: Sat Aug 30, 2014 8:21 am

Re: The "How do I..." Thread

Post 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.
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: The "How do I..." Thread

Post by cocka »

Here you are: [wiki]PickActor[/wiki]
Stardust
Posts: 57
Joined: Sat Jan 12, 2013 6:41 pm
Location: France

Re: The "How do I..." Thread

Post 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 :)
User avatar
edward850
Posts: 5890
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: The "How do I..." Thread

Post 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.
CRxTRDUDE
Posts: 52
Joined: Fri Nov 18, 2011 11:11 am
Location: Form nowhere with blob

Re: The "How do I..." Thread

Post 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?
Locked

Return to “Editing (Archive)”