Post by lgb3d on Sept 9, 2022 23:53:38 GMT -5
Have you ever wanted to kick him when he was down?
Have you ever wanted to kill him when he was down?
Have you ever imagined catching him on fire and killing him while he is burning?
I'm going to cover a little bit of an advanced topic here which is mind blowing, a real game changer..
...........
This video demonstrates kicking or killing him when he's down
youtube.com/shorts/iiLQWwS8nNw?feature=share
This video demonstrates a looping animation, and just the same you can take him out of this with a death blow. I'm imagining this would be a graphic of a guy on his knees, utilizing the looping animation frames to make it appear he is burning.
youtube.com/shorts/l8UvM1n2uUs?feature=share
When the enemy is down it is similar to him being knocked out. He is no longer bumpable so you can walk over him, but he's caught in limbo meaning the player can still attack him taking him out of limbo sending him to a new frame.
Sadly for the kick him or shoot him while he's down laying lifeless. I had to change the handle numbers in solid0.txt for the frames of the animation hes looping in to read only a single handle #..
If you are crafty with graphics you might be able to use two three or four handle numbers and make it appear as if he is twitching around on the ground.
The point I'm getting at is that you can't go from standing to on the ground without an in-between, but if the in-between is looping he would look like a flopping frog and that would be too unrealistic. So if you do use multiple images his body cannot be changing between standing and laying down you need to choose a position and have him twitching or burning in that position as the frames are going to continue looping.
I could imagine this being utilized with the fire bomb technique like I mentioned in my how to gib enemies tutorial.
...........
Okay so that graphics, handle numbers and solid0.txt are on you
And I will explain how to orchestrate this, either through guardsrc.4th (For individual guard sets or levels)... or through PYGMYINI.4th ( the engines AI for guards )
One thing to keep in mind if we modify the number of frames in any part of the animation in solid0.txt... it needs to be uniform throughout the game so each of your enemies needs to have the same events land on the same frame numbers. And there must be 32 frames even if you use less they still need to be present.
So if you do feel desire to make major change with the frame numbers location of events number of frames per event, you might consider making a new master template to your desired Baseline for your project, and every time you make a new enemy set using the engine it will jive with the AI script
..........
FYI recently I discovered the Dos engines AI script for guards, I'm learning a lot from it.. and hope someday to make an appropriate tutorial on that topic as we can modify this in various ways. Much easier to work with than later releases
............
ok..... so there are four different death senes...
in the dos engine they look like this
0 curdeath ! ( normal gun lethal death )
0 dth.attr death!
9 dth.strt death!
12 dth.end death!
-10 dth.score death!
1 curdeath !
0 dth.attr death! ( stick foam death )
13 dth.strt death!
15 dth.end death!
5 dth.score death!
2 curdeath ! ( tear gas )
1 dth.attr death!
16 dth.strt death!
17 dth.end death!
1 dth.score death!
3 curdeath ! ( knockout gas or punch )
9 dth.attr death!
24 dth.strt death!
27 dth.end death!
10 dth.score death!
............................
to decode this
# curdeath = type of death
# dth.attr = death properties/attributes
# dth.strt = first frame for this type of death
# dth.end = last frame for this type of death
# dth.score = score assigned for killing it this way
..........................................
what we are interested in is "dth.attr"
0 = dead and not coming back
1 = short ko period
8 = normal ko period
9 = large ko period..
.........................................
with the windows engine I had been discovering a lot of interesting things by finding unique #s ... then I thought to my self how do they work in dos.. my favorite in windows was -1.. but it only worked with normal death.. it would just continue looping.. you could not shoot guard again, it was like getting a free extra animation. then I discovered -3 did simular on goo and tear gass... but the guard comes out of it like a ok, but then stands like a statue you can not shoot or hurt... hmmm.. So I thought to my self to experiment with dos.. see if I could get an extra animation in dos. but the results were different... in a good way.
.......
in dos engine both -1 and -3 work the same... and work on all four deaths..
So if you want a guard who is impossible to kill use -1 or -3 on all 4 of the dth.attr..
but i dont think thats wise you would have to be very creative with you animations.. perhaps a guard with very short height or very few graphics this could work...
I think its necessary to see the guard pop up ad flip as seen in my video, when hes down and you hit him..
so if you want to kick him... keep ko attr as a 1 8 or 9.. i prefer 1 because its the shortest ko period..
if you want him to be able to die.. keep normal death attr 0.
then that leaves us two deaths..
perhaps you work with the number of frames and create animations...
perhaps one is a animation of guard burning.. like you throw a fire bomb at him?
and another of him twitching on the floor.. perhaps you cracked him with a baseball bat or shocked him with a taser?
the important part.. they will come out of these animation on there own, in about the time the guard typicaly wakes up from a ko.. they will return to tracking you and attacking you.. but through the time of there limbo, you can hit him with any of your weapons.. and based on your weapon attrabute or fld.txt digits he will jump to the frame your weapon triggers...
example he is twitching on the ground, you throw a fire bomb.. then he starts burning, so you hit him with the bat again the fire goes out and hes twitching again, so you kick him and he lays there koed.. or perhaps you shot him... then he would die.. the only frames where the new attack will branch his animation is is the dth.attr is -1 or -3... so if he is in ko mode and ko dth,attr is 1 he will not react to another weapon..
another note.. the guards have death or pain sounds. every time you hit him with a weapon he will make one of his 4 sounds. if its a new weapon he will jump to that frame.. but if you keep hitting him with the weapon that took him to that -3... he will just keep looping those death sounds.. letting you know he is still alive and getting hurt..
............................
so how do you get this to work in your game?
you will need to add some lines to your guardsrc.txt.. the dos guardsrc.txt is much different than the windows so I am going to try to describe placement..
you will see the three states a guard can be set at
.........................................................
robodata mxrobo b/robo * -1 fill ( clear data to zeros )
: waitthenhunt
begin
10 sentryorhunt
0 until ;
: randompatrol
begin
2 randomwalk
intflag robostat@ if -1 huntflag robostat! trackdown then
0 until ;
: staystanding
!
begin
10 standandshoot
0 until
: waitthenhunt
......................................
choose one of the three waitthenhunt is fine,
copy and paste this block,
0 curdeath ! ( normal gun lethal death )
0 dth.attr death!
9 dth.strt death!
12 dth.end death!
-10 dth.score death!
1 curdeath !
0 dth.attr death! ( stick foam death )
13 dth.strt death!
15 dth.end death!
5 dth.score death!
2 curdeath ! ( tear gas )
1 dth.attr death!
16 dth.strt death!
17 dth.end death!
1 dth.score death!
3 curdeath ! ( knockout gas or punch )
9 dth.attr death!
24 dth.strt death!
27 dth.end death!
10 dth.score death!
and place it between...........
: waitthenhunt
begin...
........................................
now you have........
: waitthenhunt
0 curdeath ! ( normal gun lethal death )
0 dth.attr death!
9 dth.strt death!
12 dth.end death!
-10 dth.score death!
1 curdeath !
0 dth.attr death! ( stick foam death )
13 dth.strt death!
15 dth.end death!
5 dth.score death!
2 curdeath ! ( tear gas )
1 dth.attr death!
16 dth.strt death!
17 dth.end death!
1 dth.score death!
3 curdeath ! ( knockout gas or punch )
9 dth.attr death!
24 dth.strt death!
27 dth.end death!
10 dth.score death!
begin
10 sentryorhunt
0 until ;
...........................................
no you can tweek your guard set dth.attr for each of the four deaths..
or find that code starting with... 0 curdeath ! ( normal gun lethal death )
in
gcs\engine\ PYGMYINI.4TH
editing there will set defaults for the entire game despite what guard set..
So if you want all
2 curdeath ! ( tear gas )
to =
-3 dth.attr death!
for the length of the game.. this is your one stop shop..
and if by chance on level three you have a different guard set you dont want to react that way you can adjust just that one guardsrc.4th to be a different value...
in that area of pygmyini.4th you will see other actions such as run and shoot... this is where you can adjust those frame start and end #s..
so through your whole game... walk run and shoot frame numbers must be the same!
but in your guardsrc.4th you can adjust your death start and ends... ok... just make sure your death start and ends dont over lap frames the engine knows as walk run or shoot... ok
....
so I hope I gave you some Ideas. I wish this worked in v 1.3.. ugh..
fyi much more to come as I have been studying this pygmyini.4th.. but I want to be sure my discoveries are thoroughly tested first.. as well currently my goal is my game being made on 1.3 so ... when I get there I will surley let you all know.
if anyone has questions or needs help with this tutorial, I would be happy to help with anything other than vgr graphics that is up to you.. ;p
looking forward to your awesome vgr graphics, a guard who dose the moonwalk when shot! awesome!
......................
fyi
...................
: waitthenhunt
-1 armorflag robostat!
begin
10 sentryorhunt
0 until ;
............................
the line starting with "-1" ending with "!"
add that to your guardsrc.4th to make them invincible to non lethal weapons..
but for some reason you must add this one to each of the 3 states of the guard not just waitthenhunt...
meaning..? goo gun, ninja kick, and gas grenades.. maybe tear gas... not sure because my explosion is modified and has aspects of tear gas but its not the same... the -1 line dose not block that explosion...
try it out.. ;p
Have you ever wanted to kill him when he was down?
Have you ever imagined catching him on fire and killing him while he is burning?
I'm going to cover a little bit of an advanced topic here which is mind blowing, a real game changer..
...........
This video demonstrates kicking or killing him when he's down
youtube.com/shorts/iiLQWwS8nNw?feature=share
This video demonstrates a looping animation, and just the same you can take him out of this with a death blow. I'm imagining this would be a graphic of a guy on his knees, utilizing the looping animation frames to make it appear he is burning.
youtube.com/shorts/l8UvM1n2uUs?feature=share
When the enemy is down it is similar to him being knocked out. He is no longer bumpable so you can walk over him, but he's caught in limbo meaning the player can still attack him taking him out of limbo sending him to a new frame.
Sadly for the kick him or shoot him while he's down laying lifeless. I had to change the handle numbers in solid0.txt for the frames of the animation hes looping in to read only a single handle #..
If you are crafty with graphics you might be able to use two three or four handle numbers and make it appear as if he is twitching around on the ground.
The point I'm getting at is that you can't go from standing to on the ground without an in-between, but if the in-between is looping he would look like a flopping frog and that would be too unrealistic. So if you do use multiple images his body cannot be changing between standing and laying down you need to choose a position and have him twitching or burning in that position as the frames are going to continue looping.
I could imagine this being utilized with the fire bomb technique like I mentioned in my how to gib enemies tutorial.
...........
Okay so that graphics, handle numbers and solid0.txt are on you
And I will explain how to orchestrate this, either through guardsrc.4th (For individual guard sets or levels)... or through PYGMYINI.4th ( the engines AI for guards )
One thing to keep in mind if we modify the number of frames in any part of the animation in solid0.txt... it needs to be uniform throughout the game so each of your enemies needs to have the same events land on the same frame numbers. And there must be 32 frames even if you use less they still need to be present.
So if you do feel desire to make major change with the frame numbers location of events number of frames per event, you might consider making a new master template to your desired Baseline for your project, and every time you make a new enemy set using the engine it will jive with the AI script
..........
FYI recently I discovered the Dos engines AI script for guards, I'm learning a lot from it.. and hope someday to make an appropriate tutorial on that topic as we can modify this in various ways. Much easier to work with than later releases
............
ok..... so there are four different death senes...
in the dos engine they look like this
0 curdeath ! ( normal gun lethal death )
0 dth.attr death!
9 dth.strt death!
12 dth.end death!
-10 dth.score death!
1 curdeath !
0 dth.attr death! ( stick foam death )
13 dth.strt death!
15 dth.end death!
5 dth.score death!
2 curdeath ! ( tear gas )
1 dth.attr death!
16 dth.strt death!
17 dth.end death!
1 dth.score death!
3 curdeath ! ( knockout gas or punch )
9 dth.attr death!
24 dth.strt death!
27 dth.end death!
10 dth.score death!
............................
to decode this
# curdeath = type of death
# dth.attr = death properties/attributes
# dth.strt = first frame for this type of death
# dth.end = last frame for this type of death
# dth.score = score assigned for killing it this way
..........................................
what we are interested in is "dth.attr"
0 = dead and not coming back
1 = short ko period
8 = normal ko period
9 = large ko period..
.........................................
with the windows engine I had been discovering a lot of interesting things by finding unique #s ... then I thought to my self how do they work in dos.. my favorite in windows was -1.. but it only worked with normal death.. it would just continue looping.. you could not shoot guard again, it was like getting a free extra animation. then I discovered -3 did simular on goo and tear gass... but the guard comes out of it like a ok, but then stands like a statue you can not shoot or hurt... hmmm.. So I thought to my self to experiment with dos.. see if I could get an extra animation in dos. but the results were different... in a good way.
.......
in dos engine both -1 and -3 work the same... and work on all four deaths..
So if you want a guard who is impossible to kill use -1 or -3 on all 4 of the dth.attr..
but i dont think thats wise you would have to be very creative with you animations.. perhaps a guard with very short height or very few graphics this could work...
I think its necessary to see the guard pop up ad flip as seen in my video, when hes down and you hit him..
so if you want to kick him... keep ko attr as a 1 8 or 9.. i prefer 1 because its the shortest ko period..
if you want him to be able to die.. keep normal death attr 0.
then that leaves us two deaths..
perhaps you work with the number of frames and create animations...
perhaps one is a animation of guard burning.. like you throw a fire bomb at him?
and another of him twitching on the floor.. perhaps you cracked him with a baseball bat or shocked him with a taser?
the important part.. they will come out of these animation on there own, in about the time the guard typicaly wakes up from a ko.. they will return to tracking you and attacking you.. but through the time of there limbo, you can hit him with any of your weapons.. and based on your weapon attrabute or fld.txt digits he will jump to the frame your weapon triggers...
example he is twitching on the ground, you throw a fire bomb.. then he starts burning, so you hit him with the bat again the fire goes out and hes twitching again, so you kick him and he lays there koed.. or perhaps you shot him... then he would die.. the only frames where the new attack will branch his animation is is the dth.attr is -1 or -3... so if he is in ko mode and ko dth,attr is 1 he will not react to another weapon..
another note.. the guards have death or pain sounds. every time you hit him with a weapon he will make one of his 4 sounds. if its a new weapon he will jump to that frame.. but if you keep hitting him with the weapon that took him to that -3... he will just keep looping those death sounds.. letting you know he is still alive and getting hurt..
............................
so how do you get this to work in your game?
you will need to add some lines to your guardsrc.txt.. the dos guardsrc.txt is much different than the windows so I am going to try to describe placement..
you will see the three states a guard can be set at
.........................................................
robodata mxrobo b/robo * -1 fill ( clear data to zeros )
: waitthenhunt
begin
10 sentryorhunt
0 until ;
: randompatrol
begin
2 randomwalk
intflag robostat@ if -1 huntflag robostat! trackdown then
0 until ;
: staystanding
!
begin
10 standandshoot
0 until
: waitthenhunt
......................................
choose one of the three waitthenhunt is fine,
copy and paste this block,
0 curdeath ! ( normal gun lethal death )
0 dth.attr death!
9 dth.strt death!
12 dth.end death!
-10 dth.score death!
1 curdeath !
0 dth.attr death! ( stick foam death )
13 dth.strt death!
15 dth.end death!
5 dth.score death!
2 curdeath ! ( tear gas )
1 dth.attr death!
16 dth.strt death!
17 dth.end death!
1 dth.score death!
3 curdeath ! ( knockout gas or punch )
9 dth.attr death!
24 dth.strt death!
27 dth.end death!
10 dth.score death!
and place it between...........
: waitthenhunt
begin...
........................................
now you have........
: waitthenhunt
0 curdeath ! ( normal gun lethal death )
0 dth.attr death!
9 dth.strt death!
12 dth.end death!
-10 dth.score death!
1 curdeath !
0 dth.attr death! ( stick foam death )
13 dth.strt death!
15 dth.end death!
5 dth.score death!
2 curdeath ! ( tear gas )
1 dth.attr death!
16 dth.strt death!
17 dth.end death!
1 dth.score death!
3 curdeath ! ( knockout gas or punch )
9 dth.attr death!
24 dth.strt death!
27 dth.end death!
10 dth.score death!
begin
10 sentryorhunt
0 until ;
...........................................
no you can tweek your guard set dth.attr for each of the four deaths..
or find that code starting with... 0 curdeath ! ( normal gun lethal death )
in
gcs\engine\ PYGMYINI.4TH
editing there will set defaults for the entire game despite what guard set..
So if you want all
2 curdeath ! ( tear gas )
to =
-3 dth.attr death!
for the length of the game.. this is your one stop shop..
and if by chance on level three you have a different guard set you dont want to react that way you can adjust just that one guardsrc.4th to be a different value...
in that area of pygmyini.4th you will see other actions such as run and shoot... this is where you can adjust those frame start and end #s..
so through your whole game... walk run and shoot frame numbers must be the same!
but in your guardsrc.4th you can adjust your death start and ends... ok... just make sure your death start and ends dont over lap frames the engine knows as walk run or shoot... ok
....
so I hope I gave you some Ideas. I wish this worked in v 1.3.. ugh..
fyi much more to come as I have been studying this pygmyini.4th.. but I want to be sure my discoveries are thoroughly tested first.. as well currently my goal is my game being made on 1.3 so ... when I get there I will surley let you all know.
if anyone has questions or needs help with this tutorial, I would be happy to help with anything other than vgr graphics that is up to you.. ;p
looking forward to your awesome vgr graphics, a guard who dose the moonwalk when shot! awesome!
......................
fyi
...................
: waitthenhunt
-1 armorflag robostat!
begin
10 sentryorhunt
0 until ;
............................
the line starting with "-1" ending with "!"
add that to your guardsrc.4th to make them invincible to non lethal weapons..
but for some reason you must add this one to each of the 3 states of the guard not just waitthenhunt...
meaning..? goo gun, ninja kick, and gas grenades.. maybe tear gas... not sure because my explosion is modified and has aspects of tear gas but its not the same... the -1 line dose not block that explosion...
try it out.. ;p