Skip to content

Conversation

@penev92
Copy link
Member

@penev92 penev92 commented Apr 23, 2025

(Here we go again!)
Two things to note:

  • The ChronoResourceDelivery here is broken because of the ongoing docking rework upstream , but I don't think it's worth adapting to the current WIP engine APIs until those settle to a semi-stable state.
  • The ImportRA2MapCommand may have some regressions (I believe it doesn't import lamps after this update), but it deserves a full rewrite (as mentioned in Added a Red Alert 2 .map importer and terrain lighting #798 (comment)) based on Improve gen2 map importer OpenRA#20784, which I am already doing in a follow-up branch and would like to keep in a separate PR because this one is big enough.

@penev92 penev92 force-pushed the update-to-20250330 branch from 40164d6 to ce3d79a Compare April 24, 2025 17:05
penev92 added 14 commits April 25, 2025 00:10
- Move Voxel assets browser preview definitions
 from common to TS (OpenRA PR 21118).
- Persist skirmish settings between sessions (OpenRA PR 21206).
- Prevent community mods from warning on unused translations
 in the common assets (OpenRA PRs 21503, 21622).
- Expose mod.yaml content to localisation (OpenRA PR 21601).
.\utility.cmd ra2 --update-mod release-20231010 --detailed --apply
OpenRA PR 21134.
Run utility command --extract-chrome-strings. NOTE: This expects that there is a /fluent folder with a /chrome.ftl file in your mod!
OpenRA PR 21204?
Run utility command --extract-yaml-strings.
Refinery.TickLifetime and TickVelocity were removed in OpenRA PR 20636
as they were apparently unused for a long, long time.
@penev92 penev92 force-pushed the update-to-20250330 branch from ce3d79a to 316ae3d Compare April 24, 2025 21:11
@penev92
Copy link
Member Author

penev92 commented Apr 24, 2025

Fixed several things and took the liberty to update AUTHORS.

I have two follow-up PRs ready:

  • for the map importer
  • for the content packages / installation

But I would prefer not to add them to this already quite sizable PR.

@Mailaender
Copy link
Member

Crashes when I start with map The Alamo:

Exception of type `System.ArgumentException`: This frozen actor has no footprint.
Actor Name: cafncp
Actor Location: 27,-27
Input footprint: []
Input footprint (after shroud.Contains): []
   at OpenRA.Traits.FrozenActor..ctor(Actor actor, ICreatesFrozenActors frozenTrait, PPos[] footprint, Player viewer, Boolean startsRevealed) in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Game/Traits/Player/FrozenActorLayer.cs:line 100
   at OpenRA.Mods.Common.Traits.FrozenUnderFog.<>c__DisplayClass9_0.<OpenRA.Traits.INotifyCreated.Created>b__0(Player player, Int32 playerIndex) in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Mods.Common/Traits/Modifiers/FrozenUnderFog.cs:line 72
   at OpenRA.Primitives.PlayerDictionary`1..ctor(World world, Func`3 valueFactory) in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Game/Primitives/PlayerDictionary.cs:line 38
   at OpenRA.Mods.Common.Traits.FrozenUnderFog.OpenRA.Traits.INotifyCreated.Created(Actor self) in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Mods.Common/Traits/Modifiers/FrozenUnderFog.cs:line 70
   at OpenRA.Actor.Initialize(Boolean addToWorld) in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Game/Actor.cs:line 215
   at OpenRA.Mods.Common.Traits.SpawnMapActors.WorldLoaded(World world, WorldRenderer wr) in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Mods.Common/Traits/World/SpawnMapActors.cs:line 52
   at OpenRA.World.LoadComplete(WorldRenderer wr) in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Game/World.cs:line 291
   at OpenRA.Game.StartGame(String mapUID, WorldType type) in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Game/Game.cs:line 203
   at OpenRA.Network.UnitOrders.ProcessOrder(OrderManager orderManager, World world, Int32 clientId, Order order) in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Game/Network/UnitOrders.cs:line 200
   at OpenRA.Network.OrderManager.ReceiveImmediateOrders(Int32 clientId, OrderPacket orders) in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Game/Network/OrderManager.cs:line 180
   at OpenRA.Network.NetworkConnection.OpenRA.Network.IConnection.Receive(OrderManager orderManager) in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Game/Network/Connection.cs:line 350
   at OpenRA.Sync.<>c__DisplayClass13_0.<RunUnsynced>b__0() in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Game/Sync.cs:line 167
   at OpenRA.Sync.RunUnsynced[T](Boolean checkSyncHash, World world, Func`1 fn) in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Game/Sync.cs:line 203
   at OpenRA.Sync.RunUnsynced(World world, Action fn) in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Game/Sync.cs:line 168
   at OpenRA.Game.InnerLogicTick(OrderManager orderManager) in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Game/Game.cs:line 651
   at OpenRA.Game.LogicTick() in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Game/Game.cs:line 666
   at OpenRA.Game.Loop() in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Game/Game.cs:line 835
   at OpenRA.Game.Run() in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Game/Game.cs:line 888
   at OpenRA.Game.InitializeAndRun(String[] args) in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Game/Game.cs:line 313
   at OpenRA.Launcher.Program.Main(String[] args) in /home/matthias/Entwicklung/OpenRA/ra2/engine/OpenRA.Launcher/Program.cs:line 46

Apparently it contained multiplayer maps, but we don't install it anyway.
To stop it from crashing due to a fence at the top tile row
that is being projected outside the map bounds.
@penev92
Copy link
Member Author

penev92 commented May 6, 2025

The problem was a fence at the topmost row of tiles, which was being projected outside of the map bounds.
The map editor just didn't render that portion of the fence.
image
I reimported the map using https://github.com/penev92/ra2/tree/mapImporterRewrite / #815, which was a very long time coming and it is now fine because the updated map importer adds a bunch of extra cordon tiles.
image

Comment on lines +89 to +97
// void INotifyHarvestAction.MovingToRefinery(Actor self, Actor refineryActor)
// {
// var iao = refineryActor.Trait<IAcceptResources>();
// var targetCell = self.World.Map.CellContaining(iao.DeliveryPosition);
// if (destination != null && destination.Value != targetCell)
// ticksTillCheck = 0;
// refinery = refineryActor;
// destination = targetCell;
// }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out commented function.

Comment on lines +119 to +120
// self.QueueActivity(new DeliverResources(self, refinery));
// self.QueueActivity(new FindAndDeliverResources(self, refinery));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete it or keep it. We track the changes in revision control.

foreach (var kv in structuresSection)
{
var isDeployed = false;
// TODO: Add back isDeployed,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you removing it?

spawn-claimed: 5, 5, 22, 22
spawn-disabled: 5, 5, 22, 22 # TODO: Needs new artwork!
admin: 64, 5, 7, 5
bot: 170, 51, 16, 16 # TODO: Needs new artwork!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just copy from ra.

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

Successfully merging this pull request may close these issues.

2 participants