User Tag List

Results 1 to 9 of 9

Thread: Magic Octroks can't find the bait

  1. #1
    Keese
    Join Date
    Nov 2018
    Posts
    39
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    269
    Level
    6
    vBActivity - Bars
    Lv. Percent
    6.06%

    Magic Octroks can't find the bait

    Hi!

    If I put a bait on the screen, that octroks comes to it (as it should be). But if anything is between the bait and the octoroks, a tree, a stone or whatever, they can't find the way. And that even, if the bait is only two tiles away.



    It stays as seen on the screenshot: The right-sided octoroks stays on the right side of the tree and NEVER come to the bait.

    What can I do (except removing all barriers)?

  2. #2
    How many licks to get to the center Chris Miller's Avatar
    Join Date
    Mar 2001
    Location
    of a Tootsie Roll Pop?
    Age
    46
    Posts
    3,510
    Mentioned
    94 Post(s)
    Tagged
    4 Thread(s)
    vBActivity - Stats
    Points
    5,661
    Level
    23
    vBActivity - Bars
    Lv. Percent
    37.75%
    About all you can do is move the bush. Someone with more scripting knowledge might know a way, though.

    Download Lands of Serenity today! You will be knocked comatose by its sheer awesomeness.
    The Titan's Quest, best played in the bathroom as the excitement can be somewhat...overwhelming.





    Official AGN Discord Channel

    Official ZC Dev Discord Channel

  3. #3
    Keese
    Join Date
    Nov 2018
    Posts
    39
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    269
    Level
    6
    vBActivity - Bars
    Lv. Percent
    6.06%
    Normally they find the way to the bait:



    Pic 1: The enemies are anywhere.

    Pic 2: I put the bait on the screen and they come from wherever they were before.

    Pic 3: Normally it also works with octoroks (if hunger is set)

  4. #4
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,759
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.52%
    It all depends on pathing. ZC Enemy AI isn't that advanced. Remember that the screen layout is pretty much defining a 3D object, in a 2D space. That#s a tree, not a bush, and its intended scale is a depiction of a forest patch.

    In ZC, even if the Octorock was attracted to the bait, it'd hit the solid combo, and change direction.

    It would be possible to write more advanced pathing as an npc script, but believe me, writing realistic pathing routines is absolute hell.

    You can try tinkering with both the enemy step speed, and the hunger value. One issue with high step, is that the read-ahead for a solidity check is at a greater distance.

  5. #5
    Keese
    Join Date
    Nov 2018
    Posts
    39
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    269
    Level
    6
    vBActivity - Bars
    Lv. Percent
    6.06%
    Quote Originally Posted by ZoriaRPG View Post
    writing realistic pathing routines is absolute hell.
    What is the problem? The bait is anywhere and the enemies too (elsewhere). And between the enemies and the bait a tiles. Solids and others.



    Ok, a single fast way doesn't always exist, because it doesn't matter if the octrok for example goes down, left, left, left, down, left OR left, left, left down, left, down OR down, down, left, left, left, left... or whatever. The route is the goal.

    A magic octorok can kill you in a few seconds, but a tree between the octorok is a problem?

  6. #6
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,429
    Level
    24
    vBActivity - Bars
    Lv. Percent
    69.42%
    The bait is to the left, so it tries to go left. It can't, so it goes down instead. Then it sees that the bait is above it, so it goes up. Then it sees that the bait is to the left, so it tries to go left, but it can't...

    Proper pathfinding would be a lot of work, but randomly choosing between the vertical or horizontal direction when moving toward bait would be enough to mostly solve this simple case. I don't believe the NES version does anything like that, though. And a column of two or three trees could still be an issue.
    Last edited by Saffith; 12-31-2018 at 01:27 AM.

  7. #7
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,759
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.52%
    Quote Originally Posted by Joeiiii View Post
    What is the problem? The bait is anywhere and the enemies too (elsewhere). And between the enemies and the bait a tiles. Solids and others.



    Ok, a single fast way doesn't always exist, because it doesn't matter if the octrok for example goes down, left, left, left, down, left OR left, left, left down, left, down OR down, down, left, left, left, left... or whatever. The route is the goal.

    A magic octorok can kill you in a few seconds, but a tree between the octorok is a problem?
    In software logic, valid paths look more like this:



    Each of those arrows is a valid node, from which you derive coordinates, and movement to go from A to B. In theory, the object (circled) may never reach B, because it can walk an infinite path. That's where logic such as A* helps:

    That's an algorithm to resolve stuff like this, but it isn't perfect, and implementing it is a complex process.

  8. #8
    Keese
    Join Date
    Nov 2018
    Posts
    39
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    269
    Level
    6
    vBActivity - Bars
    Lv. Percent
    6.06%
    Quote Originally Posted by ZoriaRPG View Post
    In software logic, valid paths look more like this:

    Where is the logic?

    The command should be (and in the most causes it is so): There is a bait in the left corner. Find the fastest way and run like hell!

    The last picture is an extreme example with 15 solid combos. It should bei never a problem, but in my quest a single tree is the problem.

    OK! If it can't solved, it is so.


    Another question: What does "duration = 768" in the bait-item means?

  9. #9
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,429
    Level
    24
    vBActivity - Bars
    Lv. Percent
    69.42%
    That means the bait will disappear after 768 frames, which is 12.8 seconds.

  10. #10
    Octorok jeffythedragonslayer's Avatar
    Join Date
    Jan 2024
    Posts
    391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    28
    Level
    2
    vBActivity - Bars
    Lv. Percent
    13.83%
    I believe this has been implemented in resources/include/std_zh/astar.zh:

    HTML Code:
    // Credits to Lejes for making the A* algorithm actually work in ZC! I probably wouldn't have ended up making my version (which is older than this) work without the assistance!
    // Optimised for 2.55 on 24th May, 220 by ZoriaRPG.
    I'm impressed that Zoria implemented this all the way back in 220 AD. Tell me, can I borrow your time machine?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social