Chaosforge Forum

  • March 28, 2024, 08:23
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: 1 2 3 [All]

Author Topic: Mod Ports (from older versions)  (Read 32993 times)

Game Hunter

  • Programmer
  • Local Inquisitor
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1044
  • Looks like game to me.
    • View Profile
    • Channel, the Roguelike
Mod Ports (from older versions)
« on: September 10, 2011, 21:54 »

There are a fair number of mods for DoomRL: unfortunately, almost all of them are made for versions prior to 0.9.9.4. Since I have a rudimentary knowledge of how modules work, I've taken it upon myself to update some mods to this version so that they can be played and used with "Custom Game". Below is a list of wads that I've finished so far (I've gotten permission from most of the creators; those people can ask me for the source code if they want to get at it):

Marine Base (by Battleguy)
Angel of Patience (by Simon-v) (in use by author)
Restless (by Gargulec)
Invasion (by you)
Metal Gear (source, by Simon-v)

Just dump these into your modules folder and enjoy! And also please report any bugs because they're probably related to the porting process. I just made sure that they played for a couple of minutes, not for the entire playthrough.
« Last Edit: October 25, 2011, 21:39 by Game Hunter »
Logged
I'm just a dude playing a dude disguised as another dude.

Latest LPs: Angband, Delver

Chronos

  • Corporal
  • *
  • Offline Offline
  • Posts: 54
    • View Profile
Re: Mod Ports (from older versions)
« Reply #1 on: September 11, 2011, 04:02 »

I played Marine Base a few times and so far it has worked well.
Logged
Arch-Vile Major (0.9.9.6G) [26/21/13/1/0]

Kornel Kisielewicz

  • God Hand
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 4562
    • View Profile
    • http://chaosforge.org/
Re: Mod Ports (from older versions)
« Reply #2 on: September 11, 2011, 05:02 »

\o/
Logged
at your service,
Kornel Kisielewicz

Motorheadbanger

  • Sergeant
  • *
  • Offline Offline
  • Posts: 92
    • View Profile
Re: Mod Ports (from older versions)
« Reply #3 on: September 11, 2011, 06:30 »

The only wrong thing I experienced was that when I died and was shown the post-mortem, I press Enter and blood pours down. When the blood reveals the title screen for 98%, the red shit gets stuck for a little longer at the bottom of the screen then it's supposed to.

Oh, and the 'Restless' mod just crashes and quits the game when attempting to launch it. Right after the first trait choice.
« Last Edit: September 11, 2011, 06:41 by Motorheadbanger »
Logged

Kornel Kisielewicz

  • God Hand
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 4562
    • View Profile
    • http://chaosforge.org/
Re: Mod Ports (from older versions)
« Reply #4 on: September 11, 2011, 07:29 »

The delay is normal -- DoomRL reloads all data files after a mod game.
Logged
at your service,
Kornel Kisielewicz

yaflhdztioxo

  • Programmer
  • Local Inquisitor
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 298
  • Lost Sole
    • View Profile
Re: Mod Ports (from older versions)
« Reply #5 on: September 11, 2011, 07:32 »

I really think these should be released in raw format, like the original sandbox scripts were
Logged

Simon-v

  • Composer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 272
  • Only Human
    • View Profile
    • The Life and Works of One Simon Volpert
Re: Mod Ports (from older versions)
« Reply #6 on: September 12, 2011, 08:00 »

I've looked through the code of the port and tweaked it a bit. It seems to work fine. I'm going to release an updated version eventually (a work-in-progress can be found here: http://dl.dropbox.com/u/23785083/DoomRL-Sandbox/0994/patience.module.zip. In any case, thanks for reminding me how cool (and utterly infuriating to play) this little project of mine was.
Logged

Thexare

  • Elder
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 281
  • I think I need a new favorite gun now...
    • View Profile
Re: Mod Ports (from older versions)
« Reply #7 on: September 12, 2011, 16:46 »

Oh, and the 'Restless' mod just crashes and quits the game when attempting to launch it. Right after the first trait choice.

Same. Error log follows:

Code: [Select]
----------------------------------------------------------------------
Timestamp   : 9/12/2011 18:44:55
Error level : FATAL EXCEPTION
Message     : Fatal exception encountered

An unhandled exception occurred at $0042F285 :
ELuaException : require : Module "restless.module" not found!
  $0042F285  LUA_VALKYRIE_REQUIRE,  line 162 of d:/Projects/fpcvalkyrie/src/vlua.pas
  $002554E1
  $002558A2
  $00255AC1
  $0042F6D9
  $00443AF8
  $0041F8C6
  $0041E3DA
  $004022CA

----------------------------------------------------------------------
Logged
Former Human Corporal
1/42 M, 7/60 S, 3/30 A
[ 6 / 1 / 0 / 0 / 0 ]

Game Hunter

  • Programmer
  • Local Inquisitor
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1044
  • Looks like game to me.
    • View Profile
    • Channel, the Roguelike
Re: Mod Ports (from older versions)
« Reply #8 on: September 12, 2011, 19:26 »

Sorry, I seem to have missed that report from yesterday. Apparently the require() function doesn't work very well with WAD files, even if it's fine with the raw module. A quick fix has been made, and I tested the WAD myself so it should be okay now.

Thanks for the reports.
Logged
I'm just a dude playing a dude disguised as another dude.

Latest LPs: Angband, Delver

Simon-v

  • Composer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 272
  • Only Human
    • View Profile
    • The Life and Works of One Simon Volpert
Re: Mod Ports (from older versions)
« Reply #9 on: September 13, 2011, 04:15 »

I have modified the source of Angel of Patience and posted an updated version in the relevant thread. With that, i am back to actively maintaining it again.
Logged

Ander Hammer

  • Elder
  • Major
  • *
  • *
  • Offline Offline
  • Posts: 385
  • burst laser rifle (2d10)x7 [80/80] (H1)
    • View Profile
Re: Mod Ports (from older versions)
« Reply #10 on: September 23, 2011, 06:29 »

Restless:

----------------------------------------------------------------------
Timestamp   : 9/23/2011 7:21:27
Error level : ERROR
Message     : Lua hook OnDie failed!

Hook name     : beings[resigned].OnDie
Error message : Lua error : modules\restless.module\main.lua:408: attempt to read undeclared variable min
----------------------------------------------------------------------

Still runs more or less fine, until wave 20, when things come unglued.

----------------------------------------------------------------------
Timestamp   : 9/23/2011 7:48:41
Error level : ERROR
Message     : Lua hook OnAction failed!

Hook name     : beings[darkness].OnAction
Error message : Lua error : lua\ai.lua:432: Object expected as parameter 3!
----------------------------------------------------------------------

----------------------------------------------------------------------
Timestamp   : 9/23/2011 7:54:37
Error level : ERROR
Message     : Lua hook OnTick failed!

Hook name     : affects[1].OnTick
Error message : Access violation
----------------------------------------------------------------------

----------------------------------------------------------------------
Timestamp   : 9/23/2011 7:55:29
Error level : ERROR
Message     : Lua hook OnAction failed!

Hook name     : beings[skeletons].OnAction
Error message : Access violation
----------------------------------------------------------------------


----------------------------------------------------------------------
Timestamp   : 9/23/2011 7:55:35
Error level : ERROR
Message     : Lua hook OnAction failed!

Hook name     : beings[shade].OnAction
Error message : Access violation
----------------------------------------------------------------------

----------------------------------------------------------------------
Timestamp   : 9/23/2011 7:55:36
Error level : ERROR
Message     : Lua hook OnDie failed!

Hook name     : beings[mookskeleton].OnDie
Error message : Access violation
----------------------------------------------------------------------

(tried picking up rockets and walking down stairs)
----------------------------------------------------------------------
Timestamp   : 9/23/2011 7:59:02
Error level : CRITICAL
Message     : Player action exception!

Error message : Access violation
----------------------------------------------------------------------

----------------------------------------------------------------------
Timestamp   : 9/23/2011 7:59:05
Error level : ERROR
Message     : Lua hook OnEnter failed!

Hook name     : cells[17].OnEnter
Error message : Access violation
----------------------------------------------------------------------

----------------------------------------------------------------------
Timestamp   : 9/23/2011 7:59:07
Error level : ERROR
Message     : Lua hook OnExit failed!

Hook name     : cells[17].OnExit
Error message : OnExit not found!
----------------------------------------------------------------------

----------------------------------------------------------------------
Timestamp   : 9/23/2011 7:59:11
Error level : FATAL EXCEPTION
Message     : Fatal exception encountered

An unhandled exception occurred at $004810AD :
Exception : cannot resume non-suspended coroutine
  $004810AD  TLUACONFIG__RESUME,  line 107 of d:/Projects/fpcvalkyrie/src/vluaconfig.pas
  $00488609  TPLAYER__AICONTROL,  line 1083 of src/dfplayer.pas
  $0049DE07  TBEING__ACTION,  line 649 of src/dfbeing.pas
  $0049DF6C  TBEING__CALL,  line 675 of src/dfbeing.pas
  $0041E70A  TDOOM__RUN,  line 444 of src/doombase.pas
  $004022CA  main,  line 91 of src/doomrl.pas

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

----------------------------------------------------------------------
Timestamp   : 9/23/2011 7:59:11
Error level : FATAL EXCEPTION
Message     : Fatal exception encountered

An unhandled exception occurred at $6C9A8C65 :
EAccessViolation : Access violation
  $6C9A8C65
  $6C9A3567
  $6C9A5054
  $6C9A60B3
  $6C9AFCC3
  $6C988BED
  $5C574196
  $5C57A37D
  $5C57E06B
  $5C57E20E
  $10005397
  $1001FF67
  $00482852
  $0042A193
  $0040B2E9
  $004022CA

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


Whee! A fun module, but it doesn't seem to have aged well.
« Last Edit: September 23, 2011, 07:06 by Ander Hammer »
Logged
Hell Baron Major
[25|20|11|2|0]
Quest: bronzes/silvers i guess
[Inferno] ITYTD Win

Game Hunter

  • Programmer
  • Local Inquisitor
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1044
  • Looks like game to me.
    • View Profile
    • Channel, the Roguelike
Re: Mod Ports (from older versions)
« Reply #11 on: October 04, 2011, 18:02 »

I've actually had Invasion done for some time now, but I was waiting for 'you' on permission. Since this is just the WAD file anyway, I'm going to post it.

I still haven't figured out the bug in Restless: any information regarding it (and other ports) should be sent to this thread post-haste.
Logged
I'm just a dude playing a dude disguised as another dude.

Latest LPs: Angband, Delver

Ander Hammer

  • Elder
  • Major
  • *
  • *
  • Offline Offline
  • Posts: 385
  • burst laser rifle (2d10)x7 [80/80] (H1)
    • View Profile
Re: Mod Ports (from older versions)
« Reply #12 on: October 06, 2011, 21:34 »

I'd have posted more information if I hadn't a) had zero free time the past few weeks and b) lost the computer with the error data to an as-yet-unascertained malfunction a while back.

I'll see if I can replicate it when I get a chance.
Logged
Hell Baron Major
[25|20|11|2|0]
Quest: bronzes/silvers i guess
[Inferno] ITYTD Win

Game Hunter

  • Programmer
  • Local Inquisitor
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1044
  • Looks like game to me.
    • View Profile
    • Channel, the Roguelike
Re: Mod Ports (from older versions)
« Reply #13 on: October 25, 2011, 21:39 »

Okay, the Metal Gear port is good enough to put here (see OP). For SOME reason the enemy sounds don't feel like working, and I want to resolve that at some point, but everything else is functional and you guys have been waiting long enough. (Also note that the source folder is given here because it's too ridiculous to lump all of it into a single file.) As always, report bugs as you find them. Incidentally, if you figure out how to make the sounds work (the information is in main.lua) then let me know that, too.

Quake 2 Demo and TerminatorRL should be done soon enough, and that will have taken care of all the publicly-released old mods.
Logged
I'm just a dude playing a dude disguised as another dude.

Latest LPs: Angband, Delver

Shinji_Ikari_9th

  • Elder
  • Major
  • *
  • *
  • Offline Offline
  • Posts: 375
  • Lock and load!
    • View Profile
Re: Mod Ports (from older versions)
« Reply #14 on: October 26, 2011, 00:39 »

Okay, the Metal Gear port is good enough to put here (see OP). For SOME reason the enemy sounds don't feel like working, and I want to resolve that at some point, but everything else is functional and you guys have been waiting long enough. (Also note that the source folder is given here because it's too ridiculous to lump all of it into a single file.) As always, report bugs as you find them. Incidentally, if you figure out how to make the sounds work (the information is in main.lua) then let me know that, too.

Quake 2 Demo and TerminatorRL should be done soon enough, and that will have taken care of all the publicly-released old mods.

just downloaded metal gear, and when i tried it, i was getting this error,

----------------------------------------------------------------------
Timestamp   : 10/26/2011 0:36:31
Error level : ERROR
Message     : Lua hook OnAction failed!

Hook name     : beings[scientist].OnAction
Error message : Lua error : modules\metal_gear.module\ai.lua:52: attempt to read undeclared variable interval
----------------------------------------------------------------------

just letting you know.

ps, thanks for this.
Logged
Over and Out!

Game Hunter

  • Programmer
  • Local Inquisitor
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1044
  • Looks like game to me.
    • View Profile
    • Channel, the Roguelike
Re: Mod Ports (from older versions)
« Reply #15 on: October 26, 2011, 08:45 »

just downloaded metal gear, and when i tried it, i was getting this error...
Oy, I know exactly where that problem is but I'm not really in a position to re-upload the module at the moment. I've made a quick fix to the file-in-error: replace it with the existing version in the folder and things should work.

Assuming they don't, I'll just run some extra tests when I get home and fix them then. Sorry about the mess-up.
« Last Edit: October 26, 2011, 11:37 by Game Hunter »
Logged
I'm just a dude playing a dude disguised as another dude.

Latest LPs: Angband, Delver

Shinji_Ikari_9th

  • Elder
  • Major
  • *
  • *
  • Offline Offline
  • Posts: 375
  • Lock and load!
    • View Profile
Re: Mod Ports (from older versions)
« Reply #16 on: October 26, 2011, 13:50 »

Oy, I know exactly where that problem is but I'm not really in a position to re-upload the module at the moment. I've made a quick fix to the file-in-error: replace it with the existing version in the folder and things should work.

Assuming they don't, I'll just run some extra tests when I get home and fix them then. Sorry about the mess-up.

looks like it worked
thanks
Logged
Over and Out!

Game Hunter

  • Programmer
  • Local Inquisitor
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1044
  • Looks like game to me.
    • View Profile
    • Channel, the Roguelike
Re: Mod Ports (from older versions)
« Reply #17 on: October 26, 2011, 19:19 »

Just to let everyone know, the module package has been updated with the quick fix (and a couple tiny things that HAVE been tested). Go wild!
Logged
I'm just a dude playing a dude disguised as another dude.

Latest LPs: Angband, Delver

Oski

  • Private
  • *
  • Offline Offline
  • Posts: 2
  • Lost Soul
    • View Profile
Re: Mod Ports (from older versions)
« Reply #18 on: January 05, 2012, 10:49 »

So, I've tried that ai fix for metal gear you posted and now the error messages have changed to:

----------------------------------------------------------------------
Timestamp   : 1/5/2012 17:46:24
Error level : ERROR
Message     : Lua hook OnAction failed!

Hook name     : beings[scientist].OnAction
Error message : Lua error : lua\core.lua:1000: attempt to call field '?' (a nil value)
----------------------------------------------------------------------

hope this helps somehow. Thanks for doing these and thanks to the original authors too! Any plans to change these for 995 or is that way too much work?
Logged

Game Hunter

  • Programmer
  • Local Inquisitor
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1044
  • Looks like game to me.
    • View Profile
    • Channel, the Roguelike
Re: Mod Ports (from older versions)
« Reply #19 on: January 05, 2012, 10:57 »

The AI fix shouldn't be necessary with the Metal Gear files in the OP (they were updated as mentioned in the post just before yours). If there are other errors then I suppose it's unrelated.

Thanks for doing these and thanks to the original authors too! Any plans to change these for 995 or is that way too much work?

I don't think switching to 0995 will be too hard, but it will probably require some rewrites nonetheless (if only because there are, say, easier ways to code certain things). I MIGHT have some time to do this, but I also need to try to continue progress on HereticRL, as well as developing the game itself. If others want to take a stab at updating them, be my guest: at the moment my priority is to update the Wiki's modding documentation for 0995, so it should be doable soon enough.
Logged
I'm just a dude playing a dude disguised as another dude.

Latest LPs: Angband, Delver

Oski

  • Private
  • *
  • Offline Offline
  • Posts: 2
  • Lost Soul
    • View Profile
Re: Mod Ports (from older versions)
« Reply #20 on: January 05, 2012, 11:57 »

Oh. Well in that case I'm getting the original error with the files in the OP. Don't worry about it, you've got a lot on your plate. Just wanted to let it be known in case it was helpful.
Logged

yaflhdztioxo

  • Programmer
  • Local Inquisitor
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 298
  • Lost Sole
    • View Profile
Re: Mod Ports (from older versions)
« Reply #21 on: January 05, 2012, 19:30 »

0994 -> 0995 isn't TOO bad, except that all thing prototypes must be complete--no extra fields, no omitted required fields.  Also, some field names changed.  So that's annoying.  But only a handful of API changes break code.
Logged

tinyrodent

  • Elder Chaos Guard
  • Second Lieutenant
  • *
  • *
  • Offline Offline
  • Posts: 188
    • View Profile
Re: Mod Ports (from older versions)
« Reply #22 on: January 15, 2012, 13:11 »

Can we get some detailed 9.9.5 modding info? Blank, Dead Simple, and my own experiments all crash.
Logged
Arch-Vile Major

Game Hunter

  • Programmer
  • Local Inquisitor
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1044
  • Looks like game to me.
    • View Profile
    • Channel, the Roguelike
Re: Mod Ports (from older versions)
« Reply #23 on: January 15, 2012, 14:23 »

This is a complete API changelog from the beta threads. Feel free to sort through:

Code: [Select]
* Episodic mods supported!
 * Multiple lua files in a mod supported
 * BF_BOSS sub-uses split into separate flags -- BF_SELFIMMUNE, BF_KNOCKIMMUNE, BF_HUNTER
 * Removed Generator.place_tile and Generator.set_translation -- instead, Valkyrie dungen's own
    functions are used -- you create a tile using Generator.tile_new( map, trans ) (note the reverse
    order!) and place it using Generator.tile_place( coord, tile ) (also reversed!). Note however, that
    the Level.place_tile stayed the same!
 * Removed Level.place_chunk -- as thanks to the new Generator tile API it is just 3 lines -- see the
    Archi style generator for an example.
 * Removed ui.plot_write -- use ui.plot_screen (can and should be fed with a multiline string!)
 * OnDieCheck hook added for beings and player -- return false to prevent death
 * entities now need to be properly defined (have all required fields, none extra)
 * new AI's available -- built-in AI removed
 * removed old API flags - BF_USESITEMS, BF_HUNTER, BF_DISTANCE and BF_RETALITATE
   ( BF_HUNTER and BF_OPENDOORS will be removed later!)
 * all flagSet sets for prototypes are now flag_set
 * all soundID sets for prototypes are now sound_id
 * all ammoID props now named ammo_id
 * XP -> xp, HP -> hp, minLev -> min_lev, maxLev -> max_lev, toDam ->todam, toHit -> tohit, toHitMelee -> tohitmelee
   for being prototypes
 * MAXAFFECTS raised to 12 - feel free to add your own!
 * path_next and direct_seek return a coord as a second result -- either it's the coord that has successfuly been
   moved to, or it is the coord that blocked
 * entity.id now returns a string id
 * entity.sid is invalid
 * entity id's are no longer limited to 20 chars
 * table.toset is now table.to_set
 * new table functions are now available table.toset, table.copy, table.icopy, table.merge, table.imerge,
   table.reversed -- all table copying/merging is shallow!
 * SHOTGUN_ and MISSILE_ constants are no more, id's changed to be unique. Use string id's for prototype
   definitions and shotguns[ "" ].nid/missiles[ "" ].nid for changing ingame.
 * Hooks - Challenge hook OnPowerUpCheck removed - OnPickupCheck working
   Challenge hook OnBeingCreate is now OnCreate - works on items too, so remember to check!
 * added thing:is_item() and thing:is_being() to thing API
 * Hooks - Challenge hook OnLevelEnter/OnLevelExit is now OnEnter/OnExit
 * Hooks - IsCompleted -> OnCompletedCheck
 * player:remove_affect added
 * being:quick_swap added
 * being:drop added
 * being:reload changed (will work with ammo packs and combat shotties)
 * OnAltReload *must* return a boolean (success)
 * being:alt_reload added (will work with all non-script alt-reloads, script ones will run, but will misbehave)
 * IF_NOAMMO and IF_DESTROY should now work with shotguns
 * technically a shotgun can now have ALT_CHAIN and work with Ammochain
 * beings can now dualgun and have gunkata-reload if equiped with the proper flags
 * beings use the full extent of the options that the player has when firing
 * being:fire now returns a boolean (if false, no time is used up!)
 * being:alt_fire added (be sure to use only with compatible objects!)
 * item hook OnFire and OnAltFire revesed return (true continues, false breaks)
 * challenge hook OnFire  takes (item,being)
 * Level hook OnFire(item,being) added
 * Level hook OnFired(item,being) added
 * removed LF_MELEEONLY flag, use Level.OnFire instead
 * introducing HookChains -- first such chain is Item-Level-Challenge hooks OnFire and OnFired
 * HookChains for OnPickup and OnPickupCheck and OnFirstPickup (Item-Level-Challenge)
 * OnPickup and OnPickupCheck are also executed for beings!
 * beings use the same code to pickup as the player, so could be made to pickup e.g. powerups
 * lever OnUse must return a boolean value (true)
 * being:use is a full featured use - if passed nil, will attempt to use levers
 * HookChains for OnUseCheck and OnUse (Item-Level-Challenge)
 * OnUseCheck and OnUse are also executed for beings!
 * Module Hooks added - inserted into the current HookChain - use ModuleID.HookName for any module
 * OnKill, OnKillAll and OnEnter are now chained into Level, Module, Challenge
 * OnCreate, OnDie, OnDieCheck are now chained into (Being/Item), Level, Module, Challenge
 * Module API - use OnCreateEpisode hook instead of create_episode, OnGenerate instead of generate
 * OnMortem is not used for printing (but for things to check before score finalization) use OnMortemPrint instead
 * indexing the inventory will no longer work
 * you can destroy inventory items that you iterate through - they will be removed from inventory
 * thing methods now correctly can be ran through self:
 * inventory rehaul
 * LFPERMANENT *light*flag added, now controls permanency of walls per cell
 * removed all permanent versions of cells (all starting with p)
 * OnDieCheck can be properly hijacked (add)
 * Level.play_sound for playing sound at coord added (add)

Hook info:
  OnCreate        // Being and Item -> Level, Module, Challenge, Core (Chained)
  OnAction        // Being
  OnAttacked      // Being
  OnDie           // Being, Level, Module, Challenge, Core (Chained)
  OnDieCheck      // Being, Level, Module, Challenge, Core (Chained)
  OnPickup        // Item, Level, Module, Challenge, Core (Chained)
  OnPickupCheck   // Item, Level, Module, Challenge, Core (Chained)
  OnFirstPickup   // Item, Level, Module, Challenge, Core (Chained)
  OnUse           // Item, Level, Module, Challenge, Core (Chained)
  OnUseCheck      // Item, Level, Module, Challenge, Core (Chained)
  OnAltFire       // Item
  OnAltReload     // Item
  OnEquip         // Item
  OnRemove        // Item
  OnKill          // Item (separate), Level, Module, Challenge, Core (Chained)
  OnKillAll       // Level, Module, Challenge, Core (Chained)
  OnHitBeing      // Item
  OnReload        // Item
  OnEquipTick     // Item
  OnEquipCheck    // Item
  OnEnter         // Item (separate),  Level, Module, Challenge, Core (chained)
  OnFire          // Item, Level, Module, Challenge, Core (Chained)
  OnFired         // Item, Level, Module, Challenge, Core (Chained)
  OnExit          // Level, Module, Challenge, Core (Chained)
  OnTick          // Level, Module, Challenge, Core (Chained)
  OnCompletedCheck// Level, Module, Challenge, Core (Chained)
  OnLoad          // Module, Challenge, Core (Chained)
  OnLoaded        // Module, Challenge, Core (Chained)
  OnUnLoad        // Module, Challenge, Core (Chained)
  OnCreatePlayer  // Module, Challenge, Core (Chained)
  OnLevelUp       // Module, Challenge, Core (Chained)
  OnPreLevelUp    // Module, Challenge, Core (Chained)
  OnWinGame       // Module, Challenge, Core (Chained)
  OnMortem        // Module, Challenge, Core (Chained)
  OnMortemPrint   // Module, Challenge, Core (Chained)
  OnCreateEpisode // Module, Challenge, Core (Chained)
  OnLoadBase      // Module, Challenge, Core (Chained)
  OnIntro         // Module, Challenge, Core (Chained)
  OnLogo          // Module, Challenge, Core (Chained)
  OnGenerate      // Module, Challenge, Core (Chained)

Module hooks are dependant on module type:
  Total conversion -- all hooks
  Episode          -- all hooks except OnLoadBase and OnLogo
  Single           -- all hooks except OnCreateEpisode, OnLoadBase and OnLogo

Off the top of my head, the most important changes for mod conversion involve a few definition changes for existing functions and some changed prototype field names. Basically this stuff (all of which is in the above changelog, so you aren't confused):
  • BF_BOSS sub-uses split into separate flags -- BF_SELFIMMUNE, BF_KNOCKIMMUNE, BF_HUNTER
  • Removed Generator.place_tile and Generator.set_translation -- instead, Valkyrie dungen's own functions are used -- you create a tile using Generator.tile_new( map, trans ) (note the reverse order!) and place it using Generator.tile_place( coord, tile ) (also reversed!). Note however, that the Level.place_tile stayed the same!
  • Removed Level.place_chunk -- as thanks to the new Generator tile API it is just 3 lines.
  • Removed ui.plot_write -- use ui.plot_screen (can and should be fed with a multiline string!)
  • removed old API flags - BF_USESITEMS, BF_HUNTER, BF_DISTANCE and BF_RETALITATE ( BF_HUNTER and BF_OPENDOORS will be removed later!)
  • all flagSet sets for prototypes are now flag_set
  • all soundID sets for prototypes are now sound_id
  • all ammoID props now named ammo_id
  • XP -> xp, HP -> hp, minLev -> min_lev, maxLev -> max_lev, toDam ->todam, toHit -> tohit, toHitMelee -> tohitmelee for being prototypes
  • entity.id now returns a string id
  • entity.sid is invalid
  • table.toset is now table.to_set
  • SHOTGUN_ and MISSILE_ constants are no more, id's changed to be unique. Use string id's for prototype definitions and shotguns[ "" ].nid/missiles[ "" ].nid for changing ingame.
Logged
I'm just a dude playing a dude disguised as another dude.

Latest LPs: Angband, Delver

tinyrodent

  • Elder Chaos Guard
  • Second Lieutenant
  • *
  • *
  • Offline Offline
  • Posts: 188
    • View Profile
Re: Mod Ports (from older versions)
« Reply #24 on: January 15, 2012, 17:20 »

Thanks that's all useful information, but didn't really help to solve the problem. With further experimentation I found that Level.fill and Level.place_tile both cause crash. If I comment those out, I can get a bare bones "single" mod to run without crashing. The fill function is not mentioned in the change log, and for the other it says:
Quote
Note however, that the Level.place_tile stayed the same!
Logged
Arch-Vile Major

Game Hunter

  • Programmer
  • Local Inquisitor
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1044
  • Looks like game to me.
    • View Profile
    • Channel, the Roguelike
Re: Mod Ports (from older versions)
« Reply #25 on: January 15, 2012, 17:41 »

With further experimentation I found that Level.fill and Level.place_tile both cause crash.
I think I know the problem: permanent cell tiles have been removed. There are some ways to set permanence to cells separately which allows for fewer cells to be loaded. You probably have some "pwall"s or "prwall"s in your code, which no longer exist. Replacing these with "wall" or "rwall" (respectively) should take care of the problem. (The only exception to this are fluids: "pwater", "pacid", and "plava" still exist because they're normally passable, so they act differently from cells with CF_BLOCKMOVE.)

If you want to set a cell to be permanent, there are two ways to do this. (Just as a reminder, a permanent cell is one that cannot be destroyed except by nukes.) The first involves setting them to be permanent at creation:
Code: [Select]
Create = function()
  ....
  local translation = {
    ["#"] = {"wall", flags = {LFPERMANENT} },
    ....
  }
  ....
}
This will make any #s you place on the map a permanent wall cell. The second method is done after the map is created:
Code: [Select]
Generator.set_permanence( area )
This will make any cells within the area permanent. Usually it's used if you're planning on making the map static (i.e., no wall-busting) and can be placed alongside the Level.player() function. Of course, you can set a cell to be permanent when you create it, but this is typically done by setting the armor and hp of the cell to zero.

Hope this helps!
« Last Edit: January 15, 2012, 17:43 by Game Hunter »
Logged
I'm just a dude playing a dude disguised as another dude.

Latest LPs: Angband, Delver

tinyrodent

  • Elder Chaos Guard
  • Second Lieutenant
  • *
  • *
  • Offline Offline
  • Posts: 188
    • View Profile
Re: Mod Ports (from older versions)
« Reply #26 on: January 15, 2012, 17:50 »

Thanks again, yes pwall was the problem.
Logged
Arch-Vile Major

tinyrodent

  • Elder Chaos Guard
  • Second Lieutenant
  • *
  • *
  • Offline Offline
  • Posts: 188
    • View Profile
Re: Mod Ports (from older versions)
« Reply #27 on: January 16, 2012, 09:09 »

But there are surely many more compatibility problems. I tried to make a simple example lever (source below) but this crashes when Level.place_tile is called: Lua error : lua\level.lua:348: attempt to index field '?' (a nil value)

Is there any particular reason that the lua sources of DoomRL (such as level.lua) need to be closed?

Code: [Select]
Items {
id = "lever_win",
name = "lever",
color = MAGENTA,
color_id = "lever",
sprite = 169,
weight = 0,
type = ITEMTYPE_LEVER,
good = "asdf",
desc = "asdf",
flags = { IF_NODESTROY },
OnUse = function(self,being)
player:win()
end,
}

Logged
Arch-Vile Major

Game Hunter

  • Programmer
  • Local Inquisitor
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1044
  • Looks like game to me.
    • View Profile
    • Channel, the Roguelike
Re: Mod Ports (from older versions)
« Reply #28 on: January 16, 2012, 09:44 »

I tried to make a simple example lever (source below) but this crashes when Level.place_tile is called: Lua error : lua\level.lua:348: attempt to index field '?' (a nil value)
This sort of error (that is, a level.lua crash due to bad indexing) is almost always because a tile has been used on the "map" without being added to the "translation". Since you've probably at least attempted to do this correctly, my guess is that your notation is off. Here are some examples for tile translations using items and beings:
Code: [Select]
local translation = {
  ["#"] = "wall",                                        -- tile with cell by itself
  ["}"] = { "floor", item = "pistol" }                   -- tile with cell and item
  ["h"] = { "floor", being = "former" }                  -- tile with cell and being
  ["U"] = { "floor", being = "former", item = "pistol" } -- tile with cell, being, and item
}
You can find this sort information in the tutorial Constructing a Map (it's not in the step-by-step but it exists on the review source). I still need to update it for stuff like definition and field changes, but the overall process for setting up maps is virtually unchanged. (I will spend some time this week to update the tutorials for 0995, possibly write a few more now that modders can setup entire episodes.)

Is there any particular reason that the lua sources of DoomRL (such as level.lua) need to be closed?
You'll have to wait for Kornel to reply on this one.
« Last Edit: January 20, 2012, 13:41 by Game Hunter »
Logged
I'm just a dude playing a dude disguised as another dude.

Latest LPs: Angband, Delver

tinyrodent

  • Elder Chaos Guard
  • Second Lieutenant
  • *
  • *
  • Offline Offline
  • Posts: 188
    • View Profile
Re: Mod Ports (from older versions)
« Reply #29 on: January 16, 2012, 10:18 »

Thanks I got it working sort of. :)
Logged
Arch-Vile Major

Kornel Kisielewicz

  • God Hand
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 4562
    • View Profile
    • http://chaosforge.org/
Re: Mod Ports (from older versions)
« Reply #30 on: March 19, 2012, 00:57 »

They're semi-closed -- once total conversions are possible, I'll open most of it.

And in some time (more than a year though) I'll open the full source code -- GPL'd.
Logged
at your service,
Kornel Kisielewicz

mcz117chief

  • Elder
  • Corporal
  • *
  • *
  • Offline Offline
  • Posts: 52
  • Eternal warrior
    • View Profile
Re: Mod Ports (from older versions)
« Reply #31 on: November 05, 2012, 14:13 »

I played the infinite arena. It is awesome, only problem I have is when the game ends it always crashes.
Logged

thelaptop

  • Chaos Fanatic!
  • Grand Inquisitor
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 2530
    • View Profile
Re: Mod Ports (from older versions)
« Reply #32 on: December 13, 2012, 11:24 »

Did I forget to sticky this?  Damn.
Logged
I computed, therefore I was.

GinDiamond

  • First Sergeant
  • *
  • Offline Offline
  • Posts: 129
  • Warrant Officer-Mancubus, trying to get all Bronze
    • View Profile
    • GinDiamond Stuff
Re: Mod Ports (from older versions)
« Reply #33 on: March 23, 2013, 14:04 »

Will Inferno be ported?

Oh, and how has modding changed? We need a new modding wiki!
Logged
Do not muddle in the affairs of Dragons, for thou art crunchy and taste good with ketchup.

tehtmi

  • Programmer
  • Local Inquisitor
  • Lieutenant Colonel
  • *
  • *
  • Offline Offline
  • Posts: 458
    • View Profile
Re: Mod Ports (from older versions)
« Reply #34 on: March 23, 2013, 17:29 »

Inferno will be ported.  I did got it mostly running during the beta, but that was before the level generation (which inferno uses in very fragile ways) was revamped, so there is more work to do.  My current guess is that I can get it out in mid-April maybe.
Logged

shark20061

  • Programmer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 266
    • View Profile
Re: Mod Ports (from older versions)
« Reply #35 on: March 23, 2013, 18:38 »

I'll help with porting if you'd like.
Logged
Hell Knight Warrant Officer (0.9.9.4)  [26!/8/3/1/0]

Mancubus 2nd Lieutenant (0.9.9.6)  [22/12/3/0/0]
M:16 S:43 (126) A:17

GinDiamond

  • First Sergeant
  • *
  • Offline Offline
  • Posts: 129
  • Warrant Officer-Mancubus, trying to get all Bronze
    • View Profile
    • GinDiamond Stuff
Re: Mod Ports (from older versions)
« Reply #36 on: March 25, 2013, 11:32 »

We also need a new modding tutorial on the wiki.
Logged
Do not muddle in the affairs of Dragons, for thou art crunchy and taste good with ketchup.

shark20061

  • Programmer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 266
    • View Profile
Re: Mod Ports (from older versions)
« Reply #37 on: March 25, 2013, 13:24 »

I'd also gladly help write it IF I had source access...
Logged
Hell Knight Warrant Officer (0.9.9.4)  [26!/8/3/1/0]

Mancubus 2nd Lieutenant (0.9.9.6)  [22/12/3/0/0]
M:16 S:43 (126) A:17

GinDiamond

  • First Sergeant
  • *
  • Offline Offline
  • Posts: 129
  • Warrant Officer-Mancubus, trying to get all Bronze
    • View Profile
    • GinDiamond Stuff
Re: Mod Ports (from older versions)
« Reply #38 on: March 25, 2013, 17:44 »

Source access? For what?
Logged
Do not muddle in the affairs of Dragons, for thou art crunchy and taste good with ketchup.

shark20061

  • Programmer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 266
    • View Profile
Re: Mod Ports (from older versions)
« Reply #39 on: March 25, 2013, 17:50 »

Because that will save me from having to ask a lot of questions.  Like I do now.
Logged
Hell Knight Warrant Officer (0.9.9.4)  [26!/8/3/1/0]

Mancubus 2nd Lieutenant (0.9.9.6)  [22/12/3/0/0]
M:16 S:43 (126) A:17
Pages: 1 2 3 [All]