• 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!

Monsters walking around fields behaviour.

Mkalo

ボーカロイド
Senator
Joined
Jun 1, 2011
Messages
1,118
Solutions
55
Reaction score
946
Location
Japan
So, I did a small code to fetch the data necessary to do it but there are plenty missing, so maybe with the help of everyone we can gather this information:

The failed ones may be found on the wiki but my code was not able to fetch the data because wiki is case sensitive and some creatures have parenthesis on it.

The no information found ones are not available on the wiki so it's not possible to get it.

Format: Name: Around: (Fire, Energy, Poison) // Through: (Fire, Energy, Poison)

http://pastebin.com/2ugkFGA0

Code used:
http://pastebin.com/9iptNbRU
 
Good work, but sadly no one want to do this. Or want but dont share :D
 
For people who want to make something fresh with tfs your scripts are a god send, keep developing stuff like this, it will keep developers who want to progress the community around.
 
Nice information.

On the topic of monsters behavior with fields, some monsters that typically avoid fields, will walk through them if they are affected by the condition the field gives (A monster will walk through fire fields if they have the burning condition).

These behaviors I think are important to make monsters interesting, as how they respond to fields creates different tactics to deal with a monster.
 
Edited the code now only 3 failed to fetch:
Code:
Failed:
Failed to fetch information about Hacker
Failed to fetch information about Donkey
Failed to fetch information about Asassin
 
I've added this feature to TFS 1.0. This is a diff patch from my engine: http://pastebin.com/cxP23Gu3
You need to ignore field->isHarmful() and monter->canIgnoreFields() because these are my functions only.

EDIT: Also ignore monster->isAttacked()

in monsters file you can use:
Code:
    <walkthroughs>
       <walkthrough fire="1"/>
       <walkthrough energy="1"/>
       <walkthrough poison="1"/>
   </walkthroughs>
 
Last edited:
I've added this feature to TFS 1.0. This is a diff patch from my engine: http://pastebin.com/cxP23Gu3
You need to ignore field->isHarmful() and monter->canIgnoreFields() because these are my functions only.

EDIT: Also ignore monster->isAttacked()

in monsters file you can use:
Code:
    <walkthroughs>
       <walkthrough fire="1"/>
       <walkthrough energy="1"/>
       <walkthrough poison="1"/>
   </walkthroughs>
But they will ignore that player attacked the monster?
 
Last edited:
But they will ignore that player attacked the monster?
No this is not included in the diff, can be easily implemented using Monster::blockHit function.

Actually tile.cpp could be way more simpler than regular TFS.

field->isHarmful() - if magic field causes some damage (third level of fire field does not)
monster->canIgnoreFields() - if monster ignores field at all
monster->canWalkthrough(combatType) - if monster can walk through specific magic field (which is solved in this thread)
monster->isAttacked() - if monster is attacked by player
monster->isSummon() - summon should always follow you through the fields

Code:
MagicField* field = getFieldItem();
if (field && !field->isBlocking() && field->isHarmful()) {
   CombatType_t combatType = field->getCombatType();
   if (!monster->isImmune(combatType) && !monster->canIgnoreFields() &&
      !monster->canWalkthrough(combatType) && !monster->isAttacked() && !monster->isSummon()) {
      return RET_NOTPOSSIBLE;
   }
}
 
Last edited:
@gunz
Where declarate:
canIgnoreFields

and is necessary change:
isAttacked

for:
isAttackable

true?,
thanks

in monster class or creature class

no you cant use isAttackable, you need to implement function that tells if monster is currently chased by player so then it should ignore fields to follow the attacker.
 
Still having trouble with this, cause im not good in c++ so i dont know how to make these functions :/
 
@Mkalo
monster ability to walk over field is related to its resist to certain damage type
if resist >= minimum to walk (immune = 100% resist) then it can walk
No need to complicate xml files like you did in recent pull
 
@Mkalo
monster ability to walk over field is related to its resist to certain damage type
if resist >= minimum to walk (immune = 100% resist) then it can walk
No need to complicate xml files like you did in recent pull
That is not true, look at ghastly dragons, they have 10% resist to fire and they still dont walk over fire fields.
 
That is not true, look at ghastly dragons, they have 10% resist to fire and they still dont walk over fire fields.
Omg your still alive. :D
 
Back
Top