-
Notifications
You must be signed in to change notification settings - Fork 3
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
Disable parking -feature #1
Comments
I don't know how parking is implemented but I can take a look. I'll let you know what I find. |
Thanks a lot! If it's easy I hope some kind of "parking on side of (some) roads could be disabled. Or maybe this idea is more of advanced vehicle option -mod material? Dunno. Would seem to fit TM+AI too :) HEy btw did you see this video of gameplay footage of After Dark https://www.youtube.com/watch?v=7wYOxYlak6Y they show all the new stuff at the menus. |
Almost done, excellent idea, thanks! It fits perfectly in fact, so well that the code was practically already written. It's just like the lane changer, you click on a segment. In this case, the click toggles the parking lanes. This got me wondering if I can actually recycle the lanes altogether. This means we could have 4-lane 2-ways (narrower, no middle portion) and 4-lane one-ways. Or 8-lane 1/2 ways! I checked out the video, good stuff! |
Thank you, this sounds very exiting, cannot wait to get to test it. One thing what I'm thinking that in After Dark that space from parking could be might be taken for such as bus lanes and bike lanes. Bus lanes are available at least for 6 lane road and 4 lane road, and bike lanes for 2 lane road and 4 lane road :) Anyhow, looking forward to disable parking along (some roads) and perhaps even taken the space to such as car lane use - or even better - tram :) So i'm thinking that disabling parking could be a feature that could be added quite soon and all the possible rest in a later update? :) |
As far as recycling lanes go, that's pretty much how Katalyst6 started over at the network extensions mod. https://github.com/Katalyst6/CSL.NetworkExtensions. The thing that would worry me is the "feature creep" turning this into a huge, monolithic mod that has so much potential to conflict with something else or break with every update. (T++ has the reputation of being buggy simply because it tries to do so much) Personally, I use the Toggle Traffic Lights mod since I can hotkey it, instead of TM's functionality. I have no desire to manually set timed lights. Really the aspect of TM that I use and want is the lane changer as I prefer it's simplicity over T++'s rather heavy/tedious/minutiae-driven implementation. If the Lane Changer (and Parking toggle, since that's a lane type too) were broken out into it's own mod, I'd happily just run that with either the IAI (but I like your changes too.... Too many forks!) |
I think Traffic Manager + Improved AI will be the hottest of the traffic mods. I use some mods, a lot of basic ones and popular ones - simple mods more than complex - but still I haven't got Network Extensions mod to appear in the menu. Maybe it's road precision but I need that a lot more than lot's of different highways ~ which is the path Network Extensions seems to be going. After Dark will have some amazing new roads :) |
I haven't completely deciphered everything that TM+IAI does, and fadsters changes, but my understanding from his comments from the initial release is that it's pretty much both AIs made to not fight with each other, and not merging TM's functionality into IAI's. i.e. Priority signs and timed traffic lights still run the original TM code, and aren't aware of what IAI is trying to do... I may be wrong though. Network Extensions has just as many "avenues" (4L roads) as highways... https://github.com/Katalyst6/CSL.NetworkExtensions/commits/master They just appear as new roads in the same road build panels for me, not as a separate menu or button in the interface. I run both Precision Engineering and Enhanced Road Heights and neither conflict for me. The only ones that I can think might have conflicts are Sapphire and Improved Build Panel. |
|
By the way, there is still a lot of cleanup that can be done in the code. However, several things to keep in mind:
Eventually, it would be nice if everything could be cleaned up and made consistent throughout. The priority right now, however, is to ensure continued functionality. |
One more thing, WillFa, the control of timed lights is indeed done by TM code. However, actually obeying the traffic lights is done by the navigation and path finding logic, which is divided between vanilla and IAI code. As for priorities, I haven't looked closely, but I believe it is similar to traffic lights in terms of where they are implemented. |
I haven't peeked at the CO dll's code in quite sometime since trying to keep num2 and num13 and num664 straight makes my head hurt. So most of the learning I've been trying to do as of late is from reading several repos here on github and try to avail myself of the work y'all have already done... That said, already in the pathfinding in the code in this very repo are 3 calls to the "GetClosestLane" function, although 2 of them are for calls to bicycles. BUT! There's one that's for general vehicles. This function is part of vanilla, so I've been trying to reason out why the processor cycles are spent finding this, but still "stay-in-lane" isn't the default behavior. Why is the code bothering to find which lane is closest and not use it? Is the int num2 just falling out of scope and needs to be moved up a closure? Is the look-ahead cycles in the a* calc overwriting it? Are the out params not actually "this is the right-hand lane" but "this is the first valid lane that isn't a sidewalk or parking/prop lane"? Since there's twice as many calls regarding bicycles than other vehicles, is it just not fully implemented yet in the CO dll? "Argh, too many questions for me... I'll come back to it later. " Having read through your, and katalyst6's, and cbethax's code, I knew enough that this parking change would be simple(-er)... but I was hoping that your familiarity would be better able to answer the question. Or at the very least, get you interested in it. |
Yeah I also had the same thought but it seems it doesn't quite do that. Still not entirely sure though. |
How is the parking disable mod coming along? |
Hey sorry, got sidetracked, regular life got in the way :p Turns out toggling parking on lanes is a little more involved. This particular information is shared by all road segments of the same type. In order to toggle parking for individual segments, I need to create a new road type altogether, and this has to be done at a precise moment during level loading. In fact, it's exactly what T++ does for its special lanes, so I already have the code to do it. Just need to extract it and adapt it for this particular use. |
Oh.. I wasn't looking to add new roads, no - not since AD will bring plenty of those, with buslanes and bike lanes. I really only wanted a tool to get rid of parked cars - from all roads if necessary :) |
You can't do that without creating "no parking" lanes. That's the only way to tell the AI it can't park cars there. |
Ok, sound good :) |
Development on this feature is on hold for now. I'll keep the issue open for the time being. |
As much as I dislike 4 lane roads I really cannot stand that there's cars parked on side of the roads. Could you perhaps fork out a feature that would disable parking on certain roads?
Thanks for considering. Armarayo
The text was updated successfully, but these errors were encountered: