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

Add subway maps #37540

Merged
merged 11 commits into from
Mar 6, 2020
Merged

Add subway maps #37540

merged 11 commits into from
Mar 6, 2020

Conversation

wapcaplet
Copy link
Contributor

@wapcaplet wapcaplet commented Jan 30, 2020

Summary

SUMMARY: Content "Add subway maps and spawn locations/itemgroups"

Purpose of change

Lots of other great maps existed in game, but none showing subway lines.

Describe the solution

Based directly on existing maps, this subway map can be found in motels, subways, and in a few itemgroups alongside its brethren only in subway tool rooms with a 75% drop rate. When activated, it reveals the location of subway stations, underground subway stations, and subway lines (yellow and blue "S" tiles).

Describe alternatives you've considered

None really Considered NOT showing the blue "S", but reconsidered.

Testing

Tested with debug; spawned a subway map, activated, and saw yellow "S" all over the map, and both yellow and blue "S" underground, with subway lines connecting them. Didn't reveal any other terrain.

image

image

Additional context

Inspired by the signs found inside the subway stations that say "Subway map", but (still) aren't an actual map of the subways.

There were revealing maps for other map areas but none yet for subways.

This commit only adds the item, but no spawns. I tested it in-game and
it works as expected - normal aboveground "S" subways, as well as
underground yellow and blue "S" subways and lines connecting them are
all revealed, but no other aboveground terrain is displayed (as
expected).
To get some subway maps spawned in the world in likely locations
@anothersimulacrum
Copy link
Member

Subway labs are probably secret, these probably shouldn't show them.

@I-am-Erk
Copy link
Member

Hm, I'm not sure a regular subway map would show the lines. It probably had a schematic diagram of them but not a useful map. It could identify the stations though, and you could make a rarer subway maintenance map that shows the lines themselves?

@ZhilkinSerg ZhilkinSerg added [JSON] Changes (can be) made in JSON Items / Item Actions / Item Qualities Items and how they work and interact Map / Mapgen Overmap, Mapgen, Map extras, Map display labels Jan 30, 2020
@Brian-Otten
Copy link
Contributor

I think the map you find in the world would have the stations and lines marked, because to find the stations you usually use a map of the area with the subway overlayed on it, so you could actually find the subway stations using the local roads. See how google maps handles subways.
The subway station themselves would have the "schematic" map, which would probably tell you neither line nor station location, just which station connects to which.

@wapcaplet
Copy link
Contributor Author

Does the game have any implementation of schematic (as opposed to geographical) maps? I don't even know how such a thing would work in-game. All the in-game maps that I know of are strictly geographical - you can stand on top of a wheat silo for 10 seconds and get a 100% accurate survey of the whole area (not just a crudely sketched schematic, as would be more realistic).

How would you know that Bobsville and Johnstown are connected via subway, if the map is not allowed to display the lines between them? A map that shows only the subway stops seems fairly useless.

I am not keen on building a whole new schematic map feature just to support this. If the map should be rarer, or only drop inside the subway maintenance room or something, would that mitigate complaints that it's too OP?

@mrkybe
Copy link
Contributor

mrkybe commented Jan 30, 2020

Does the subway map reveal/make obvious subway lab locations (is that what the blue S is?)? If so, I think its a bit OP and should be some rarer maintenance closet thing. Otherwise, I think its fine as is.

@wapcaplet
Copy link
Contributor Author

wapcaplet commented Jan 31, 2020

Does the subway map reveal/make obvious subway lab locations (is that what the blue S is?)?

Yes, I confirmed with teleport and map reveal that the blue "S" is indeed a microlab subway entrance. This is strange, because those are defined as a separate terrain microlab_sub_station that my map does not specifically reveal:

"id": "microlab_sub_station",
"name": "subway station?",
"sym": "S",
"color": "light_blue",

But after testing I learned that revealing sub_station alone reveals sub_station, sub_station_roof, sewer_sub_station, and microlab_sub_station (and anything else with sub_station as a sub_string, hah)

for( const JsonValue entry : obj.get_array( "terrain" ) ) {
if( entry.test_string() ) {
ter = entry.get_string();
ter_match_type = ot_match_type::contains;

Even if the yellow and blue S'es could be revealed separately, the subway lines would kind of give away where they are anyway. And in my experience, even knowing where they are doesn't help a lot, since they often don't have an aboveground entrance, and it's a pain to loot them through half a mile of subway track and two or more staircases.

Edit: I figured out how to avoid revealing the blue "S" lab entrances. You can still see where they are, but gotta be looking for it. Hint: They're fricking everywhere.

image

Edit2: Now might be a good time to mention that the regular "Road map" you can find just about anywhere also reveals hidden underground blue S subways, through the above string-matching rule:

To prevent subway maps from being too spoiler-y.

Before, a match for `sub_station` was matching any terrain containing
that string (including "secret" blue S lab entrances).

This commit uses a syntax similar to others in this file, which seems to
work nicely for exactly-matching the terrain types I want to reveal (and
no others).
@wapcaplet wapcaplet changed the title Add subway maps [WIP] Add subway maps Jan 31, 2020
Based on user feedback, this kind of exact geographical map would be
something only a subway maintenance worker might have.

This changes the subway map to "subway maintenance map", and removes it
from all drops except in one location: the tool room at the back of the
underground subway terminal.

Since the player must fight through a mob of zombies to reach this room,
I didn't think it was too generous to give them a 75% chance of finding
a map.
I tried to use an item where an item group was expected in the palette.
I've rolled back the palette change to how it was before, and placed the
subway map using `place_item` directly in the mapgen description.

Also added `looks_like` for the map, so it will look like a map instead
of a semicolon.
@wapcaplet
Copy link
Contributor Author

wapcaplet commented Jan 31, 2020

My latest commits could be summarized thus:

  • The subway map is now a "subway maintenance map"
  • The only place you can find it is in the back tool room of L-1 of Subway buildings (with 75% chance)
  • It no longer shows the blue "S" where underground lab entrances are

Here it is, alongside the 3 brick kilns, 1 electric kiln, 5 concrete mixers, 2 metallic smoothers and a toolbox (is the loot back here always this ridiculous?):

image

I got a curious message when I tried to activate it. Not sure how the subway workers managed:

image

It worked aboveground though. Frankly I want to put the blue "S" reveals back in; the map looks almost bugged without them, and the player can easily guess where they are. (Hint: everywhere. I am starting to believe underground labs are more common than regular subway stops.)

image

@wapcaplet wapcaplet changed the title [WIP] Add subway maps WIP Add subway maps Jan 31, 2020
This makes for considerably simpler JSON, and a more logical map. Subway
maintenance workers would of course know about lab stops as well, and
the map is a more exclusive find now that it only drops in subway tool
rooms.
@wapcaplet
Copy link
Contributor Author

Given that the regular "Road map" displays the super-secret blue "S", and this new subway map only drops in one place now, and given that restoring the blue "S" to my map makes the JSON 4 ugly lines shorter, I went ahead and did it. This is my final version, unless anyone has reason to object.

@wapcaplet wapcaplet changed the title WIP Add subway maps Add subway maps Jan 31, 2020
@Night-Pryanik
Copy link
Contributor

Night-Pryanik commented Jan 31, 2020

You can specify to reveal only the exact location you need by using the following syntax in the list of terrains

{ "om_terrain": "location_id_you_need", "om_terrain_match_type": "TYPE" },

"use_action": {
"type": "reveal_map",
"radius": 180,
"terrain": [ "subway", "sub_station" ],
Copy link
Contributor

@ZhilkinSerg ZhilkinSerg Jan 31, 2020

Choose a reason for hiding this comment

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

You can use different overmap terrain match type if you need it, e.g.:

Suggested change
"terrain": [ "subway", "sub_station" ],
"terrain": [ { "om_terrain": "subway", "om_terrain_match_type": "TYPE" }, "sub_station" ],

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks—I did something like this in previous revisions, but was happier with the “contains” matching I got from the plain string.

Previously, the regular "road map" of a region would show not only
above-ground subway buildings (yellow "S"), but below-ground ones as
well, including all subway stations at underground labs (blue "S").

With the addition of the new "subway maintenance map", which reveals all
the underground subway lines, it makes sense to hide this information
from the regular road map (if it ever should have been shown at all).
This makes the subway map a more exclusive item, being the only map
showing underground subway stations.
@wapcaplet
Copy link
Contributor Author

Since this one is waiting on content freeze anyway, I made one more change (7daac7e) to the regular road map, so it no longer shows underground subway stations. Now, the "subway maintenance map" will be the only map that reveals the underground blue "S", and the regular "road map" will only reveal above-ground yellow "S" (public subway entrances).

@ZhilkinSerg ZhilkinSerg changed the base branch from master to dev March 6, 2020 10:38
@ZhilkinSerg ZhilkinSerg merged commit 1a140f5 into CleverRaven:dev Mar 6, 2020
@ZhilkinSerg ZhilkinSerg mentioned this pull request Mar 6, 2020
13 tasks
ZhilkinSerg pushed a commit that referenced this pull request Mar 7, 2020
ZhilkinSerg pushed a commit that referenced this pull request Mar 10, 2020
ZhilkinSerg pushed a commit that referenced this pull request Mar 15, 2020
ZhilkinSerg pushed a commit that referenced this pull request Mar 15, 2020
ZhilkinSerg pushed a commit that referenced this pull request Mar 16, 2020
ZhilkinSerg pushed a commit that referenced this pull request Mar 17, 2020
ZhilkinSerg pushed a commit that referenced this pull request Mar 17, 2020
ZhilkinSerg pushed a commit that referenced this pull request Mar 18, 2020
@wapcaplet wapcaplet deleted the subway-maps branch March 28, 2020 13:53
ZhilkinSerg pushed a commit that referenced this pull request Mar 29, 2020
ZhilkinSerg pushed a commit that referenced this pull request Apr 1, 2020
ZhilkinSerg pushed a commit that referenced this pull request Apr 1, 2020
ZhilkinSerg pushed a commit that referenced this pull request Apr 2, 2020
ZhilkinSerg pushed a commit that referenced this pull request Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Items / Item Actions / Item Qualities Items and how they work and interact [JSON] Changes (can be) made in JSON Map / Mapgen Overmap, Mapgen, Map extras, Map display
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants