Adding a new Side?

how to do?

Information and discussion for custom maps and mods.
raminator
Posts: 106
Joined: Tue Mar 15, 2005 6:31 pm
Location: Stuttgart

Adding a new Side?

Post by raminator »

Hello everyone.
i tried to add a new side to ra by adding some stuff to the yaml-files and xmls.

if i play solo withou AI, everything seems to work fine, but once i try a game with AI i get this IE...

Code: Select all

System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at OpenRA.Sound.PlayVoice(String phrase, Actor voicedUnit, String variant)
   at OpenRA.Selection.Combine(World world, IEnumerable`1 newSelection, Boolean isCombine, Boolean isClick)
   at OpenRA.Widgets.WorldInteractionControllerWidget.HandleInputInner(MouseInput mi)
   at OpenRA.Widgets.Widget.HandleMouseInputOuter(MouseInput mi)
   at OpenRA.Widgets.Widget.HandleMouseInputOuter(MouseInput mi)
   at OpenRA.Widgets.Widget.HandleMouseInputOuter(MouseInput mi)
   at OpenRA.Widgets.Widget.HandleInput(World world, MouseInput mi)
   at OpenRA.Game.DispatchMouseInput(MouseInputEvent ev, MouseEventArgs e, Modifiers modifierKeys)
   at OpenRA.GlRenderer.GraphicsDevice.Present()
   at OpenRA.Graphics.Renderer.EndFrame()
   at OpenRA.Graphics.Viewport.DrawRegions(World world)
   at OpenRA.Game.Tick()
   at OpenRA.Game.Run()
   at OpenRA.Program.Run(String[] args)
   at OpenRA.Program.Main(String[] args)
any Idea?

Edit:
to be more exactly. the game IE´s as soon as i select my new countries MCV.
without AI this works without any problem

chrisf
Posts: 246
Joined: Mon Sep 06, 2010 4:59 am

Post by chrisf »

You'll need to do some setup for your new side in voices.yaml

raminator
Posts: 106
Joined: Tue Mar 15, 2005 6:31 pm
Location: Stuttgart

Post by raminator »

ok...will look at it...
but i think i already edited that file

somewat like this
soviet: .r01,.r03
allies: .v01,.v03
test: .r01,.r03

or do i need to have seperate samples for each side like ".t01" ?

chrisf
Posts: 246
Joined: Mon Sep 06, 2010 4:59 am

Post by chrisf »

That should work. The MCV uses the vehicle voice, make sure it's correct.

If you still have trouble, paste your hacked file somewhere and I'll take a look.

raminator
Posts: 106
Joined: Tue Mar 15, 2005 6:31 pm
Location: Stuttgart

Post by raminator »

ok...the mcv is not a problem anymore...
last time game crashed because i selected a harvester.
things i changed in voices.yaml was to give my testcountry own entry with .t01/2/3 and copied to \extra\ the soviet soundfiles and renamed them to *.t01/2/3
and to be sure i put copied those in a mix named test.mix too.

will test some more and tell you if i was able to get it working

raminator
Posts: 106
Joined: Tue Mar 15, 2005 6:31 pm
Location: Stuttgart

Post by raminator »

tested some more with actual version (both cnc and ra) and the game ies randomly when I select a unit (infantry or vehicles).
like when I select some E1 they say "hello". a couple of times later the game ies when I select those E1 again.
and since I checked everything a couple of times I doupt that I made an error...

debug.log says: "Failed generating OpenAL source 30"
exception.log says:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at OpenRA.Sound.PlayVoice(String phrase, Actor voicedUnit, String variant)
at OpenRA.Selection.Combine(World world, IEnumerable`1 newSelection, Boolean isCombine, Boolean isClick)
at OpenRA.Widgets.WorldInteractionControllerWidget.HandleInputInner(MouseInput mi)
at OpenRA.Widgets.Widget.HandleMouseInputOuter(MouseInput mi)
at OpenRA.Widgets.Widget.HandleMouseInputOuter(MouseInput mi)
at OpenRA.Widgets.Widget.HandleMouseInputOuter(MouseInput mi)
at OpenRA.Widgets.Widget.HandleInput(World world, MouseInput mi)
at OpenRA.Game.DispatchMouseInput(MouseInputEvent ev, MouseEventArgs e, Modifiers modifierKeys)
at OpenRA.GlRenderer.GraphicsDevice.Present()
at OpenRA.Graphics.Renderer.EndFrame()
at OpenRA.Graphics.Viewport.DrawRegions(World world)
at OpenRA.Game.Tick()
at OpenRA.Game.Run()
at OpenRA.Program.Run(String[] args)
at OpenRA.Program.Main(String[] args)

have you ever tried adding a new side/country and can confirm that it works?

thanks again

chrisf
Posts: 246
Joined: Mon Sep 06, 2010 4:59 am

Post by chrisf »

Well, there's nothing special about the "builtin" sides -- they are done exactly the same way. I will have a look tonight.

raminator
Posts: 106
Joined: Tue Mar 15, 2005 6:31 pm
Location: Stuttgart

Post by raminator »

thank you =)
one thing that seems to be working fine is adding new units...
got to try if it works with AI too

thanks again

raminator
Posts: 106
Joined: Tue Mar 15, 2005 6:31 pm
Location: Stuttgart

Post by raminator »

i have now the problem again, that once i select my mcv the game IEs...
with happens with my new and the 2 standard sides.

Code: Select all

debug.log says:
Failed generating OpenAL source 30

exception.log says:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at OpenRA.Sound.PlayVoice(String phrase, Actor voicedUnit, String variant)
   at OpenRA.Selection.Combine(World world, IEnumerable`1 newSelection, Boolean isCombine, Boolean isClick)
   at OpenRA.Widgets.WorldInteractionControllerWidget.HandleInputInner(MouseInput mi)
   at OpenRA.Widgets.Widget.HandleMouseInputOuter(MouseInput mi)
   at OpenRA.Widgets.Widget.HandleMouseInputOuter(MouseInput mi)
   at OpenRA.Widgets.Widget.HandleMouseInputOuter(MouseInput mi)
   at OpenRA.Widgets.Widget.HandleInput(World world, MouseInput mi)
   at OpenRA.Game.DispatchMouseInput(MouseInputEvent ev, MouseEventArgs e, Modifiers modifierKeys)
   at OpenRA.GlRenderer.GraphicsDevice.Present()
   at OpenRA.Graphics.Renderer.EndFrame()
   at OpenRA.Graphics.Viewport.DrawRegions(World world)
   at OpenRA.Game.Tick()
   at OpenRA.Game.Run()
   at OpenRA.Program.Run(String[] args)
   at OpenRA.Program.Main(String[] args)
i attached my rules, mod.yaml, voices.yaml, chrome.xml...
Last edited by raminator on Tue Sep 21, 2010 3:28 pm, edited 1 time in total.

chrisf
Posts: 246
Joined: Mon Sep 06, 2010 4:59 am

Post by chrisf »

You appear to have uploaded a zip containing OpenRA.Game.exe and nothing else. Did you mean to upload something else?

raminator
Posts: 106
Joined: Tue Mar 15, 2005 6:31 pm
Location: Stuttgart

Post by raminator »

my fault...
here´s the correct zip
Attachments
cncx.zip
(834.99 KiB) Downloaded 496 times

raminator
Posts: 106
Joined: Tue Mar 15, 2005 6:31 pm
Location: Stuttgart

Post by raminator »

any news here?
i tested this again and again with fresh installs of openra and yaml-editing from scratch...
but always the same errors.

how does this exactly work?
- i edited chrome.xml to have entries for "test" (using chrome-allies.png)
- i edited voices.yaml to have sounds for "test"
- i added "test"/"Test" as new "Country@2" to system.yaml
- i gave them all allied units and buildings via infantry.yaml, structures.yaml, vehicles.yaml

and every now and then the game IEs when i select a unit

i will try now removing all voices from all units to see if this helps

UPDATE1:
i gave all infantry, that is using the generic voices, the medic voices and no crash...
so either i did something terribly wrong with thos generic voices for all units or there´s some bugs in that system...

UPDATE2:
giving vehicles engineer voices fixed the problem
so as far as i understand the yaml-files there must be some error in the generic-voices-code for units (atleast if there´s a third country)
can this be fixed by editing the dll-files?

User avatar
Sleipnir
Posts: 878
Joined: Wed Apr 10, 2002 11:52 pm
Contact:

Post by Sleipnir »

I can reproduce your crash, and will look into fixing it.

Edit: Fixed. http://github.com/pchote/OpenRA/commit/49bfd697

raminator
Posts: 106
Joined: Tue Mar 15, 2005 6:31 pm
Location: Stuttgart

Post by raminator »

that´s good news! =)

Iran
Posts: 92
Joined: Wed Sep 08, 2010 3:16 pm

Post by Iran »

Any updates? Did you get a third side completely functional?

Post Reply