Chaosforge Forum

  • March 28, 2024, 19:24
  • Welcome, Guest
Please login or register.



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

Author Topic: Uniques/exotics/assemblies/artifacts test  (Read 23071 times)

zenfur

  • Corporal
  • *
  • Offline Offline
  • Posts: 41
  • Huh?
    • View Profile
Uniques/exotics/assemblies/artifacts test
« on: January 16, 2012, 15:17 »

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
Logged
[0.9.9.7G][20/15/10/5/1/0]
19 different medals
Hell Baron

Game Hunter

  • Programmer
  • Local Inquisitor
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1044
  • Looks like game to me.
    • View Profile
    • Channel, the Roguelike
Re: Uniques/exotics/assemblies/artifacts test
« Reply #1 on: January 17, 2012, 08:43 »

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.
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: Uniques/exotics/assemblies/artifacts test
« Reply #2 on: January 17, 2012, 10:05 »

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
But how is it done?
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: Uniques/exotics/assemblies/artifacts test
« Reply #3 on: January 17, 2012, 23:08 »

I tried "require" and it doesn't seem to work though.
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: [Select]
require( "some_mod:items" )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.
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: Uniques/exotics/assemblies/artifacts test
« Reply #4 on: January 20, 2012, 18:49 »

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)
« Last Edit: January 20, 2012, 19:04 by tinyrodent »
Logged
Arch-Vile Major

Matt_S

  • Elder
  • Major
  • *
  • *
  • Offline Offline
  • Posts: 394
  • Lost Soul
    • View Profile
Re: Uniques/exotics/assemblies/artifacts test
« Reply #5 on: January 20, 2012, 21:00 »

I only have a cursory understanding of Lua, but I think you might have to do thing:get_position() because that's the format, using the colon, where it passes objects to the function as a self parameter.
Logged

tinyrodent

  • Elder Chaos Guard
  • Second Lieutenant
  • *
  • *
  • Offline Offline
  • Posts: 188
    • View Profile
Re: Uniques/exotics/assemblies/artifacts test
« Reply #6 on: January 20, 2012, 21:37 »

Yeah you're right I figured that out after.
Logged
Arch-Vile Major

tinyrodent

  • Elder Chaos Guard
  • Second Lieutenant
  • *
  • *
  • Offline Offline
  • Posts: 188
    • View Profile
Re: Uniques/exotics/assemblies/artifacts test
« Reply #7 on: January 20, 2012, 22:48 »

EDIT: Latest version is compatible with 0.9.9.5 and 0.9.9.6 beta. More terrain types added to monster spawn area, soldier lever suppressed.


There is a schematics lying here.                                             
 You feel yanked away!                                                         
 ##############################################################################
 #
++++"?+......^^^^^^#.&&&&&..................                                #
 #
"++%"+........^^^^^#&&&&&&&...................                              #
 #
""""+..........^^^.#.&&&&&&...................                              #
 #
++"?..........^...#&&&&&&...................                               #
 #####...........#####..
&&&&.......###========###                             #
 #
\.\..............||#..&.&........###========### .                           #
 #.
\\..............||#.............###========###..                           #
 #
\\;...*...>........#.*...........===........===...                          #
 #
;;;..............!!#.............===........===...                          #
 #
;;;..............!!#.............===....@...===....                         #
 #####...........#####...........
..===........===....                         #
 #  ...............  #............
.###........###....                         #
 #
}}.}.............  #.............###........###                             #
 #
}}}}............#.............###........###                             #
 #
}}}}}......... [[[[#...........................                             #
 #
}}}}}....... [[[[[[#...........................                             #
 #
}}}}}}....   [[[[[[#  .........................                             #
 #
}}}}}}        [[[[[#     ......................                             #
 ########################################
######################################
 
Igor Savin                 Armor : none                                       
 
Health: 100% Exp:  1/0%    Weapon: pistol (2d4) [6/6]                         
 cautious                                                   
Hell's Playground 

« Last Edit: January 23, 2012, 21:01 by tinyrodent »
Logged
Arch-Vile Major

tinyrodent

  • Elder Chaos Guard
  • Second Lieutenant
  • *
  • *
  • Offline Offline
  • Posts: 188
    • View Profile
Re: Uniques/exotics/assemblies/artifacts test
« Reply #8 on: January 20, 2012, 23:00 »

Some notes about the playground mod:
  • It dynamically spawns all items in each category, so new items will appear with no code changes.
  • Similarly there is a lever dynamically created to spawn each monster type. You need Intuition 1 or 2 to see what type.
  • Items and powerups remain after pickup/use so you can grab another one.
  • There is just one new example item, a powerup which levels up the player (helps to get Intuition/Whizkid for experiments). Its source is found in levelup.lua
  • Some glitchy schematic powerups appear. There may be other items that were never intended to be spawned this way.
  • There is no PickupCheck for items, so you can grab the Dragonslayer and go nuts. ;)
I'd like to remove the hard-coded "require" and enumerate all of the source files in the mod folder but haven't heard whether this is possible...
Logged
Arch-Vile Major

Kornel Kisielewicz

  • God Hand
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 4562
    • View Profile
    • http://chaosforge.org/
Re: Uniques/exotics/assemblies/artifacts test
« Reply #9 on: January 20, 2012, 23:13 »

As for the auto-require: It's not possible and will not be possible.

Reason:
1) any functionality needs to work from in a wad and as plain files
2) os-functions (like opening files, browsing directories, I/O, etc) need to be turned off for safety reasons (this will be especially important once DoomRL works in a Unix shared environment)
Logged
at your service,
Kornel Kisielewicz

tinyrodent

  • Elder Chaos Guard
  • Second Lieutenant
  • *
  • *
  • Offline Offline
  • Posts: 188
    • View Profile
Re: Uniques/exotics/assemblies/artifacts test
« Reply #10 on: January 20, 2012, 23:15 »

Would you be willing to consider a module property which tells the engine to load all source in the module folder?
Logged
Arch-Vile Major

Kornel Kisielewicz

  • God Hand
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 4562
    • View Profile
    • http://chaosforge.org/
Re: Uniques/exotics/assemblies/artifacts test
« Reply #11 on: January 20, 2012, 23:19 »

That would require more work than it sounds. Also, in most cases the order of loading makes a difference, so it would only be reasonable for subfolders.
Logged
at your service,
Kornel Kisielewicz

Deathwind

  • Colonel
  • *
  • Offline Offline
  • Posts: 505
  • HMP Angel of Patience 0.9.9.4
    • View Profile
Re: Uniques/exotics/assemblies/artifacts test
« Reply #12 on: January 22, 2012, 16:46 »

schematics may be bugged but the backpack is coded correctly (even with text for second pickup)

minor bug, DS doesn't give it's perm zerk...

edit
bug, constant random spawning nightmare demons
bug, ammo pickups only work once, not really a problem because of the ammo cans but...
« Last Edit: January 22, 2012, 16:54 by Deathwind »
Logged
v.997 [16/5/2/0/0]

Uitë

  • Elder
  • First Sergeant
  • *
  • *
  • Offline Offline
  • Posts: 113
  • Lost Soul
    • View Profile
Re: Uniques/exotics/assemblies/artifacts test
« Reply #13 on: January 22, 2012, 16:55 »

I seem to recall that DS (and BA) was special, in that you couldn't just mod them in to experiment with how to use them.

I mean, not only doesn't it give you zerk, you can also pick it up and equip it without doing anything special.
Logged
Arch-Vile 1st Lieutenant
[26|12|6|1|0]

tinyrodent

  • Elder Chaos Guard
  • Second Lieutenant
  • *
  • *
  • Offline Offline
  • Posts: 188
    • View Profile
Re: Uniques/exotics/assemblies/artifacts test
« Reply #14 on: January 22, 2012, 17:02 »

bug, constant random spawning nightmare demons
bug, ammo pickups only work once, not really a problem because of the ammo cans but...

The demons appear to spawn as a side effect of wearing or wielding something special... ;) Whatever the case, there's no code in the playground mod to spawn them.

I'll look into the ammo issue.
Logged
Arch-Vile Major
Pages: [1] 2 3  All