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

Defaults: breaks combine: Nodes #2

Open
yaaaaa opened this issue Sep 23, 2019 · 9 comments
Open

Defaults: breaks combine: Nodes #2

yaaaaa opened this issue Sep 23, 2019 · 9 comments

Comments

@yaaaaa
Copy link
Owner

yaaaaa commented Sep 23, 2019

To reproduce:

  1. Put original offsets in folders:
    изображение

изображение

  1. Run make.cmd to build TO mod

  2. Change true to false in if (LoadField(d, "AddExtension", true))
    Line 78 in Reloaded-Origins-master\engine\OpenRA.Mods.Common\Graphics\TilesetSpecificSpriteSequence.cs and Run make.cmd to build TO mod again or just rename file Reloaded-Origins-master\mods\yr\bits\sc\z\zl.png to zl.png.shp

  3. Run launch-game.cmd to see the crash in sequense used combine:

This crash is not exist in d2k mod, this sequence and metadata loads from this png correctly.

@yaaaaa
Copy link
Owner Author

yaaaaa commented Sep 23, 2019

OpenRA/OpenRA#17140

@yaaaaa
Copy link
Owner Author

yaaaaa commented Sep 23, 2019

if you "Change true to false in if (LoadField(d, "AddExtension", true))
Line 78 in Reloaded-Origins-master\engine\OpenRA.Mods.Common\Graphics\TilesetSpecificSpriteSequence.cs and Run make.cmd to build TO mod again" and not use AddExtension trait in e1 sequence, + add AddExtension: true to ALL other sequences of the mod, then game boot without errors, but when e1 soldier is trained in game, game crash:

OpenRA engine version release-20190314
Red Alert 2 mod version {DEV_VERSION}
on map 982d0a37b50154eab6c3652b37301bb7966b6833 (The Alamo by Westwood Studios).
Date: 2019-09-23 12:09:31Z
Operating System: Windows (Microsoft Windows NT 6.2.9200.0)
Runtime Version: .NET CLR 4.0.30319.42000
Exception of type System.NullReferenceException: Ссылка на объект не указывает на экземпляр объекта.
в OpenRA.Graphics.Animation.ScreenBounds(WorldRenderer wr, WPos pos, WVec offset, Single scale) в c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Graphics\Animation.cs:строка 72
в OpenRA.Graphics.AnimationWithOffset.ScreenBounds(Actor self, WorldRenderer wr, Single scale) в c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Graphics\AnimationWithOffset.cs:строка 52
в OpenRA.Mods.Common.Traits.Render.RenderSprites.d__f.MoveNext() в c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Mods.Common\Traits\Render\RenderSprites.cs:строка 211
в OpenRA.Actor.d__11.MoveNext() в c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Actor.cs:строка 197
в System.Linq.Enumerable.Any[TSource](IEnumerable1 source) в OpenRA.Traits.ScreenMap.AggregateBounds(IEnumerable1 screenBounds) в c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Traits\World\ScreenMap.cs:строка 225
в OpenRA.Traits.ScreenMap.TickRender() в c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Traits\World\ScreenMap.cs:строка 265
в OpenRA.World.TickRender(WorldRenderer wr) в c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\World.cs:строка 379
в OpenRA.Game.<>c__DisplayClass23.b__20() в c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Game.cs:строка 625
в OpenRA.Sync.<>c__DisplayClass5.b__4() в c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Sync.cs:строка 166
в OpenRA.Sync.RunUnsynced[T](Boolean checkSyncHash, World world, Func`1 fn) в c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Sync.cs:строка 182
в OpenRA.Sync.RunUnsynced(Boolean checkSyncHash, World world, Action fn) в c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Sync.cs:строка 166
в OpenRA.Game.InnerLogicTick(OrderManager orderManager) в c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Game.cs:строка 625
в OpenRA.Game.LogicTick() в c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Game.cs:строка 640
в OpenRA.Game.Loop() в c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Game.cs:строка 770
в OpenRA.Game.Run() в c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Game.cs:строка 810
в OpenRA.Game.InitializeAndRun(String[] args) в c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Game.cs:строка 256
в OpenRA.Program.Main(String[] args) в c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Support\Program.cs:строка 37

@alexeik
Copy link

alexeik commented Sep 23, 2019

image

вот так должна выглядеть папка для YR.
нужно только эту папку заполнить.
RA2 не нужна.

@cookgreen
Copy link
Contributor

cookgreen commented Sep 25, 2019

I think there is a bug for sprite loaders, for now, openra use sprite loaders in the mod.yaml to load the sprite formats not the extension.
It will try to load the sprite with the order defined in the mod.yaml
so that means:
SpriteFormats: ShpTS, TmpTS, ShpTD, PngSheet

is different from
SpriteFormats: PngSheet, ShpTS, TmpTS, ShpTD

So openra load the sprite by the sprite loader order defined in mod.yaml, not the extension. This is a big issue. I think that's why always load failed

In SpriteLoader.cs

//should have sprite extension check, load sprite by using the correct sprite loader
foreach (var loader in loaders)
	if (loader.TryParseSprite(stream, out frames, out metadata))
		return frames;

@abcdefg30

@yaaaaa
Copy link
Owner Author

yaaaaa commented Sep 27, 2019

Removed PngSheet ot first place
SpriteFormats: PngSheet, ShpTS, TmpTS, ShpTD
, nothing changed.

OpenRA engine version release-20190314
Red Alert 2 mod version {DEV_VERSION}
on map 3a94af24afc3d43b59eecdff309bbe44c5047644 (Pitch Point by Westwood Studios).
Date: 2019-09-27 05:21:07Z
Operating System: Windows (Microsoft Windows NT 6.2.9200.0)
Runtime Version: .NET CLR 4.0.30319.42000
Exception of type System.NullReferenceException: Object reference not set to an instance of an object.
at OpenRA.Graphics.Animation.ScreenBounds(WorldRenderer wr, WPos pos, WVec offset, Single scale) in c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Graphics\Animation.cs:line 72
at OpenRA.Graphics.AnimationWithOffset.ScreenBounds(Actor self, WorldRenderer wr, Single scale) in c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Graphics\AnimationWithOffset.cs:line 52
at OpenRA.Mods.Common.Traits.Render.RenderSprites.d__f.MoveNext() in c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Mods.Common\Traits\Render\RenderSprites.cs:line 211
at OpenRA.Actor.d__11.MoveNext() in c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Actor.cs:line 197
at System.Linq.Enumerable.Any[TSource](IEnumerable1 source) at OpenRA.Traits.ScreenMap.AggregateBounds(IEnumerable1 screenBounds) in c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Traits\World\ScreenMap.cs:line 225
at OpenRA.Traits.ScreenMap.TickRender() in c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Traits\World\ScreenMap.cs:line 265
at OpenRA.World.TickRender(WorldRenderer wr) in c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\World.cs:line 379
at OpenRA.Game.<>c__DisplayClass23.b__20() in c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Game.cs:line 625
at OpenRA.Sync.<>c__DisplayClass5.b__4() in c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Sync.cs:line 166
at OpenRA.Sync.RunUnsynced[T](Boolean checkSyncHash, World world, Func`1 fn) in c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Sync.cs:line 182
at OpenRA.Sync.RunUnsynced(Boolean checkSyncHash, World world, Action fn) in c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Sync.cs:line 166
at OpenRA.Game.InnerLogicTick(OrderManager orderManager) in c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Game.cs:line 625
at OpenRA.Game.LogicTick() in c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Game.cs:line 640
at OpenRA.Game.Loop() in c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Game.cs:line 770
at OpenRA.Game.Run() in c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Game.cs:line 810
at OpenRA.Game.InitializeAndRun(String[] args) in c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Game.cs:line 256
at OpenRA.Program.Main(String[] args) in c:\games\RTS\04.10.19\ra2-master\engine\OpenRA.Game\Support\Program.cs:line 37

@cookgreen its only if PNG in combine, look: OpenRA/OpenRA#17140

@alexeik . работает даже без файла movmd03, у меня они же, только распакованы в ту же самую папку для извлечения ресурсов

@cookgreen
Copy link
Contributor

ah

@cookgreen
Copy link
Contributor

#3

@yaaaaa yaaaaa changed the title YR, RA2 & RO mods do not load metadata from png in combines: [TS][RA2][YR][RO] Can't load metadata from png in combines: Sep 27, 2019
@yaaaaa
Copy link
Owner Author

yaaaaa commented Sep 27, 2019

Combine works correct without Defaults.

@yaaaaa yaaaaa changed the title [TS][RA2][YR][RO] Can't load metadata from png in combines: Defaults trait breaks combine Nodes Sep 27, 2019
@yaaaaa yaaaaa changed the title Defaults trait breaks combine Nodes Defaults: breaks combine: Nodes Sep 27, 2019
@cookgreen
Copy link
Contributor

hey, long time no see!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants