DoomRL > Modding
Mod Ports (from older versions)
Oski:
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.
yaflhdztioxo:
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.
tinyrodent:
Can we get some detailed 9.9.5 modding info? Blank, Dead Simple, and my own experiments all crash.
Game Hunter:
This is a complete API changelog from the beta threads. Feel free to sort through:
--- Code: --- * 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
--- End code ---
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.
tinyrodent:
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!
--- End quote ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version