to change the PICTURE of unit or building

Dune 2000

Information and discussion for custom maps and mods.
Post Reply
Adrian
Posts: 73
Joined: Wed Feb 12, 2020 5:44 pm

to change the PICTURE of unit or building

Post by Adrian »

Couple years ago I tried to make new units (or maybe more precisely “changed units”) for Dune 2000. I was advised to inherit the units. It works.
In this topic:
viewtopic.php?f=83&t=21229&p=311987#p311987

And new question.
Is it possible to change the picture of unit or building?

LeonardMT
Posts: 19
Joined: Tue Jan 12, 2021 2:38 am

Re: to change the PICTURE of unit or building

Post by LeonardMT »

Okay here's how I do it. First take out the RenderSprites trait we will use sequences.yaml. I recommend that you format your map the way most people do it rather then have your rules in map.yaml because it's extremely easy to mess up the indentation. So, at the bottom of your map.yaml add this:

Code: Select all

Rules: rules.yaml

Sequences: sequences.yaml
Now add rules.yaml and sequences.yaml to you map. Then add your new Harv code to rules.yaml

Code: Select all

harvester2:
	Inherits: harvester
	Cloak:
		IsPlayerPalette: true
Now copy and paste this code to your sequences.yaml:

Code: Select all

harvester2:
	idle: DATA.R8
		Start: 1699
		Facings: -32
	harvest: DATA.R8
		Start: 3884
		Length: 6
		Facings: -8
		Tick: 80
		ZOffset: 1
		BlendMode: Multiply
	dock: DATA.R8
		Start: 3623
		Length: 10
	dock-loop: DATA.R8
		Start: 3633
	icon: YOUR ICON FILENAME HERE
		Start: 4280
		Offset: -30,-24
Replace the YOUR ICON FILENAME HERE with your icon's filename. (it must be in your map file or in the game files)

And thats how you do it, just omit the file extension.

Adrian
Posts: 73
Joined: Wed Feb 12, 2020 5:44 pm

Re: to change the PICTURE of unit or building

Post by Adrian »

Thank you for your quick reply.
Suddenly I extremly busy and cannot even test code above :-( (have some problems)
But thank you very much ones more!

But... Another question.
I never modify before the pictures from Dune 2000. I thought the pictures are set of BMP-files here (or something like this). But it looks like the pictures are in DATA.R8 (from code above).

So I don't quite understand, where are images of units and buildings? How to open and edit them?

LeonardMT
Posts: 19
Joined: Tue Jan 12, 2021 2:38 am

Re: to change the PICTURE of unit or building

Post by LeonardMT »

Oops I double checked my code and saw that it was slightly wrong here's the corrected code:

Code: Select all

harvester2:
	idle: DATA.R8
		Start: 1699
		Facings: -32
	harvest: DATA.R8
		Start: 3884
		Length: 6
		Facings: -8
		Tick: 80
		ZOffset: 1
		BlendMode: Multiply
	dock: DATA.R8
		Start: 3623
		Length: 10
	dock-loop: DATA.R8
		Start: 3633
	icon: YOUR ICON FILENAME HERE
Now I don't have all that much experice modding the dune mod, however it looks like all unit sprites are stored in DATA.R8 like one massive .shp file and the harvester icon is stored in sequence # 4280. Thats all I can help you with because like I said I don't have all that much experice modding the dune mod. Also one more thing: This is where the DATA.R8 file is:
C:\Users\USERNAME\AppData\Roaming\OpenRA\Content\d2k\v2

Adrian
Posts: 73
Joined: Wed Feb 12, 2020 5:44 pm

Re: to change the PICTURE of unit or building

Post by Adrian »

Thank you very much. Now I know the principle of the picture storing in Dune 2000, at least.
Hmm... It looks not easy.

So many pictures for moving units. For buildings... may be this is not so complex.
And resolution of pictures is so little. Difficult to draw.

Post Reply