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

Overmap overhaul (step 5) #20003

Merged
merged 16 commits into from
Jan 22, 2017
Merged

Overmap overhaul (step 5) #20003

merged 16 commits into from
Jan 22, 2017

Conversation

codemime
Copy link
Contributor

@codemime codemime commented Jan 10, 2017

Continues #19518.

Closes #17638.
Closes #19635.
Fixes #19953.

Overview

In short, nice road connections become available:

megamall .... refugee

  • Any "linear" terrain can be specified in overmap specials. It now rotates in accordance with the owning special (see 62d62bc).
  • Existing connections of "linear" terrains aren't overwritten when adding new connections, only get updated (see c3da59d).
  • Fixed road connections (see 45ceeb9) for:
    • Cemetery
      cemetery

    • FEMA Camp

    • Hazardous Waste Sarcophagus

    • Hospital

    • Hotel

    • Mall

    • Military Bunker

    • Motel

    • Office Tower

    • Prison

    • Public Works

    • Ranch Camp

    • School

    • Sewage Treatment Plant

  • No more cuts for roads on overmap borders (see 1fe7ec6).

Implementation details

  • A properly rotated/connected terrain can be obtained from oter_type_t (see 62d62bc).
  • Don't use string suffixes in determining connections (see dde8ef3).
  • More consistency checks were added (see 6b07434 and 023ad0b).
  • Various code enhancements.

JSON API changes

In overmap_special:

  • Various "linear" terrains can be present in overmaps. Define "overmap": "road_..." to make an adjoined road (sewer, ant tunnel e.t.c.) of your liking. Mention its point in connections if you want to make a connection.
  • terrain can now be omitted in connections when point points to an overmap of the desired type.

Example:

"overmaps": [
    { "point": [0,-1,0], "overmap": "road_end_north" }
],
"connections": [
    { "point": [0,-1,0] }
]

@AncientSion
Copy link

Wow, that is awesome. Very good job.

@@ -10099,13 +10099,12 @@ FFFFFFFFFFFFFFFFFFFFFFFF\n\
}
}

int terrain_type_with_suffix_to_nesw_array( oter_id terrain_type, bool array[4] );
Copy link
Member

Choose a reason for hiding this comment

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

Yuck, this isn't your fault or anything, but it's terrible. If you have a moment please move this prototype to a header file and include it instead of declaring it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@codemime
Copy link
Contributor Author

Added a description. All set.

These aren't always highways connecting cities, so:

- removing various versions of is_road().
- renaming and replacing cities with points.
@keyspace
Copy link
Contributor

Tried PR branch locally. Didn't see anything not matching OP. Wasn't very thorough, though.

Some specials will need review to match road connections, but that's outside the scope.

E.g. Sarcophagus:

sarcophagus-road-conn

@Coolthulhu Coolthulhu self-assigned this Jan 22, 2017
@Coolthulhu Coolthulhu merged commit cbc93d5 into CleverRaven:master Jan 22, 2017
@codemime codemime deleted the omap_over_n6 branch January 22, 2017 10:49
@keyspace
Copy link
Contributor

Should the JSON API changes be announced in #19376?..

@codemime codemime mentioned this pull request Jan 29, 2017
@codemime
Copy link
Contributor Author

Should the JSON API changes be announced in #19376?..

Done. Thanks.

@pisskop
Copy link
Contributor

pisskop commented Mar 3, 2017

This commit has largely destroyed the mapgens ability to generate overmap specials that can rotate; which went a long way helping both towards fitting large specials that need specific requirements to spawn and creating less static and obviously modulated overmap regions.

I question if the ability to have flush roads is worth the havoc it will cause to the immersion of the game.

@Coolthulhu
Copy link
Contributor

You must be doing something wrong because I'm getting rotated specials.

@pisskop
Copy link
Contributor

pisskop commented Mar 3, 2017

Perhaps I should clarify.

My own mod, PKs_rebalance, uses things like s_lot. The parking lot. Or the sai or small power station.
I put them into larger structures like the necropolis or small pregenned towns.

Amoung other examples, the above are not capable of being rotated because the game explicitly checks for several separate extensions.

  • north-south
  • east-west
  • fourway
  • northeast-southwest

being examples.

an s_lot does not have these extensions. Nor does anything I can add into the mod. Therefore, no special that includes an unrotatable terrain, which now require arbitrary tags to flag them as such, will be able to rotate for the reasons above.

That means nothing with the coregame's < s_lot >, < field >, or anything made by a 3rd party mod can be used to rotate specials.

@Coolthulhu
Copy link
Contributor

That's a pretty specific example that certainly doesn't warrant the "havoc it will cause to the immersion of the game" overreaction.

Make an issue, provide an example of how you used it and how you can't use it now. Maybe it's easier to solve than it sounds.

@pisskop
Copy link
Contributor

pisskop commented Mar 3, 2017

A 'specific example' implies one or two cases. Ive listed 5 here, and have plenty of room to name more.

The amount of censor placed upon the mapgen process quite literally robs mod maker's of a resource ...

When something as prominent as a field tile or a forest tile cannot be included into a rotatable special, let alone any of the custom-made, non-hardcoded terrains, its a larger problem.

@kevingranade
Copy link
Member

kevingranade commented Mar 4, 2017 via email

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