I tried modding my map to make the Supply Truck transport infantry like the APC instead of give money to allies. I set the cash to 0 but the game crashes. Here's what the change look like:
TRUK:
Inherits: ^Vehicle
Inherits@selection: ^SelectableSupportUnit
Buildable:
Queue: Vehicle
BuildPaletteOrder: 410
Prerequisites: ~techlevel.low
Description: Transports cash to other players.\n Unarmed
Valued:
Cost: 500
Tooltip:
Name: Supply Truck
Health:
HP: 11000
Armor:
Type: Light
Mobile:
Speed: 128
RevealsShroud:
Range: 4c0
Cargo:
Types: Infantry
MaxWeight: 5
PipCount: 5
LoadingCondition: notmobile
DeliversCash:
Payload: 0
PlayerExperience: 0
SpawnActorOnDeath:
Actor: moneycrate
mod Supply Truck to transport infantry?
Re: mod Supply Truck to transport infantry?
I'd just remove the lines
What does the crash log say?
Code: Select all
DeliversCash:
Payload: 0
PlayerExperience: 0
-
- Posts: 16
- Joined: Wed Apr 22, 2020 8:48 am
Re: mod Supply Truck to transport infantry?
removed those lines but still crashes:abcdefg30 wrote: ↑Tue May 25, 2021 11:28 pmI'd just remove the linesWhat does the crash log say?Code: Select all
DeliversCash: Payload: 0 PlayerExperience: 0
OpenRA engine version release-20200503
Red Alert mod version release-20200503
Date: 2021-05-26 06:04:41Z
Operating System: Windows (Microsoft Windows NT 6.2.9200.0)
Runtime Version: .NET CLR 4.0.30319.42000
Exception of type `OpenRA.YamlException`: s-vehicles.yaml:52: Parent type `^Vehicle` not found
at OpenRA.MiniYaml.ResolveInherits(String key, MiniYaml node, Dictionary`2 tree, Dictionary`2 inherited)
at OpenRA.MiniYaml.Merge(IEnumerable`1 sources)
at OpenRA.Graphics.SequenceProvider.Load(IReadOnlyFileSystem fileSystem, MiniYaml additionalSequences)
at OpenRA.Graphics.SequenceProvider.<>c__DisplayClass7_0.<.ctor>b__0()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at OpenRA.Graphics.SequenceProvider.Preload()
at OpenRA.Map.PostInit()
at OpenRA.Map..ctor(ModData modData, IReadOnlyPackage package)
at OpenRA.ModData.PrepareMap(String uid)
at OpenRA.Game.StartGame(String mapUID, WorldType type)
at OpenRA.Network.UnitOrders.ProcessOrder(OrderManager orderManager, World world, Int32 clientId, Order order)
at OpenRA.Network.OrderManager.TickImmediate()
at OpenRA.Sync.<>c__DisplayClass13_0.<RunUnsynced>b__0()
at OpenRA.Game.InnerLogicTick(OrderManager orderManager)
at OpenRA.Game.LogicTick()
at OpenRA.Game.Loop()
at OpenRA.Game.Run()
at OpenRA.Game.InitializeAndRun(String[] args)
at OpenRA.WindowsLauncher.RunGame(String[] args)
UPDATE: i fixed the crash by removing
Inherits: ^Vehicle
Inherits@selection: ^SelectableSupportUnit
but i still cant load troops in the truck
Re: mod Supply Truck to transport infantry?
Does your infantry have the Passenger trait with the correct CargoType?
Code: Select all
Passenger:
CargoType: Infantry
-
- Posts: 16
- Joined: Wed Apr 22, 2020 8:48 am
Re: mod Supply Truck to transport infantry?
It's the default infantry, they can enter APCs.abcdefg30 wrote: ↑Wed May 26, 2021 10:56 amDoes your infantry have the Passenger trait with the correct CargoType?Code: Select all
Passenger: CargoType: Infantry
Re: mod Supply Truck to transport infantry?
Hm, the only other thing that could be is if you use spaces for indentation. (You have to use tabs.) So double check that. Otherwise I'm out of ideas.
-
- Posts: 16
- Joined: Wed Apr 22, 2020 8:48 am
Re: mod Supply Truck to transport infantry?
I copy pasted the code so no space or tab needed. I think the supply cargo ability isnt allowing it but i dont know how to removed it from the map mod, if i dont add the cargo codes then its automatically added.