Skip to content
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

XCC mixer TD SHP: Reference doesn't point to image data #21422

Open
Typhoon-95 opened this issue May 10, 2024 · 3 comments
Open

XCC mixer TD SHP: Reference doesn't point to image data #21422

Typhoon-95 opened this issue May 10, 2024 · 3 comments

Comments

@Typhoon-95
Copy link

System Information

  • Operating System: Windows 10 x64 22H2
  • OpenRA Version: release-20231010
  • OpenRA Mod: openra-cnc
  • Source: Official download from the website
  • For self-compiled or third-party packages: Mono version

Exception log

OpenRA engine version release-20231010
OpenRA Language: en
Tiberian Dawn mod version release-20231010
Date: 2024-05-10 15:33:57Z
Operating System: Windows (X64, Microsoft Windows NT 10.0.19045.0)
Runtime Version: .NET CLR 6.0.22
Installed Language: es (Installed) es (Current) es (Current UI)
Exception of type `System.IO.InvalidDataException`: Reference doesn't point to image data 70788->4633
   at OpenRA.Mods.Cnc.SpriteLoaders.ShpTDSprite..ctor(Stream stream)
   at OpenRA.Mods.Cnc.SpriteLoaders.ShpTDLoader.TryParseSprite(Stream s, String filename, ISpriteFrame[]& frames, TypeDictionary& metadata)
   at OpenRA.Graphics.SpriteCache.GetFrames(IReadOnlyFileSystem fileSystem, String filename, ISpriteLoader[] loaders, TypeDictionary& metadata)
   at OpenRA.Graphics.SpriteCache.LoadReservations(ModData modData)
   at OpenRA.Graphics.SequenceSet.LoadSprites()
   at OpenRA.ModData.PrepareMap(String uid)
   at OpenRA.World..ctor(String mapUID, ModData modData, OrderManager orderManager, WorldType type)
   at OpenRA.Game.StartGame(String mapUID, WorldType type)
   at OpenRA.Game.LoadShellMap()
   at OpenRA.Mods.Common.LoadScreens.BlankLoadScreen.StartGame(Arguments args)
   at OpenRA.Game.InitializeMod(String mod, Arguments args)
   at OpenRA.Game.Initialize(Arguments args)
   at OpenRA.Game.InitializeAndRun(String[] args)
   at OpenRA.WindowsLauncher.WindowsLauncher.RunGame(String[] args)

Replay

Additional information

I've been trying to add a new unit based on the Mammoth Mark 2, with both idle and move sequences included in my shp file. I modded the defaults.yaml and each of the vehicles yaml files located in rules and sequences respectively to get this working. The games starts and crashes after some seconds, giving me this error as a result.

@Mailaender
Copy link
Member

How did you create the .shp file?

@Typhoon-95
Copy link
Author

First, I converted all the frames from Blender into TD's temperat palette using the ImageShaper tool, giving me a TS shp file with TD colors. Then, I separated all the frames into png files using XCC Mixer and finally, I turned all the images into an actual TD shp file with the same tool

@anvilvapre
Copy link
Contributor

OpenRA.Mods.Cnc/SpriteLoaders/ShpTDLoader.cs

else if (h.Format == Format.XORLCW && !offsets.TryGetValue(h.RefOffset, out h.RefImage))
                                        throw new InvalidDataException($"Reference doesn't point to image data {h.FileOffset}->{h.RefOffset}");                                                                                                 
                        }            

@Mailaender Mailaender changed the title InvalidDataException`: Reference doesn't point to image data XCC mixer TD SHP: Reference doesn't point to image data May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants