• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Guide Make movie dead man in location

Myth

Freebooter
Good afternoon! I usually write to the forum at a time when I need help. But this time I want to share my experience.
Task: you need to add corpses to the location. This is necessary when you write the quest and you need to show the results of the battle. For example: the burning city and the dead people on earth.
The task is kind of simple: create a character and kill it.
But there is a problem: if we prescribe a type of citizen or any other person to the character, he will first stand, then die. It does not look very good.
You can assign a type of recumbent actor to the character. But again: when you play the animation, the character will still get up.
A bit of theory: the animation of the character's death is selected inside the function "SetCharacterTask_Dead".
And we can not influence what animation should be played.
How to be?
Solve the problem: let's say the character we're killing uses the "man" animation.
1) Save the file "man.ani" with a new name. For example: "deadman.ani";
2) Open the usual notepad or any text editor "deadman.ani"
3) Remove all deaths from the file "deadman.ani"
4) Save changes to the file.
Additionally, you can delete the movements that are played during the receipt of damage.
It remains only to adjust the parameters of our corpse: write him an animate "deadman", not "man". After that, call him a lying actor and kill at the right time.
All!
 
Cool!
Maybe @Grey Roger or @jack RavkhaR cab find some use for that trick. :cheers

It is possible that @ChezJfrey can fix this for a newer version of the kernel. We only need a new flag for the character, with the meaning: whether to play the death animation and when receiving damage. The solution is that the above I found by accident. If I did not start to correct the old animations, I would not have found it.

If someone is interested: I can also write how for animation files to include text highlighting in Notepad ++
 
Open Notepad ++
Click on "Setting" - Style Configurator
Languare - ini file
Under "user ext.:" write "ani"
Restart Notepad ++
Reopen Animations File in Notepad ++

Безымянный.jpg
 
Doesn't CoAS have something like this?
Code:
void LAi_ActorSetLayMode(aref chr)
{
   if(LAi_type_actor_Error(chr, false)) return;
   chr.chr_ai.type.mode = "lay";
   BeginChangeCharacterActions(chr);
   chr.actions.idle.i1 = "Lay_1";
   EndChangeCharacterActions(chr);
}
That's in PoTC's "LAi_Actor.c". It's already used in several quests in which a character needs to be lying on the ground.

Does "man.ani" in CoAS have the animation "Lay_1"? If not, you could probably add it - perhaps define its start and end points as both being the same as the end frame of a death animation.
 
Doesn't CoAS have something like this?
Code:
void LAi_ActorSetLayMode(aref chr)
{
   if(LAi_type_actor_Error(chr, false)) return;
   chr.chr_ai.type.mode = "lay";
   BeginChangeCharacterActions(chr);
   chr.actions.idle.i1 = "Lay_1";
   EndChangeCharacterActions(chr);
}
That's in PoTC's "LAi_Actor.c". It's already used in several quests in which a character needs to be lying on the ground.

Does "man.ani" in CoAS have the animation "Lay_1"? If not, you could probably add it - perhaps define its start and end points as both being the same as the end frame of a death animation.

The problem is not that there is not enough animation. The problem is that for a recumbent character the standing death animation is prescribed. I tried to specify through the scripts the absence of these movements - it did not help.

I corrected the animation from the earlier games of the series.
 
The problem is not that there is not enough animation. The problem is that for a recumbent character the standing death animation is prescribed. I tried to specify through the scripts the absence of these movements - it did not help.

I corrected the animation from the earlier games of the series.

I would do what @Grey Roger suggests, with LAi_ActorSetLayMode. If the .ani file you want to use does not contain a Lay_1, then find a spot in the animation where the character is lying flat, and add that frame for Lay_1 in the .ani. I believe man.ani already has this.

For review of this function, COAS Isabella quest has the scene out in the jungle, where Isabella's servant is found dead. Take a look at how the case "BackRosita_3": in Quest\Isabella\BrigCaptain.c sets that mode, and her address group to Belize_ExitTown, so that when that scene is loaded, she is immediately lying flat on the ground, with no death animation of stand/fall to ground.
 
I would do what @Grey Roger suggests, with LAi_ActorSetLayMode. If the .ani file you want to use does not contain a Lay_1, then find a spot in the animation where the character is lying flat, and add that frame for Lay_1 in the .ani. I believe man.ani already has this.

For review of this function, COAS Isabella quest has the scene out in the jungle, where Isabella's servant is found dead. Take a look at how the case "BackRosita_3": in Quest\Isabella\BrigCaptain.c sets that mode, and her address group to Belize_ExitTown, so that when that scene is loaded, she is immediately lying flat on the ground, with no death animation of stand/fall to ground.

I'll look at what you mentioned.

The way I suggested above I like more than just a recumbent actor. He does not lie "stunned," he is really dead and can be searched like a dead man. And if you are standing next to the lying actor: it is not searched.

But for one place such editing is really necessary: go to prison, to the prisoners. And try to shoot the prisoner who lies. He will rise and die.
 
Last edited:
I'll look at what you mentioned.

The way I suggested above I like more than just a recumbent actor. He does not lie "stunned," he is really dead and can be searched like a dead man. And if you are standing next to the lying actor: it is not searched.

I wonder if the following would work, after generating and setting lay condition and allowing a dead search and also keep the character from disappearing after death timeout?

chr.SaveItemsForDead = true;
chr.DontClearDead = true;
LAi_CheckKillCharacter(chr);

But for one place such editing is really necessary: go to prison, to the prisoners. And try to shoot the prisoner who lies. He will rise and die.

Yes, I think the dead animation would do such a thing for a sitting/lying character because the animation frames start from the standing character position. I wonder if a new lying death animation needs to be defined in .ani, then for such a character, define the death defaults, similar to LAi_SetDefaultSitAnimation(aref chr). That is called for a sitting character, that defines their death animation in SetDefaultSitDead(chr) to "Sit_Death". Copy those functions as LAi_SetDefaultLieAnimation/SetDefaultLieDead, find frames for a lying death, add to .ani as Lie_Death, and for any character set into the scene as lying, call LAi_SetDefaultLieAnimation? Just some thoughts about how to do this...
 
Fix it in script!

\Program\Loc_ai\types\LAi_actor.c was edit

void LAi_ActorSetLayMode(aref chr)
{
if(LAi_type_actor_Error(chr, false)) return;
chr.chr_ai.type.mode = "lay";
LAi_SetDefaultLayAnimation(chr)
}

\Program\Loc_ai\LAi_utils.c - add New lines

void LAi_SetDefaultLayAnimation(aref chr)
{
if(IsEntity(chr))
{
BeginChangeCharacterActions(chr);
SetDefaultLayIdle(chr);
SetLayDead(chr);
EndChangeCharacterActions(chr);
}
}
\Program\characters\characters.c - add new lines

void SetLayDead(ref character)
{
character.actions.dead.d1 = "Lay_1";
character.actions.dead.d2 = "Lay_1";
}

void SetDefaultLayIdle(ref character)
{
character.actions.idle.i1 = "Lay_1";
character.actions.idle.i2 = "Lay_1";
character.actions.idle.i3 = "Lay_1";
character.actions.idle.i4 = "Lay_1";
character.actions.idle.i5 = "Lay_1";
character.actions.idle.i6 = "Lay_1";
character.actions.idle.i7 = "Lay_1";
character.actions.idle.i8 = "Lay_1";
character.actions.idle.i9 = "Lay_1";
character.actions.idle.i10 = "Lay_1";
//character.actions.idle.i11 = "idle_11";
character.actions.HitNoFight = "Lay_1";
}

And its done!

Thx for @ChezJfrey! Save me again!
 
Back
Top