Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further fleshing out of mi-go areas #1962

Merged
merged 8 commits into from
Oct 19, 2022

Conversation

chaosvolt
Copy link
Member

@chaosvolt chaosvolt commented Oct 6, 2022

Summary

SUMMARY: Balance "Adjustments to mi-go locations, atmosphere field"

Purpose of change

This tweaks a few things with mi-go locations to make the expected method of progression (target gasping tubes to de-yuggothform the environment, bust NPCs out, lead them out) a bit more feasible, in particular fixing some issues with NPCs having trouble pathing through mi-go gas due to it counting as dangerous. This also adds support for an alternative way to bust out captive NPCs, albeit with some risk.

Describe the solution

  1. Set mi-go gas to not count as dangerous. Necessary for NPCs to path through it if needed to escape, otherwise they have a habit of camping in the tower endlessly unless the player personally clears out every last vestige of mi-go funk. Additionally, set mi-go atmosphere the same priority as hot air, so that it won't cover up hazards like fire or electricity.
  2. Added a smaller, more damaged variant of the scarred lump that leaks a reduced amount of mi-go atmosphere instead of hot air. This is used for the smaller emitters so that smashing the less-dangerous emitters doesn't magnify the overall temperature of the area, instead increasing the atmosphere slightly (which is easier for a prepared player to counteract than extreme heat).
  3. Made gasping tubes mineable as well, expanding the options for mitigating the terrain.
  4. An idea that came up was a way to open the cages holding the NPCs at some risk. Added an examine_action used by a new furniture, a nerve cluster that when interacted with removes resin cages in a decent radius, including the ones holding zombies nearby, and creates a loud noise to alert anything in the area. Plus, it comes with a bonus surprise when activated...
  5. Also figured out how to make it trigger the same effects when smashed, with the added effect of spawning the Bonus Surprise™ injured.
  6. Added the new furniture to relevant areas in mi-go scout towers and encampments.
  7. Misc: set it so bashing resin pod furniture also returns some resin pods, just as the other pods have a limited yield when bashed.

Describe alternatives you've considered

  1. If I could figure out how to make the examine action open cages on other z-levels above and below I'd be inclined to do that too, just to make things that much more spicy for the player during the escape.
  2. Making the atmosphere's effects build up and decay more slowly could also make quick dips into a tower less annoying while making a prolonged stay hinder the player's escape for long enough to actually matter, instead of ramping up to maximum awfulness near-instantly but also wearing off mere seconds after you escape.

Testing

  1. Compiled and load tested.
  2. Confirmed that fire, lightning, and acid all show up even with mi-go atmosphere present.
  3. Blundered in, tested that messing with the nerve cluster does indeed open the cages, make a sound, convert the nerves into a scarred lump, and spawn a fun surprise.
  4. Recruited the NPCs, confirmed they don't get stuck due to the atmosphere.
  5. Wandered into another such place with mjolnir and smacked the nerve cluster, confirmed it spawns an injured mi-go myrmidon.

Additional context

image

image

@chaosvolt
Copy link
Member Author

Quick mockup of possible sprite to use for the nerve cluster, combines a resin pod with signs of a mi-go mymidon body, meshed with tendrils connecting to the ceiling.

sprite example

@Coolthulhu Coolthulhu self-assigned this Oct 11, 2022
src/map.h Outdated
@@ -1707,6 +1707,7 @@ class map
* @param p The point on this map where the item is and creature will be
*/
void rotten_item_spawn( const item &item, const tripoint &p );
void smash_migo_nerve( const tripoint &p );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason for it to be a map method. Try map_functions.h.

Copy link
Member Author

@chaosvolt chaosvolt Oct 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does significantly increase the number of includes needed in map_functions.cpp before it'll work, unless you meant something else by that? Discussion on the discord indicates that's desired to reduce bloat in map.cpp anyway so will mess with that.

src/map.cpp Outdated
"shout", "scream_tortured" );
monster *const spawn = g->place_critter_around( mon_mi_go_myrmidon, p, 1 );
spawn->set_hp( spawn->get_hp_max() / 2 );
if( g->u.sees( p ) ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_player_character()
g->u is going to be deprecated in the future.

"examine_action": "migo_nerve_cluster",
"bash": {
"str_min": 250,
"str_max": 600,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can tear it with bare hands and yet it's harder than steel?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holdover from before I figured out to write a smash function for it, whoops.

@chaosvolt
Copy link
Member Author

chaosvolt commented Oct 13, 2022

So I've commited my current work on this, with it converting the shared stuff into a single function in map_functions.cpp. So far this is now the only error I've got left while compiling:

1>C:\Users\Vincent\Documents\GitHub\Cataclysm-BN\src\map_functions.cpp(34,14): error C2663: 'map::ter_set': 2 overloads have no legal conversion for 'this' pointer

EDIT: And easy fix thanks to Olanti spotting what I missed.

With thanks to Olanti for spotting what I overlooked.
src/iexamine.cpp Outdated
if( query_yn( _( "This looks important. Tear open nerve cluster?" ) ) ) {
p.mod_moves( -200 );
add_msg( _( "You grab hold of a sinewy tendril and wrench it loose!" ) );
map_funcs::handle_migo_nerve( here, examp, false );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handle is very ambiguous. on_migo_nerve_destroyed or something.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

migo_nerve_cage_removal maybe?

@Coolthulhu Coolthulhu merged commit 6d0c344 into cataclysmbnteam:upload Oct 19, 2022
@chaosvolt chaosvolt deleted the more-yuggoth-updates branch October 19, 2022 15:28
@chaosvolt
Copy link
Member Author

Note to self: need to remember to PR the sprite to UDP repo when the unpacked version is finally in usable condition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants