Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - RiC David

Pages: [1]
1
Programming / Adding Sound based on Message Buffer - help appreciated
« on: July 15, 2014, 10:30:04 PM »
[TL;DR Note]  While writing this, I managed to find a file containing the message2sound script so you can skip ahead to the 'Fake Edit' if you don't want to hear me set the stage, so to speak

Hi,

After playing a Brogue 1.7.3 mod that added sound based on message buffer events, I really want to learn how to either apply that mod to newer versions of the game or put such a script together myself and before I go any further I'd appreciate if you could tell me whether this is too complex a task for a programming novice such as myself.

I've been nosing around the files of the modded Brogue (LazyCat's 1.7.3 fork - found here: http://skylink.dl.sourceforge.net/project/brogueaudio/Brogue-AUDIO_v9x.zip) but have yet to find the elusive file that details the process. The current release of Angband (3.5.0) includes optional event based sound and also an easy to understand/modify config file; it will say things like "hit_good = goodhit.mp3" which tells me how it tells the game which sound file to play but not all importantly how it tell the game to run these scripts when message events occur.

In the lib/pref folder of Angband are some other promising files such as the message.prf file that tells the game which colour to print the messages in and also mentions that some messages aren't even actually printed and only exist so that sounds can be played when they occur. Another piece of the puzzle but again still no clue as to how they made the game associate messages with file executions.

[Fake Edit]

Further digging has shown me that the current sound functionality is the work of 'Dubtrain' (http://www.dubtrain.com/angband) and is based on 'Craig's Angband Sound Patch' (http://www.chambrook.org/angband/soundfx.php) which in turn is an evolution of Tim Baker's 'AngbandTK' (can't locate this). Craig's patch is a diff file that contains the scripting and man does it look intimidating; that said, some parts seem relatively straight forward like the following which appears to be the core message2sound instruction:

Code: [Select]
@@ -283,6 +292,7 @@
  {
  act = "claws you.";
  do_cut = 1;
+ sound_msg = MSG_MON_CLAW;
  break;
  }

(This would work in conjunction with the sound.cfg file that says "mon_claw = example.mp3")

I'd post the whole file but I see we can't use [spoiler] BBC and nobody's going to want to see pages and pages of coding so all I can do is point you toward the Zip containing the file in question (soundfx-patch.diff) - http://www.chambrook.org/angband/angband-3.0.5-soundfx.zip.

I've probably answered my own question - yes, yes it is far too complex for me to even consider undertaking, but if by any slim chance that intimidating diff file is constructed in some noob friendly manner (say, some GUI that creates the script) then please let me know.

Alternatively, if anyone can tell me where the message2sound script is located in LazyCat's sound mod so I can just transfer this to the latest version of Brogue (1.7.4) then that would be a whole hell of a lot easier; the only reason I want to do all of this is so I can continue playing the updated game with sound!

Thank you so much for reading and I hope I've been clear and informative,

-RiC

2
Player's Plaza / Easy diagonals on existing roguelikes! (partial solution)
« on: February 10, 2014, 06:00:22 PM »
This being a community of ASCII gamers (largely), perhaps everybody here is already savvy enough to figure out a fix to this problem but it took me long enough so maybe this will help somebody else:

I have a laptop without a number pad and so diagonals tend to be pretty awkward; the YUBN keys are reasonable compromises if they alone are an option - often though they're part of the 'vi' keys (YU, HJKL, BN) and so things like 'kick' have to be remapped, which in Nethack is something ridiculous like Ctrl+X.

This fix allows you to use the extremely convenient Shift+Left or Right to go diagonally up & left/right and Ctrl+Left or Right to go diagonally down & left/right; naturally your left hand tends to hover around that area so it makes the whole thing a breeze, for some reason this isn't common in even new-ish roguelikes (only ADOM does this and even that may be a NOTEYE interface feature).

Anyway, you'll need the free and lightweight 'Auto Hot Key' programme which can be downloaded at autohotkey.com. Once downloaded, simply create a new ahk file (you'll find the option in the Right Click > New > AHK file menu, otherwise you can create a text file and rename the extension .ahk) and paste this in (without the lines):

------------------------------

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


+Left::
Send 7
return
+Right::
Send 9
return
^Left::
Send 1
return
^Right::
Send 3


-------------------------------

Then open the file to run the script, a little icon will now reside in your notifications bar that you might want to set to 'hide', and if you're likely to play these games a lot then maybe put it in your 'StartUp' folder so you don't have to keep opening it.

The stuff at the top is the default coding it recommends so don't ask me what that all does. The rest of it tells the computer to map Shift ("+") or Control ("^") and either Left or Right to the horizontal number keys that control diagonal movement. In the unlikely case that the game you're playing doesn't use the horizontal numbers for movement and only uses the number pad then instead of "1" or "9" with "Numpad1" or "Numpad9"; if you have an even more unusual setup for movement then replace those numbers with whichever keys control your diagonal movement.

I can't tell you how much better it feels to play Nethack with easy diagonal movement...but I'm going to try - it feels great. I think I'd prefer this to a number pad anyway because there's less movement involved.

Hope this helps someone else as much as it did me.

 -RiC


3
I don't know exactly why but I really dislike pets in Nethack. Funny enough, I love amassing a small party of followers in Brogue and I quite like the pets in WazHack but in Nethack they just get in my way and cramp my style. When I hear people's strategies for winning, they heavily feature the pet and so I'm wondering how many people are successful (not necessarily winning but playing a respectable game) without the pet.

Cheers.

4
Player's Plaza / How do you picture ASCII based Roguelikes?
« on: July 13, 2013, 09:43:01 PM »
I've always been curious when it comes to simple graphics or in this case ASCII 'graphics', whether other people are re-envisioning what they see. The most I ever do is occasionally try to envision a hallway or room from a different perspective but I don't really overlay the simple black background and white walls with something realistic - it's more like if an ASCII Roguelike could be viewed from first person as is.

If a kobold is coming towards me then I'll actively call up the mental image of a kobold from time to time just to reinforce my sense of what I'm dealing with but I don't keep this up, it's just a brief flash from time to time.

It gets to the point where I'm so familiar with, say a < or > that as soon as one appears I know it only as a stairway; I never actually picture a stairway though.

Is this similar to your experience? If so, do you feel the intention (or experience of the creator of Rogue, let's say) is to reimagine it, akin to what box art often does for games?

Either way, I completely immerse myself in the game world - it's just that it's a simple looking world.

Pages: [1]