Ant Units (Update: map added "Radioactive Forest")

Information and discussion for custom maps and mods.
Post Reply
User avatar
raymundo
Posts: 117
Joined: Mon Mar 30, 2015 10:39 am

Ant Units (Update: map added "Radioactive Forest")

Post by raymundo »

Looking for help here, I've been running into a strange exception.

Here is the exception

Exception of type `System.InvalidOperationException`: TypeDictionary contains multiple instance of type `OpenRA.Mods.Common.Traits.RenderSpritesInfo`
at OpenRA.Primitives.TypeDictionary.Get[RenderSpritesInfo] () [0x00000] in <filename unknown>:0
at OpenRA.Mods.Common.Widgets.ProductionPaletteWidget.RefreshIcons () [0x00000] in <filename unknown>:0
at OpenRA.Mods.Common.Widgets.ProductionPaletteWidget.set_CurrentQueue (OpenRA.Mods.Common.Traits.ProductionQueue value) [0x00000] in <filename unknown>:0
at OpenRA.Mods.Common.Widgets.Logic.ClassicProductionLogic+<SetupProductionGroupButton>c__AnonStorey0.<>m__1 (Boolean reverse) [0x00000] in <filename unknown>:0
at OpenRA.Mods.Common.Widgets.Logic.ClassicProductionLogic+<SetupProductionGroupButton>c__AnonStorey0.<>m__4 (KeyInput e) [0x00000] in <filename unknown>:0


and here is a link with text of my .yaml, note the actual map is attached to this post. https://gist.github.com/anonymous/a4cec7a536d44870fab2


I was wondering if it was because I am trying to create multiple units that are using RenderUnit: with the same Image: ant

Edit: Extra info- The first 2 units Ant, and REDANT work fine, its when i add the others that this exception occurs.
Any help much appreciated, thanks!
Attachments
spawn.oramap
(9.68 KiB) Downloaded 318 times
Last edited by raymundo on Wed Aug 05, 2015 8:46 pm, edited 3 times in total.

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

Post by abcdefg30 »

You probably want "RenderSprites:" instead of "RenderUnit:" on "TANT" and "QANT".
("^Infantry" uses "RenderSprites:". If you define "RenderUnit:" on an actor that inherits "^Infantry", you have two Render traits, which causes this crash.)

User avatar
raymundo
Posts: 117
Joined: Mon Mar 30, 2015 10:39 am

Post by raymundo »

Thanks, I can now get them to load in! I will have to change one to inherit tank because I want to give it mad tank ability, and mad tank require renderunit: instead of render sprites:

That was hard to figure out for me because I was looking in infantry and wondering how the game knew which sprite to render. It is based off their default names but it doesn't indicate which type of rendering is used.

Canavusbis
Posts: 37
Joined: Thu May 21, 2015 10:58 pm

Post by Canavusbis »

raymundo wrote: Thanks, I can now get them to load in! I will have to change one to inherit tank because I want to give it mad tank ability, and mad tank require renderunit: instead of render sprites:

That was hard to figure out for me because I was looking in infantry and wondering how the game knew which sprite to render. It is based off their default names but it doesn't indicate which type of rendering is used.
This will be fixed in the next release.

User avatar
raymundo
Posts: 117
Joined: Mon Mar 30, 2015 10:39 am

Post by raymundo »

I am now trying to create the queen ant, I got the MadTank to work but I am having an issue when adding healing. This exception crashes the game after the ant turns to to heal the other ant, it crashes right as it should heal it.

Exception of type `System.InvalidOperationException`: TypeDictionary contains multiple instances of type `OpenRA.Traits.IQuantizeBodyOrientationInfo`
at OpenRA.Primitives.TypeDictionary.GetOrDefault (System.Type t) [0x00000] in <filename unknown>:0
at OpenRA.Primitives.TypeDictionary.GetOrDefault[IQuantizeBodyOrientationInfo] () [0x00000] in <filename unknown>:0
at OpenRA.Traits.BodyOrientation+<BodyOrientation>c__AnonStorey0.<>m__0 () [0x00000] in <filename unknown>:0
at System.Lazy`1[System.Int32].CreateValue () [0x00075] in /private/tmp/source-mono-mac-4.0.0-branch/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.0/external/referencesource/mscorlib/system/Lazy.cs:440

https://gist.github.com/anonymous/2b5791129e41aa4619c8

A link to my Queen Ant yaml^^

Thanks all for your help :D Hoping to create a fun mod map soon.

User avatar
Graion Dilach
Posts: 277
Joined: Fri May 15, 2015 5:57 pm

Post by Graion Dilach »

MadTank requires WithFacingSpriteBody in playtest and RenderUnit in last release, which are probably already inherited from ^Tank, your crash is caused by the fact that you're using WithInfantryBody and you don't remove the inherited renderer trait.
Image
Image
Image
AS Discord server: https://discord.gg/7aM7Hm2

User avatar
raymundo
Posts: 117
Joined: Mon Mar 30, 2015 10:39 am

Post by raymundo »

Thanks, I simply removed the withinfantrybody and it works now, the reason i put that on there was because it was on the medic unit, should've remembered i was really using a tank.

User avatar
raymundo
Posts: 117
Joined: Mon Mar 30, 2015 10:39 am

Post by raymundo »

http://resource.openra.net/maps/3998

My map is up if anyone wants to try. This is my first mod map, comments and critique welcomed! This idea was inspired by Zjordy's map Ant Base

3v9 map where soviets (the 3) play as ant faction:

Kennel:
- gives spy satellite (ant vision)
- Cash trickler built into their kennel
4 Buildable units:

-Worker Ant High Hp, cheap, and strong close range attack
-Electric Ant- High Hp, longer build time but uses a stronger version of tesla tank cannon
-Flying Ant - Low hp, Fast, flamethrower weapon and rocketeer missiles for anti-air
-Queen Ant- M.A.D. Tank that also acts as a medic to the worker and electric ant.

The Allie team starts with limited bases and 2 engineers each. There are many buildings to capture on the map, including 3 service depots so it is possible to get mcv if the wrong person doesn't capture these. Id say ants have the early advantage, if they don't stop the allies from building up they are more likely to lose.
Last edited by raymundo on Mon Aug 10, 2015 6:25 am, edited 1 time in total.

eddie
Posts: 47
Joined: Sun Feb 23, 2014 8:42 am

Post by eddie »

Nice Map!

Tschokky created a cool new interior tileset (http://cnc-comm.com/community/index.php?topic=4294.0). You could use that for a map inside the ant hill.

I think that would be fun!

Post Reply