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

Lane customiser: Direction, and type #515

Open
originalfoo opened this issue Sep 1, 2019 · 30 comments
Open

Lane customiser: Direction, and type #515

originalfoo opened this issue Sep 1, 2019 · 30 comments
Labels
feature A new distinct feature PARKING Feature: Parking AI / restrictions / etc

Comments

@originalfoo
Copy link
Member

originalfoo commented Sep 1, 2019

An option to customise lanes:

  • Travel direction
  • Lane type:
    • Parking
    • Bike lane
    • Bus lane
    • Taxi Rank (would need update to Taxi AI)
    • Traffic lane
    • Loading bay (for cargo deliveries/collections)
    • Disabled (no traffic)
    • Median - treat as a pedestrian median (could possibly facilitate advanced crossings at later date?)
    • Emergency / Hard Shoulder - see Highways: Hard shoulder / emergency lane #26

For example, consider the following 'roundabout' near a train station:

image

The medium 4-lane roads have cycle lanes either side, but the smaller roads of the 'roundabout' are parking lanes (primarily due to the fact that the road assets I use don't have 1-way roads with cycle lanes). Here, I might want parking around the park, a taxi rank near the station, and a cycle lane around the outer edge.

The UI would be via what is currently Parking Restrictions tool. It could get renamed Lane Customisation tool.

This could later be extended to allowing normal road lanes to be enabled/disabled and have lane direction toggled maybe?

@originalfoo originalfoo added feature A new distinct feature PARKING Feature: Parking AI / restrictions / etc labels Sep 1, 2019
@originalfoo originalfoo changed the title Cycle parking/bike lanes between: Parking, Bike lane, Taxi rank, Filter lane Cycle parking/bike lanes between: Parking, Bike lane, Taxi rank, Traffic lane Sep 1, 2019
@originalfoo originalfoo changed the title Cycle parking/bike lanes between: Parking, Bike lane, Taxi rank, Traffic lane Lane customiser: Direction, and type Nov 1, 2019
@originalfoo
Copy link
Member Author

As an example of 'disabled' lane:

image

That's a two-lane road which transitions to a three lane asymmetric road going under the viaduct. I've used lane connectors to 'disable' the middle lane (nothing connects to it) and put a fake median over it where the viaduct pillar is. (Lots of decals and other detailing was added later to make it look like a single road).

@originalfoo
Copy link
Member Author

Regarding lane direction, some related issues:

@AllegedlyLuca
Copy link

Regarding lane direction: Through messing with ModTools, I found that lane direction (or, at least, lane arrows) was controlled or at least influenced by m_direction and m_finalDirection in the NetInfo.Lane class. I note that the specific class is already being accessed by the speed limit manager, and that tool itself allows per-lane settings. I'm not completely sure which of the two mentioned variables are used in determining traffic direction though. I'm of the mind that m_finalDirection is the most important variable but can't help thinking m_direction factors into things as well.

I'd like to add that this did not change the direction that the translucent arrow pointed on one-way roads.

btw, I like that picture. Feels distinctly British.

@originalfoo
Copy link
Member Author

From REV0:

Some crazy idea not sure its relevance, so id like to hear your inputs
A function that disables lanes in networks

Use: Rail networks and bridges. Instead current approach of making bridges as standard 2 lane 2 way, some networks (overpasses) would be made as bidirectional tracks. User then use tmpe or a fork mod to disable any lane they dont need; so 1 network can be used as 2 way 2 lane, 1 way 2 lane or 1 way on 1 lane and 2nd lane would be bidirectional. Same idea applies on tri and quad tracks
I should be asking a separate mod for railway networking at this stage lol
Network is bare bone in this game so sometimes stuff like this come to my head, irl there is no uni directional track unfortunately

@originalfoo
Copy link
Member Author

originalfoo commented Jul 28, 2020

An example of a taxi lane (this one created in-game with invisible taxi stand asset):

image

@originalfoo
Copy link
Member Author

Building Spawn Points mod allows spawn/despawn points to be set per builting. Some can be placed far from building, eg. shops in a mall could have their cargo spawn/despawn points in a loading bay lane. Could do similar with garbage, etc.

Vehicle types that spawn worker cims (eg. hearse, ambulance, police, fire, etc) still need to be close to target building.

@krzychu124
Copy link
Member

Changing any road properties require creating new NetInfo variant, as any change to existing one will update all instances and future builds.
I've already created simple prototype mod that can clone and change network properties (like lane type, direction etc.), save and then recreate previously saved variants of the original road. Save process was build with fall back behavior in mind so e.g. when you create new variants but then you forget to enable/subscribe the mod game will load original ones (mod knows they should be altered on load => no mod, no alternative settings) - that will prevent issues like we see with NExt2 when you forget to subscribe it or something is broken with a mod.
It's not that far from usable version but still requires some improvements to UI as it might be a bit too complicated to use.

@originalfoo
Copy link
Member Author

That sounds awesome, would love to test! Is that the mod some of the 'blank road' networks in workshop mention "direction change mod ready"?

@krzychu124
Copy link
Member

Yeah, I started working on it because of request from the author of blank roads networks, but it should work with all assets (at least for changing basic things)

@originalfoo
Copy link
Member Author

Is the mod able to add/remove lanes, or does it only alter the existing lanes?

@kianzarrin
Copy link
Collaborator

wouldn't changing lane direction mess up the props? I have code in my Adaptive Network mod to switch prop fields between forward/backward.

@CNColorful
Copy link

@krzychu124
I can't use many of the features inside,I don't know why this is the case, but I still want to use this mod

@krzychu124
Copy link
Member

wouldn't changing lane direction mess up the props? I have code in my Adaptive Network mod to switch prop fields between forward/backward.

I think we are talking about lanes without props, like vehicle, bike or parking one.

@krzychu124
Copy link
Member

krzychu124 commented Feb 10, 2022

@krzychu124 I can't use many of the features inside,I don't know why this is the case, but I still want to use this mod

@CNColorful share logs as always, preferably create "new issue" via this interface

@CNColorful
Copy link

CNColorful commented Feb 10, 2022 via email

@krzychu124
Copy link
Member

I don't need video, we need log files, output_log.txt and TMPE.log. Video showing the problem only show us the problem, but won't tell use what is wrong with your installation

@CNColorful
Copy link

CNColorful commented Feb 10, 2022 via email

@CNColorful
Copy link

CNColorful commented Feb 10, 2022 via email

@krzychu124
Copy link
Member

@CNColorful
Copy link

CNColorful commented Feb 10, 2022 via email

@CNColorful
Copy link

CNColorful commented Feb 10, 2022 via email

@krzychu124
Copy link
Member

I suggest using web interface, not via email reply, because it does not work well :/

@CNColorful
Copy link

CNColorful commented Feb 10, 2022 via email

@krzychu124
Copy link
Member

There is no attachment in case you've sent any. I suggest just using Github and drag&drop files

@CNColorful
Copy link

CNColorful commented Feb 10, 2022 via email

@CNColorful
Copy link

CNColorful commented Feb 10, 2022 via email

@kianzarrin
Copy link
Collaborator

@aubergine10 should we close this considering that krzychu is already working on a new mod?

@CNColorful
Copy link

CNColorful commented Mar 2, 2022 via email

@krzychu124
Copy link
Member

If there is no functional difference between the new mod and the old mod, it does not need to be closed. Most users with this mod are used to using it

It will be (when I find a lot of free time to fight with bugs) a completely new mod. That task is way too complex to include it into TM:PE and there is also no reason to do so. You might thing it is "just a lane type change" but reality is the new mod needs to generate new assets on the fly based on the road you want to change lane type, store changes and restore (generate again) when you load the savegame. If something go wrong, at best you will see bunch of errors, at worst you won't be able to load savegame at all.

@CNColorful
Copy link

CNColorful commented Mar 2, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new distinct feature PARKING Feature: Parking AI / restrictions / etc
Projects
None yet
Development

No branches or pull requests

5 participants