Getting started

Give GDI a medic

Information and discussion for custom maps and mods.
ApornasPlanet
Posts: 24
Joined: Mon Sep 28, 2015 12:16 pm

Post by ApornasPlanet » Wed Feb 28, 2018 8:06 pm

Thank you! Worked perfectly!

To see if I could replicate this I tried to give Nod a Radar Dome instead of a commcenter.

So I extracted a sprite from (Documents/OpenRA/Content/ra/v2/lores.mix) and an icon from (Documents/OpenRA/Content/ra/v2/lores.mix). I put those in the bits folder.

Then I opened the structures.yaml in the rules folder, copied the code for the commcenter, pasted it in the bottom. Changed name to Radar Dome and made it buildable only by Nod, and the original commcenter only buildable by GDI.

Then I went to the structures.yaml in the sequences folder. Added the dome there as well with the addition of icon: domeicon.

Of course this didn't work. And I'm unsure where I should reference the sprite dome.shp, the actual building.

Any help on this?

And is it enough to use the XCC Mixer, then rightclick on something and choose "extract"?

User avatar
Inq
Posts: 84
Joined: Sun Sep 27, 2015 2:48 am

Post by Inq » Thu Mar 01, 2018 12:06 am

ApornasPlanet wrote: Thank you! Worked perfectly!

To see if I could replicate this I tried to give Nod a Radar Dome instead of a commcenter.

So I extracted a sprite from (Documents/OpenRA/Content/ra/v2/lores.mix) and an icon from (Documents/OpenRA/Content/ra/v2/lores.mix). I put those in the bits folder.

Then I opened the structures.yaml in the rules folder, copied the code for the commcenter, pasted it in the bottom. Changed name to Radar Dome and made it buildable only by Nod, and the original commcenter only buildable by GDI.

Then I went to the structures.yaml in the sequences folder. Added the dome there as well with the addition of icon: domeicon.

Of course this didn't work. And I'm unsure where I should reference the sprite dome.shp, the actual building.

Any help on this?

And is it enough to use the XCC Mixer, then rightclick on something and choose "extract"?
Yeah its enough just to extract it. (Although it will be the wrong palette for C&C)

You'll need:
dome.shp (The building/damage frame) Documents/OpenRA/Content/ra/v2/conquer.mix

domemake.shp (the build/sell frames) Documents/OpenRA/Content/ra/v2/conquer.mix

domeicon.shp (the icon picture) Documents/OpenRA/Content/ra/v2/hires.mix
(hires is the windows version of RA, lores is the dos version, you only want lores infantry for C&C, the lores icons don't look great)

So you are editing the right files, it should be easy to clone the rules for the hq & then just change the code a little to match up with the radar dome.


#############################rules/structures.yaml##############################

DOME: the name of the shp
Inherits: ^BaseBuilding
Inherits@IDISABLE: ^DisabledOverlay
Inherits@shape: ^2x2Shape Added this line, inherited from defaults.yaml
HitShape: Changed this, to match dome from RA
UseTargetableCellsOffsets: false
TargetableOffsets: 0,0,0, 630,-384,0, 630,384,0, -700,-512,0, -700,512,0
Valued:
Cost: 1000
Tooltip:
Name: Radar Dome Changed this,the name ingame tooltip
ProvidesPrerequisite:
Prerequisite: anyhq
Buildable:
BuildPaletteOrder: 70
Prerequisites: proc, ~techlevel.medium
Queue: Building.Nod Changed this, so its a nod only building
Description: Provides radar and Air Strike support power.\nUnlocks higher-tech units and buildings.\nRequires power to operate.
Building: Changed this, to match dome from RA
Footprint: xx xx ==
Dimensions: 2,3
LocalCenterOffset: 0,-512,0
Selectable: Changed this, to match dome from RA
Bounds: 48,40,0,9
DecorationBounds: 48,53,0,-4
SelectionDecorations:
WithSpriteBody:
PauseOnCondition: lowpower
Health:
HP: 80000
RevealsShroud:
Range: 10c0
WithBuildingBib:
ProvidesRadar:
RequiresCondition: !lowpower
RenderDetectionCircle:
DetectCloaked:
Range: 5c0
RequiresCondition: !lowpower
AirstrikePower:
PauseOnCondition: lowpower
Prerequisites: ~techlevel.superweapons
Icon: airstrike
ChargeInterval: 6000
SquadSize: 3
QuantizedFacings: 8
Description: Air Strike
LongDesc: Deploy an aerial napalm strike.\nBurns buildings and infantry along a line.
EndChargeSpeechNotification: AirstrikeReady
SelectTargetSpeechNotification: SelectTarget
InsufficientPowerSpeechNotification: InsufficientPower
IncomingSpeechNotification: EnemyPlanesApproaching
UnitType: a10
DisplayBeacon: True
BeaconPoster: airstrike
BeaconPosterPalette: beaconposter
DisplayRadarPing: True
CameraActor: camera
ArrowSequence: arrow
ClockSequence: clock
CircleSequence: circles
SupportPowerChargeBar:
Power:
Amount: -50


#############################sequences/structures.yaml##############################

##When you copy the sequences its easier to start with the original,
So copy the dome from RA.

dome: ## The name of the shp
idle:
Offset: 0,-4
damaged-idle:
Start: 1
Offset: 0,-4
make: domemake ## The name of the buildup shp
Length: *
Offset: 0,-4
bib: bib3 ## Changed this, the bib is the dirt below the building, it needs to be changed to match C&C, I just copied the one for C&C power plant
UseTilesetExtension: true
Length: *
icon: domeicon## I removed the fake icon, because there is no fake buildings in C&C

##########################################################


So add the 3 files to bits & add the above code to the two yaml's you should be able to build a radar dome as NOD in C&C.

It will however be the wrong colour because you have not converted the sprites colour palette, or told the game to load the building in RA palette.
Attachments
TDRadarDome.zip
TD Radar Dome example - wrong colour palette
(18.03 KiB) Downloaded 10 times

zeroth
Posts: 4
Joined: Wed Nov 28, 2018 3:45 am

Re: Changing RA to RD palette.

Post by zeroth » Mon Dec 03, 2018 11:23 am

Inq wrote:
Sat Jan 06, 2018 9:38 am
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.
Hi, I am finding this very difficult to do, have read a few threads to little success. Could anyone try to give step by step guide on how to achieve this?

I have a RA heavy tank that I want to insert into TD.

Thanks!!

User avatar
Materianer
Posts: 162
Joined: Mon Jul 04, 2016 8:27 am

Re: Getting started

Post by Materianer » Mon Dec 03, 2018 8:36 pm

Hey this may help you, here is a heavy tank already included and some other units.

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

This is an old map from 2014 so maybe some things maybe changed.

zeroth
Posts: 4
Joined: Wed Nov 28, 2018 3:45 am

Re: Getting started

Post by zeroth » Tue Dec 04, 2018 10:47 am

Cheers! I will have a look.

Since posting I have found a solution that may help someone else (may not be the best/correct):

Add the following to rules\palettes

Code: Select all

	PaletteFromFile@playerRA:
		Name: playerRA
		Filename: temperatRA.pal
		ShadowIndex: 4
	PlayerColorPalette@playerRA:
		BaseName: playerRA
		BasePalette: playerRA
		RemapIndex: 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95


Add the file:
temperatRA.pal to bits folder.

Add the following code to rules\vehicles (or aircraft):
RenderSprites:
PlayerPalette: playerRA

Post Reply