dymanoid / RealTime

A mod for the Cities: Skylines game. Adjusts the time flow and the citizens behavior to make them more real.
MIT License
97 stars 59 forks source link

No locale found #9

Closed Toonu closed 6 years ago

Toonu commented 6 years ago

screenshot Hello, I've added your mod and its working nicely, the only problem is that the settings for the mod is all showing No locale found, meaning I can't set up the values because I don't know what they mean. Or at least screenshot of the normal settings would be helpful for setup. 👍

dymanoid commented 6 years ago

@Toonu, which game version do you have? Does it happen all the time, or maybe the settings are OK after a game restart?

DalveenLeandor commented 6 years ago

it happen to me 1 time, i change game language to English and return to my language and it solve.

Toonu commented 6 years ago

Version 1.10.0 F3. Restart didn't help, but as said, its fortunately just language problem, because functionality of the mod isn't changed at all. I'll try set the game to...idk...spanish and then back to english later today and see.

dymanoid commented 6 years ago

Still cannot reproduce the issue.

Toonu commented 6 years ago

Maybe it's some other mod incompability?

dymanoid commented 6 years ago

If you encounter this issue, can you please share your game log file?

timapelov commented 6 years ago

I also had this bug, I changed the name of the mod folder to "RealTime" and everything became correct.

dymanoid commented 6 years ago

@timapelov, please don't change the folder names because they are managed by Steam.

Eragon2016 commented 6 years ago

hey i have the same problem and i have tried changing the game language to a different language and then back to the language i use but it does not work even enabling one real time does not work

dymanoid commented 6 years ago

@Eragon2016, please share your game's log file just after the issue occurs. Otherwise, I'm unable to tell what is wrong. I cannot reproduce this issue.

Eragon2016 commented 6 years ago

he 'Real Time' cannot load data from localization file 'C:\Users\ERAGON2016\AppData\Local\Colossal Order\Cities_Skylines\Addons\Mods\RealTime\Localization\en.xml', error message: System.Xml.XmlException: Text node cannot appear in this state. file:///C:/Users/ERAGON2016/AppData/Local/Colossal Order/Cities_Skylines/Addons/Mods/RealTime/Localization/en.xml Line 80, position 12. at Mono.Xml2.XmlTextReader.ReadText (Boolean notWhitespace) [0x00000] in :0 at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in :0 at Mono.Xml2.XmlTextReader.Read () [0x00000] in :0 at System.Xml.XmlTextReader.Read () [0x00000] in :0 at Mono.Xml.EntityResolvingXmlReader.Read () [0x00000] in :0 at Mono.Xml.Schema.XsdValidatingReader.Read () [0x00000] in :0 at System.Xml.XmlValidatingReader.Read () [0x00000] in :0 at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] in :0 at System.Xml.XmlDocument.ReadNode (System.Xml.XmlReader reader) [0x00000] in :0 at System.Xml.XmlDocument.Load (System.Xml.XmlReader xmlReader) [0x00000] in :0 at System.Xml.XmlDocument.Load (System.String filename) [0x00000] in :0 at RealTime.Localization.LocalizationProvider.Load (System.String language) [0x00000] in :0 is this it i'm new to this

dymanoid commented 6 years ago

@Eragon2016, thank you for this valuable information. It seems to be an issue with the Unity3D game engine. I'll create a workaround for this.

Eragon2016 commented 6 years ago

thank you but i use the .xml that the mod created

dymanoid commented 6 years ago

So you don't change anything in the XML files, right?

Eragon2016 commented 6 years ago

english and no i don't change anything

Eragon2016 commented 6 years ago

thank you for trying to fix it but the problem is still there

dymanoid commented 6 years ago

@Eragon2016, can you provide the log file please?

Eragon2016 commented 6 years ago

The 'Real Time' mod cannot find a required localization file 'C:\Program Files (x86)\Cities Skylines Parklife\Localization\en.xml' there is this and everytime i open the gamei get a debug of all my mods but they work fine real time is my concern since i don't understand why it is this mod only and traffic manager

originalfoo commented 6 years ago

How do you launch the game? Through Steam or a desktop shortcut? Is the game purchased through Steam, or GOG or some other vendor?

And do you install the mod via Steam Workshop or some manual method? Do you use any mods that save/load content manager settings (such as this or this)?

Likely source of issue is this function in RealTimeMod.cs:

        private static string GetModPath()
        {
            string assemblyName = typeof(RealTimeMod).Assembly.GetName().Name;

            PluginManager.PluginInfo pluginInfo = PluginManager.instance.GetPluginsInfo()
                .FirstOrDefault(pi => pi.name == assemblyName || pi.publishedFileID.AsUInt64 == WorkshopId);

            return pluginInfo == null
                ? Environment.CurrentDirectory
                : pluginInfo.modPath;
        }

Maybe pluginInfo is null and Environment.CurrentDirectory is returning wrong path? Regardless, having some logging in GetModPath() function would help track down which value contains wrong path.

dymanoid commented 6 years ago

Okay, so this is another issue, not the original one.

dymanoid commented 6 years ago

BTW, the method you show has no issues. If there is no PluginInfo instance for the mod with a registered workshop ID in the game, then something is globally wrong.

originalfoo commented 6 years ago

Yup, the game is doing something wrong, but which bit of the game? It would still be useful to track down and report to Paradox/CO. Reasoning: If that method will be included in #84 (either as part of the shared infrastructure or in the mods that use that infrastructure) then this issue is going to recur.

Eragon2016 commented 6 years ago

well a friend gave me the game and i download the mods though a website and not steam and i use none of the mods you have shown when i enter the game a pop-up appears saying that no source files has not been found for almost all the mods but they still work fine its only real time that does not show the options only no locale found

dymanoid commented 6 years ago

Okay. Real Time doesn't support running without Steam Workshop, sorry.

Eragon2016 commented 6 years ago

oh ok thank you anyway for trying to fix