mod Supply Truck to transport infantry?

Information and discussion for custom maps and mods.
Post Reply
RedAlertMig
Posts: 16
Joined: Wed Apr 22, 2020 8:48 am

mod Supply Truck to transport infantry?

Post by RedAlertMig »

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

abcdefg30
Posts: 641
Joined: Mon Aug 18, 2014 6:00 pm

Re: mod Supply Truck to transport infantry?

Post by abcdefg30 »

I'd just remove the lines

Code: Select all

DeliversCash:
Payload: 0
PlayerExperience: 0
What does the crash log say?

RedAlertMig
Posts: 16
Joined: Wed Apr 22, 2020 8:48 am

Re: mod Supply Truck to transport infantry?

Post by RedAlertMig »

abcdefg30 wrote:
Tue May 25, 2021 11:28 pm
I'd just remove the lines

Code: Select all

DeliversCash:
Payload: 0
PlayerExperience: 0
What does the crash log say?
removed those lines but still crashes:


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

abcdefg30
Posts: 641
Joined: Mon Aug 18, 2014 6:00 pm

Re: mod Supply Truck to transport infantry?

Post by abcdefg30 »

Does your infantry have the Passenger trait with the correct CargoType?

Code: Select all

Passenger:
	CargoType: Infantry

RedAlertMig
Posts: 16
Joined: Wed Apr 22, 2020 8:48 am

Re: mod Supply Truck to transport infantry?

Post by RedAlertMig »

abcdefg30 wrote:
Wed May 26, 2021 10:56 am
Does your infantry have the Passenger trait with the correct CargoType?

Code: Select all

Passenger:
	CargoType: Infantry
It's the default infantry, they can enter APCs.

abcdefg30
Posts: 641
Joined: Mon Aug 18, 2014 6:00 pm

Re: mod Supply Truck to transport infantry?

Post by abcdefg30 »

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. :(

RedAlertMig
Posts: 16
Joined: Wed Apr 22, 2020 8:48 am

Re: mod Supply Truck to transport infantry?

Post by RedAlertMig »

abcdefg30 wrote:
Thu May 27, 2021 3:27 pm
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. :(
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.

Post Reply