Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Switching vehicle body and turret
It might happen that while modding and finding assets (which are not many for RA1 frankly), you want something that looks different. In your search you might come across different SHP files where the entire unit is defined in one SHP file or it is made by combining several SHP files. If it is the former, then your job is a bit easy, otherwise it is slightly difficult.
There is no actual use of 3D data in RA1. The units are actually pictures of 3D models and OpenRA calculates which picture to show at what time to show a proper unit. As an example, look at the sequence for 1tnk:
1tnk:idle:Start: 0Facings: 32turret:Start: 32Facings: 32muzzle: gunfire2Start: 0Length: 2icon: 1tnkiconStart: 0
This defines the frames for every animations. When the unit is idle, it should start from frame number 0 and show one of the 32 next frames, so frames 0,1,2,...,31 represent the idle torso animation.
The turret is defined from frame number 32 onward to frame number 63 (as it says 32 facings)
The definition for muzzle is a but different.
muzzle:gunfire2Start: 0Length: 2
What this means is that, for muzzle animation, use the animation "gunfire" and use frame numbers 0 and 1 as the length is 2
Here the 1tnk is using the assets from another SHP with the name gunfire.
Now for some fun stuff. What we will do is to make 1tnk use the turret for 2tnk. to do this, you will change the code like this:
turret:2tnkStart: 32Facings: 32
So the changed code will look like this:
1tnk:idle:Start: 0Facings: 32turret: 2tnkStart: 32Facings: 32muzzle: gunfire2Start: 0Length: 2icon: 1tnkiconStart: 0
Keep in mind that this will only work if the number of frames in the turret sequence is the same as that for 2tnk's turret. You can check that by checking 2tnk's sequence entry.
If however, there is a separate turret model in another SHP, then the frames for turrent will start from frame number 0. I came across a model for a BMP and I had to define it like this:
bmp:idle:Start: 0Facings: 32muzzle: minigunStart: 0Length: 6Facings: 8turret: bmpturStart: 0Facings: 32icon: bmpiconStart: 0
You can see that the bmptur sequence starts from 0 and ends at 31 (0 to 31 makes 32 facings).
Players 🎲
- FAQ ❓
- Installation 📦
- Hotkeys andStances 🎮
- Strategies 🏁
- Settings 🔧
- Dedicated Server ◾
- Badges & Icons 🥇
- Changelog 📓
- Donating 🪙
Modders ✏️
- Tools 🧰
- Audio guide 🔉
- Traits 📝
- Palettes and Remaps 🎨
- World Coordinate System 🌐
- Map scripting
- Lua-API 📋
- Conditions 🆕
- Mapping 🚧
- Modding Guide
- Pixelart 🌃
- Utility
Developers 🔧