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

Discussions of the development process of the game.
Post Reply
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 »

rijackson741 wrote:How do you choose a target, and what happens if there's something in the way (can I shoot round the corner of a building?)?
Inside combat, you choose a target for ranged attacks by doing a long-press, which is also how choosing targets for melee is done in the game at the moment.

Outside combat, you can choose a target by going into an "aim mode" and clicking on a monster (you can't move in aim-mode).

Currently, you can shoot something even if there's something in the way, but soon I'll make objects in the way block your aim.

Around the corner of a building? Well, you'd have to move so there's a straight line between you two.
ideas plox
User avatar
Zukero
Lead Developer
Posts: 2028
Joined: Thu Jul 21, 2011 9:56 am
android_version: 8.0
Location: Eclipse

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

Post by Zukero »

Good job on this so far.

I like your teleport debug button. I think I'll keep it.

I like the idea of fleeing/chasing mobs. Are any mobs already configured to show these behaviour in your build? I'd like to test it.

Ranged weapons, however, I'm not sure you can integrate them in a fun way, with an intuitive enough UI, and a good balance.
Moreover, I don't see how you can detect obstacles on the map in a convincing way: the Objects layer can contain either huge boulders or small flowers, and an unwalkable tile could very well be shot over (like a river).
Reediting all existing maps to include a "shootable" layer in a similar way to walkable, is IMHO the only solution, but that's a huge amount of work. I would vote against it.
Last reserve, this system would give a greater advantage to players with large screen devices, as those with smaller, cheap phones would not get the chance to kill enemies far away.
If you find a way to overcome all of this, I'll be really happy to add this to the game.

As for using magic, this doesn't fit with the world. Magic in AT is very rare and limited. It's mostly necromancy, and no fireball shooting. This has already been ruled out.
Lvl: 78, XP: 8622632, Gold: 271542, RoLS: 1, ElyR: -, RoL: -, ChaR: 1, GoLF: 1, ShaF: 1, SRoV: 1, VSH: 1, WMC: 1, GoW: 1
HP: 71, AC: 301%, AD: 38-47, AP: 3, ECC: 50%, CM: 3.75, BC: 101%, DR: 2
User avatar
Firefly84
Posts: 278
Joined: Mon Aug 10, 2015 9:23 am
android_version: 8.0
Location: Germany

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

Post by Firefly84 »

Why don't you use range weapon as a tool to open closed path or treasures?
Firefly
Lvl: 114, PV: 497, FQ: 63
RoLS: 2, ElyR: 1, RoL: 2, HoF: 0, ChaR: 1, GoLF: 1, ShaF: 4, SRoV: 6, VSH: 3, WMC: 1, GoW: 1, BD: 1
DP: 0, X: 0, M: 1, BoGt: 1, SotA: 0, RofLS: 1
HP: 505, AC: 262, AD: 89-105, AP: 4 each, ECC: 12, CM: -, BC: 156, DR: 4
User avatar
Zukero
Lead Developer
Posts: 2028
Joined: Thu Jul 21, 2011 9:56 am
android_version: 8.0
Location: Eclipse

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

Post by Zukero »

In this case, it would be better handled as scripted events than with a real ranged weapons system.
Lvl: 78, XP: 8622632, Gold: 271542, RoLS: 1, ElyR: -, RoL: -, ChaR: 1, GoLF: 1, ShaF: 1, SRoV: 1, VSH: 1, WMC: 1, GoW: 1
HP: 71, AC: 301%, AD: 38-47, AP: 3, ECC: 50%, CM: 3.75, BC: 101%, DR: 2
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 »

Zukero wrote:Good job on this so far.

I like your teleport debug button. I think I'll keep it.

I like the idea of fleeing/chasing mobs. Are any mobs already configured to show these behaviour in your build? I'd like to test it.

Ranged weapons, however, I'm not sure you can integrate them in a fun way, with an intuitive enough UI, and a good balance.
Moreover, I don't see how you can detect obstacles on the map in a convincing way: the Objects layer can contain either huge boulders or small flowers, and an unwalkable tile could very well be shot over (like a river).
Reediting all existing maps to include a "shootable" layer in a similar way to walkable, is IMHO the only solution, but that's a huge amount of work. I would vote against it.
Last reserve, this system would give a greater advantage to players with large screen devices, as those with smaller, cheap phones would not get the chance to kill enemies far away.
If you find a way to overcome all of this, I'll be really happy to add this to the game.

As for using magic, this doesn't fit with the world. Magic in AT is very rare and limited. It's mostly necromancy, and no fireball shooting. This has already been ruled out.
Currently I have following/fleeing behavior of all monsters set to a default constant.
So yeah basically all monsters flee/follow now. But there's an enum list and JSON data can be easily written to the "fleeBehavior" variable of each monster.

I've implemented two systems that I'm switching between for testing.
Edit: The two systems are the same except that one has real-time following.
Both systems work like the standard combat in that you can still flee (exit combat) by moving.

In one implementation, monsters will follow you after you flee, real time, and no way to make them stop.

In the second implementation, it is exactly like the current system but extended to make ranged combat balanced. Monsters move towards you while you're attacking them with ranged, and will stop following you when you flee (move).

About fleeing, it works very simply: if at low hp or "a coward monster" then move to an adjacent square away from player.
Will not attack even if engaged.

About the ranged UI, I have to disagree because the newest commits are very simple to use ranged attacks in.
You just press a button (Edit: only once), select a monster, and combat starts as normal but you have extra range.

I think I'll send you an apk now to see what I mean.
(It's missing a few things that I haven't committed like distance-limits and fixes to monster fleeing.)

As for balance, I think it can be balanced if we make ranged weapons less accurate and have inaccuracy increase with distance. Also the weapons will have a distance limit so at max it'll be something like 10, and when starting out it'll be like 3.
Since monsters follow you, then ranged combat has no advantage over melee.

About obstacles, perhaps we can check if both unwalkabLe tile and in objects layer?
It could work but there will always be exceptions.

Unfortunately I couldn't work much today but I have most of code ready for distances.
So by tomorrow night distances should be implemented. Eventually it'll be a player skill but I'll start by hardcoding it to 5.
(Edit: 5 tiles because it's enough to make tactics necessary and still fits on smallest screen)

As for magic, it's ok if we don't add them.
Honestly I was just pointing out that it's easy from a coding perspective. :p
ideas plox
User avatar
Nut
Posts: 1505
Joined: Mon Oct 27, 2014 12:14 pm
android_version: 8.0
Location: Glade

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

Post by Nut »

I think this kind of weapon would change the game a lot. Not a bad idea, I think I am going to like it!
But I also suggest that the details should be clear before you go into coding. (changing things is more difficult than just adding...)

Here some thoughts, that came into my mind, and surely there are more things to be thought of:

- What about strong monsters which don’t move or cross some line?
Maybe it is sufficient enough that ammution is rare, and you have to get near to collect it after usage.

- The range should be limited as you already proposed, maybe not constant but as an attribute of the single weapons. (e.g. Daggers get more distance than a lance)

- What can be used as far range weapon: Just special weapons? Or can everything be thrown?

- If you throw or shoot things, then they land anywhere to be possibly collected - if you can get there (e.g. not in water)
They should appear on the map like normal dropped items (when not in water etc).

- daggers should be handled different to bow/arrows. A bow should be a 2handed weapon. Arrows could be used automatically from inventary.

- With normal attack you use all weapons you have in hands.
If you have a dagger and a lance in the hands, do you throw both at a time?

- When a monster is near a dagger is used normally, when he is far, is the dagger then thrown?

- Which directions it is possible to shoot? Rectangular? Or diagonally too? Or free? The calculation of distance and even more the free (shootable) way might be more complicated.

- What if you miss a monster, does the weapon hits the next monster in line?

- What about 3rd dimension: Can you shoot from heights, or uphill? Or maybe in a curve over some barrier?

As I said, I really like the idea and hope that the difficulties could be solved, so that it gets a nice feature.
Nut
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 »

Nut wrote:I think this kind of weapon would change the game a lot. Not a bad idea, I think I am going to like it!
But I also suggest that the details should be clear before you go into coding. (changing things is more difficult than just adding...)

Here some thoughts, that came into my mind, and surely there are more things to be thought of:

1- What about strong monsters which don’t move or cross some line?
Maybe it is sufficient enough that ammution is rare, and you have to get near to collect it after usage.

2- The range should be limited as you already proposed, maybe not constant but as an attribute of the single weapons. (e.g. Daggers get more distance than a lance)

3- What can be used as far range weapon: Just special weapons? Or can everything be thrown?

4- If you throw or shoot things, then they land anywhere to be possibly collected - if you can get there (e.g. not in water)
They should appear on the map like normal dropped items (when not in water etc).

5- daggers should be handled different to bow/arrows. A bow should be a 2handed weapon. Arrows could be used automatically from inventary.

6- With normal attack you use all weapons you have in hands.
If you have a dagger and a lance in the hands, do you throw both at a time?

7- When a monster is near a dagger is used normally, when he is far, is the dagger then thrown?

8 - Which directions it is possible to shoot? Rectangular? Or diagonally too? Or free? The calculation of distance and even more the free (shootable) way might be more complicated.

9- What if you miss a monster, does the weapon hits the next monster in line?

10- What about 3rd dimension: Can you shoot from heights, or uphill? Or maybe in a curve over some barrier?

As I said, I really like the idea and hope that the difficulties could be solved, so that it gets a nice feature.
Here are my answers on what I guess will happen.
1- Collecting ammunition after using them seems pretty un-fun to me.
I'd rather have no ammunition at all, and instead add a "fatigued" debuff to the player that makes his combating life harder.

2- See point 3 below.
It's not up to me to decide whether to limit ranged attacks to special weapons or make everything throwable.

3- More likely at first only special weapons can be used.
Although to be honest, and from a game-balance perspective, since there's a distance limit, inaccuracy debuff, and extra AP cost, I do not see why we cannot make everything throwable.

But personally I support "Special weapons", probably through some wacky quests.

4- It's doable, but not likely to happen because of the same reason as ammunition.

5- Daggers, if they become a ranged weapon, will likely be separated into two items.
The daggers that are already in the game, and new a "throwing daggers" item.

6- I have no idea. Possibly the main-hand will take preference over shield hand. But this feature depends too much on other undecided features like whether all items will have ranged-attacks/throwable anyway.

7- You manually press a "select ranged target" button before going into combat mode with a monster.
So if you engage in normal melee, it's normal melee. If you select the monster as a ranged target, then it's a ranged attack.

8- If ranged attacks are implemented, they will most likely have linear shooting in all direction (like the arrows on your numpad) as it will most probably measure distance according to a simple:
distance = target_tile_position - player_tile_position

9- Absolutely most-likely nope. That would miss the point of "missing" an attack and makes ranged attacks even more powerful than they are.

10 - Down-hill and up-hill would actually be easier to implement than to remove.
Shooting "over barriers" seems too much like artillery strike to me.
That's my highly-unofficial opinion and guesswork on the matter.

Personally I'd like ranged attacks to be really simple without overthinking it.
Equip a long bow -> Target a monster a few tiles away -> Make good tactical use of them time before he gets to you.

The range-attack system is meant to be an extension of the current system by merely adding a few weapons so that you can engage in combat without going into melee distance.
Well, yeah, we can add a negative debuff that's called "reloading ammunition" where you can't attack for a turn every 2 turns.
But making ammunition rare would be admitting that ranged-attacks are too powerful, so someone can still save all his ammunition and abuse it later.

I'm imagining a quest where you enter a room and you enter combat mode while cornered by enemies that are coming towards you every turn,
This way the combat screen would be much more interesting and you have more options than if all of them were literally in melee distance.
In this case the power of the weapon doesn't really matter. It could be a sling.
It's the tactical change that's interesting.

At least that's my opinion for what it's worth.

I think the idea is beautiful as it is in its simplicity.
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 »

The Wooden Longbow has landed in the realm of Aytee.

From the depths of a tree branch it sprung forth, fully formed, and hopped into the weapon slot.

Warning: Large Images.
"Item Info"
Image
"Pew Pew"
Image
ideas plox
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 »

twirlimp wrote:
"Pew Pew"
Image
twirlimp, this image shows something I had in mind for a long time. The buttons on the bottom of the screen can be used for combos with different attacks. I see you have put bow-mode...that's excellent, it will instantly switch to combat? I was thinking that with combos in the form of buttons that appear once you enter combat mode you can introduce player skill and strategy, not just the usual attack and flee actions. Buttons like Defense, Quick Strike, Lunge, Slash; each producing a slightly different effect. What do you think?
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 »

The aim-mode button instantly switches to combat but first you have to press it and select a valid target.

As for weapon combos, i admit that "Defend" sounds good, but perhaps it's only usable if you have a shield equipped.

To be honest I haven't yet decided that combos are fun and i need more examples before I'm convinced.

It seems like it would make combat unnecessary complex, and we can just add the effects to new weapons so you re-equip for each combo.

Please feel free to expand your idea and say how you think it'll be like . I think my creativity dries up when I'm sleepy. :p
ideas plox
Post Reply