Giter Club home page Giter Club logo

csl-ambient-sounds-tuner's People

Contributors

archomeda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

csl-ambient-sounds-tuner's Issues

Update nuget package

Hi,

I'm looking to set up appvoyer for my project, when I came across your nuget packages for the C:S internal libraries. However, I did notice though that the libraries don't seem to been updated for the latest released version( 1.4.0-f3 ), would it be possible to update them? ( Provided that I'm not gonna get in trouble for possible violations of the EULA ๐Ÿ˜† )

P.S: Thanks so much for providing the service! This seems like a really great idea, maybe you should ask Colossal Order/Paradox to maintain it, if possible?

Item order in UI

Would it be possible to re-order items somewhat to group related things?

For example, all the siren volumes next to each other (maybe also rename them to something like "Siren: Police" for example), environment together, animals together, etc...

Mod causes errors on Cities Skylines 1.6.0

As per title. The error reads:

A Mod caused an error [ModException]

Details:
System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
at System.Reflection.Assembly.GetExportedTypes () [0x00000] in :0
at ColossalFramework.Plugins.PluginManager+PluginInfo.GetInstances[IUserMod] () [0x00000] in :0
at EntryData.GenerateData () [0x00000] in :0

Load and unload when enabled/disabled without requiring a restart

Currently when the mod is enabled or disabled, the state of the mod at the main menu doesn't change until the game has been restarted or a save has been loaded and unloaded. This can be solved by listening to the event that gets fired when a mod has been enabled or disabled.

Changing either the police or ambulance siren changes them both

The game treats the police sirens the same as the ambulance sirens. Since they are both references, when you change one, the other one gets changed too.

In other words: This causes the volume of the police sirens to be the same with the ambulance sirens. If you change the volume of one siren, the other one gets changed automatically as well.

In order to solve this, we have to prevent that both EffectInfo objects reference the same AudioInfo object. This means that we have to duplicate the ambulance siren AudioInfo object to the police siren EffectInfo object. After that, we should be able to change them individually.

Exception when enabling or disabling other mods while AST is enabled

The following exception is thrown when enabling or disabling other mods while Ambient Sounds Tuner is enabled:

NullReferenceException
  at (wrapper managed-to-native) UnityEngine.Component:get_gameObject ()
  at ColossalFramework.UI.UIComponent.GetUIView () [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIComponent.Invalidate () [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIPanel.ChildInvalidatedLayout () [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIPanel.ChildIsVisibleChanged (ColossalFramework.UI.UIComponent child, Boolean value) [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIComponent.OnVisibilityChanged () [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIComponent.set_isVisible (Boolean value) [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIComponent.Show () [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIScrollbar.AutoHide () [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIScrollbar.set_value (Single value) [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIScrollbar.set_maxValue (Single value) [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIScrollablePanel.UpdateScrollbars () [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIScrollablePanel.ChildInvalidatedLayout () [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIScrollablePanel.ChildInvalidated (ColossalFramework.UI.UIComponent child, Vector2 value) [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIComponent.OnSizeChanged () [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIComponent.set_size (Vector2 value) [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIComponent.FitChildrenVertically (Single margin) [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIPanel.AutoArrange () [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIPanel.ChildInvalidatedLayout () [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIPanel.ChildInvalidated (ColossalFramework.UI.UIComponent child, Vector2 value) [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIComponent.OnSizeChanged () [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIComponent.set_size (Vector2 value) [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIComponent.FitChildrenVertically (Single margin) [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIPanel.AutoArrange () [0x00000] in <filename unknown>:0 
  at ColossalFramework.UI.UIPanel.Update () [0x00000] in <filename unknown>:0 

Add support for custom sounds

It's something that has been suggested by someone and I have thought about it since. Since the volumes and the UI are pretty much in place right now, I can now start working towards getting this implemented.

The basic idea is that this mod itself will not provide custom sounds nor give the ability to select custom files directly from your computer. The way I want to set it up, is pretty much alike Sapphire with the UI skins, but with a bit more advanced selection in the options panel. If someone wants to make, let's call it a sound pack, he or she has to make his or her own mod, create an XML file that defines the sounds, combine the audio files with it and upload the mod on the workshop. Of course that mod itself doesn't do anything, so a dependency has to be set up properly. After it's been installed and enabled, the user can choose between the installed audio files of a specific sound (and default of course).

This is still theoretical of course. But if this works out nicely, I think there will be a lot of happy people.

NullReferenceException when patching sounds

The following error has been reported on the Steam Workshop:

[Warning] : AudioInfo must be instantiated using the ScriptableObject.CreateInstance method instead of new AudioInfo. ()
[Warning] : [AmbientSoundsTuner] Could not patch sounds: System.NullReferenceException: Object reference not set to an instance of an object
  at AmbientSoundsTuner.SoundPatchers.SoundsPatcher.GetAudioInfo (AmbientSoundsTuner.SoundPatchers.SOundContainer sound) [0x0000] in <filename unknown>:0
  at AmbientSoundsTuner.SoundPatchers.SoundsInstancePatcher`1[T].BackupSound (.T id) [0x0000] in <filename unknown>:0
  at AmbientSoundsTuner.SoundPatchers.SOundInstancePatcher`1[T].BackupAll (System.Func`2 backupFunc) [0x0000] in <filename unknown>:0
  at AmbientSoundsTuner.SoundPatchers.SoundsInstancePatcher`1[T].BackupAllSounds () [0x0000] in <filename unknown>:0
  at AmbientSoundsTuner.Mod.PatchSounds[String] (AmbientSoundsTuner.SoundPatchers.SoundsInstancePatcher`1 patcher, IDictionary`2 newSounds) [0x0000] in <filename unknown>:0
  at AmbientSoundsTuner.Mod.PatchSounds () [0x0000] in <filename unknown>:0

Recheck if compatibility with some [ARIS] mods can be restored

I'm unsure if there are any incompatibilities at all currently, since I did not test it beforehand. But since some people would actually love to remove the seagulls completely instead of just muting it, it would be nice for those people to actually have compatibility with the mod [ARIS] Remove Seagulls.

Further testing is needed.

Improve settings UI

The UI window has to be improved to contain tabs, instead of a big list of sliders. Especially if more sliders will be added in the future.

Settings are not applied nor saved when the window has not been closed

This was done intentionally at first. The settings will be saved upon closing the window. But this also causes some trouble. For example, it's possible to close the options window before closing the one from Ambient Sounds Tuner. This way, applying or saving the settings is skipped until that window has been closed manually.

Changing settings while in main menu throws exception

This issue is introduced with version 1.2.3. If you change a volume or audio track, the mod throws an exception because the sound is not loaded yet (you have to be ingame for that). This exception should be harmless, as the settings should still be saved when you close the options panel.

This issue is only when you're in the main menu. Changing settings while being in-game works just fine.

Debug Output for build 1.1.0.40

Hi Archomeda. I unsubscribed to the old version of ASTuner and subscribed to the new version. I restarted CS and received the following Debug Output window:

A.

  1. I disabled ScrollableToolBar and TerraformTool, restarted CS but recieved the below message.
  2. Unsubscribed to ASTuner, kept others disabled, restarted CS, subscribed ASTuner, restarted CS and received debug output again. Screenshot below
    image 1

B.
I went into CS and ASTuner worked with the above disabled. The volume controls appear to work as intended. When entering from or exiting to the CSe main menu I received the Debug Output window with a huge list. I realize this may not be of any value to you but I wanted to illustrate what I was getting.
Screenshot below:
image 002
image 003
image 004
image 005

Upon exiting to the main menu.
image 7

BTW: Thanks for your explaination, that explained a lot. Sorry for my delayed response, I'm UTC+5 hrs and couldn't get to this until this evening.

System Spec:
Intel Core i7-3930K Sandy Bridge-E 3.2GHz (3.8GHz Turbo) LGA 2011 Six-Core
MSI R9 290X LIGHTNING 4GB 512-Bit GDDR5 PCI Express 3.0
ASRock X79 Extreme6 LGA 2011 Intel X79 SATA 6Gb/s USB 3.0
COOLER MASTER HAF X Black Steel/ Plastic ATX w/tons of cooling
CORSAIR Hydro Series H100
Dual ASUS Black 24" 2ms HDMI LED monitors
G.SKILL Ripjaws Z Series 16GB (4 x 4GB)
Dual Corsair Force GT Series 180GB SATA III Internal SSD's
CORSAIR HX Series 750W SLI Ready CrossFire Ready 80 PLUS GOLD Certified Modular PSU
Logitech G510s Keyboard
Logitech G13 gamepad
Logitech G700s Laser Mouse

Ability to change volume of more sounds

Depends on #13.

There are more sounds of which the volume can be changed, but have not yet been added to the mod. The following sounds been proposed to include in the mod:

  • Animals
    • Cows
    • Pigs
    • Seagulls
  • Buildings
    • Advanced Wind Turbine
    • Airport
    • Bus Depot
    • Cemetery (multiple versions, depending on map theme)
    • Coal/Oil Power Plant
    • Commercial
    • Crematory (multiple versions, depending on map theme)
    • Elementary School (multiple versions, depending on map theme)
    • Fire Station
    • Fusion Power Plant
    • Harbor
    • High School (multiple versions, depending on map theme)
    • Hospital
    • Hydro Power Plant
    • Incineration Plant
    • Industrial
    • Metro Station
    • Nuclear Power Plant
    • Police Station
    • Small Power Plant (?)
    • Solar Power Plant
    • Train Station
    • University (multiple versions, depending on map theme)
    • Water Drain Pipe / Treatment Plant
    • Water Pumping Station
    • Wind Turbine
    • On Fire
    • On Upgrade
  • Misc
    • Bulldozer (Buildings)
    • Bulldozer (Props)
    • Bulldozer (Roads)
    • Placement (Buildings)
    • Placement (Props)
    • Placement (Roads)
    • Road Drawer
    • UI Clicks
    • UI Clicks (Disabled)
    • Zone Filler

Add ability to tune effect sounds

Effects are located in the field m_effects of the Effects GameObject. This will allow us to change the volume for the effects as well. The UI needs to be extended though. And at the moment I've no idea if the effects are dynamic or static. It's probably for the best to assume it's dynamic.

Maximum volume is not set on slider when using a custom sound

This happens only when the options panel is initialized. If a sound pack has a custom maximum volume set (that is not 1) on a certain sound, its slider still has its maximum set to 1. This prevents using a value higher than 1 when changing the volume.

Workaround: Change to the default sound and change back again. This should correctly apply the maximum value on the slider so you can change it. This has to be done every time the options panel is reloaded (every time a mod is enabled/disabled and after a restart).

Error - evidenlty with new update

Here is error info:

A Mod caused an error [System.Exception]

Details:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
  at System.Collections.Generic.Dictionary`2[AudioManager+AmbientType,AmbientSoundsTuner.Configuration+Sound].get_Item (AmbientType key) [0x00000] in <filename unknown>:0 
  at AmbientSoundsTuner.UI.ModOptionsPanel.AddSoundRow[AmbientType] (SliderDef`1 slider, UIHelperBase helper) [0x00000] in <filename unknown>:0 
  at AmbientSoundsTuner.UI.ModOptionsPanel.AddTab[AmbientType] (ColossalFramework.UI.UITabstrip tabstrip, Single buttonWidth, System.String title, IDictionary`2 content) [0x00000] in <filename unknown>:0 
  at AmbientSoundsTuner.UI.ModOptionsPanel.PopulateUI () [0x00000] in <filename unknown>:0 
  at CommonShared.UI.ConfigPanelBase.PerformLayout () [0x00000] in <filename unknown>:0 
  at AmbientSoundsTuner.Mod.OnSettingsUI (UIHelperBase helper) [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception
System.Exception: A Mod caused an error

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.