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 upReplace add_spawn() calls in mapgen with place_spawn() #3951
Comments
This comment has been minimized.
This comment has been minimized.
GreyZebra
commented
Oct 29, 2013
|
It will take some time, but I'll get it. |
This comment has been minimized.
This comment has been minimized.
|
I think it also makes the monster blacklist mod function fail. Which means we can't remove certain monsters from the game in their entirety via a mod, because they are hard coded. |
codemime
added
the
Mapgen
label
Jan 15, 2017
Leland
added
the
[C++]
label
Aug 19, 2017
ZhilkinSerg
referenced this issue
Feb 1, 2018
Merged
[RDY] Replaced `add_spawn` with `place_spawn` #22847
kevingranade
closed this
in
#22847
Feb 2, 2018
kevingranade
reopened this
Feb 2, 2018
This comment has been minimized.
This comment has been minimized.
|
Afraid there are quite a few of these left in mapgen.cpp and mission_start.cpp |
This comment has been minimized.
This comment has been minimized.
Yes, sorry. I've somehow searched for this function only in |
This comment has been minimized.
This comment has been minimized.
|
I won't replace void mission_start::place_zombie_mom( mission *miss )
{
const tripoint house = random_house_in_closest_city();
miss->target = house;
overmap_buffer.reveal( house, 6 );
tinymap zomhouse;
zomhouse.load( house.x * 2, house.y * 2, house.z, false );
zomhouse.add_spawn( mon_zombie, 1, SEEX, SEEY, false, -1, miss->uid,
Name::get( nameIsFemaleName | nameIsGivenName ) );
zomhouse.save();
} |
This comment has been minimized.
This comment has been minimized.
|
Step 2 is in #22852. When that will be merged only 85 |
This comment has been minimized.
This comment has been minimized.
|
Step 3 is in #22854. When that will be merged only 67 |
ZhilkinSerg
referenced this issue
Feb 7, 2018
Merged
[RDY] Rollback recent spawn function changes in hardcoded mapgen #22898
ZhilkinSerg
added
the
(P5 - Long-term)
label
Apr 3, 2018
ZhilkinSerg
added this to To do
in Mapgen and overmapgen improvements
Apr 19, 2018
This comment has been minimized.
This comment has been minimized.
|
Hi, I'm looking to start contributing to Cataclysm. Could I finish this task, if any |
This comment has been minimized.
This comment has been minimized.
|
Beware, it can end bad. |
This comment has been minimized.
This comment has been minimized.
|
Ok, I read the issue you linked. Could that issue be solved by adding some flag to Then, spawns for monsters like zombies can stay as a group, and spawns intended for turrets or powerful monsters can have the flag set to true so that only one of them spawns. |
This comment has been minimized.
This comment has been minimized.
@ZhilkinSerg @kevingranade I've listed the relevant bits of the place_spawns() method with comments where I made changes.
|
This comment has been minimized.
This comment has been minimized.
|
On a related note, there are certain spawns of individual, specific monsters that don't have monster groups like hazmat bots and fungaloids (lines 3787, 3843 of mapgen.cpp respectively). I saw that in the old, rolled-back commits, special monster groups consisting of only those monsters existed. Should I adopt that approach or is there some other approach I'm overlooking? |
This comment has been minimized.
This comment has been minimized.
|
That could be some legacy code which was not refactored yet. Generally we want most of the things unhardcoded and jsonized. Starting replacing single monster spawn with monster groups would be a good start. |
This comment has been minimized.
This comment has been minimized.
|
Thanks for the input. I'll keep at it. |
kevingranade commentedOct 29, 2013
There are several building layouts in mapgen.cpp and building_generation.cpp that have add_spawn() calls placing specific monsters on the map instead of place_spawn, which is more generic and selects monsters from a group. This causes issues with the options that modify spawn behavior, because add_spawn() doesn't support those options.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.