Page 1 of 1
Tutorial: Add a building and a unit
Posted: Mon Sep 28, 2015 12:21 pm
by ApornasPlanet
I really wanna learn how to mod but I'm an idiot. So I need a thorough step-by-step walkthrough on how to add for example a building and/or a unit.
I thought that adding a soviet airfield to GDI and then add the soviet Mig could serve as a random example. How would I accomplish that?
Are there someone who could take the time to write a step-by-step tutorial? I think I would learn a lot by it and then be able to do stuff by myself.
Re: Tutorial: Add a building and a unit
Posted: Mon Sep 28, 2015 3:13 pm
by Inq
ApornasPlanet wrote: ↑I really wanna learn how to mod but I'm an idiot. So I need a thorough step-by-step walkthrough on how to add for example a building and/or a unit.
I thought that adding a soviet airfield to GDI and then add the soviet Mig could serve as a random example. How would I accomplish that?
Are there someone who could take the time to write a step-by-step tutorial? I think I would learn a lot by it and then be able to do stuff by myself.
Check out
https://github.com/OpenRA/OpenRA/wiki/C ... a-new-unit
A little out of date but the principles are the same.
Posted: Mon Sep 28, 2015 5:39 pm
by Norman_
heres a code for the ra airfield in td and a nice interceptor unit. just add the weapon(s) to the SFIG: unit and it should work. check the weapons and rules folder. you could copy and edit the Maverick: from ra and add it to Weapons: and use it or create a new weapon for it.
also check other modmaps rules to see how some stuff works.
http://pastebin.com/WfaSnymX
( small fault: you have to use RenderSprites: instead of RenderUnit: )
Posted: Thu Oct 01, 2015 10:52 am
by ApornasPlanet
Thanks!
However I decided to start with something more simple before I continue with the airfield. At least I thought so.
I tried to add a sniper unit to nod. But I can't get it to work.
How many documents do I have to edit? I have added it in 1) rules/infantry and 2) sequences/infantry. Is that enough?
But I'm also unsure of a lot. I don't know what most things mean. What is "BuildPaletteOrder" for example?
Posted: Thu Oct 01, 2015 11:24 am
by Graion Dilach
Depending on your version, you can use
https://github.com/OpenRA/OpenRA/wiki/Traits for releases and
https://github.com/OpenRA/OpenRA/wiki/T ... laytest%29 for playtests - just Ctrl-F on the trait you're looking for.
Keep in mind that this only applies to rules, the rest doesn't get such outputs although at sequences and weapons the results are straightforward enough imo.
What you did might be enough, but to tell more we need to see what you actually did.
Posted: Thu Oct 01, 2015 11:55 am
by ApornasPlanet
Norman_ wrote: ↑heres a code for the ra airfield in td and a nice interceptor unit. just add the weapon(s) to the SFIG: unit and it should work. check the weapons and rules folder. you could copy and edit the Maverick: from ra and add it to Weapons: and use it or create a new weapon for it.
also check other modmaps rules to see how some stuff works.
http://pastebin.com/WfaSnymX
( small fault: you have to use RenderSprites: instead of RenderUnit: and RenderBuilding: )
I did all this and added OrcaAGMissiles as both primary and secondary weapon to the SFIG but it doesn't seem to work. The new airfield doesn't show up in the buildings menu and not the SFIG either. Any ideas why?
I unpacked the shp:s into the "bits"-folder.
Posted: Thu Oct 01, 2015 12:01 pm
by ApornasPlanet
I use the latest release.
First I copied the entire cnc-folder but renamed it cnce. So that I got a fourth mod folder. I dont wanna mess up the original TD-mod.
Then I just went into the rules folder, opened the infantry yaml-file and made a copy of RMBO but renamed it E7. Then I changed some of the stats like:
Name: Sniper
Prerequisites: anyhq, ~techlevel.medium
Queue: Infantry.Nod
Then I went into the sequences-folder, opened the infantry yaml-file and added the new E7-unit.
That's pretty much what I did but that didn't change anything.
Posted: Thu Oct 01, 2015 12:46 pm
by Graion Dilach
Ofcourse it didn't. When you duplicated the folder, you didn't set the mod to read your duplicated folder. Check out mod.yaml in your mod's main folder.
You don't really need to duplicate the whole thing in that case anyway, a mod can be done via linking every asset of another mod and just have a bunch of yamls itself which are only your additions.
Posted: Thu Oct 01, 2015 12:58 pm
by ApornasPlanet
Graion Dilach wrote: ↑Ofcourse it didn't. When you duplicated the folder, you didn't set the mod to read your duplicated folder. Check out mod.yaml in your mod's main folder.
You don't really need to duplicate the whole thing in that case anyway, a mod can be done via linking every asset of another mod and just have a bunch of yamls itself which are only your additions.
Yeah I just realized! How stupid!
If I decide to copy the whole thing would it be sufficent to replace all occurences of "cnc" with "cnce" in the mod.yaml?
In some cases like this one:
Folders:
.
./mods/cnc
./mods/cnc/bits
./mods/cnc/bits/jungle
./mods/cnc/bits/ss
./mods/cnc/uibits
~^Content/cnc
Would it be sufficent to do like this:
Folders:
.
./mods/cnce
./mods/cnce/bits
./mods/cnce/bits/jungle
./mods/cnce/bits/ss
./mods/cnce/uibits
~^Content/cnce
And even that last one?
Posted: Thu Oct 01, 2015 2:28 pm
by abcdefg30
That should work, but you'll probably need to download the assets again (with the ingame dialogue), as there are no assets in ~^Content/cnce for obvious reasons.