Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upList of hard-coded mapgen functions to be moved to JSON #21824
Comments
ZhilkinSerg
changed the title
List of mapgen function to be moved to JSON
List of hard-coded mapgen functions to be moved to JSON
Sep 9, 2017
Night-Pryanik
added
Mapgen
Organization
labels
Sep 9, 2017
This comment has been minimized.
This comment has been minimized.
These all make heavy use of randomization as implemented now. It will be next to impossible to duplicate their current functionality in JSON.
I'm assuming this is the military outpost, in which case, it also uses a lot of random layouts, though it often generates very poorly and a more static layout is probably more desirable. |
This comment has been minimized.
This comment has been minimized.
|
I could help with the randomization, but I'd need to know how should the interface look like to be usable. |
This comment has been minimized.
This comment has been minimized.
Thanks. Can you talk @kevingranade out of axing LUA? ;) Seriously, that is the only way to keep random stuff in its current state when moving it out of hardcode. If you look through the hardcoded mapgen code most of random stuff is:
It is very easy to transfer most of such code from Also |
This comment has been minimized.
This comment has been minimized.
There was very good approach for random layouts of overmap specials in Mansion Upgrade Project. I believe we can use it for |
This comment has been minimized.
This comment has been minimized.
|
It should be possible to easily recreate a lot of the random aspects, at least of the FEMA camp and mansion by simply using alternate omts in the special definitions for them. So, instead of following the fema_entrance/fema pattern, follow the school_1_1, school_1_2, school_1_3 etc. pattern, and having multiple mapgens for each of the _1_1, _1_2 variants, and just ensuring that the linkages to adjacent overmaps always line up. |
This comment has been minimized.
This comment has been minimized.
Yes, the only issue here is editing maps to fix linking to adjacent tiles. |
This comment has been minimized.
This comment has been minimized.
I tried to rez that branch a little while back and never really made any major progress with it, my notes on it are still up though, vache#15 |
kevingranade
referenced
this issue
Sep 19, 2017
SunshineDistillery
referenced this issue
Nov 6, 2017
Merged
[WIP] Example buildings to be JSONized #22366
This comment has been minimized.
This comment has been minimized.
|
No recent progress, and issue scope is over-large. |
kevingranade
closed this
Jan 3, 2018
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Moved progress tracking to https://discourse.cataclysmdda.org/t/14736 |
ZhilkinSerg commentedSep 9, 2017
•
edited
There are a lot of hardcoded mapgen functions still in the code which should be moved out of CPP to JSON (or LUA):
map::drawfunction in mapgen.cpp.This issue is aimed to track what functions are left to be jsonized.
Randomization can be implemented in LUA right now, but it is not an option for non-LUA builds.
Merged (as of 2018-01-05):
bank- #21823 (some randomness was dropped);lmoe- #21822;radio_tower- #21834 (some randomness was dropped);sub_station- #21836 (some randomness was dropped);church_gothic- #21217;church_new_england- #21217;office_doctor- #21217;prison- #21211;hospital,hospital_entrance- #22543.To be merged (as of 2018-01-05):
fema,fema_entrance- #22366 (added as mod for easy testing, subsequently need changes to cpp, also need to be mainlined if overmap terrains are used as start locations and/or in quest chains);megastore,megastore_entrance- #22366 (added as mod for easy testing, subsequently need changes to cpp, also need to be mainlined if overmap terrains are used as start locations and/or in quest chains);silo,silo_finale- #22366 (added as mod for easy testing, subsequently need changes to cpp, also need to be mainlined if overmap terrains are used as start locations and/or in quest chains).Not ready (possibly need randomization in JSON):
haz_sar,haz_sar_b1,haz_sar_entrance,haz_sar_entrance_b1;mansion,mansion_entrance;office_tower_1,office_tower_1_entrance,office_tower_b,office_tower_b_entrance;outpost;parking_lot;police;sewage_treatment,sewage_treatment_hub,sewage_treatment_under;shelter_under;spiral,spiral_hub;station_radio;temple,temple_finale,temple_stairs;toxic_dump.Not ready (most certainly need randomization in JSON)
mil_surplus;pawn;s_gas;s_pharm;s_sports.Should be left in code (and probably need rework):
Ant-related:
anthill,ants_curved,ants_end,ants_food,ants_four_way,ants_larvae,ants_queen,ants_straight,ants_tee.Basement and houses:
basement_generic_layout,basement_junk,basement_spiders,house_generic_big_livingroom,house_generic_boxy,house_generic_center_hallway.Fungal:
fungal_bloom,fungal_flowers,fungal_tower.Lab:
ice_lab,ice_lab_core,ice_lab_finale,ice_lab_stairs,lab,lab_core,lab_finale,lab_stairs.Mine:
mine,mine_down,mine_entrance,mine_finale,mine_shaft.River:
river_center,river_curved_not,river_curved,river_straight.Road:
bridge,highway,road_curved,road_end,road_four_way,road_straight,road_tee,rock.Sewer:
sewer_curved,sewer_end,sewer_four_way,sewer_straight,sewer_tee.Spider:
spider_pit,spider_pit_under.Subway:
subway_curved,subway_end,subway_four_way,subway_station,subway_straight,subway_tee.Triffid:
triffid_finale,triffid_roots.Other
crater,dirtlot,field,forest,hive,null,open_air,cave_rat,cave,cavern,empty_rock,hellmouth,rift,slimepit_down.Further progress tracking is moved to https://discourse.cataclysmdda.org/t/14736.