Github Fork: Ranged Weapons, Monsters follow player and/or flee.

Discussions of the development process of the game.
Post Reply
User avatar
Voom
VIP
Posts: 617
Joined: Sat Dec 19, 2015 5:24 pm
android_version: 7.0
Location: Fort Lauderdale, FL

Re: Github Fork: Attacked Monsters Follow Player when he Flees, Mons Flee when low HP, Basic Ranged Attacks Support

Post by Voom »

Yes, I understand. That's good, long press will prevent the mistake of pressing the wrong tile.
Voom
twirlimp
VIP
Posts: 204
Joined: Wed Dec 30, 2015 8:00 am
android_version: 4.3

Re: Github Fork: Attacked Monsters Follow Player when he Flees, Mons Flee when low HP, Basic Ranged Attacks Support

Post by twirlimp »

Voom wrote:Yes, I understand. That's good, long press will prevent the mistake of pressing the wrong tile.
I made edits to fleeing and ranged combat that will make everything much easier.
(Checkout the update log on first page for more info, or even download the modified game and try it)
2 new ranged weapons. Max weapon range now shows in item info.

Fleeing from combat works normally again (if no monsters in adjacent tile), and...

All monsters follow the player -- in real time -- after he flees combat.
(for a limited distance).

Can target monsters outside combat without the "aim" button.

But "safe aim" can still be used to select a target without accidentally moving.

There's an option to make aiming necessary so you always need to press "aim" to start ranged combat.
(This prevents accidentally attacking monsters while moving, but it is not necessary because you can flee on the first turn ad they will not follow)
Last edited by twirlimp on Mon Jan 04, 2016 6:56 pm, edited 1 time in total.
ideas plox
twirlimp
VIP
Posts: 204
Joined: Wed Dec 30, 2015 8:00 am
android_version: 4.3

Re: Github Fork: Attacked Monsters Follow Player when he Flees, Mons Flee when low HP, Basic Ranged Attacks Support

Post by twirlimp »

Code Changes of interest to content creators

1 new proeprty for items & weapons.

"increaseMaxRange"
increaseMaxRange basically determines the range of the weapon.
Default is 0 which means it is a melee weapon and you can shoot adjacent tiles.

The new ranged weapons have range of +2, +4, and +4, with increasing accuracy debuffs to compensate.
3 new properties for monsters.

"hpFleeThreshold", "lineOfSight", "rageMultiplier".
Rage multiplier determines by how much they will follow player (outside combat).
0 means never follow,
1.0 means they follow by number of steps equal to distance when first attacked
(so if it moves in a straight line it will reach the player position at attack time),
2.0 means it will go double that distance, and so on.
Default in JSON data is now 1.0, so you should be pretty safe if you move just one square.

Line of sight determines whether they will try to move to engage player when attacked from afar.
0 means that they do not engage even when attacked with melee,
1 means they do not move in combat but will attack you if adjacent.
10 means they have line of sight of ten tiles.
Default in JSON data is now 200, which is more than 20 times the range of any bow so far.

HP threshold determines when they flee.
0 means they never flee,
1.0 mean they flee when combat starts (100%hp), 0.2 means they flee at 20% hp.
Default in JSON data is now 0.2
Notes. Following and line of sight work as expected, but fleeing not so much.
Fleeing currently only works outside combat.
Inside combat they just freeze and wait till they die/combat ends.
ideas plox
twirlimp
VIP
Posts: 204
Joined: Wed Dec 30, 2015 8:00 am
android_version: 4.3

Re: Github Fork: Ranged Weapons, Monsters follow player, Monsters flee at low HP.

Post by twirlimp »

So I was thinking of a solution for how to handle obstacles.
At first I thought of many complex work-arounds but eventually I decided on a fair compromise:

Ranged attacked should not be used to shoot if there is an unwalkable tile between you.
This is very fair since if it were melee combat, you wouldn't be able to attack either.

What are your thoughts?
ideas plox
ace
VIP
Posts: 573
Joined: Sat Jun 21, 2014 4:00 am
android_version: 9.0 - Pie
Location: lodar's hideout

Re: Github Fork: Ranged Weapons, Monsters follow player, Monsters flee at low HP.

Post by ace »

twirlimp wrote:So I was thinking of a solution for how to handle obstacles.
At first I thought of many complex work-arounds but eventually I decided on a fair compromise:

Ranged attacked should not be used to shoot if there is an unwalkable tile between you.
This is very fair since if it were melee combat, you wouldn't be able to attack either.

What are your thoughts?
yeah, absolutely. considering the fact that AT is an old school type game, most peoples should not have any problem.
the secrets of shadow and light
be happy :lol:
https://facebook.com/andorstrail
twirlimp
VIP
Posts: 204
Joined: Wed Dec 30, 2015 8:00 am
android_version: 4.3

Re: Github Fork: Ranged Weapons, Monsters follow player, Monsters flee at low HP.

Post by twirlimp »

ace wrote:
twirlimp wrote:So I was thinking of a solution for how to handle obstacles.
At first I thought of many complex work-arounds but eventually I decided on a fair compromise:

Ranged attacked should not be used to shoot if there is an unwalkable tile between you.
This is very fair since if it were melee combat, you wouldn't be able to attack either.

What are your thoughts?
yeah, absolutely. considering the fact that AT is an old school type game, most peoples should not have any problem.
Perfect XD

I'll try to submit this feature within a day.

Do you think bows should have criticals?
so far I gave them strong accuracy debuffs and was wondering if they're too weak how compared to weapons of their tier.
ideas plox
User avatar
Nut
Posts: 1507
Joined: Mon Oct 27, 2014 12:14 pm
android_version: 8.0
Location: Glade

Re: Github Fork: Ranged Weapons, Monsters follow player, Monsters flee at low HP.

Post by Nut »

I tried the apk - really nice piece of work! 8-)

- You are right, no need of ammunition is better for AT. It fits good like you have realized it.

- I also like that there is no need to go and gather all dropped items. First I thought it a bit strange, that all those dropped items fly automatically from afar to me, but otherwise I would be too lazy to gather it all and thus litter the Environment...

-
Ranged attacked should not be used to shoot if there is an unwalkable tile between you.
This is very fair since if it were melee combat, you wouldn't be able to attack either.
I think it is fair indeed, and does not give too many disadvantages to foes.
On the other hand it is not realistic not to be able to shoot e.g. across a river.
Some thoughts:
I put into spoiler for better reading

I fear that for realistic behaviour the only way is to enhance the whole map:
A shooting-possible attribute is necessary.
But instead of adding only this, I'd rather have added the type of tile, e.g.:
1.plain
2.massive (no walk, no shooting) like wall, pillars, ...
3.water (no walk, shooting possible)
4.fire (no walk, shooting possible)
5.permeable (no walk, shooting possible) like tree, fence, table, ...
6. ...

This is a real huge effort, I know. But if one starts reengineering, such information is not more work than just adding shooting-possible attribute. And surely this could be used for later additions.

But I agree to Zukero and would not do it now.
So I also vote for using the walkable attribute as shooting-possible now.


- Bow with criticals - why not? Maybe a candidate for a new legendary item?


Just some more things:

1) In one aim mode, equipped with a bow, I could just pass through all monsters. (bug or a feature? ;) )

2) Now I'd like to switch weapon from bow to sword and back often. Maybe it is possible to change the inventary, so that new or unequipped items gets in first inventary position instead of last?

3) Should it be possible for foes to shoot arrows too?


By the way: Cleaning Gargoyles Cave is much faster now :mrgreen:
Nut
ace
VIP
Posts: 573
Joined: Sat Jun 21, 2014 4:00 am
android_version: 9.0 - Pie
Location: lodar's hideout

Re: Github Fork: Ranged Weapons, Monsters follow player, Monsters flee at low HP.

Post by ace »

twirlimp wrote:
ace wrote:
twirlimp wrote:So I was thinking of a solution for how to handle obstacles.
At first I thought of many complex work-arounds but eventually I decided on a fair compromise:

Ranged attacked should not be used to shoot if there is an unwalkable tile between you.
This is very fair since if it were melee combat, you wouldn't be able to attack either.

What are your thoughts?
yeah, absolutely. considering the fact that AT is an old school type game, most peoples should not have any problem.
Perfect XD

I'll try to submit this feature within a day.

Do you think bows should have criticals?
so far I gave them strong accuracy debuffs and was wondering if they're too weak how compared to weapons of their tier.
since bows can be used to aim different body parts like neck, head, forehead, arms, legs etc., so, IMO instead of having critical chance we can have an accuracy chance which will give extra damage when arrows hits vulnerable parts enemies.
the secrets of shadow and light
be happy :lol:
https://facebook.com/andorstrail
twirlimp
VIP
Posts: 204
Joined: Wed Dec 30, 2015 8:00 am
android_version: 4.3

Re: Github Fork: Ranged Weapons, Monsters follow player, Monsters flee at low HP.

Post by twirlimp »

ace wrote:
twirlimp wrote:
ace wrote:
yeah, absolutely. considering the fact that AT is an old school type game, most peoples should not have any problem.
Perfect XD

I'll try to submit this feature within a day.

Do you think bows should have criticals?
so far I gave them strong accuracy debuffs and was wondering if they're too weak how compared to weapons of their tier.
since bows can be used to aim different body parts like neck, head, forehead, arms, legs etc., so, IMO instead of having critical chance we can have an accuracy chance which will give extra damage when arrows hits vulnerable parts enemies.
Actually this can be done to all weapons. All we have to do is replace the "critical hit" message with "you hit the face! critical!".
And face/neck/heart could depend on the critical damage.
ideas plox
ace
VIP
Posts: 573
Joined: Sat Jun 21, 2014 4:00 am
android_version: 9.0 - Pie
Location: lodar's hideout

Re: Github Fork: Ranged Weapons, Monsters follow player, Monsters flee at low HP.

Post by ace »

twirlimp wrote:
Actually this can be done to all weapons. All we have to do is replace the "critical hit" message with "you hit the face! critical!".
And face/neck/heart could depend on the critical damage.
not exactly. since a person with only bow will have to greatly depend on the accuracy, bcz if an arrow hits armor or non-vulnerable part of enemy then it is surely an advantage for enemies. but in melee combat you know where exactly you have to swing your sword but what matters here is how fast and hard you hit a spot on your enemy that is you do a critical attack.
the secrets of shadow and light
be happy :lol:
https://facebook.com/andorstrail
Post Reply