Can someone point out what I have done wrong with this YAML

Information and discussion for custom maps and mods.
Post Reply
traincrazy484
Posts: 12
Joined: Fri Mar 18, 2016 1:32 am

Can someone point out what I have done wrong with this YAML

Post by traincrazy484 »

So I have been tinkering around with openra files, and I tried to create a build-able Badger Bomber. However I seem to have run into a bit of a bother with the Badger icon. So here is the Yaml.

Bomber:
Inherits: ^Plane
Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
Buildable:
Queue: Aircraft
BuildAtProductionType: Plane
BuildPaletteOrder: 30
Prerequisites: ~afld, ~techlevel.medium
Description: Anti-Tanks & Anti-Infantry Plane.\n Strong vs Infantry, Vehicles\n Weak vs Aircraft
Valued:
Cost: 250
Tooltip:
Name: Tu-16 Badger
Health:
HP: 60
Armor:
Type: Light
RevealsShroud:
Range: 11c0
Type: GroundPosition
RevealGeneratedShroud: False
RevealsShroud@GAPGEN:
Range: 9c0
Type: GroundPosition
Armament@PRIMARY:
Weapon: ChainGun.Yak
LocalOffset: 256,-213,0
MuzzleSequence: muzzle
Armament@SECONDARY:
Name: secondary
Weapon: ChainGun.Yak
LocalOffset: 256,213,0
MuzzleSequence: muzzle
Armament@SECONDARY:
Name: secondary
Weapon: Napalm
LocalOffset: 85,213,-85
AttackPlane:
FacingTolerance: 20
Aircraft:
CruiseAltitude: 2560
InitialFacing: 192
TurnSpeed: 4
Speed: 178
RepulsionSpeed: 40
MaximumPitch: 56
AutoTarget:
InitialStance: HoldFire
InitialStanceAI: HoldFire
AmmoPool:
Ammo: 999999999
PipCount: 6
ReloadDelay: 11
ReturnOnIdle:
SelectionDecorations:
VisualBounds: 30,28,0,2
WithMuzzleOverlay:
Contrail:
Offset: -853,0,0
SpawnActorOnDeath:
Actor: BADR.Husk
SmokeTrailWhenDamaged:
Offset: -853,0,0
Interval: 2
ProducibleWithLevel:
Prerequisites: aircraft.upgraded
RenderSprites:
Image: badr
Icon: badricon.shp


Here is the Error code I got with it.

OpenRA.Utility(1,1): Error: Failed with exception: System.AggregateException: One or more errors occurred. ---> OpenRA.YamlException: Actor type bomber: Junk value `badricon.shp` on trait node Icon
at OpenRA.ActorInfo..ctor(ObjectCreator creator, String name, MiniYaml node) in c:\Users\bobda\Desktop\OpenRAModSDK-


A few notes I would like to leave:

1. I copy-pasted the yak code and changed few things as this was a test.
2. I modified the Yak weapons , However the modded Yak (which I copy-pasted from) worked fine beforehand.
3. I have tried typing without .shp at the end.
4.I have tried using IconPalette.
5. The badger icon was already in the regular openra files.

I've tried all sorts of things but I can't seem to get to work. I feel like I did something wrong here. In case this not legible for you guys I'm going to leave the yaml file on here as well.
Attachments
aircraft.yaml
Here is the full yaml file
(9.58 KiB) Downloaded 219 times

User avatar
MustaphaTR
Posts: 203
Joined: Mon Aug 04, 2014 6:38 am
Location: Kastamonu, Turkey

Post by MustaphaTR »

You should define the Icon on sequence code not, rule.

traincrazy484
Posts: 12
Joined: Fri Mar 18, 2016 1:32 am

Post by traincrazy484 »

Alright I did that, but now its saying its missing icon info.

bomber:
idle:
Facings: 16
icon: badricon


OpenRA.Utility(1,1): Error: Missing Type: IconInfo

User avatar
MustaphaTR
Posts: 203
Joined: Mon Aug 04, 2014 6:38 am
Location: Kastamonu, Turkey

Post by MustaphaTR »

Game is still trying to read it as a rule code. You need to put the sequence code under Sequences/aircraft.yaml.

traincrazy484
Posts: 12
Joined: Fri Mar 18, 2016 1:32 am

Post by traincrazy484 »

The thing that throwing me off, is that the code I posted yesterday is what I put In Sequences/Aircraft. I removed the Icon from the Rules/Aircraft.yaml too just to make sure it wasn't conflicting or something.

User avatar
MustaphaTR
Posts: 203
Joined: Mon Aug 04, 2014 6:38 am
Location: Kastamonu, Turkey

Post by MustaphaTR »

There shouldn't be an Icon: tag on rule file, if you removed it, it should work fine.

traincrazy484
Posts: 12
Joined: Fri Mar 18, 2016 1:32 am

Post by traincrazy484 »

Well I don't know what to say , I suppose its just a fluke then. I'm going to write this off as a no go and just lower the cool down for the Para Bombs. :)[/img]

Post Reply