OpenXcom Forum
Modding => Help => Topic started by: wcho035 on October 19, 2019, 02:36:50 pm
-
One thing I noticed when a terrain tile explodes, because I have a hybrid mod, the explosion always show of an underwater bubble explosion instead of the land base version. If it happened on land.
The only way to fix this is to add the extra line hitanimation: something to switch the explosions for land and sea correctly. I do have offset handling between sea and land explosions. All weapons in my items.rul are working correctly with land and sea explosion switching. It’s only the damaged or exploding terrain that I can’t find the section in the ruleset to add this needed hitanimation line to fix it.
I assume you can’t do this in the MCD file, is there somewhere in the ruleset can this line be added?
-
This is not related to the terrain tiles, but to the spritesheet used for explosions (https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Sounds_and_Animations -> X1.pck for explosive weapons). You might be using the wrong sprite sheet, or your offsets might be wrong.
Are you using UFO or TFTD as your base game?
-
This is not related to the terrain tiles, but to the spritesheet used for explosions (https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Sounds_and_Animations -> X1.pck for explosive weapons). You might be using the wrong sprite sheet, or your offsets might be wrong.
Are you using UFO or TFTD as your base game?
If you want to help, at least read my request carefully. What you propose above is a problem I have resolved a long time ago.
-
If you want to help, at least read my request carefully. What you propose above is a problem I have resolved a long time ago.
Your original post stated nothing of that sort since it didn't include the
I do have offset handling between sea and land explosions. All weapons in my items.rul are working correctly with land and sea explosion switching. It’s only the damaged or exploding terrain that I can’t find the section in the ruleset to add this needed hitanimation line to fix it.
part.
You only stated that that the in-game explosions display their underwater instead of their land version, which I replied to.
-
I asked which part of the ruleset that I need to add a hitanimation:somthing, so I can correct the problem with underwater explosion appearing on land, when the land terrain tile exploded. Due to weapon damage. That was my original question asked.
Unless this line hitanimation: something is added, the incorrect explosion is shown on land. This is a problem I have tested in my mod. Once this line is added, to any explosion type weapon on my item.rul, the switch worked correctly.
So I was asking where in the ruleset I can find some reference to terrain tiles explosion.
The solution you offered, I am already fully aware of it. It is not related to my question asked.
Thank you for helping, I do appreciate the input. However, I do prefer if one of the developer to answer this, so to avoid too many unnecessary posting just to answer this question.
-
Land explosion offset is defined by a global variable (check vars.rul in TFTD):
constants:
explosionOffset: 24 # index into X1.PCK
Underwater explosion offset is smaller by 8.
For example if land offset is 24, underwater offset is 16 (=24-8).
-
Thanks you for this Meridian.
Land explosion offset is defined by a global variable (check vars.rul in TFTD):
constants:
explosionOffset: 24 # index into X1.PCK
Underwater explosion offset is smaller by 8.
For example if land offset is 24, underwater offset is 16 (=24-8).
My mod is UFO base hybrid, how different is the offset compare to TFTD? If it is different to that of TFTD?
-
In order to switch from above ground to underwater explosions, TFTD in OXC checks whether the alienDeployment/terrain for the mission has a depth greater than 0. If the depth is greater than zero, then the game picks the explosion 8 frames earlier in X1.PCK. To make this not crash, there is an extra offset added at the mod level in the standard/xcom2/vars.rul file:
constants:
# bunch of other stuff ....
explosionOffset: 8
This means the above water explosion will start at frame 8 of X1.PCK and the underwater explosions start at frame 0. Notice also in xcom2's items.rul that explosives have hitAnimation: 8 instead of hitAnimation: 0.
If you want to use custom explosion animations, they need to follow the same format. Put the underwater sprites at frame x - 8 in X1.PCK, the above water sprites at frame x, and hitAnimation: x on the explosive item.
-
Thank you Meridian and thank you too Ohartenstein23. I am very grateful for the detail reply. Most appreciate of the help again.
-
I asked which part of the ruleset that I need to add a hitanimation:somthing, so I can correct the problem with underwater explosion appearing on land, when the land terrain tile exploded. Due to weapon damage. That was my original question asked.
Unless this line hitanimation: something is added, the incorrect explosion is shown on land. This is a problem I have tested in my mod. Once this line is added, to any explosion type weapon on my item.rul, the switch worked correctly.
So I was asking where in the ruleset I can find some reference to terrain tiles explosion.
The solution you offered, I am already fully aware of it. It is not related to my question asked.
Thank you for helping, I do appreciate the input. However, I do prefer if one of the developer to answer this, so to avoid too many unnecessary posting just to answer this question.
Feel free to ignore any of the following
After rereading what you wrote it sounds like originally all explosion animations where displayed incorrectly (underwater explosions on land), which in case of items/weapons you were able to fix by adding/changing the hitanimation entry.
The explosions of terrain objects (barrels etc.?) however still displays the wrong animation (underwater on land). Does any of this apply to smoke effects (these also have two versions)? Are these also displayed incorrectly?
Explosion and smoke animations are to my knowledge not defined on a per-tile basis (i.e. you can't define a tile as having this or that smoke/explosion effect). The game differentiates between 'land' and 'underwater' terrain via the depth[] entry in the terrain definition (https://openxcom.org/forum/index.php?topic=3835.0) and applies animations accordingly ( ->TFTDs X1.PCK contains animations for land/underwater terrains).
Either your terrain defintions are off or your animation offsets (explosionOffset / smokeOffset (https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Other_.28TFTD.29_Constants)) are wrong.
EDIT: was about to post this, might as well. Sounds like it was the offsets after all. Glad you got this sorted out in the end.
-
Do me a favor krautbernd. Why don't you ignore of anything that I will post in the future within this forum. It will make life simpler for you and I.
I asked a simple question and yet it got inflated to something that it needed more time from you and I to invest on.
Meridian and ohartenstein23 have both answered the question. No need for the extra details or more investment on the same topic. Time to move on. I know I will.
Either your terrain defintions are off or your animation offsets (explosionOffset / smokeOffset (https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Other_.28TFTD.29_Constants)) are wrong.
You can speculate all you like.. if this makes you happy.
-
In order to switch from above ground to underwater explosions, TFTD in OXC checks whether the alienDeployment/terrain for the mission has a depth greater than 0. If the depth is greater than zero, then the game picks the explosion 8 frames earlier in X1.PCK. To make this not crash, there is an extra offset added at the mod level in the standard/xcom2/vars.rul file:
constants:
# bunch of other stuff ....
explosionOffset: 8
This means the above water explosion will start at frame 8 of X1.PCK and the underwater explosions start at frame 0. Notice also in xcom2's items.rul that explosives have hitAnimation: 8 instead of hitAnimation: 0.
If you want to use custom explosion animations, they need to follow the same format. Put the underwater sprites at frame x - 8 in X1.PCK, the above water sprites at frame x, and hitAnimation: x on the explosive item.
Hi! adding the constant solved my problem, thanks!
-
For the record I told you in my initial reply that your offsets might be wrong. I linked you to the ruleset reference which not only includes the offset in the section I linked, it also list both offsets in the section 'Other (TFTD) Constants'. I asked you whether or not you're using a TFTD-based mod precisly because the offsets are different.
-
Don't be a jerk
I am sick of getting reports for you two. You keep derailing threads with your passive-aggressive bickering.
Either hash it out in private or learn to use the ignore list. Next offense I'm banning you both.
-
Hi SupSuper
I am prepare and will do anything to avoid krautbernd.
If you can show me how to use the ignore list. I will use it.
As much as I tried to ignore him, he seems to unable to take the hint that I am not interested in his replies.
Or he's forcing the issue. In this thread here, I am asking Meridian or the developers for help with a simple issue. This is something I asked Meridian in private messaging, before he asked me to post it here.
I did so reluctantly.
If you check the threads.
https://openxcom.org/forum/index.php/topic,4830.435.html
I did my best to ignore him, when he criticize my idea on suicide bombers.
Do me a favor krautbernd. Why don't you ignore of anything that I will post in the future within this forum. It will make life simpler for you and I.
I have written this specifically, so everyone could be in view that I have done my best to in trying to avoid a forum bickering.
-
I've pointed this out before. This a discussion forum. Which means people are bound to face criticism. I do not exempt myself from that.
But I have never ever seen anyone go ballistic about this the way you have, including your statement (paraphrased) that the forum would be better off without me (https://openxcom.org/forum/index.php/topic,4595.msg118201.html#msg118201). I wonder, just hypothetically, if we tallied up the times I've acutally helped people, contributed content and bug reports/bug fixes etc. - do you think that's justified, seeing how I am apparently able to have a constructive discussion with everybody else beside you, and from what others have told me they face the same problem concerning you? This is a cheap shot and I'll probably burn some bridges with this, but how many people have actually been grateful for your input?
I've started this off the same I would have with anybody else asking for help. Your reaction? Modify your initial post, claiming you said something you did not and instantly antagonizing me.
If you look at the thread you linked to you'll notice that all I did was ask you to clarify how the second part of your proposal was supposed to work as well as pointing out that the first part likely wouldn't work, which I later confirmed by actually trying it out in game. Something you could have done beforehand but decided not to. Meridian subsequently told you that this would not work, as well as telling you later on that the first part of your suggestion is also out of the question. This is not the first time this has happened. Instead of judging information by who's presenting it you you might want to judge it on it's own merit, as well as actually checking that your own suggestions work or the information you give out is accurate, something you've repeatedly failed to do in the past.
BTW, the ignore list is located Profile -> modify profile -> Buddies/Ignore List but feel free to wait for an 'official' reply telling you the same thing. Jesus Christ.