Comments (20)
It's not a bug - it's the rat saying a curse word.
It's censored to keep the game child-appropriate.
from remixed-dungeon.
Sorry for delayed reply.
Scared may or may not inherit from Fleeing (in my opinion ai states should be not related by inheritance)
Not sure if it is possible to completely avoid flipflops scenarios but it worth to try to mininize chances.
For example it may be: Scared -> nowhere to run -> Berserk(immune to terror) or(50% chance) Death from fear.
from remixed-dungeon.
It is rat reaction to moving from Fear (due to Fetid Rat Skull) to Anger(due your attack) and back again...
from remixed-dungeon.
So this is not a bug? Certainly looks like it.
from remixed-dungeon.
One possible solution is to add "permanent" flag for Terror caused by Ratter aura.
from remixed-dungeon.
Do you want me to try and do it and pull request? I can definitely try, but I'd be happy if you give me some pointers - line numbers etc.
P.S. Можно по-русски.
from remixed-dungeon.
O its will be great!
Bellow is good places to start:
com\watabou\pixeldungeon\actors\mobs\Rat.java Rat.canAttack
com\watabou\pixeldungeon\actors\buffs\Terror.java
P.S. Можно и по-русски
from remixed-dungeon.
Thanks for the explanation @DatBoi287, I would suggest to change it to something like F$%K, so it can be understood by others. It seems like you're the only one to get this. Also, maybe it's not right for a rat to curse, since it's incapable of speech. Thoughts?
from remixed-dungeon.
This is Giant Marsupial Rat from highly magical world.
from remixed-dungeon.
I like the joke :)
I want to revisit this issue. As I see it there are two things:
- The
#$%^
is not clear - it might be just me, but I couldn't understand this means curses, or that it means the creature is angered. (This is minor) - The fact that the creature is angered on each hit when there is a terror aura.
My thoughts:
- Change the anger string to something else, like
F$%K
or😡
(Unicode smiley, although in the current font it doesn't look too angry), or maybe add a log message "The rat gets angry!". - Contrary to @Mikhael-Danilov's suggestion to make Terror from Ratter permanent, I believe that the rat should stay angry for some time (or even forever once attacked). Real-life creatures, even when scared, when provoked, will attack back. So making terror permanent will result in a creature that gets punished and doesn't do anything about it.
- These are details though, either way should be good.
- I also understand that this is a Giant Marsupial Rat from highly magical world and might not adhere to the real-world examples.
Let's discuss this further so we can find a solution.
EDIT: Nethack has an interesting approach to this - https://nethackwiki.com/wiki/Scare#Effect
They have 2 different but connected statuses - scared and fleeing. Worth a read.
from remixed-dungeon.
- I strongly against "Fuck" or similar words in Remixed. Because we must keep the game child-appropriate. And being translated to other languages this word can be... translated too creatively...
1.a Using unicode can be an option ( but this requires fixes for pixel font )
1.b Adding log message looks like good addition ( log will be too spammy with it? or not? )
- PD creatures behavior much simpler what nethack monsters (let leave real-world creatures alone for now)
They have following ai states:
SLEEPING,HUNTING,WANDERING,FLEEING,PASSIVE. (Some mobs have more complex behavior but it implemented by overriding methods such as getCloser & canAttack - which is bad in comparasion to new ai state imho )
Terror buff works simple as follows:
if (buff instanceof Terror) {setState(FLEEING);}
For partial solution we can do not aplly Terror buff for already fleeing Rat ( check Rat.canAttack() )
Or for more complete and complex sollution we can introduce new ai states.
from remixed-dungeon.
- Agreed against curse words.
a. How hard are the fixes? Maybe until we agree on the logic this should be postponed.
b. I agree that the log might be too spammy, so first the correct logic has to be in place. If it is good, it shouldn't spam the states and we can add the log messages safely. - Can you explain what will happen if we go forward with the partial solution of ignoring terror if fleeing?
- Introducing new AI states seems both complicated and risky, at least to me. What do you think?
Anyway when I have time I'll start experimenting with this.
from remixed-dungeon.
a. We need add corresponding smile to pixel font, should be not too hard.
b. Agreed.
2. Terror will be applied much less often, curses too.
3. In my opinion new AI states can make code clearer, and mobs smarter, so for me this is preferred way.
from remixed-dungeon.
Agreed to go forward with a new AI state. I guess a good one is SCARED. In that state the mob will attack only if it can't run away from the hero. What do you think?
Maybe a good start will be to draw the finite state machine diagram of the current implementation (or other representation like a text description of it), and the proposed one so it's easier to follow.
from remixed-dungeon.
Roughly it looks-like this:
ANY -terror> FLEEING
ANY -attacked> HUNTING
ANY -lullaby> SLEEPING
HUNTING -target lost> WANDERING
SLEEPING,WANDERING-target spotted>HUNTING
from remixed-dungeon.
So this is the current one:
Generated with GraphViz using this code:
digraph finite_state_machine {
rankdir=LR;
size="10,10"
node [shape = circle];
PASSIVE, HUNTING, WANDERING, FLEEING -> SLEEPING [ label = "lullaby()" ];
PASSIVE, SLEEPING, WANDERING, FLEEING -> HUNTING [ label = "is_attacked()" ];
PASSIVE, HUNTING, WANDERING, SLEEPING -> FLEEING [ label = "terror()" ];
HUNTING -> WANDERING [ label = "target_lost()" ];
SLEEPING, WANDERING -> HUNTING [ label = "target_spotted()" ];
}
What do you think the SCARED should look like here?
from remixed-dungeon.
Thanks for great state graph!
I believe we should look at Thief class:
https://github.com/NYRDS/pixel-dungeon-remix/blob/6611f3c22a5902265fb72c60673ca3c4bf287d3d/PixelDungeon/src/main/java/com/watabou/pixeldungeon/actors/mobs/Thief.java
It is privately extends FLEEING state to something very similar to proposed SCARED state. Maybe it worth to reuse it?
from remixed-dungeon.
I'm frankly having hard time keeping all the info in my head for this discussion, sorry if you'll have to explain some things several times for me.
The code you're talking about:
private class Fleeing extends Mob.Fleeing {
@Override
protected void nowhereToRun() {
if (buff( Terror.class ) == null) {
getSprite().showStatus( CharSprite.NEGATIVE, TXT_RAGE );
setState(HUNTING);
} else {
super.nowhereToRun();
}
}
}
Does this mean "If I have nowhere to run and am not terrified, start HUNTING" behavior? Or is there something else?
from remixed-dungeon.
It is. it is not SCARED as is due to 'terrified' part, but close enough.
from remixed-dungeon.
Great. I think it might be good to have something similar as well. First thing that I thought:
Scared
state will inherit fromMob.Fleeing
- If I am scared, I am fleeing, but if I am not scared I can still be fleeing for other reasons.- This will introduce structure to the AI States
- On the other hand, this will introduce complexity and might interfere with some other code - if there are
instanceof Fleeing
lines, they will catch Scared as well and it might introduce bugs.
- Once I am
Scared
but have nowhere to run, I will startHunting
.
I'm still not sure how this will integrate with Ratter Skull and whether it will solve the flipflops of the states we have now (Fear <--> Anger). I mean that it might introduce another flipflop - SCARED <--> HUNTING
.
from remixed-dungeon.
Related Issues (20)
- Broken link in README HOT 1
- GameServices/texts-es-ES and GameServices/texts-es-Es HOT 1
- Game isn't responding HOT 1
- Feature Request: Non-Play Store builds HOT 3
- necromancer eating up resources HOT 1
- random spellbook HOT 1
- NEW LOGO FOR U HOT 8
- Unused code from Codacy HOT 4
- CODEBEAT not working HOT 2
- [HELP NEEDED] Can't use emulator - too slow HOT 1
- Game log is not at the bottom of the screen HOT 8
- Resurrection with Ankh sets the hero to a skull until restart HOT 3
- More descriptions of death causes required
- Atomic saves
- Deterministic dungeon
- Text rendering system needs refactoring HOT 2
- ChromeOS Version Update? HOT 4
- [question] Is there an instruction on how to compile this project? HOT 1
- libGDX port HOT 2
- korean translation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from remixed-dungeon.