• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS A* Algorithm :D

Creature::eek:nThink() @ralke

replace
C++:
forceUpdateFollowPath = true

with
C++:
if (followCreature) {
        goToFollowCreature();
    }

    forceUpdateFollowPath = true;

Fixes are pushed to github (only need the path call one ralke)

Done ^^

But still says that There is no way.
1662860964352.png

Tried clicking sewers and thoose stuff too :p
What is wrong? Thanks in advance!!
Post automatically merged:

Edit: I saw some other commits, going to apply and see how it goes

What else must be added?? If you could link me to it i'll apreciate it !!

Here's my change history
 
Done ^^

But still says that There is no way.
View attachment 70479

Tried clicking sewers and thoose stuff too :p
What is wrong? Thanks in advance!!
Post automatically merged:

Edit: I saw some other commits, going to apply and see how it goes

What else must be added?? If you could link me to it i'll apreciate it !!

Here's my change history
Check the github changes. You need to change in game.cpp

Change all
C++:
player->getPathTo

it will look something like this
C++:
if (player->getPathTo(movingCreatureOrigPos, listDir, 0, 1, true, true)) {

add , PLAYER_SEARCHDIST to end of all to look like this
C++:
if (player->getPathTo(movingCreatureOrigPos, listDir, 0, 1, true, true, PLAYER_SEARCHDIST)) {

Make sure to only add to end. Don't change any values in it other than that.

Then in player.h
under
C++:
static constexpr int32_t PLAYER_MIN_SPEED = 10;

add
C++:
static constexpr int32_t PLAYER_SEARCHDIST = 9;
 
Check the github changes. You need to change in game.cpp

Change all
C++:
player->getPathTo

it will look something like this
C++:
if (player->getPathTo(movingCreatureOrigPos, listDir, 0, 1, true, true)) {

add , PLAYER_SEARCHDIST to end of all to look like this
C++:
if (player->getPathTo(movingCreatureOrigPos, listDir, 0, 1, true, true, PLAYER_SEARCHDIST)) {

Make sure to only add to end. Don't change any values in it other than that.

Then in player.h
under
C++:
static constexpr int32_t PLAYER_MIN_SPEED = 10;

add
C++:
static constexpr int32_t PLAYER_SEARCHDIST = 9;

Think I missed something, I got this error log
1662861886036.png

It shows me this potential fix
1662861993389.png
 
Be sure to implement the newest commits from this morning. Fixed summons keepDistance. They will walk away if you are too close now. Also fixed an issue which made them stop following after x distance because of the keepDistance fix and lastly fixed the path updating for following. It was constantly updating very fast. Now it will only update if it needs to.

@ralke
 
Be sure to implement the newest commits from this morning. Fixed summons keepDistance. They will walk away if you are too close now. Also fixed an issue which made them stop following after x distance because of the keepDistance fix and lastly fixed the path updating for following. It was constantly updating very fast. Now it will only update if it needs to.

@ralke
Could you create a new github with one specific commit that addresses the changes for the system?
 
Could you create a new github with one specific commit that addresses the changes for the system?
Once it is ready to merge I will. There isn't much too it really. Both the pull requests do one thing each.

1) Call path update whenever it is needed (so we don't get walking delays)
2) Make the pathfinding faster so it takes less performance to use.

All other changes have just been things that broke because of the difference in the pathfinding system.

If summons didn't walk away in default TFS then one of the commits made it so they do. It was kind of related so I added it in.
 
Last edited:
Be sure to implement the newest commits from this morning. Fixed summons keepDistance. They will walk away if you are too close now. Also fixed an issue which made them stop following after x distance because of the keepDistance fix and lastly fixed the path updating for following. It was constantly updating very fast. Now it will only update if it needs to.

@ralke

Perfect! Worked! In case someone else looks at this, be sure to merge "Add min distance check" this way distX and distY won't show as undefined.
 
Not sure if its only me?
The commits are abit messy to follow, some overwrites others etc... but I should have gotten them all

path.gif
 
Last edited:
Not sure if its only me?
The commits are abit messy to follow, some overwrites others etc... but I should have gotten them all

View attachment 70847
Yeah, I found this same problem while doing some testing. I haven't posted the fix for it yet because I am still testing. You should be able to change this to fix it:

map.cpp
C++:
// We are at the target and don't need to walk away. No need to update path.
    if (!fpp.keepDistance && fpp.minTargetDist <= 1 && distX < 2 && distY < 2) {
        return false;
    }

to
C++:
// We are at the target and don't need to walk away. No need to update path.
    if (!fpp.keepDistance && fpp.minTargetDist <= 1 && distX < 2 && distY < 2) {
        return true;
    }
 
Cool

up sorry for double post, could somebody point me out which are the requeried changes in order to apply the "new monster behavior" please? i can see many references from differentes autoerhs i must apply all ? which one to choose?

thanks
 
Cool

up sorry for double post, could somebody point me out which are the requeried changes in order to apply the "new monster behavior" please? i can see many references from differentes autoerhs i must apply all ? which one to choose?

thanks
I have the same question. Is it possible for someone to summarize what is needed? Because some of the git commits overlap others.
 
In that order:

 
is there a way to add or replace all this commits without doing it manually code by code 1 by one? pleas enlighten me
if im using tfs 1.4?
 
is there a way to add or replace all this commits without doing it manually code by code 1 by one? pleas enlighten me
if im using tfs 1.4?
I don't know exactly how but I think that you can compare the Greed repository with a clean TFS-1.5 Nekiro downgrade and just start importing the changes from compare. Otherwise, if you don't have source changes that you must keep, just use that sources are clean TFS-downgrades with some little addings (see logs).
 
i added all the commits menthiones by @Nottinghster and i having the same compiling errors as in the clean repository
Lua:
1>database.cpp
1>C:\Users\diap\Documents\GitHub\Greed-TFS-1.5-Downgrades\src\creature.cpp(225,2): error C2065: 'isUpdatingPath': undeclared identifier
1>C:\Users\diap\Documents\GitHub\Greed-TFS-1.5-Downgrades\src\creature.cpp(245,21): warning C4390: ';': empty controlled statement found; is this the intent?
1>databasemanager.cpp

How to solve this? To fix the second error, I just deleted the semicolon, but don't know how to declare isupdating path

edited: there was an error with cherry-picking, I just changed the whole code and now have compiled it
Post automatically merged:

This is incredible work, very smooth in comparison with tfs normal behavior thanks

and i think there are many more commits involved, at least I have used the ones displayed in GitHub desktop
In that order:

 

Attachments

Last edited:
since you are trying to fix monster behavior can you guys point me out how to fix this pls ? C++ - mosnter ranged attack tfs 1.5 are very off is there a way to fix this? (https://otland.net/threads/mosnter-ranged-attack-tfs-1-5-are-very-off-is-there-a-way-to-fix-this.282764/#post-2708191) @ralke @Itutorial

also when monster are being chased ( monster that run away like hunter, amazon, orc spearman ) when they get reached by a player they stand still and start attacking but they dont run away could be this fixable?
edit:: monster can be easily cornered too
 
Last edited:
Back
Top