DoomRL > Modding
Uniques/exotics/assemblies/artifacts test
zenfur:
I'd very like to see somebody (or myself) to create a mod which adds at the beggning of the game a room filled with all those crazy and reasonable uniques/exotics/assemblies/artifacts you all (and me) suggest in ideas section (for testing matters).
I could try to handle it, but I don't have any experience with mod api. I could try to fiddle with code, but not sure if it will be availble for me.
Also modding api could be not enough, for some new effects like reflecting bullets.
For me, who seen all of the uniques and exotics in game, also built almost all assemblies (I think I didn't make cerberus armor anytime) and obtained all artifacts, current uniques are quite boring, you know...
Would you also like to see something like this? Share your opinion. I'm looking forward to possitive response ;P
Game Hunter:
I don't mind chipping in: if some people want to post ideas they'd like to see attempted in a sandbox environment, I can try to provide some insight as to how the item's unique abilities might be coded in. This would provide the additional benefit of giving us ideas on how to improve the API by including possibilities that are impossible in the current version.
I'm not actually going to code them FOR you, but I can certainly push you in the right direction. I'm kinda hoping for more sulf-sufficient modders and throwing fully-usable code at people won't turn them into that, after all.
tinyrodent:
It wouldn't be difficult to make a simple framework for this. Perhaps each weapon idea could go into its own lua file. I tried "require" and it doesn't seem to work though. According to the changelog:
--- Quote --- * Multiple lua files in a mod supported
--- End quote ---
But how is it done?
Game Hunter:
--- Quote from: tinyrodent on January 17, 2012, 10:05 ---I tried "require" and it doesn't seem to work though.
--- End quote ---
Require expects a somewhat unique pathing when it comes to files. Let's say you have a module defined as "some_mod" and you also have a file called "items.lua" that you want to include. This is what should be included in your main.lua file:
--- Code: ---require( "some_mod:items" )
--- End code ---
This is best placed immediately after the core.declare() of your module, so nothing gets forgotten. Originally in 0.9.9.4 there were issues using this function with compiled WADs, although I think it was fixed (if not 0.9.9.5 then almost surely in SVN). Running with direct source code never had problems with require(), so it should be plenty accessible.
tinyrodent:
Ok so is there any way to enumerate the source files in a mod folder? I'd like to auto-require them all so that adding a new item doesn't require modification of any of the other files.
Also, whenever I call get_position() it gives this error:
Lua error : lua\core.lua:25: attempt to index local 'self' (a nil value)
For example in a hook OnPickupCheck(thing), call thing.get_position(). Or OnCreate hook, same problem. What am I doing wrong?
EDIT: Never mind I worked around it with coord.new(thing.x,thing.y)
Navigation
[0] Message Index
[#] Next page
Go to full version