Giter Club home page Giter Club logo

rushhour's Introduction

I'm a Software Engineer from Manchester, UK. In my spare time I also write software, because why not?

rushhour's People

Contributors

earalov avatar kiaranyasha avatar kirillnaumkin avatar nanofi avatar propanedragon avatar r4j4h avatar vukivan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

rushhour's Issues

Allow events to occur at non-landmark buildings

The mod should choose a random building to host an event at if there's more than one of the building in the city. That way I can just allow the mod to host events wherever the player wants them hosted.

Missing file prevents compilation

When I try to compile I get an error

Source file 'Places\CityEventManager.cs' could not be found 

It stems from the presence of this line:

<Compile Include="Places\CityEventManager.cs" />

on line 63 of RushHour/RushHour.csproj.

I am going to try removing the include and am presuming it will compile fine then, but figured I should bring it to your attention. :)

Idea: Event Editor

Rush Hour now features user customizable events.

We can have them come from assets and I believe I saw @PropaneDragon encouraging users to make their own custom ones by creating .XML files manually. This inspired the idea in me for Rush Hour to provide an editor for these events to make it easier for users.

At the very least being able to view a list of the currently loaded XML files and the currently loaded events would be a big boon to let the user know what events are in play. Even stronger would be a way to enable/disable them. And then topping that would be a built in way to modify and add new ones.

I think this would increase and enable the userbase, which might not be as comfortable with files, file systems, and not to mention XML, to help generate events and to share events.

I'm not sure anyone's interest in this but if there is some this would definitely require some design ahead of time to do properly so toward that end I've attempted to start a design discussion below beginning with where the menu should live:

Tools Menu

The Tools Menu provides Map, Asset, and Theme editors and I feel this would be a great place for an Event Editor.

The menu shows buttons for those editors and manages showing/hiding little panels of New/Load buttons when any are clicked. Those buttons then generally open a Dialog for progress with the user. New/Load would work well a singular Event but in our context we are managing "event packages", if you will, of XML files. So New/Manage might work better. Then New might let you choose a name and then add/manage events within it and then save to an .XML file, while Manage lets you open an .XML file.

I did some preliminary feasibility research. While I am unfamiliar with that menu's code, most of it was simple to follow and understand. I lost tracing the graphics for the menu items or the actual "template" for the menus. My trail stopped at ...\Steam\steamapps\common\Cities_Skylines\Cities_Data\level4. I don't know how to read those guys. My concern with understanding this is to ensure that the screen will be able to handle an additional button - e.g. will it be a scrollable panel, etc.

Not meaning to spend too much time on one avenue though, so let's move on.

Content Manager Menu as Events Category

The Content Manager has an extensible Categories list and then lists items for each Category. Existing Categories already provide precedents for configuration (events within an event package as opposed to one event per slot), for sharing and/or viewing on workshop, and for adding new entries of (See Add style from Styles category). We could introduce a new Events category.

The Mods category provides Options buttons like we would probably want to use, but with a label like Modify/Change/Edit/Manage/Customize.

On the precedent of Sharing and Workshop links, anything useful would probably also require cooperation of other parties like steam, but we could perhaps facilitate users in opening an Explorer window or Finder window or otherwise getting the path to their XML for manual sharing. We could also link to the source prop's Steam Workshop page if the file is coming from an asset.

Adding new events would facilitate users in using our provided GUI to easily and safely build events.

Rush Hour Options Sub-Menu

Rush Hour's own Options menu would make a fine home for viewing/managing events. Perhaps as a sub-menu within our options panel or a Dialog. I already desire organizing our Options panel better and this route could harmoniously work towards that. It also keeps the event management explicitly encapsulated by Rush Hour and stays under what's already in our domain of modification.

Please fix OnSettingsUI

Hi there PropaneDragon,

Can you please change
UIButton componentInChildren = Resources.FindObjectsOfTypeAll<OptionsKeymappingPanel>()[0].GetComponentInChildren<UITabstrip>().GetComponentInChildren<UIButton>();

to

UIButton componentInChildren = GameObject.Find("KeyMappingTabStrip").GetComponentInChildren<UIButton>();

It is not safe. I cannot use OptionsKeymappingPanel because of this.

Idea: random events bound to policies

IF possible, a new type of policy would be welcome. This is to block out the possibility that your underdeveloped city/district becomes swamped in traffic due to an event.
The workings would be the same as lets say, disabling high rise buildings in your region/district.
On region level this would mean that no random events take place.

P.s sorry in for dumping all these ideas ๐Ÿ˜„

Find a workaround for including CimTools in the mod

I did a stupid and included the dll of CimTools in the mod from the get-go instead of adding it as a required mod. Because of this I need many different versions of CimTools to avoid any clashing with mods that use other versions.

We need a workaround or a good idea to either decrease the number of CimTools floating around there, or find a way of subscribing to a global CimTools mod without screwing around with the existing users.

Commercial demand always high

Installed this mod last night and noticed my commercial demand skyrocketed and stayed high no matter how much I zoned. Just noticed the latest commit (22608ef) was supposed to fix the problem, so I unsubscribed and re-subscribed in Steam to make sure I had the latest version. Unfortunately, it seems I'm still experiencing issue. ๐Ÿ˜• I disabled the mod to verify that it was the cause and commercial demand dropped to 0. I don't have any other mods installed that change game mechanics, so I think it must be RushHour.

Allow users to modify when night starts

Possible issues that might need checking out:

  • Does modifying when night starts affect when the sun goes down?
  • Does this mess with anything relying on checks to see whether it's night time?
  • Is this more work than it's worth, and is there an easier way?

Idea: garbage collection times

Right now garbage collection is done quite randomly. At least, it feels that way. With the mod enabled and having garbage pickup like whenever things can get quite messy with the traffic, especially during rush hour.
Proposed solution is to start garbage collection late at night, early mornings (think between 01:00 or 04:00) or maybe even better, make it configurable.

Issue building from source - EventPopupManager._panel = null?

Hey, I realise this may be an issue with my build set up, I just can't seem to understand where.

Upon building the latest source and adding the mod, I get the following:

The Mod D:\SteamLibrary\steamapps\common\Cities_Skylines\Files\Mods\RushHour [CimTools.dll, RushHour.dll] has caused an error [ModException]

Details:
System.NullReferenceException: Object reference not set to an instance of an object
  at RushHour.Events.EventPopupManager.Initialise () [0x00000] in <filename unknown>:0 
  at RushHour.Events.EventPopupManager.get_Instance () [0x00000] in <filename unknown>:0 
  at RushHour.LoadingExtension.OnLevelLoaded (LoadMode mode) [0x00000] in <filename unknown>:0 
  at LoadingWrapper.OnLevelLoaded (UpdateMode mode) [0x00000] in <filename unknown>:0 

Trying to debug the issue, it seems like _panel never initialises with an object:

image

image

It seems that _panel = LoadingExtension._mainUIGameObject.AddComponent<EventPopupPanel>(); doesn't seem to be returning an object.

Have you come across this before? I'm guessing this is something not working within UnityEngine, but thought I'd check if you've come across it..!

Stuttering every few seconds

It seems a lot of people are having some stuttering issues when running the mod after the localisation update. Might be something to do with the date/time bar (maybe getting a translation is expensive for some reason?), but needs more investigation.

Time is locked upon new game or load save

never had issue with this mod till recently where when starting new game or loading a previous game save time in bottom left is locked at Sunday 0:00, Day/night cycle keeps runs like normal, and there is also no options for rush hour in menu and i receive the following error upon enabling mod

A Mod caused an error [System.Exception]

Details:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: An exception was thrown by the type initializer for RushHour.Options.OptionHandler ---> System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
at System.Collections.Generic.List`1[CimToolsRushHour.v2.Utilities.Language].get_Item (Int32 index) [0x00000] in :0
at CimToolsRushHour.v2.Utilities.Translation.LoadLanguages () [0x00000] in :0
at CimToolsRushHour.v2.Utilities.Translation.AvailableLanguagesReadable () [0x00000] in :0
at RushHour.Options.OptionHandler..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
at RushHour.RushHourMod.OnSettingsUI (UIHelperBase helper) [0x00000] in :0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception

EDIT: Sunday 0:00 is on new game and loading old game is random day of week still at 0:00

Idea: show times in budget slider

Right now the budget sliders are split in 2 parts, day and night but no clear indication when one is becoming active/inactive.
With this mod day/night budgets are becoming important (finally!) but with no clear indication as to when and what is happening it still feels like walking in absolute darkness.
Budget slider

Awesome work so far and keep it up!

Fix compatibility with Time Warp?

Since the Football update and the event system CO integrated the time speed in Time Warp no longer works with the event blips in Rush Hour. Potentially fix this issue?

Options Menu settings save and are good for session but upon next game load are defaulted until Apply is hit again.

In the Options Menu, settings save and are good for the remainder of that play session but upon next game load are defaulted until Apply is hit again. Things seemingly are not broken, but this is because the Options Menu shows the serialized settings and not the current state of the values.

Let's take "Enable random events" (ERE). ERE defaults to true. On a blank slate starting Cities and going to Mod options for Rush Hour should see it checked. If you uncheck and hit Apply, the variable is updated in the game to false. If you restart the game, the variable in the game is at default value. If you open Mod Settings it shows the saved XML value, in this case appearing unchecked now - seemingly correct.

If we hit Apply again without touching anything, the value is correct again.

This is ornery to describe and so I have illustrated it here with debug logging.

https://github.com/r4j4h/RushHour/tree/save-load-problem-demo

If you load the game and hit F7 you should see the values print. By loading them and using the nifty ref parameter it can be corrected. There are probably better ways of doing this though.

Idea: People visit their friends

Right now residential buildings can't be visited by cims other than their residents. But what If people will visit their friends, especially on weekends? It will make residential zones more interesting :)

Events seem loth to fire

I have quite a few of the unique buildings that should be firing events and cause people to visit them, etc as I see in the code for events at the Expo Center and Stadium, but I am not getting any Chirper messages nor any appearance of events on the time bar.

I have tried to force events using the options menu, but since none have ever fired, none fire after the previous one is over.

Maybe add a button to fire an event?

Event start and end causes CTDs for some people.

000000013FE93178 (Cities) JobQueue::ExecuteOneJob 000000013FBE651B (Cities) operator new 000000013FBE5175 (Cities) operator new 000000013FBE2A10 (Cities) operator delete 000000013FBE2D76 (Cities) operator delete 000000013FD52F43 (Cities) MonoManager::UnloadSystemAssemblies 000000013FED6494 (Cities) ShaderLab::FastPropertyName::Init 000000013FECC20C (Cities) ShaderLab::FastPropertyName::Init 000000013FE7FF7E (Cities) Unity::Material::BuildProperties 000000013FE8003E (Cities) Unity::Material::SetShader 000000013FF12E93 (Cities) BaseRenderer::GetSortingFudge 0000000019254E9B (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Material:set_shader (UnityEngine.Shader) 0000000019254A91 (Mono JIT Code) ColossalFramework.UI.UIDynamicFont:get_material () 0000000019254932 (Mono JIT Code) ColossalFramework.UI.UIDynamicFont:get_isValid () 000000001925BAF8 (Mono JIT Code) ColossalFramework.UI.UILabel:Invalidate () 000000001925D3DC (Mono JIT Code) ColossalFramework.UI.UIComponent:PerformLayout () 000000001928AB18 (Mono JIT Code) ColossalFramework.UI.UIComponent:OnSizeChanged () 000000001925B281 (Mono JIT Code) ColossalFramework.UI.UIComponent:set_size (UnityEngine.Vector2) 000000004355686D (Mono JIT Code) ColossalFramework.UI.UIComponent:set_height (single) 000000003181AD36 (Mono JIT Code) RushHour.UI.EventPopupPanel:PerformLayout () 000000000BFFEDA5 (Mono JIT Code) RushHour.Events.EventPopupManager:Show (string,string,InstanceID) 000000000C000CEF (Mono JIT Code) RushHour.Events.CityEvent:PopupEventEnded (InstanceID) 000000021BA631AD (Mono JIT Code) RushHour.Events.CityEvent:Update () 000000021BA62A0F (Mono JIT Code) RushHour.Events.CityEventManager:ClearDeadEvents () 000000021BA626AF (Mono JIT Code) RushHour.Events.CityEventManager:UpdateEvents () 000000021BA62413 (Mono JIT Code) RushHour.Events.CityEventManager:Update () 000000021BA61E4B (Mono JIT Code) RushHour.SimulationExtension:SimulationStep (int) 000000001920D954 (Mono JIT Code) SimulationManager:SimulationStep () 00000000052797FB (Mono JIT Code) SimulationManager:SimulationThread () 00000000051A8BBB (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr) 000007FEEB7C4043 (mono) mono_set_defaults 000007FEEB7183AD (mono) mono_runtime_invoke 000007FEEB741743 (mono) mono_thread_interruption_request_flag 000007FEEB7F6889 (mono) unity_mono_method_is_generic 0000000076FC59BD (kernel32) BaseThreadInitThunk 00000000770FA2E1 (ntdll) RtlUserThreadStart

Cities crashing is actually Rush Hour after all

Turns out the language selection is completely fucked for some reason. I still need to figure out why it's messed up as much as it is, but it appears to be when it's loading XML language files up or applying languages to the UI.

I also still have no idea why setting Steam to offline mode fixes it...

Make ghost mode work!

  • Enable option
  • Make sure most of the code is disabled when active
  • Make sure option saves

What branch to use?

Hi there,
I downloaded the release branch but that caused some errors in VS2015 like
'DistrictPolicies.Policies' does not contain a definition for 'ExtraInsulation'

thanks

User made events

Allow users to make their own events.

  • Needs to work around the existing XML system
  • Should be very little/no need to add anything to the existing XML events. Don't really want to have people update all their custom events.
  • Needs a UI that fits into the game and isn't confusing
  • Needs balancing. Should cost loads, but gains shouldn't be easy to get from the system.
  • Proper planning.

Almost no commuter traffic

My city with a population of about 80k I almost see no residential or commuter traffic, not even on a Monday morning (where almost everyone should go to work). The city does not have any public transit and almost all traffic is originating from commercial and industry. There is some traffic in my leisure/entertainment areas, but almost exclusively from tourists.

One of my industry area is only accessible by highway and even tho there are no worker commuting there goods are getting created.

I first suspected this could be an issue with another mod as I was using Traffic Manager Presidential Edition and Realistic Population, but low traffic remains even without these mods.

More diversed lunch break

I have an issue with the lunch break habits of my cims.
They tend to be crazy about certain commercial buildings, while completely ignoring other opportunities. Problem is most visible for universities and high-schools, where during lunch time a giant crowd will rush out, all going to the same store.
I guess it is not due to a new iPhone release in that store or something ;)
It looks funny and hilarious.
What is the default AI behaviour here?
Could you make it more diverse without affecting game performance too much?

Language not English by default

I know what this problem is, but it still needs fixing. For future reference - it's because the language is set for "English (United Kingdom)" by default, but I changed the xml file recently to only read "English", which probably screws with the initial language state.

Issues around creating and ending events

A Mod caused an error [System.Exception]

Details:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException:
  at (wrapper managed-to-native) UnityEngine.Component:get_transform ()
  at ColossalFramework.UI.UIComponent.get_cachedTransform () [0x00000] in <filename unknown>:0
  at ColossalFramework.UI.UIComponent.AddUIComponent[UISprite] () [0x00000] in <filename unknown>:0
  at RushHour.UI.DateTimeBar.CreateEventBlock (Double startPercent, Double endPercent, Color32 colour, UInt16 buildingId, System.String tooltip) [0x00000] in <filename unknown>:0
  at RushHour.UI.DateTimeBar.CreateEvent (DateTime startTime, DateTime endTime, UInt16 building, Color32 colour) [0x00000] in <filename unknown>:0
  at RushHour.UI.DateTimeBar.CreateEvent (RushHour.Events.CityEventData eventData, Color32 colour) [0x00000] in <filename unknown>:0
  at RushHour.UI.DateTimeBar.UpdateEventBlocks () [0x00000] in <filename unknown>:0
  at RushHour.UI.DateTimeBar.<Initialise>b__6_0 (System.String languageIdentifier) [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception)

New BuildingWorldInfoPanel issues

Some people are having issues with the custom BuildingWorldInfoPanel.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: at (wrapper managed-to-native) UnityEngine.Component:GetComponentFastPath (System.Type,intptr) at UnityEngine.Component.GetComponent[UIComponent] () [0x00000] in <filename unknown>:0 at ColossalFramework.UI.UICustomControl.get_component () [0x00000] in <filename unknown>:0 at ColossalFramework.UI.UICustomControl.Find[UIButton] (System.String searchName) [0x00000] in <filename unknown>:0 at RushHour.UI.NewBuildingWorldInfoPanel+<>c__DisplayClass5_0.<OnSetTarget>b__0 (System.String languageIdentifier) [0x00000] in <filename unknown>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception

Idea: Make sense of buildings names

Right now no matter what park or unique building you plop it will behave like a generic entertainment building. It would be cool if building a citizen wants to visit would depend on its name (for custom assets some parsing may be applied.

Some examples:

  • citizens with pet dogs prefer to go to dog park
  • kids prefer to go to playgrounds
  • people prefer to go to theaters or cinemas on weekends and at evenings
  • no resident would like to go to governmental building at weekend
  • Some people go to churches at Sunday mornings
  • Pubs and bars are most visited at friday nights
  • And so on and on and on...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.