Quistar-LAB / PropAnarchy

Prop Anarchy is a mod that utilizes EML and contains popular functions that were rendered incompatible due to the new Prop Framework
MIT License
3 stars 2 forks source link

All props shifted by approx 1 map tile #2

Closed originalfoo closed 2 years ago

originalfoo commented 2 years ago

Log file: output_log.txt

After changes on Dec 30th 2021 all the props in my city have suddenly shifted by approx 1 map tile, and are no longer selectable in Move It mod.

The height and angle of props seems to be correct, but they are shifted sideways on one axis.

image

I've also noticed that they seem to disappear depending on camera angle:

image

Change camera angle and they disappear:

image

They seem to disappear at different angles, for example:

image

image

image

Recently updated mods: image

originalfoo commented 2 years ago

As an interim workaround - maybe put a button in mod options that, when clicked, repositions the props by whatever offset they had?

The workaround on the mod comments of selecting all and adjust to terrain height is a major nigmare as I have thousands of props up on buildings (such as aircraft warning lights, shop signs, etc) it's going to be complete nightmare repositioning thousands of props.

originalfoo commented 2 years ago

Ah, just seen EML update with emergency button - will test now and report back.

originalfoo commented 2 years ago

Enabled in game but had no effect; assuming it needs enabling before loading save, it might be worth updating text of the button to make that clear to users.

Quistar-LAB commented 2 years ago

Yes, try enable before loading game

originalfoo commented 2 years ago

Ok, tried - props are still in same place, but now flattened to terrain and selectable.

image

Some are outside the map area entirely (light props on the right of image below):

image

I can't select those props with Move It as it's selection box is constrained to map size.

This gives some illustration of the extent of the issue I'm faced with:

image

I have over 26,000 hand-placed props which all need manual repositioning. :/

Quistar-LAB commented 2 years ago

Lemme see if I can find another way around this

originalfoo commented 2 years ago

Just read your comment on EML workshop page; will try save and load as described there and report back.

Might be worth highlighting that process in big quote box with h1 text on both PA and EML workshop descriptions.

Testing save/exit/load cycle now...

Quistar-LAB commented 2 years ago

Nono

Quistar-LAB commented 2 years ago

Don't! yet

Quistar-LAB commented 2 years ago

Ok reload game with version 1.0.0 again, with emergency checkbox enabled and start the procedure again, this time save

originalfoo commented 2 years ago

Ok, will try.

BTW, it's prolly best to show warning to users on main menu screen, before loading city, so they know what's happening. You can stop "Resume" (auto load last save) feature by setting LauncherLoginData.instance.m_continue to false, that way user will stay on main menu even if they chose "Resume" button on the Paradox Launcher app. They can still choose to load saves, etc., but at least they will know about potential issues. The OK button on displayed message can store that the warning has been viewed by user so it won't keep spamming on subsequent app launches.

Quistar-LAB commented 2 years ago

Yeah I know, but it'll probably take me another 2 hours just to get this warning message programmed

originalfoo commented 2 years ago

Hmm... doesn't look like it worked - with the button enabled, then loading save, will the props be in correct position when city loaded, or only after save + exit + reload? (each save I put under different file name so as not to overwrite old saves)

Quistar-LAB commented 2 years ago

Even with version 1.0.0?

originalfoo commented 2 years ago

With 1.0.0 - Enabled checkbox in EML settings, loaded save, and my cargo harbour props are still in the river:

image

(BTW, the city I loaded was saved about 12-13 hours ago before the update that caused the problem as far as I can tell)

I'm about to save, exit, reload and will report back...

originalfoo commented 2 years ago

Hrm, that didn't go too well:

image

Summary error text from "copy" button on that error panel:

The Mod C:\Program Files (x86)\Steam\steamapps\workshop\content\255710\576327847 [EightyOne.dll] has caused an error [ModException]

Details:
System.InvalidCastException: Cannot cast from source type to destination type.
  at (wrapper managed-to-native) object:__icall_wrapper_mono_object_castclass (object,intptr)
  at ColossalFramework.IO.DataSerializer.ReadObject[Data] (ColossalFramework.IO.LegacyResolverHandler customResolver) [0x00000] in <filename unknown>:0 
  at ColossalFramework.IO.DataSerializer.Deserialize[Data] (System.IO.Stream stream, Mode mode, ColossalFramework.IO.LegacyResolverHandler customResolver) [0x00000] in <filename unknown>:0 
  at ColossalFramework.IO.DataSerializer.Deserialize[Data] (System.IO.Stream stream, Mode mode) [0x00000] in <filename unknown>:0 
  at EightyOne.DataExtensions.AreaManagerDataExtension.OnLoadData () [0x00000] in <filename unknown>:0 
  at SerializableDataWrapper.OnLoadData () [0x00000] in <filename unknown>:0 

Full errror text from log file:

InvalidCastException: Cannot cast from source type to destination type.
  at (wrapper managed-to-native) object:__icall_wrapper_mono_object_castclass (object,intptr)
  at ColossalFramework.IO.DataSerializer.ReadObject[Data] (ColossalFramework.IO.LegacyResolverHandler customResolver) [0x00000] in <filename unknown>:0 
  at ColossalFramework.IO.DataSerializer.Deserialize[Data] (System.IO.Stream stream, Mode mode, ColossalFramework.IO.LegacyResolverHandler customResolver) [0x00000] in <filename unknown>:0 
  at ColossalFramework.IO.DataSerializer.Deserialize[Data] (System.IO.Stream stream, Mode mode) [0x00000] in <filename unknown>:0 
  at EightyOne.DataExtensions.AreaManagerDataExtension.OnLoadData () [0x00000] in <filename unknown>:0 
  at SerializableDataWrapper.OnLoadData () [0x00000] in <filename unknown>:0 
Rethrow as ModException: The Mod C:\Program Files (x86)\Steam\steamapps\workshop\content\255710\576327847 [EightyOne.dll] has caused an error

UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
SerializableDataWrapper:OnLoadData()
SimulationManager:LateUpdateData(UpdateMode, Single, Single)
SimulationManager:Managers_LateUpdateData(UpdateMode, Single, Single)
<LoadSimulationData>c__IteratorB:MoveNext()
AsyncTask:Execute()
SimulationManager:SimulationStep()
SimulationManager:SimulationThread()

Log file: output_log.txt

Quistar-LAB commented 2 years ago

Yep I noticed, please give EML workshop a quick resubscription

Quistar-LAB commented 2 years ago

BTW can you get on Discord. Its more convenient

originalfoo commented 2 years ago

Error still happening after unsub/resub EML

The Mod C:\Program Files (x86)\Steam\steamapps\workshop\content\255710\576327847 [EightyOne.dll] has caused an error [ModException]

Details:
System.InvalidCastException: Cannot cast from source type to destination type.
  at (wrapper managed-to-native) object:__icall_wrapper_mono_object_castclass (object,intptr)
  at ColossalFramework.IO.DataSerializer.ReadObject[Data] (ColossalFramework.IO.LegacyResolverHandler customResolver) [0x00000] in <filename unknown>:0 
  at ColossalFramework.IO.DataSerializer.Deserialize[Data] (System.IO.Stream stream, Mode mode, ColossalFramework.IO.LegacyResolverHandler customResolver) [0x00000] in <filename unknown>:0 
  at ColossalFramework.IO.DataSerializer.Deserialize[Data] (System.IO.Stream stream, Mode mode) [0x00000] in <filename unknown>:0 
  at EightyOne.DataExtensions.AreaManagerDataExtension.OnLoadData () [0x00000] in <filename unknown>:0 
  at SerializableDataWrapper.OnLoadData () [0x00000] in <filename unknown>:0 
Quistar-LAB commented 2 years ago

Ok, please go back to a previous game save, and follow through the procedure again

originalfoo commented 2 years ago

Ok, trying with an autosave, and if that doesn't work I'll go back to much earlier 'forest' save.

image

originalfoo commented 2 years ago

Same issue:

image

Going to try the much older forest save next.

originalfoo commented 2 years ago

Same issue with forest save. :(

Process I'm using:

  1. Launch cities
    • Launcher app -> Play
  2. Options > EML > Enable emergency button
    • It's showing EML version 1.0.0 on the options screen
  3. Load a save (eg. dec2021, AutoSave, and most recently... forest)
  4. City loads, but props are still in weird positions
  5. Save city as prop fuckery (overwriting existing file)
  6. Exit to desktop (note: I use Instant Return to Desktop mod, but doubt that makes any difference)
  7. Launch game again + load city
    • Launcher app -> Resume
  8. I get the 81 Tiles cannot cast error and the props are still in weird places

The forest save was made prior to 0.9.8 release as far as I can tell. The other saves (dec2021 and AutoSave) were made after 0.9.8 release.

Quistar-LAB commented 2 years ago

That's really too bad... I tried getting around this issue, but for your situation, you'll have to go to a version before you started using EML

originalfoo commented 2 years ago

Would it not be possible to get a button that I can use in-game to just shift the position of the props?

It's not so much that props are 'floating' as many users report, the props are shifted sideways (appears to be different direction depending on map quadrant?)... if prop was at higher elevation originally, it will look like they are floating when it's at the shifted position as they will still be at original elevation. Moving back to original position = not floating any more.

If there was some way to just shift them back.... otherwise I'm losing about 2-3 days of city modifications. I can do it, of course, but if there's any way of avoiding having to lose 2-3 days of changes....

Quistar-LAB commented 2 years ago

The thing is there's no way of telling the shift from the vector being loaded. I really hate to tell you this, but there's no other way for me to unsave the error introduced by previous EML version. I'm very sorry you had to lose 2~3 days of work.

Quistar-LAB commented 2 years ago

Please follow the procedure at https://github.com/Quistar-LAB/EManagersLib/releases to fix your issue

originalfoo commented 2 years ago

That worked!! :D

I had to unsub Customize It Extended mod to get the 0.9.7 version to load without error; might be worth adding a note on that to releases page.