Page 6 of 18

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

Posted: Tue Jan 05, 2016 6:02 pm
by twirlimp
Voom wrote:
twirlimp wrote:
Voom wrote:While in aim-mode, before your first attack, you have the option to flee as if you didn't want to fight and you changed your mind. In this case, if the monster is not adjacent shouldn't the player be exposed nothing else but 100% chance of flee? Or maybe the flee chance can vary based on how faraway the monster is (longest combatable range at 100% chance of flee.

You're right, and I'll see if I can do it in the next couple of days (but note that you won't be followed unless you attack so it's a minor issue).

Actually there's already unused code to check whether you're at the start of battle (that is, no monsters are angry and coming to get you).
You're right, it is just a minor issue if you haven't attacked, in which case 100% chance of flee will suffice. But there is the point that once you have already attacked the flee chance can vary based on distance. I believe that is also minor, but slightly more of an issue then the former. Thx.
Ok I fixed the first issue. It's already in the new apk link.

As for the second issue, to be honest I don't want to make flee chance decrease (edit: increase) with distance.
The whole point of adding following behavior to monsters was to make ranged-weapons more balanced.
If ranged weapons cause flee chance to increase, then I believe monster-following would have become useless.

If anything, flee chance should decrease with distance. Is that what you meant? Sorry if I misunderstood.

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

Posted: Tue Jan 05, 2016 6:07 pm
by twirlimp
Zukero wrote:Just one advice: instead of naming all your APKs AndorsTrail.apk, try adding some versioning to the name, for example AndorsTrail_RangedBeta_04.apk
It helps knowing who's up-to-date and who's not.

I always do this when sending out test builds to the dev team.
You're absolutely right.

All I was doing was just overwriting the same apk file on dropbox.

Anyway I applied the fix you suggested and as a side-effect fleeing behavior was partially fixed!

Since fleeing monsters are not considered "enraged" then combat exits and their fleeing works as usual.

Edit: Of course this is only a partial fix since there will probably eventually be other enraged monsters around.

Edit: Here's a link to the Dropbox folder.
https://www.dropbox.com/sh/med60467eql1 ... ZaUJa?dl=0

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

Posted: Tue Jan 05, 2016 6:10 pm
by Voom
Yeah, I meant decrease with distance. Sorry if I confused you.

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

Posted: Tue Jan 05, 2016 6:16 pm
by Voom
Voom wrote:Yeah, I meant decrease with distance. Sorry if I confused you.
Absolutely wrong, I meant increase your chance of flee if farther away. I see your point though, no need to explain. :)

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

Posted: Tue Jan 05, 2016 6:28 pm
by twirlimp
Voom wrote:
Voom wrote:Yeah, I meant decrease with distance. Sorry if I confused you.
Absolutely wrong, I meant increase your chance of flee if farther away. I see your point though, no need to explain. :)
No problem, I have a typo in most post too. :P

I start with talking about "decreased" when it's obvious in the same paragraph that I mean increase.

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

Posted: Wed Jan 06, 2016 8:02 am
by twirlimp
Zukero wrote:I have found an issue: when you kill an enemy from afar with your bow, the fight does not end, as you automatically engage another enemy, one that's not even in range if need be. I think after killing an enemy, if there are no adjacent ones, the fight must end.
I changed the exit-combat mechanics and I also nerfed ranged weapon accuracy to compensate for their range.

Just for clarification, now you automatically exit combat if there are no "enraged" monsters within weapon range.
If there are enraged monsters then will still auto-select another one for combat if it is within weapon range.

Note that monsters become enraged only when attacked,
and not when they attack or move during combat.

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

Posted: Wed Jan 06, 2016 9:29 am
by Nut
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 like the behaviour of attacked foes very much, that they come after you.
But if you stay behind some Monster blocking the passage, the other foes behind stay where they are. They could be attacked without any risk:

Image

Image

Using this is not really fair, but useful...

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

Posted: Wed Jan 06, 2016 10:55 am
by twirlimp
Nut wrote:
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 like the behaviour of attacked foes very much, that they come after you.
But if you stay behind some Monster blocking the passage, the other foes behind stay where they are. They could be attacked without any risk:
Image

Image

Using this is not really fair, but useful...
I haven't yet added the code for tiles blocking the arrow path.
Monsters will definitely block the arrow path if your're targeting monsters behind them.

But also currently monsters don't move towards you if they can't a find a path.

I'm working on making them flee in the opposite direction,
although they'll still get stuck in corners unless I use heavier AI.

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

Posted: Wed Jan 06, 2016 12:27 pm
by Nut
I'm working on making them flee in the opposite direction,

Great! Much better than just waiting 8-)
although they'll still get stuck in corners unless I use heavier AI.
Do you think more AI is necessary? Getting trapped in corners might look realistic.
Otherwise, if they get clever, one could Play hide & seek with monsters :twisted:

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

Posted: Wed Jan 06, 2016 1:26 pm
by twirlimp
Nut wrote:
I'm working on making them flee in the opposite direction,

Great! Much better than just waiting 8-)
although they'll still get stuck in corners unless I use heavier AI.
Do you think more AI is necessary? Getting trapped in corners might look realistic.
Otherwise, if they get clever, one could Play hide & seek with monsters :twisted:
Well you can still play hide and seek with them when they're following you.

Anyway I just tested fleeing and it seems they're pretty smart.

It's probably as perfect as it can get without actually annoying you. :)

I made it so they attack/follow you if they can't flee, and flee if they can't attack/follow you.