Author Topic: Anyone familiar with Lua and DoomRL?  (Read 4895 times)

Legend

  • Rogueliker
  • ***
  • Posts: 656
  • Karma: +0/-0
    • View Profile
    • Email
Anyone familiar with Lua and DoomRL?
« on: April 28, 2014, 05:54:34 PM »
Sorry if this is the wrong place to post. It seemed like the most reasonable.

Anyways, not really a programming question, but seems relevent. I was finally getting around to trying doomrl v997 but it keeps crashing on startup because of a script I added to the config files to play music randomly on each level. This script worked just fine in the previous v996 of doomrl. 

I already tried posting a thread over on the doomrl forums and sent a couple pm's to game hunter who helped me with the script in the first place. Unfortunately, I have still gotten no replies. So I thought I may try here.

Here is a link to the thread which shows the script I am using and the error log I get:

http://forum.chaosforge.org/index.php/topic,7086.0.html

I figured someone here might be familiar with lua and doomrl. I really have no knowledge of lua scripting and simply got the script from piecing together what game hunter showed me. Unfortunately I have not been able to get hold of him.

I just can't stand playing with the same music tracks playing over and over again on the same exact levels anymore. Which is why I switched them out for the more ambient psx/d64 tracks and also set up to play randomly each time I start the game.

Anyways, thanks for any help anyone can provide and sorry again if this is in the wrong area.

Quendus

  • Rogueliker
  • ***
  • Posts: 447
  • Karma: +0/-0
  • $@ \in \{1,W\} \times \{1,H\}$
    • View Profile
    • Klein Roguelikes
Re: Anyone familiar with Lua and DoomRL?
« Reply #1 on: April 28, 2014, 08:33:31 PM »
It's not a solution, but I would be inclined to just make a playlist in my usual music player. It would lose the ability to automatically change tracks when entering a new level, and possibly break immersion when you interact with it, but on the other hand you'd have something that's more intuitive than a Lua script and doesn't crash.

Rickton

  • Rogueliker
  • ***
  • Posts: 215
  • Karma: +0/-0
    • View Profile
    • Weirdfellows
Re: Anyone familiar with Lua and DoomRL?
« Reply #2 on: April 28, 2014, 11:54:38 PM »
You need to put commas after the new tracks in reg_playlist and spec_playlist.
« Last Edit: April 29, 2014, 12:03:38 AM by Rickton »
Creator of the 7DRL Possession: Escape from the Nether Regions
And its sequel, simply titled Possession

Legend

  • Rogueliker
  • ***
  • Posts: 656
  • Karma: +0/-0
    • View Profile
    • Email
Re: Anyone familiar with Lua and DoomRL?
« Reply #3 on: April 29, 2014, 12:57:38 AM »
You need to put commas after the new tracks in reg_playlist and spec_playlist.

Thanks.

Well, I feel lame now.  :P

I added the missing commas. But got a new error now.  :(

Code: [Select]
----------------------------------------------------------------------

----------------------------------------------------------------------
Timestamp   : 4/28/2014 17:55:03
Error level : FATAL EXCEPTION
Message     : Fatal exception encountered

An unhandled exception occurred at $004B1963 :
ELuaException : EntryFeed(Music) target not a table!
  $004B1963  TLUACONFIG__ENTRYFEED,  line 156 of e:/Projects/fpcvalkyrie/src/vluaconfig.pas
  $0042D18F  TDOOMIO__CONFIGURE,  line 327 of src/doomio.pas
  $0041E8BC  TDOOM__LOAD,  line 142 of src/doombase.pas
  $0041F059  TDOOM__RUN,  line 259 of src/doombase.pas
  $00401CC5  main,  line 111 of src/doomrl.pas

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

Legend

  • Rogueliker
  • ***
  • Posts: 656
  • Karma: +0/-0
    • View Profile
    • Email
Re: Anyone familiar with Lua and DoomRL?
« Reply #4 on: April 29, 2014, 03:34:50 AM »
Ok. I feel extra super lame now!  :-[   :'(   :-\   :o

The last error I got was because I somehow removed the actual table from the .lua.  I put it back and it seems to work now.

Thanks Rickton for pointing out my mistake.

*face-palm!  (-‸ლ)   :-[
« Last Edit: April 29, 2014, 03:45:13 AM by Legend »

guest509

  • Guest
Re: Anyone familiar with Lua and DoomRL?
« Reply #5 on: May 21, 2014, 02:29:31 AM »
Victory!

That's a damn good idea Legend.

My dream-never-to-be-built Roguelike will have this feature.

Legend

  • Rogueliker
  • ***
  • Posts: 656
  • Karma: +0/-0
    • View Profile
    • Email
Re: Anyone familiar with Lua and DoomRL?
« Reply #6 on: May 27, 2014, 05:38:18 AM »
Victory!

That's a damn good idea Legend.

My dream-never-to-be-built Roguelike will have this feature.

What feature? The random music?  Or the feature of some idjit overlooking simple things and making a thread  wondering why it doesn't work so the world can see his lameness?  :P

Kimchi

  • Newcomer
  • Posts: 13
  • Karma: +0/-0
    • View Profile
    • Email
Re: Anyone familiar with Lua and DoomRL?
« Reply #7 on: May 27, 2014, 04:32:13 PM »
Eh... don't worry too much about the lameness, Legend. It's actually something like a right of passage. Every programmer has his epic tale of the "semicolon that got away". Or better yet, think about it this way: You are now among the select few on this earth who can joke about the "totally obvious" arcane detail that you missed when the vast majority of humanity can't tell code from crok! :D