Open Dregu opened 3 years ago
Thank you for all your work, Dregu!
I don't know anything about Lua scripts, what kinds of things could we use them for in Spelunky2? Just off the bat, it would be cool if we could load in enemies and traps that are not in the level editor. This would require integrating more tightly with the editor.
I think the Lua API should allow access to primitive drawing using imgui (line, text, etc). Or maybe even simpler, just a boolean to toggle showing an entity's hitbox.
An enum for search flags would be a great addition, especially since it's entirely reliant on your memorization skills right now
Can we also get event's on_entity_spawn with uid as argument (ideally run before the item is drawn on screen), on_entity_kill or before_entity_kill with uid, actually why events never have arguments? can they have them even? like on_level giving you a level number, on_win giving info what win it is etc.
Currently, spawning LIQUID_*
entities with spawn_entity()
results in a crash. A fix for this or a workaround would be appreciated.
Another related topic; having increased liquid pools for areas in which liquid is problematic would be useful.
For instance, currently on olmec, any liquid other than LIQUID_STAGNANT_LAVA
won't work.
Some things that would be nice to have:
hopefully shouldn't be too hard to implement :p
@0novo for the ai_state aka move_state there are different numbers used in different ways, some are common like idle, attack, but other like 11 is caveman sleep and 5 when he blinks the eyes + even some between for a split second, i would be hard to name them properly
There may be certain scripting scenarios involving entrances and exits that are more elaborate than simply manipulating the LOGIC_DOOR
entities created from level generation. For instance, entities spawned upon starting a level (spelunkers, the starting torch on dark levels, the skull/pot that spawns by the entrance) do not spawn during the set_post_tile_code_callback()
phase while LOGIC_DOOR
and its associated entities do. Since this is the case, we are unable to define a spelunker's spawn location at this stage of level generation.
Below are some exit/entrance related requested variables:
Upon death with the Ankh equipped, you respawn at the entrance door (with the exception of Hundun's Hideaway, where it's the exit)
When wanted by an npc, it spawns in an aggroed state at the exit doors (or Tun's specific cases, such as the entrance door 30 seconds into a level and the Sunken City ship door).
When the compass is equipped, the arrow points towards the exit door(s) (or the mothership entrance when the alien compass is equipped)
* When the compass is equipped, the arrow points towards the exit door(s) (or the mothership entrance when the alien compass is equipped)
compass works by attaching ENT_TYPE_FX_COMPASS
to the LOGIC_DOOR
, you can just kill it and attach it to whatever you want, same with alien compass = ENT_TYPE_FX_SPECIALCOMPASS
About the player spawn, ankh and tun, there is spawn_x/spawn_y in the plugin in LevelGen, you just need someone to expose them to lua. Oh also the hundun ankh spawn is door1_x/door1_y in exit_door_locations in the same place as the spawn
Order of options can we get some way to manipulate order of options made with register_option ?
can we get some way to manipulate order of options made with register_option ?
They are in alphabetical order based on the key. Might not be the ideal way to order them, but at least it is a way to do it.
We can now define our own chance-determined procedural spawns; Now allow us to define unique guaranteed procedural spawns.
For example, spawning the locked chest in a random part of the level, the same way the golden key spawns.
is_valid
function that define_procedural_spawn
uses.lvl
filesCurrently in terms of shop definitions, we are limited to defining a custom room template type as a shop and to changing what type of shop spawns in a level. Allow us to specify what shop type is spawned for our custom shop-type room templates.
For example, creating a level with multiple custom shop-type room templates and assigning them a variety of shop types, such as a general store, clothing shop, hired hand shop, and dice shop.
Overlunky has an udp sockets feature - I think it's a good idea to add support for tcpsocket
According to JayTheBusinessGoose, state.logic_volcana has something to do with how magmar spawns are set. Expose this to the API so we can define the spots that magmars can spawn from.
A bonus would be allowing magmar spawns to be set and work in other themes, such as Temple, the City Of Gold, or Olmec.
Our mod changes textures via script that need to be normal mapped.
Feel free to dump your ideas and required functions for the Lua scripting API here.