Skip to content

Chunking and sound

chimericchimeric Member Posts: 1,163
I would like to prevent the body fall sound when a creature gets chunked. Any way to do that? A trigger for permanent death? It happens under -10 hp, doesn't it? Or at -10 hp?

Comments

  • kjeronkjeron Member Posts: 2,368
    "GORE.WAV" or "GORE2.WAV".
    It's coded to Opcode 13*0x8, Kill target: Exploding.
    -20 hp is the threshold
    Only Crushing, Slashing, and Piercing will chunk.
    Cold and Magic Cold will Freeze.
    Other damage types cause a normal death.
    You can:
    • replace those two sound files (remove just the sound)
    • turn off Gore (remove the chunking, but not the death)
    • deal another damage type (death without chunk)
    • use MINHP/1 (prevent the death)
    • kill them with Opcode 13*0x40, Kill target: Exploding stoned (chunk without sound)
    • kill them with Opcode 13*0x80, Kill target: Exploding frozen (chunk without sound)
    • kill them with Level Drain (same as Exploding stoned)
  • chimericchimeric Member Posts: 1,163
    That's not what I'm asking. I don't mind chunking, though I could use some solution to make it less common. But here I'm looking for a way to block FAL_01B, FAL_02_B and FAL_03B, the thumping sounds of body fall that play automatically after death. They are written in all animations' INI files, and it's unnatural when a large creature gets smashed into flying bits yet there is still a thud of a falling body.
  • kjeronkjeron Member Posts: 2,368
    Okay, so it appears certain animations don't play their fall sound anyway, which is why I didn't know you were referring to it.
    While you can change a creatures sounds with: SetPlayerSound(Object,strref,sndslot), there isn't a slot that corresponds to the fall sound slot.
    You would likely have to remove the entry from every INI file, then add it back in with opcode 174 as a contingent effect for every creature. A script won't trigger fast enough(and is a terrible place for this anyway) - the sound happens well after the body hits the floor. So it will have to be opcode 232, condition #16. In the spell to be cast, precede the Play Sound effect with Opcode 318: STATE bitequal STATE_EXPLODING_DEATH(0x100), you'll have to add a new entry for it, there is no Statecheck entry in SPLPROT by default.
    So every .INI would have need:
    REPLACE_TEXTUALLY ~fall=.*~ ~fall=~
    Every .CRE would need:
    LPF ADD_CRE_EFFECT INT_VAR opcode = 232 parameter2 = 16 timing = 9 STR_VAR resource = EVAL ~%SUBSPELL%~ END
    SPLPROT.2da would need:
    COPY_EXISTING ~SPLPROT.2DA~ override
     COUNT_2DA_COLS cols
     COUNT_2DA_ROWS cols SPLPROT_STATE
    APPEND ~SPLPROT.2DA~ ~STATE 0x111 -1 8~
    I would name the subspells after the sound files they are to play, so an otherwise empty spell "FAL_01B.SPL":
    LPF ADD_SPELL_EFFECT int_var opcode = 318 target = 1 parameter1 = 0x100 parameter2 = SPLPROT_STATE duration = 1 STR_VAR resource = EVAL ~%DEST_RES%~ END
    LPF ADD_SPELL_EFFECT INT_VAR opocde = 174 target = 1 timing = 1 STR_VAR resource = ~FAL_01B~
  • chimericchimeric Member Posts: 1,163
    edited June 2017
    You are wrong about practically everything you say here. Your method may be sound, but what you say about sounds is not. Creatures have TWO sets of them, one in the CRE file, which can be anything, and the other, duplicating, in the INI file of the avatar. This is why ogres shout twice when they die - because the death playback doesn't quite overlap. It's also why Silence does not quite manage to quiet creatures down, it only suppresses sounds in the CRE and, among INI-directed sounds, footsteps, for some reasons. These INI embeddings are some kind of left-over from Bioware days, I believe, and they are the reason why you can't make, for example, a custom ogre with his own voice bits - because you'd still hear the sounds from the INI mixing in. I'm in the process of cleaning up all INI files so that animations are soundless except for footsteps and body falls (and, for the few creatures who have them, "turn head" sounds). With cleared INIs only CRE sounds play, with no weirdness and interference, and custom creatures can be made. Also all animations play their fall thuds without fail, you just can't always hear them for the music, the ambient and the death scream and damage sound. The body fall sound plays instantly after death and not "well after." It starts too quickly, in fact, with no regard for the height and bulk of the creature falling. I'm substituting a few new and edited fall sounds to account for height and weight...

    That said, your method with PlaySound() may be the way to go, unless I can remove or silence creatures somehow when they die. Thanks.

    Edit: Silence works to remove the fall thud with a cleaned-up INI. Now I just need some contingency or script check to silence a creature at -20 hp.

    Edit-edit: Actually, nothing, not even a contingency, is quick enough if it triggers after death. It takes it a full second to get going, much too late for sound or silence.
    Post edited by chimeric on
  • kjeronkjeron Member Posts: 2,368
    chimeric said:

    Creatures have TWO sets of them, one in the CRE file, which can be anything, and the other, duplicating, in the INI file of the avatar. This is why ogres shout twice when they die - because the death playback doesn't quite overlap.

    There are actually three sound locations available to creatures(CRE/INI/2DA), and it is why SetPlayerSound(Object,strref,sndslot) wouldn't work, because it can only change the sound listed in the CRE file(DYING), but has no effect on the sound listed in the INI (fall) or 2DA(DIE). The 2DA sounds also bypass silence.
    chimeric said:

    I'm in the process of cleaning up all INI files so that animations are soundless except for footsteps and body falls (and, for the few creatures who have them, "turn head" sounds).

    And I was suggesting doing that cleaning to the falling sound: remove it from the INI, and add it to the CRE as a contingency effect that triggers on a non-chunking death.
    chimeric said:

    With cleared INIs only CRE sounds play, with no weirdness and interference, and custom creatures can be made.

    Custom creatures can already be made, just duplicate the animation in another slot, its how pallet swaps are already done.
    chimeric said:

    Also all animations play their fall thuds without fail, you just can't always hear them for the music, the ambient and the death scream and damage sound.

    Those were easy enough to remove for testing purposes actually, some creatures simply do not play their falling sound when they die, even though they have one listed in all three files.
    chimeric said:

    The body fall sound plays instantly after death and not "well after."

    I was referring to a script not always triggering fast enough to match the falling body, not the hardcoded trigger.
    chimeric said:

    Edit: Silence works to remove the fall thud with a cleaned-up INI. Now I just need some contingency or script check to silence a creature at -20 hp.

    If you can find a trigger that applies the Silence effect before the creatures dying sound starts playing, either apply it(326) with STATE bitequal STATE_EXPLODING_DEATH or prevent it(318) with STATE bitnotequal STATE_EXPLODING_DEATH.
  • chimericchimeric Member Posts: 1,163
    edited June 2017
    Nothing is quick enough.

    Which creatures, you say, don't play the fall sound?
    kjeron said:

    Custom creatures can already be made, just duplicate the animation in another slot, its how pallet swaps are already done.

    Are you serious? That's like buying a new car when you don't like the old paint.

    Say, you don't happen to know what spell the engine applies to chunk creatures, do you? It probably does that with a spell, just as cloning for Project Image with SIMULACR.SPL and the others. People have figured out which spells were used there, I wonder how?
  • kjeronkjeron Member Posts: 2,368
    chimeric said:

    Which creatures, you say, don't play the fall sound?

    Looks like it is also dependent on the type of death, some of my forced chunking deaths just would not trigger the fall sound. They did often play the dying sound in their CRE file of the save, which I had to remove so I could listen for the fall sound in their INI. Was testing mostly against party members, so this might have just been a reminder that party members aren't always the best option for testing.
    chimeric said:

    Are you serious? That's like buying a new car when you don't like the old paint.

    It's one file to copy and rename.
    chimeric said:

    Say, you don't happen to know what spell the engine applies to chunk creatures, do you? It probably does that with a spell, just as cloning for Project Image with SIMULACR.SPL and the others. People have figured out which spells were used there, I wonder how?

    Even those spells(MISLEAD/PROJIMAG/SIMULACR) don't include everything that is applied to the clone.
    There is still a lot that is applied directly by the engine, without a resource.
  • chimericchimeric Member Posts: 1,163
    edited June 2017
    Well, I've been able to obtain perfectly normal copies of characters after I removed the level drain and other things in those spells, so I can't imagine what else the engine might do to them. It set their script names to COPY, most unfortunately. But how was it discovered what the engine casts?
    kjeron said:


    Looks like it is also dependent on the type of death, some of my forced chunking deaths just would not trigger the fall sound. They did often play the dying sound in their CRE file of the save, which I had to remove so I could listen for the fall sound in their INI. Was testing mostly against party members, so this might have just been a reminder that party members aren't always the best option for testing.

    I'm not sure they fall when in the party, can't say. Out of the party, though, they rumble. :shrug: All the creature I've tried to chunk so far - with an axe, not Ctrl+Y - have played the sound for me.
    kjeron said:

    It's one file to copy and rename.

    Why would you want to do it that way? Why remove sounds in a new animation's INI when you can just clean up the old one and then making an NPC for everyone will be as easy as making a CRE file, and there'll be no sound duplication and problems with silence?

    For how I intend to stop the thuds, everything I've tried for blocking the sound is either too slow or object-specific. I think I'm going to go with invisible minions and silencing LastSummonerOf(Myself).
  • kjeronkjeron Member Posts: 2,368
    chimeric said:

    Well, I've been able to obtain perfectly normal copies of characters after I removed the level drain and other things in those spells, so I can't imagine what else the engine might do to them. It set their script names to COPY, most unfortunately. But how was it discovered what the engine casts?

    By using a save editor to look at the active effects on creatures. V2 Effects store the filename and type(item/spell) of their parent resource when attached to a creature, its what Opcode 321(Remove Effects by Resource) and Opcode 258(Activate Spell Sequencer) use. Engine applied effects leave this field empty.
  • chimericchimeric Member Posts: 1,163
    Right! Of course! But how to go about that with chunking?..
  • chimericchimeric Member Posts: 1,163
    By the way, some of the animations have several sounds for the same function, in a row. How does that work? Or supposed to? When I tried entering several files myself, only the first or the last, I don't remember, played.
Sign In or Register to comment.