Opening and editing .yaml files?

Information and discussion for custom maps and mods.
Post Reply
User avatar
jaymanxyz
Posts: 77
Joined: Sun Oct 31, 2010 5:04 am
Location: Houston

Opening and editing .yaml files?

Post by jaymanxyz »

I'd like to start modding, cuz I did a lot of RULES modding on RA, but I need to know how to open and edit a .yaml file to do that. Anybody got any good programs or methods on how to do this?

Any help is appreciated.

Gecko
Posts: 51
Joined: Mon Oct 04, 2010 10:05 pm

Post by Gecko »

For editing the yaml files I suggest using notepad++ (Manually select Syntax > YAML)

User avatar
jaymanxyz
Posts: 77
Joined: Sun Oct 31, 2010 5:04 am
Location: Houston

Post by jaymanxyz »

Gecko wrote: For editing the yaml files I suggest using notepad++ (Manually select Syntax > YAML)
Thanks, Gecko, it helped a lot!!! :D

User avatar
jaymanxyz
Posts: 77
Joined: Sun Oct 31, 2010 5:04 am
Location: Houston

Post by jaymanxyz »

Gecko wrote: For editing the yaml files I suggest using notepad++ (Manually select Syntax > YAML)
Thanks, Gecko, it helped a lot!!! :D

User avatar
jaymanxyz
Posts: 77
Joined: Sun Oct 31, 2010 5:04 am
Location: Houston

Post by jaymanxyz »

Wait- one more question (please excuse my newbiness), but I edited some simple things in the weapons.yaml file with N++, saved, made a new shortcut for my mod, but none of the changes show up in-game. Any problems that I'm not seeing or something?

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

Post by Sleipnir »

It depends on how you have structured the mod.

If you are following our "official" method, creating a mod that overrides one of the base mods, there is a bug which means that mods are loaded in the reverse order from what you'd expect.
In your shortcut, you need to specify `Game.Mods=mymod,ra` instead of `ra,mymod'.

If you copied and renamed one of the base mods (which is fine for playing with things, but will cause a lot of problems if you want to keep the changes when you upgrade the game), then it should simply work, provided you edited the right mod.

Edit: If you followed the copy/rename route, you will need to edit mod.yaml to point at your new copy, otherwise it will simply load the rules from the original mod. This is the most likely reason for it not working.

User avatar
jaymanxyz
Posts: 77
Joined: Sun Oct 31, 2010 5:04 am
Location: Houston

Post by jaymanxyz »

One more problem...

I go onto N++, open the mod.yaml file, find & replace all the "ra", with "wow" (name of my mod), and save. I execute the appropriate shortcut, but it just comes up with "OpenRA has stopped working..."

Am I doing something wrong?

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

Post by Sleipnir »

You probably find-and-replaced out things that you shouldn't have... For example, temperat.mix, and RALoadScreen should not be changed. You only want to change the filepaths.

When the game crashes, check My Documents\OpenRA\Logs\exception.log for a stacktrace, which should tell you what caused it.

User avatar
jaymanxyz
Posts: 77
Joined: Sun Oct 31, 2010 5:04 am
Location: Houston

Post by jaymanxyz »

First of all, thanks for your patience Sleipner. Anyway, I replaced all the filepaths like you said, but it still crashes. I checked the logs, and t came up with this:

System.InvalidOperationException: Cannot locate type: raLoadScreen
at OpenRA.ObjectCreator.<ObjectCreator>m__19(String s)
at OpenRA.ObjectCreator.CreateObject[T](String classname)
at OpenRA.ModData..ctor(String[] mods)
at OpenRA.Game.Initialize(Arguments args)
at OpenRA.Program.Run(String[] args)
at OpenRA.Program.Main(String[] args)


:\

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

Post by Sleipnir »

Near the bottom of mod.yaml you should have (note the capitalization, it matters!)

Code: Select all

LoadScreen&#58; RALoadScreen

User avatar
jaymanxyz
Posts: 77
Joined: Sun Oct 31, 2010 5:04 am
Location: Houston

Post by jaymanxyz »

System.IO.FileNotFoundException: File not found: mods\wow\chrome.xml
File name: 'mods\wow\chrome.xml'
at OpenRA.FileFormats.FileSystem.Open(String filename)
at OpenRA.Graphics.ChromeProvider.LoadChromeSource(String filename)
at OpenRA.Graphics.ChromeProvider.Initialize(String[] chromeFiles)
at OpenRA.ModData..ctor(String[] mods)
at OpenRA.Game.Initialize(Arguments args)
at OpenRA.Program.Run(String[] args)
at OpenRA.Program.Main(String[] args)


...when the chrome.xml is right there in the directory?

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

Post by Sleipnir »

Can you post your mod.yaml here?

User avatar
jaymanxyz
Posts: 77
Joined: Sun Oct 31, 2010 5:04 am
Location: Houston

Post by jaymanxyz »

Yeah, sure.

Code: Select all

# Classic Red Alert Mod -- Package Manifest

Folders&#58;
	
	mods/wow
	mods/wow/bits
	mods/wow/uibits
	mods/wow/packages

Packages&#58;
	~main.mix
	redalert.mix
	conquer.mix
	hires.mix
	local.mix
	sounds.mix
	speech.mix
	allies.mix
	russian.mix
	temperat.mix
	snow.mix
	interior.mix
	~scores.mix
	~movies1.mix
	~movies2.mix

Rules&#58;
	mods/wow/rules/defaults.yaml
	mods/wow/rules/system.yaml
	mods/wow/rules/vehicles.yaml
	mods/wow/rules/structures.yaml
	mods/wow/rules/infantry.yaml
	mods/wow/rules/civilian.yaml
	mods/wow/rules/trees.yaml

Sequences&#58;
	mods/wow/sequences.yaml

Cursors&#58;
	mods/wow/cursors.xml

Chrome&#58;
	mods/wow/chrome.xml
	
Assemblies&#58;
	mods/wow/Openra.Mods.ra.dll

ChromeLayout&#58;
	mods/wow/chrome/ingame.yaml
	mods/wow/chrome/mainmenu.yaml
	mods/wow/chrome/videoplayer.yaml
	mods/wow/chrome/settings.yaml
	mods/wow/chrome/gamelobby.yaml
	mods/wow/chrome/serverbrowser.yaml

Weapons&#58;
	mods/wow/weapons.yaml
	
Voices&#58;
	mods/wow/voices.yaml
	
TileSets&#58;
	mods/wow/tilesets/snow.yaml
	mods/wow/tilesets/interior.yaml
	mods/wow/tilesets/temperat.yaml

Music&#58;
	mods/wow/music.yaml

Movies&#58;
	mods/wow/movies1.yaml
	mods/wow/movies2.yaml

LoadScreen&#58; RALoadScreen
ShellmapUid&#58;5065fbcb8e5b1b6cea2a003c64f9b48fcaa33e06

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

Post by Sleipnir »

It looks like you're running an old build (>1 month old), a lot has changed since then. I recommend installing the most recent build, and trying again from scratch (you won't be able to copy any of your existing mod files over without introducing problems).

User avatar
jaymanxyz
Posts: 77
Joined: Sun Oct 31, 2010 5:04 am
Location: Houston

Post by jaymanxyz »

Aha! Thanks, Sleipner, I finally got it working! Time to mod!!!
Thanks for your help!

:D

Post Reply