Page 1 of 1
Trait Documentation for modders
Posted: Wed Jun 08, 2011 8:21 pm
by enginuity
I'm working on producing a documentation for all (or at least, the ones that seem more useful to modders who aren't willing/able to look in the source code to figure out their behavior, or just figure out what they are)
https://github.com/OpenRA/OpenRA/wiki/T ... umentation
I only have 5 traits listed so far; but if anyone has comments on the format, on any missing information, or any specific traits or class of traits they wish to see, please let me know. It's better to know now, as opposed to having to modify it after many traits have been added.
Also, may I take the CashTrickler information and post it inside the subcategory (only one subcategory so far...)?
Posted: Thu Jun 09, 2011 6:27 am
by Proteus
This is great! Would love to see more.
Keep up the good work
Posted: Wed Jun 15, 2011 12:42 pm
by Petrenko
Shalom,
i already started something like yours a few weeks ago. But for now i stopped it but if you would like to use some of them: please do.
http://www.sleipnirstuff.com/forum/view ... 83&t=15113
Keep up the good work!
Posted: Thu Jun 16, 2011 10:19 pm
by chrisf
@Petrenko You're most welcome to edit the wiki pages too.
Posted: Wed Jun 29, 2011 10:01 am
by Petrenko
Shalom,
i added two traits from my own list to the wiki.
Hope they are still compatible.
Edit:
I added 1 and made up a new branch (ammo-related)
in dev 6/28 the cnc-aircraft it able to reload itself. i added the trait to the documentation. afterwards i looked at the ra-aircraft and at the helipad. Where does the helipad get the information to reload landed aircraft? because it also repairs them?
Edit 2:
I added a new branch (structures-production-related)
I already tested once to add al the traits i got there to the transport helicopter (CNC) to let it act as a mobile barracks. It worked well, only problem was the new productionbar got dark grey (could not produce units) until i build a barracks after building a transport. so for each new transport i had to produce a barracks which enabled producing at the transport. Why?
Edit 3:
Added a new branch (cloak-related)
Posted: Wed Jun 29, 2011 11:57 am
by Petrenko
I got it!
To make the transport helicopter a mobile barracks i changed it like this,
TRAN:
Inherits: ^Helicopter
Valued:
Cost: 1500
Tooltip:
Name: Chinook Transport
Icon:tranicnh
Description: Fast Infantry Transport Helicopter.\n Unarmed
Buildable:
BuildPaletteOrder: 10
Prerequisites: hpad
BuiltAt: hpad
Owner: gdi,nod
Helicopter:
LandWhenIdle: true
ROT: 5
Speed: 15
InitialFacing: 0
LandableTerrainTypes: Clear,Rough,Road,Ore,Beach
Health:
HP: 90
Armor:
Type: Light
RevealsShroud:
Range: 8
RenderUnit:
WithRotor@PRIMARY:
Offset: 0,14,0,-4
WithRotor@SECONDARY:
Id: rotor_2
Offset: 0,-14,0,-2
WithShadow:
FallsToEarth:
RallyPoint:
Exit@1:
SpawnOffset: 12,24
ExitCell: 1,2
Production:
Produces: Infantry
ProductionQueue:
Type: Infantry
BuildSpeed: .4
LowPowerSlowdown: 3
QueuedAudio: bldging1.aud
ReadyAudio: unitredy.aud
OnHoldAudio: onhold1.aud
CancelledAudio: cancel1.aud
ProductionBar:
ProvidesCustomPrerequisite:
Prerequisite: barracks
1. I deleted the cargo-trait
2. I added Rallypoint-trait, Production-trait, ProductionQueue-trait, ProductionBar-trait
3. I also (and i think that made if finaly work) add ProvidesCustomPrerequisite-trait. I got all traits from the hand of nod.
Posted: Wed Jun 29, 2011 8:33 pm
by Petrenko
I don't know why,
but this is fun!
1. Added two quick-tweak-guides
2. Added new branch (weapon-related) - Still very early progress
3. Added a "back-button" at the end of every branch.
Posted: Thu Jun 30, 2011 2:03 am
by enginuity
Thanks for adding on to the documentation!! I'll get working on it too once my life becomes slightly less hectic...
Posted: Thu Jun 30, 2011 8:02 am
by Sleipnir
Keep up the good work guys

I'll spend some time over the next couple of days verifying and filling in some of the missing details.
Posted: Thu Jun 30, 2011 10:08 am
by Petrenko
Okidokiloki,
i added the veterancy-stuff which already existed on the modding-branch.
Also the weapon-traits may need an overhaul.
Edit:
Might also write something about inherits?
Edit2:
1. Wrote something about Inherits.
2. Added "Structures: Basics"
Edit3:
A tweakguide about making air to air combat possible would be great.
My problem was a single MIG could sacrifice itself to get a cluster of three MIGS down.
Change the weapon?
Also, where do i upload images for guides? So i could add them via url.
Need to remind me to add something about healing
Posted: Fri Jul 01, 2011 12:26 pm
by Petrenko
Heyho again,
1. added a tweak guide about making a unit a healer
2. added "attack-trait" branch
Posted: Tue Jul 19, 2011 3:12 pm
by Petrenko
Heyho,
i added a few branches and traits and stuff:
1. Render-Related
2. Units-Basics (Empty for now)
3. Move-Related
4. I added something about offsets under "attack-related"
To do:
Make an exclaimer for offsets in general.
Posted: Sun Jul 31, 2011 1:28 pm
by Petrenko
Note to myself:
Get to know about invisible bibs.
Add tweak guide about "free unit when building is placed".
Edit:
Added tweak gude about "free unit when building is placed"
Posted: Tue Oct 09, 2012 9:28 am
by Matt
https://github.com/chrisforbes/OpenRA/tree/radoc is a work in progress for auto-generated trait documentation stored inside the source code using
OpenRA.Utility.exe --doc
will then output something like
http://sprunge.us/faLe (to be adjusted to wiki markdown)
Is this even required? Modders seem to be able to get along with YAMLs quite well even though there is few documentation.
Posted: Wed Mar 20, 2013 8:43 pm
by Matt
Done in
https://github.com/OpenRA/OpenRA/pull/2808 and ported everything to
https://github.com/OpenRA/OpenRA/wiki/Traits which supersedes the previous wiki pages. You can still ask here how some non-obvious traits work to get them documented with priority.