Do you want to apply it for enemies or for players?When the boss "Shiva" defends in "Street of Rage X", there is an attack that tries to counter. I saw this script, but I think it's code optimized for that game, so I'm wondering if there is a script that can easily be applied to other games.
You can control some blocking aspects using a few features.
There is something I am concerned about before a counter attack.
In the video, Shiva's defense is excellent, but in my game, which is set up similarly, the character only defends against attacks from afar and has almost no defense against close range attacks.
Blaze's attack speed is also very fast, so I don't think it's a speed issue.


anim block
range 0 96
rangea 0 96
rangeb 0 96
rangez -24 24
loop 0
delay 96
offset 137 191
bbox 128 114 25 80
frame data/chars/bosses/shiva/sor3/block00.png
@DD Tokki Hi friend, in case you need some help in SORX features, you can tag me
Do you want to apply it for enemies or for players?
You can control some blocking aspects using a few features.
In the SORX, Shiva is using nopassiveblock 1 and blockodds 1.
View attachment 7553
View attachment 7554
In addition, you can use ranges in the block animation as a refinement to define at what distance the enemy will consider to block an incoming attack.
C:anim block range 0 96 rangea 0 96 rangeb 0 96 rangez -24 24 loop 0 delay 96 offset 137 191 bbox 128 114 25 80 frame data/chars/bosses/shiva/sor3/block00.png
name Chin-L1
type enemy
health 58
aggression -80
speed 11.8
jumpheight 5
risetime 44
jugglepoints 20
guardpoints 20
guardrate 2
knockdowncount 0
antigrab 1
antigravity -50
falldie 2
blockodds 1
nopassiveblock 1
gfxshadow 1 1
noquake 1
nolife 1
candamage player obstacle
hostile player
anim block
range 0 100
rangea 0 100
rangeb 0 100
rangez -30 30
loop 0
delay 100
offset 35 84
bbox 7 0 45 80
@cmd degravity -0.5
frame data/sprites/sprite/chara/chin/block.gif
@DD Tokki Hi friend, in case you need some help in SORX features, you can tag me
Do you want to apply it for enemies or for players?
You can control some blocking aspects using a few features.
In the SORX, Shiva is using nopassiveblock 1 and blockodds 1.
View attachment 7553
View attachment 7554
In addition, you can use ranges in the block animation as a refinement to define at what distance the enemy will consider to block an incoming attack.
C:anim block range 0 96 rangea 0 96 rangeb 0 96 rangez -24 24 loop 0 delay 96 offset 137 191 bbox 128 114 25 80 frame data/chars/bosses/shiva/sor3/block00.png
But the enemy block usage can vary depending on some attack adjustments too, like attackthrottle, aggression or even if the attack ranges are conflicting with block ranges.I referred to the settings applied to shiva for the characters that defend, but they are not as good at defense as shiva. In particular, it hardly blocks close range attacks.
What's the aggression value for this enemy in the video?
It blocks exactly 90% of ranged attacks, but doesn't seem to recognize close range attacks. But if you look at Streets of Rage, it's only like that in my game.
It is set to 'aggression -80'. It depends on the difficulty level, but this is an easy mode setting.What's the aggression value for this enemy in the video?
You can maybe increase the aggression value and reduce the attackthrottle, this way the enemy will be more active but doing less attacks.
View attachment 7555
anim attack1
loop 0
fastattack 1
delay 4
offset 32 106
bbox 14 0 45 102
attack 0 0 0 0 0 0 0 0 0 0
@cmd degravity -0.5
frame data/sprites/sprite/chara/robert/attack-a01.gif
delay 3
offset 31 108
bbox 20 0 45 104
sound data/sounds/se/misc/attack1.wav
attack 36 0 62 46 6 0 0 0 0 16
hitflash flash-middle
hitfx data/sounds/se/misc/flash-punch1.wav
dropv 2.4 1 0
forcedirection -1
frame data/sprites/sprite/chara/robert/attack-a02.gif
offset 31 106
bbox 18 0 45 102
attack 0 0 0 0 0 0 0 0 0 0
frame data/sprites/sprite/chara/robert/attack-a03.gif
delay 6
offset 31 106
bbox 18 0 45 102
frame data/sprites/sprite/chara/robert/attack-a04.gif
delay 4
offset 32 106
bbox 14 0 45 102
frame data/sprites/sprite/chara/robert/attack-a01.gif
I'm curious to test it directly in your game, can you send me the exact copy you are currently using?C:anim attack1 loop 0 fastattack 1 delay 4 offset 32 106 bbox 14 0 45 102 attack 0 0 0 0 0 0 0 0 0 0 @cmd degravity -0.5 frame data/sprites/sprite/chara/robert/attack-a01.gif delay 3 offset 31 108 bbox 20 0 45 104 sound data/sounds/se/misc/attack1.wav attack 36 0 62 46 6 0 0 0 0 16 hitflash flash-middle hitfx data/sounds/se/misc/flash-punch1.wav dropv 2.4 1 0 forcedirection -1 frame data/sprites/sprite/chara/robert/attack-a02.gif offset 31 106 bbox 18 0 45 102 attack 0 0 0 0 0 0 0 0 0 0 frame data/sprites/sprite/chara/robert/attack-a03.gif delay 6 offset 31 106 bbox 18 0 45 102 frame data/sprites/sprite/chara/robert/attack-a04.gif delay 4 offset 32 106 bbox 14 0 45 102 frame data/sprites/sprite/chara/robert/attack-a01.gif
I tried controlling attacks, but I still have trouble blocking melee attacks.
Above is the player's first attack. It's a normal attack that doesn't nullify any defenses, but I can't figure out what the problem is.
aggression 100
attackthrottle 0.5 1 #attack chance of 50% and check at every 1 second
aggression 100
attackthrottle 0.7 1 #attack chance of 30% and check at every 1 second
riseinv 0.5 1
anim block
range 0 200
rangea 0 200
rangeb 0 200
rangez -50 50
loop 0
delay 100
offset 35 84
bbox 7 0 45 80
@cmd degravity -0.5
frame data/sprites/sprite/chara/chin/block.gif
thank youI made some adjustments and was able to reinforce the block using the following configurations.
Videos 1 and 2:
Video 3:
In the SORX I'm using a chance value of 0.7 (same as 30%, 1.0 means 0% = no attack) because I can open more space for dodge and block. This way the enemy can use many actions in a similar proportion instead of doing attacks all the time due to the high aggression.
Speaking about aggression, it does not control only attacks, but many actions in general, this is why I'm using a high value causing the enemy to move and act constantly even if not attacking.
C:anim block range 0 200 rangea 0 200 rangeb 0 200 rangez -50 50 loop 0 delay 100 offset 35 84 bbox 7 0 45 80 @cmd degravity -0.5 frame data/sprites/sprite/chara/chin/block.gif
I noticed that Chin doesn't have "riseinv" configured like Shiva has, so the player can always hit him immediately after the rise animation in case he has a bbox.
In addition, the block is only triggered if the opponent is doing an attack in which the frame contains an attack box, like the test I made at the beginning of the video using pause. In this test you can see that Robert's blitz only contains an attack box at the end of the animation, but at this moment he is already too close to Chin and he doesn't have enough time to trigger the block.
So, in general, the block is working as intended but there's some details in your game that may need adjustments. I suggest making more experiments with delay, collision boxes and range in order to allow enemies to block attacks. If players are moving/attacking too fast without the proper attack boxes to trigger the block animation, it may not work in the correct moment.
A last detail we can't forget, SORX is using the v4 engine and it contains some fixes related to blocking, making it more accurate than v3.
Exactly, we can see it in mainly in the first two videos. However, some small changes in the range, riseinv aggression and attackthrottle can improve the gameplay in general aspect too, like we can see in the video 3.Does this mean that Robert's attack box passes briefly and it is too late for Chin's block to catch it?
I tried it again and found that by expanding the player's attack box, enemies now often try to defend themselves, but when attacking from close range, they are not as protected as expected.I made some adjustments and was able to reinforce the block using the following configurations.
Videos 1 and 2:
Video 3:
In the SORX I'm using a chance value of 0.7 (same as 30%, 1.0 means 0% = no attack) because I can open more space for dodge and block. This way the enemy can use many actions in a similar proportion instead of doing attacks all the time due to the high aggression.
Speaking about aggression, it does not control only attacks, but many actions in general, this is why I'm using a high value causing the enemy to move and act constantly even if not attacking.
C:anim block range 0 200 rangea 0 200 rangeb 0 200 rangez -50 50 loop 0 delay 100 offset 35 84 bbox 7 0 45 80 @cmd degravity -0.5 frame data/sprites/sprite/chara/chin/block.gif
I noticed that Chin doesn't have "riseinv" configured like Shiva has, so the player can always hit him immediately after the rise animation in case he has a bbox.
In addition, the block is only triggered if the opponent is doing an attack in which the frame contains an attack box, like the test I made at the beginning of the video using pause. In this test you can see that Robert's blitz only contains an attack box at the end of the animation, but at this moment he is already too close to Chin and he doesn't have enough time to trigger the block.
So, in general, the block is working as intended but there's some details in your game that may need adjustments. I suggest making more experiments with delay, collision boxes and range in order to allow enemies to block attacks. If players are moving/attacking too fast without the proper attack boxes to trigger the block animation, it may not work in the correct moment.
A last detail we can't forget, SORX is using the v4 engine and it contains some fixes related to blocking, making it more accurate than v3.
It feels like the enemy is defending itself only when the player hits it as if grazing the enemy.Exactly, we can see it in mainly in the first two videos. However, some small changes in the range, riseinv aggression and attackthrottle can improve the gameplay in general aspect too, like we can see in the video 3.
aggression 100
attackthrottle 0.5 1 #attack chance of 50% and check at every 1 second
aggression 100
attackthrottle 0.7 1 #attack chance of 30% and check at every 1 second
riseinv 0.5 1
Yes, it's because the enemy has more actions to choose in a close range compared with a long range.If you hit it close to the front, it feels like it defends less than if you hit it from a distance.
anim block
range 0 150
rangea 0 150
rangez -40 40
loop 0
delay 100
offset 35 84
bbox 7 0 45 80
@cmd degravity -0.5
frame data/sprites/sprite/chara/chin/block.gif
anim attack1
rangea 0 77
range 0 86
loop 0
fastattack 1
jugglecost 5
delay 2
offset 21 79
bbox 6 2 45 73
attack 0 0 0 0 0 0 0 0 0 0
@cmd degravity -0.5
frame data/sprites/sprite/chara/chin/attack-a01.gif
anim attack2
rangea 0 77
range 0 86
loop 0
fastattack 1
jugglecost 5
delay 2
offset 25 94
bbox 8 19 45 71
attack 0 0 0 0 0 0 0 0 0 0
@cmd degravity -0.5
frame data/sprites/sprite/chara/chin/attack-b01.gif
anim attack3
rangea 0 77
range 0 86
loop 0
fastattack 1
jugglecost 21
delay 8
offset 26 64
bbox 21 0 45 60
attack 0 0 0 0 0 0 0 0 0 0
@cmd degravity -0.5
frame data/sprites/sprite/chara/chin/attack-c01.gif
anim freespecial
rangea 0 80
range 80 150
loop 0
fastattack 1
jugglecost 10
delay 10
offset 27 86
bbox 17 7 45 75
attack 0 0 0 0 0 0 0 0 0 0
@cmd degravity -0.5
frame data/sprites/sprite/chara/chin/skill-01.gif
Sorry friend, what is ERA?The ERA is definitely high
Exactly, it was my intent on reducing the attack rate but adding block, counter and dodge together with riseinv+riseattack. This way Shiva has many ways to escape from the player's obliteration instead of only blocking.If you add special skills instead of just relying on defense, you can become a martial artist like Shiva.![]()
I don’t even know what ‘ERA’ is. Since I communicate through a translator, sometimes the sentences are translated differently from what I intended.Yes, it's because the enemy has more actions to choose in a close range compared with a long range.
Below you can see a comparison, if we get a range of 130 in the x axis only the block and freespecial animations will be selected. However, in a range of 80 it will compete with all the other animations below and randomly selected.
So, there's a high chance of the enemy to do an attack at a close range, making him unable to not defend the player's attacks.
C:anim block range 0 150 rangea 0 150 rangez -40 40 loop 0 delay 100 offset 35 84 bbox 7 0 45 80 @cmd degravity -0.5 frame data/sprites/sprite/chara/chin/block.gif anim attack1 rangea 0 77 range 0 86 loop 0 fastattack 1 jugglecost 5 delay 2 offset 21 79 bbox 6 2 45 73 attack 0 0 0 0 0 0 0 0 0 0 @cmd degravity -0.5 frame data/sprites/sprite/chara/chin/attack-a01.gif anim attack2 rangea 0 77 range 0 86 loop 0 fastattack 1 jugglecost 5 delay 2 offset 25 94 bbox 8 19 45 71 attack 0 0 0 0 0 0 0 0 0 0 @cmd degravity -0.5 frame data/sprites/sprite/chara/chin/attack-b01.gif anim attack3 rangea 0 77 range 0 86 loop 0 fastattack 1 jugglecost 21 delay 8 offset 26 64 bbox 21 0 45 60 attack 0 0 0 0 0 0 0 0 0 0 @cmd degravity -0.5 frame data/sprites/sprite/chara/chin/attack-c01.gif anim freespecial rangea 0 80 range 80 150 loop 0 fastattack 1 jugglecost 10 delay 10 offset 27 86 bbox 17 7 45 75 attack 0 0 0 0 0 0 0 0 0 0 @cmd degravity -0.5 frame data/sprites/sprite/chara/chin/skill-01.gif
Sorry friend, what is ERA?
Exactly, this was my intent on reducing the attack rate but adding block, counter and dodge together with riseinv+riseattack. This way Shiva has many ways to escape from the player's obliteration instead of only blocking.
No problem friend, I understand itI don’t even know what ‘ERA’ is. Since I communicate through a translator, sometimes the sentences are translated differently from what I intended.![]()