Closed Toothspit closed 7 years ago
I'm working on it. I'm kinda waiting for my first PR to be merged before moving on to the rest. Now I know what I'm doing, more or less, single tile buildings won't take more than 2 or 3 hours each.
The major PITA is multiple tile overmaps and its savegame compatibility.
we would have to make a separate issue for each mapgen function to be JSONified to preserve credit for the bounty
Sounds fine to me. Those specials are huge - for example, prison is over 1k lines.
Yup, multiple issues and then probably a project to associate them all. It's the same thing that was done for the Z-index feature.
There are only 16 buildings left in the mapgen_functions.cpp save for specials like sewer, roads, subways, rivers, caves, etc.
More is in mapgen.cpp:
Buildings with computers cannot be jsonized until #20770 will be merged.
Some of the buildings (like mil_surplus
) are generated in random sizes - it is not possible to directly reimplement them in json now, but probably lua_mapgen
can be used.
@ZhilkinSerg yeah, I'd noticed that! Do we feel that it's good to keep those randomly generated buildings, or should we transition them to static JSON structures?
Doing so would mean we lose out on the dynamic nature that the current hardcoded implementation brings, but we'd have a much more manageable (and standardized) codebase as a result.
The big one is going to be the lab. Individual rooms won't be hard, but I'm not even sure how, or even if, the current JSON format can put it together correctly.
Example of lua mapgen: https://www.dropbox.com/s/pm8rpd1bhkhu9f5/cdda_lua_mapgen_example.zip?dl=0
Replaces dojo
building with lua-generated house.
Also see http://smf.cataclysmdda.com/index.php?topic=14258.0.
Do note https://github.com/CleverRaven/Cataclysm-DDA/issues/20819, though.
We probably won't want to move map generation to be dependent on tech that's being sunsetted.
I guess LUA won't be removed if it will be actually used.
mil_surplus
mapgen in LUA: https://www.dropbox.com/s/3gn2p4sgmt5gdmz/cdda_mapgen_mil_surplus.zip?dl=0
Please don't afraid excess amount of loot - i didn't add check for loot spawn chances yet.
I guess LUA won't be removed if it will be actually used.
Incorrect, there is still not a compelling case for LUA, and I don't intend to accept any new LUA functionality.
A note on the mapgen/bountysource issue. One, you probably do need to post separate bounties on separate chunks of mapgen.
Four overmaps converted to LUA - https://www.dropbox.com/s/rlgitvrk9hoo49r/cdda_lua_mapgen_v2.zip?dl=0:
s_pharm
s_sports
mil_surplus
sub_station
LUA mapgen has major drawback - it seems that lua-generated buildings aren't automatically rotated. There is possibly a workaround with using overmap_specials.json
, but I didn't find it yet.
EDIT: Actually is is possible - see #21738.
Question seems to have been answered, closing.
Came up in IRC, probably not the first time. We want to post a big ol' fat bounty on JSONifying some of mapgen_functions, but aren't sure on the best way to go about it. There also aren't, to my knowledge, any issues for a JSONification PR to close. And if I can be real for second, those mapgen functions are godawful to read when you're trying to do something like #21192.
This issue is merely to establish consensus on how to handle bounties for projects like this: since Bountysource doesn't appear to support Github's
-[ ]
task lists nor Projects, we would have to make a separate issue for each mapgen function to be JSONified to preserve credit for the bounty. Is this acceptable, or is there a better method we didn't know about?