spelunky-fyi / Playlunky

Extended Mod Management for Spelunky 2 via dll injection
MIT License
14 stars 8 forks source link

Feature Suggestions & Backlog #13

Open Malacath-92 opened 3 years ago

Malacath-92 commented 3 years ago

This is just a rough backlog on what would be interesting to look at, it's not a guarantee that any of this makes it into Playlunky. The list is in order of priority. Please comment here if you have any other suggestion for features. As soon as someone decides to work on one they should open a separate issue for it and probably make a feature branch, you know, git etiquette.. The list is written from a developer perspective, so might not make sense to a user. Some points might be more fitting for the game-api or meta, but fret not, this is just a random list so it's allowed to contain illogical stuff.

In Review:

Done:

gmjosack commented 3 years ago

Pet menu added to pet entity sheets

Mr-Auto commented 3 years ago

"Option to block saving the game to savegame.sav" wouldn't be easier just to make copy of the savefile at the start and then replace it after finish, i guess it depends what this point actually means.

Suggestion: can we look on how the entities are controlled? we can see button presses in movable, but can't force them, is it just a read only and the controls are done differently? there is also the whole logic of they behavior

Malacath-92 commented 3 years ago

@Mr-Auto: It sounds sensible but that's not possible. There's no guarantee that the game shuts down cleanly, so if that doesn't happen we can't copy back the save data. It's also just much cleaner and more accurate to the intent to just not write to the save file as opposed to moving files. The intent is to let people play the game with mods without unlocking new things, some people might not want to unlock stuff while having mods that make the game easier for example.

Regarding your second point I don't know much. Only for HH and the Player I have some idea, but I never even looked at the buttons field of other entities.

C-ffeeStain commented 3 years ago

Could we please get "community rules" like we have "community tilecodes"?

Malacath-92 commented 3 years ago

@C-ffeeStain could you share some links or explanations around what "community rules" would mean, how they would work and even what "vanilla rules" are doing right now?

gmjosack commented 3 years ago

Custom Level Improvements

Custom Generation

Currently a level will use specific templates depending on the type of level generation. For example 1-1 will never look for and use setroom templates as it expects to be procedurally generated. It would be nice if possible to tell a level to use setrooms for creators who want to build a non-procedural level.

Custom Level Files

To expand on the previous section, currently we have very limited ability to override an area per level. There are some areas that get custom overrides like jungle has blackmarket, tidepool has lake and lakeoffire, etc. dwelling for example doesn't have any overrides other than 1-4. If someone wanted to build a non-procedural experience for dwelling they'd end up with the same level played 3 times. It would be nice if we had some possibility of override per level within an area to support different setrooms for levels 1,2,3,4, etc. We might want to allow this to be dynamic for example if someone wanted to build a longer dwelling mod. (dwelling is just being used as an example here, this applies to all areas)

Expanded Rules

Currently 1/N spawns for traps and monsters are hard coded per area. e.g. you can only do a percentage spawn of moles in dwelling or 1/N spawn. Expanding support for all monsters/traps to have percentage based spawn rules in all areas would be helpful.

C-ffeeStain commented 3 years ago

also, it would be nice if when we get the community rules, if we could define the spawn conditions such as

rule_spawn_condition(function (x, y, layer)
  if get_entities_at(x+1, ...) == {} then -- if nothing to the right of this tile
    spawn_entity(ENT_TYPE.MONS_SNAKE, ...) -- spawn the snake
  end
end, "snake") -- would override default game rule handling for rule \+snake
Malacath-92 commented 3 years ago

@C-ffeeStain I would imagine the interface for the procedural spawns to be the same as it is for tile codes, so exposing a set_pre_procedural_spawn and a set_post_procedural_spawn. We'll see how that pans out, if it is possible or not.

Dregu commented 3 years ago

Manually updating decorations on newly spawned blocky floor tiles etc. would be sweet!

Mr-Auto commented 3 years ago

can we get: get_heart_color is_female set_heart_color for characters that are not in the current level? maybe as entityDB functions?

Autumnagnificent commented 3 years ago

Using custom .lvl files Maybe New worlds/themes

gmjosack commented 3 years ago

Might be neat to specify the full level file hierarchy so you could say

["generic.lvl", "custom-level.lvl"]

or any other hierarchy you want

Mr-Auto commented 3 years ago

sound callback giving you entity that produced the sound, and position also ability to set position for sound you start, so the game handles the volume correctly

Dregu commented 3 years ago

A proper detoured callback for the current ON.LOADING stuff and/or something that runs right after the prng is initialized with a new seed.

Mr-Auto commented 2 years ago

Changing constellation names

this is done with the strings functions, unless you want to make special function for it or not overwrite when language change

gmjosack commented 2 years ago

Composable dmpreview.tok

dmpreview.tok provides the previews for arena levels in the menus:

image

Now that we understand the format for dmpreview.tok it'd be neat to try to auto generate and update the dmpreview.tok for any arena files included in a mod.

and/or

provide a more composable format such as dm1-1.preview that contains the byte preview for only a single level.

Malacath-92 commented 2 years ago

Do we understand just the format or also how the game uses it? For example, is it possible to add new arena levels there (and for arena in general)?

gmjosack commented 2 years ago

The game only uses these to display a preview of the level and is orthogonal to the level files themselves. Currently the game just has 40 hard coded arenas and this file has the previews for all 40 arenas. People like to make arena packs but the previews don't get updated currently. Now that we know the format we have a few options. I could write something to just generate these and people could ship it with their mods but it loses composability. It might be annoying to rewrite the level parser for playlunky so another option is individual preview files I could make a tool to make them from modlunky easily and playlunky just merges them.

Malacath-92 commented 2 years ago

Maybe we don't have to rewrite the level file parser, maybe we can load the level in-engine and pull all data we need from there. I'd have to look into how likely that is to work (or not work I guess) and if it does we can auto-generate these in Playlunky. Otherwise something mergeable as you suggest would be rather simple as well and it would most likely produce faster results.

Now that we talk about this though I'm curious as well whether we could load more than those 40 level files.

gmjosack commented 2 years ago

One thing I did learn this morning is there is a lot of space for adding your own symbols as well so I wonder if we wouldn't want to leave open the option for people to make their own previews with additional symbols which makes me think having something merge-able would be good regardless, with a stretch goal for automating previews if no custom one is provided.