Trait Documentation for modders

I'm working on it; I need suggestions.

Information and discussion for custom maps and mods.
Post Reply
enginuity
Posts: 6
Joined: Wed Jun 08, 2011 7:08 pm

Trait Documentation for modders

Post 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...)?

Proteus
Posts: 23
Joined: Wed Jun 08, 2011 2:42 pm

Post by Proteus »

This is great! Would love to see more.

Keep up the good work

User avatar
Petrenko
Posts: 156
Joined: Fri Apr 08, 2011 5:36 pm

Post 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!

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

Post by chrisf »

@Petrenko You're most welcome to edit the wiki pages too.

User avatar
Petrenko
Posts: 156
Joined: Fri Apr 08, 2011 5:36 pm

Post 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)
Last edited by Petrenko on Wed Jun 29, 2011 1:57 pm, edited 1 time in total.

User avatar
Petrenko
Posts: 156
Joined: Fri Apr 08, 2011 5:36 pm

Post 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.

User avatar
Petrenko
Posts: 156
Joined: Fri Apr 08, 2011 5:36 pm

Post 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.

enginuity
Posts: 6
Joined: Wed Jun 08, 2011 7:08 pm

Post by enginuity »

Thanks for adding on to the documentation!! I'll get working on it too once my life becomes slightly less hectic...

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

Post 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.

User avatar
Petrenko
Posts: 156
Joined: Fri Apr 08, 2011 5:36 pm

Post 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

User avatar
Petrenko
Posts: 156
Joined: Fri Apr 08, 2011 5:36 pm

Post by Petrenko »

Heyho again,

1. added a tweak guide about making a unit a healer
2. added "attack-trait" branch

User avatar
Petrenko
Posts: 156
Joined: Fri Apr 08, 2011 5:36 pm

Post 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.
Hail to the soviets!

User avatar
Petrenko
Posts: 156
Joined: Fri Apr 08, 2011 5:36 pm

Post 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"
Hail to the soviets!

Matt
Posts: 1155
Joined: Tue May 01, 2012 12:21 pm
Location: Germany

Post 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

Code: Select all

[Desc("String")]
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.

Matt
Posts: 1155
Joined: Tue May 01, 2012 12:21 pm
Location: Germany

Post 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.

Post Reply