OpenXcom Forum
Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: robin on December 26, 2020, 03:17:53 pm
-
EDIT: new ruleset described below: https://openxcom.org/forum/index.php/topic,8944.msg135061.html#msg135061
According to the documentation, melee weapons should use meleeAnimation stored in HIT.PCK, instead of hitAnimation stored in SMOKE.PCK.
1. - does it mean that the stun rod anim has been moved to HIT.PCK? Because AFAIK the stun hit anim is inside SMOKE.PCK; the default HIT.PCK should only hold the default melee hit (https://www.ufopaedia.org/index.php/HIT.PCK).
2. - is the maximum number of frames supported for HIT.PCK animations = 4? The anim below is 8 frames, but it seems not fully rendered ingame.
2.1 - the stun rod animation has 9 frames, so IF it has been moved to HIT.PCK, does it mean that not all the frames are rendered?
3. - what about the max frames for animations in SMOKE.PCK? The default smoke animation is 12 frames, so all my custom animations use 12 frames.. but I'm suspecting that the limit is actually 10...
-
As far as I know both hitAnimation and meleeAnimation work the same in OXC and OXCE
1. it hasn't been moved, it was always there... there is no special stun hit anim, there is only one default melee hit anim in UFO
2. yes, it's 4
const int Explosion::HIT_FRAMES = 4;
const int Explosion::EXPLODE_FRAMES = 8;
const int Explosion::BULLET_FRAMES = 10;
2.1 where is the 9 frame stun animation? I don't see anything like that
3. the smoke animation is 4 frames, you see 12 sprites only because there are 3 different types (thin, normal and dense smoke)... 3x4=12
limit for bullet impact animations (also in SMOKE.PCK) is 10 frames
limit for explosions (X1.PCK) is 8 frames
-
As far as I know both hitAnimation and meleeAnimation work the same in OXC and OXCE
1. it hasn't been moved, it was always there... there is no special stun hit anim, there is only one default melee hit anim in UFO
2. yes, it's 4
const int Explosion::HIT_FRAMES = 4;
const int Explosion::EXPLODE_FRAMES = 8;
const int Explosion::BULLET_FRAMES = 10;
2.1 where is the 9 frame stun animation? I don't see anything like that
see attached img, aren't the highlighted frames the ones for the stun rod hit?
EDIT: no i'm an idiot, that's the AP round hit animation... my image had that green frame that mislead me...
limit for bullet impact animations (also in SMOKE.PCK) is 10 frames
AAHHHHHH*booomm*
oh well
-
it's probably not too difficult to make the number of frames item-specific, if there's a need for it, I can have a look...
-
It's ok don't worry, I'll tweak my animations to fit the limits.
-
MOAR questions. The following is how I defined SMOKE.PCK inside extraSprites.rul.
- type: SMOKE.PCK
height: 40
width: 384
subX: 32
subY: 40
files:
8: Resources/apoc/SMOKE/smoke_cloud.gif # override vanilla animation, 12 frames
106: Resources/apoc/SMOKE/hit_spawn_brainsucker.png
116: Resources/apoc/SMOKE/robomedikit_xcom_spawn.png
126: Resources/apoc/SMOKE/hit_goo_white.png
136: Resources/apoc/SMOKE/hit_entropy.png
width=384 means it holds 12 frames. This is necessary because "smoke_cloud.gif" animation is made of 12 frames (or 4*3).
But of course all the other animations must be 10 frames, so the effective width for them is 320.
XComFiles is like this:
- type: SMOKE.PCK
height: 80
width: 160
With these sizes, the total frame count of the image is 10. But if the mod were to override the smoke animation, like mine does, needing a total of 12 frames, the size would be insufficient. So I can't use that.
In conclusion, should I:
a) use 40*384 sized image files, with blank frames at the end (but then the subimage count should be 12 or 10 like it is now?)
b) size the images to the effective count of frames (so basically 40*320) despite defining "width: 384"
?
-
I think you can just define it twice, with different sizes, like vanilla terror weapons:
- type: BIGOBS.PCK
width: 64
height: 96
subX: 32
subY: 48
files:
58: Resources/Weapons/Terror.png
- type: BIGOBS.PCK
width: 32
height: 48
files:
57: Resources/Weapons/Zombie.png
I'll check tomorrow and update the post if necessary.
-
Thanks! I'll try defining it twice.
-
Thanks! I'll try defining it twice.
I checked it and defining it twice is fully supported and recommended way to do this.
It's ok don't worry, I'll tweak my animations to fit the limits.
In other news, custom animation frame count is now also supported (OXCE v6.8.4 or higher).
Example:
items:
- type: STR_LASER_RIFLE
hitAnimation: 36
hitAnimFrames: 20 # plays laser anim + plasma anim
- type: STR_STUN_ROD
meleeAnimation: 4
meleeAnimFrames: 32 # don't forget to define additional frames in HIT.PCK
Attached a video of Liu Kang doing an 8 hit combo on a Floater.
-
I checked it and defining it twice is fully supported and recommended way to do this.
In other news, custom animation frame count is now also supported (OXCE v6.8.4 or higher).
Example:
items:
- type: STR_LASER_RIFLE
hitAnimation: 36
hitAnimFrames: 20 # plays laser anim + plasma anim
- type: STR_STUN_ROD
meleeAnimation: 4
meleeAnimFrames: 32 # don't forget to define additional frames in HIT.PCK
Attached a video of Liu Kang doing an 8 hit combo on a Floater.
Great! The combo looked quite spectacular, I want to turn the agents into Power Rangers now.
-
3. the smoke animation is 4 frames, you see 12 sprites only because there are 3 different animations (thin, normal and dense smoke)... 3x4=12
In-game testing suggests there are 2 animations: one with 4 frames of thin smoke and 2 of medium smoke, and one with 2 of medium smoke and 4 of thick smoke. But I might be interpreting something wrong.
-
Dude, I really don't have the mental strength to fight you each time I say something.
The smoke animation has 4 frames, end of the story.
I don't know what kind of testing you did, but testing and reverse-engineering has been done by a million people before you and they all agree.
Documentation is here: https://www.ufopaedia.org/index.php/SMOKREF.DAT
Source code is here: https://github.com/OpenXcom/OpenXcom/blob/master/src/Battlescape/Map.cpp#L884
PS: thick smoke (and second half of the normal smoke) is not even achievable in the game without save editing, I really wonder where you saw that...
-
That animation is excellent Robin!
(https://openxcom.org/forum/index.php?action=dlattach;topic=8944.0;attach=52636)
You can really feel the teeth slamming together just by looking at it.
I want to turn the agents into Power Rangers now.
If X-Com is going to field a Power Rangers squad they will need suitable interdimensional beasties to fight.
(I hope you don't mind me adapting your melee strike into a lovecraftian monstrosity)
(https://openxcom.org/forum/index.php?action=dlattach;topic=8944.0;attach=52665)
(https://openxcom.org/forum/index.php?action=dlattach;topic=8944.0;attach=52666)
drawingRoutine: 12 (Hallucinoid)
(https://openxcom.org/forum/index.php?action=dlattach;topic=8944.0;attach=52668)
(https://openxcom.org/forum/index.php?action=dlattach;topic=8944.0;attach=52669)
drawingRoutine: 22 (Inverted Cyberdisc with propulsion animation on top)
<The central eye is from Dioxine's X-Piratez, it looks in the direction the unit is facing.>
In other news, custom animation frame count is now also supported (OXCE v6.8.4 or higher).
Wonderful news! Thank you for adding this feature. (https://openxcom.org/forum/Themes/InsidiousV1-k/images/post/thumbup.gif)
-
hahahaha that monstrosity is nightmare fuel!
-
I don't know what kind of testing you did, but testing and reverse-engineering has been done by a million people before you and they all agree.
Documentation is here: https://www.ufopaedia.org/index.php/SMOKREF.DAT
I did deeper testing and discovered that we were both wrong. The documentation appears to be right, and it tells a story different from what you or I said.
What you said (and I'm paraphrasing based on how I interpreted it): There are three different sets of animation, the top four frames (thin smoke), the middle four frames(medium smoke), and the bottom four frames(thick smoke).
What I said: There are two sets of animation, the first six frames, and the last six frames.
What the documentation says: It selects an initial frame based on the smoke's remaining lifespan and animates through that frame and the next three frames.
What actually happens: There are three possible smoke animations, frames 1-4, frames 2-5, and frames 3-6. The remaining 6 sprite indexes aren't ever used.
https://youtu.be/nbtl7_C6Ags
In this video, I have made a smoke cloud using the smoke spritesheet below. You can see (easier at 0.25x speed) that each animation uses a set of four sprites taken from the first six on the sheet. I tried this several more times and got the same results every time.
-
What you said (and I'm paraphrasing based on how I interpreted it): There are three different sets of animation, the top four frames (thin smoke), the middle four frames(medium smoke), and the bottom four frames(thick smoke).
OK, I've changed the word "animations" to "types".
Hopefully enough to stop nitpicking on me.