Page 1 of 2

Getting started

Posted: Sun Jun 11, 2017 10:09 am
by ApornasPlanet
Ok, so I'm going to give modding another try.

To learn how I need to start simple. I'm thinking about giving GDI a medic in TD. How would I do that?

Posted: Sun Jun 11, 2017 11:01 am
by Murto the Ray
The best way of starting out would be to have a look at something similar. Have a look at the RA Medic's definition.
What you want is probably almost the same as it. Have a look around the traits on the wiki when you aren't sure what a rule does. If you want to have a new look for your medic then you will need to create that yourself or copy another unit.
You can ask specific questions here, on IRC, and Discord if you need more help.

Posted: Fri Jan 05, 2018 6:45 pm
by ApornasPlanet
Thanx mate!

To learn this I'm thinking of importing units from RA to TD. So let's take a look at the medic. Is it enough to just copy and paste the RA Medic into the infantry yaml in the rules folder of TD? Or do I need to change stuff in other yaml-files as well?

e: game can't launch if I just change the infantry-yaml.

e2: I changed some other stuff as well to try and get the medic to work in TD. Now the game crashes when I press the infantry tab.

e3: It would be very useful to me if someone could explain step by step what you need to do to get one unit from RA to TD. That would mean a lot!

Posted: Fri Jan 05, 2018 8:01 pm
by netnazgul
I think you can't just past medic into yaml because cnc graphics don't have medic sprite. You'd need to further modify the files, probably copying medic SHPs to cnc *.mix files

Posted: Fri Jan 05, 2018 9:50 pm
by ApornasPlanet
And where's that? I can find other SHPs but not that one

Posted: Sat Jan 06, 2018 6:49 am
by MustaphaTR
medic SHPs to cnc *.mix files
You should not edit the .mix files at Content folder. Custom artwork goes to bits folder at mod folder.

Posted: Sat Jan 06, 2018 9:38 am
by Inq
You'll need to convert the RA medic shp & cameo to td palette and add it to the TD bits folder.

or

Add an additional palette to the td mod and change the palette used of the medic.

It's not as simple as copy and paste from RA to TD.

Posted: Sat Jan 06, 2018 4:04 pm
by ApornasPlanet
Inq wrote: You'll need to convert the RA medic shp & cameo to td palette and add it to the TD bits folder.

or

Add an additional palette to the td mod and change the palette used of the medic.

It's not as simple as copy and paste from RA to TD.
Thanks! But I still can't find the medic.shp in the bits folder. Also which program would I use to change the palette?

Posted: Sat Jan 06, 2018 9:50 pm
by Inq
You'll need to download xcc or similar and extract them from the mix file. (Normally located in the OpenRA folder in user/documents - in windows that is)

Posted: Sun Jan 07, 2018 4:45 am
by anjew
Take note that in TD, a sprite converted over can look great on one map tileset and glitchy on other.

Posted: Sun Jan 14, 2018 10:31 am
by ApornasPlanet
I'll give 10$ to whomever wrights an extensive tutorial/guide on this. I'll pay the money if I'm by following the guide is able to get the medic into TD with voice and all.

The guide need to detail everything.


You will recieve the money through paypall.

Posted: Sun Jan 14, 2018 9:12 pm
by Materianer
ApornasPlanet wrote: I'll give 10$ to whomever wrights an extensive tutorial/guide on this. I'll pay the money if I'm by following the guide is able to get the medic into TD with voice and all.

The guide need to detail everything.


You will recieve the money through paypall.
lol i dont know how to extract units from these mix files but here is a map with a TD-Mechanic included:

https://resource.openra.net/maps/13742/

Note rules maybe have to be updated because this map is old.

Posted: Mon Feb 26, 2018 11:33 pm
by Inq
ApornasPlanet wrote: I'll give 10$ to whomever wrights an extensive tutorial/guide on this. I'll pay the money if I'm by following the guide is able to get the medic into TD with voice and all.

The guide need to detail everything.


You will recieve the money through paypall.
Not writing an extensive guide, but this is all you need. Including palette converted unit & icon. (No medical cursor)

The code posted below is for reference only - do not copy paste it

The shp's were extracted & converted using:

GIMP,
https://www.gimp.org/

XCC Mixer,
http://xhp.xwis.net/utilities/

SHP builder,
https://ppmforums.com/viewtopic.php?t=3 ... 8f30ff0357

Purple pal,
http://nyerguds.arsaneus-design.com/cncstuff/



cnc\rules\infantry.yaml

Code: Select all

MEDI:
	Inherits: ^Soldier
	Inherits@EXPERIENCE: ^GainsExperience
	Valued:
		Cost: 500
	Tooltip:
		Name: Medic
	Buildable:
		BuildPaletteOrder: 41
		Prerequisites: anyhq, ~techlevel.medium
		Queue: Infantry.GDI
		Description:  Heals nearby infantry.\n  Unarmed
	Mobile:
		Speed: 48
	Health:
		HP: 5000
	Passenger:
		PipType: Yellow
	Armament:
		Weapon: Heal
		Cursor: ability
		OutsideRangeCursor: ability
		TargetStances: Ally
		ForceTargetStances: None
	AttackFrontal:
	WithInfantryBody:
		StandSequences: stand
		DefaultAttackSequence: heal
	Voiced:
		VoiceSet: MedicVoice
	AutoTarget:
	AutoTargetPriority@DEFAULT:
		ValidTargets: Infantry
cnc\sequences\infantry.yaml

Code: Select all

medi:
	stand:
		Facings: 8
	stand2:
		Facings: 8
	run:
		Start: 8
		Length: 6
		Facings: 8
		Tick: 100
	heal:
		Start: 56
		Length: 58
		Tick: 120
	standup:
		Start: 114
		Length: 2
		Facings: 8
	idle1:
		Start: 178
		Length: 14
		Tick: 120
	idle2:
		Start: 178
		Length: 14
		Tick: 120
	die1:
		Start: 193
		Length: 7
	die2:
		Start: 201
		Length: 8
	die3:
		Start: 209
		Length: 8
	die4:
		Start: 217
		Length: 12
	die5:
		Start: 229
		Length: 18
	die6: 
		Start: 193
		Length: 7
	die-crushed: e1rot
		Start: 16
		Length: 4
		Tick: 1600
		ZOffset: -511
	prone-stand:
		Start: 130
		Stride: 4
		Facings: 8
	prone-run:
		Start: 130
		Length: 4
		Facings: 8
		Tick: 100
	icon: mediicon
cnc\weapons\other.yaml

Code: Select all

Heal:
	ReloadDelay: 80
	Range: 4c0
	Report: heal2.aud
	ValidTargets: Infantry
	Projectile: Bullet
		Speed: 1c682
	Warhead@1Dam: SpreadDamage
		Spread: 213
		Damage: -5000
		ValidStances: Ally
		ValidTargets: Infantry
		DebugOverlayColor: 00FF00
cnc\audio\voices.yaml

Code: Select all

MedicVoice:
	Voices:
		Select: mrespon1,myessir1
		Action: maffirm1,mmovout1
		Die: nuyell1,nuyell4,nuyell5,nuyell6
		Burned: yell1
		Zapped: nuyell3
		Poisoned: nuyell12

Posted: Tue Feb 27, 2018 3:29 pm
by ApornasPlanet
You sir are a hero! However, the game encountered a fatal error and crashed so something must be wrong. Dunno what and I don't have enough knowledge to determine what's wrong.

The only difference I can see is that the pasted text, provided by you, is all in blue whilst the original text of the yaml is all in red. Does that matter?

But if this works I can replicate the procedure with other stuff and then finally learn the process of modding.

Posted: Wed Feb 28, 2018 12:10 am
by Inq
ApornasPlanet wrote: You sir are a hero! However, the game encountered a fatal error and crashed so something must be wrong. Dunno what and I don't have enough knowledge to determine what's wrong.

The only difference I can see is that the pasted text, provided by you, is all in blue whilst the original text of the yaml is all in red. Does that matter?

But if this works I can replicate the procedure with other stuff and then finally learn the process of modding.
Edit: If you copy & paste the text above it, it will be incorrect - see below for correct example

Alright I tested my own advice and found it faulty :oops: , yeah don't copy that code it changes up the layout (uses multiple spaces, insted of tabs)

Download this & replace the files and you can see how it should be layed out correctly. :)
Original post wrote: To find out why the game has crashed you should go to User/documents/OpenRA/Logs (on windows)

Look for the text file called exception-2018-02-28XXXXXXXXX or something similar.
It will tell you in there the crash issue.
(if you have lots of files in the logs folder delete them all & run the game again and it will make a fresh report, so its easier to find)

The colour of the text won't matter, as long as its formatted the same. Use notepad++ or something similar to edit the text files.