Page 1 of 1
to change the PICTURE of unit or building
Posted: Mon Nov 21, 2022 10:14 pm
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?
Re: to change the PICTURE of unit or building
Posted: Mon Nov 21, 2022 11:57 pm
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.
Re: to change the PICTURE of unit or building
Posted: Tue Nov 22, 2022 5:56 pm
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?
Re: to change the PICTURE of unit or building
Posted: Wed Nov 23, 2022 7:15 am
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
Re: to change the PICTURE of unit or building
Posted: Wed Nov 23, 2022 5:21 pm
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.