Jump to content

Seravy

Members
  • Posts

    176
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Seravy

  1. Yeah, but how does the client know about that if auto-attacking isn't done by noctrl but enabled on the server side? I believe there should be a packet that tells the client "You are still attacking" otherwise we wouldn't see the animation happening either, but I couldn't find where the server sends something like that. If I could, possibly messing with that might fix the problem. But now that I think about it, one definitely has to exist, otherwise the attack animation wouldn't show up at all...
  2. Someone has to try on the official servers.
  3. Well, last time I played was like 5-7-9? idk years ago but no it wasn't like that as far as I remember. In general if a UI doesn't respond to the player's input, that's a bug even if it's an official one. So there is no known patch for this bug? Are there some IDA files for the client so I can try looking for a solution? ...omg clients nowadays are 20 mbytes? If this doesn't get fixed I might give up playing archer classes and let my AI handle it, they don't suffer from client bugs... heck I also should give up on playing tank classes, if I can't switch to attack a different mob to divert it to my character, I fail as a tank. I know I can turn of noctrl but that's just silly. I wonder... can a @noctrl server command solve this? If the client doesn't realize we are in /noctrl mode but the server makes the character keep up the attack, wouldn't that fix it? Tried experimenting with this. I was able to make the server force auto-attacking with noctrl off. (however I had to disable the server reacting to "stop attacking" requests, the client probably sends one after every attack if noctrl is off. However that didn't fix the problem. Occasionally the skill goes through but usually not, or gets delayed for a long while. So I added a breakpoint to where the server receives a skill use request. The breakpoint doesn't trigger when using a skill while attacking, even though I have /nc off. When I use the skill without attacking, the breakpoint triggers and the skill does work. I looked through unit.cpp and saw nothing that would tell the client the unit is forced to autoattack despite having /noctrl off. At this point my conclusion was : The client isn't sending an attack or skill use request packed during the attack animation, even if it's not aware the attack is continuous. So fixing this on the server side might be impossible. So I undid these changes and tried a last test : attacked with noctrl off and tried to use a skill while shooting. No matter how quickly I did it, I always managed to use the skill, it simply was delayed until the attack animation ended. So this counters that theory and implies the client is somehow still aware I'm auto-attacking with noctrl off when I modify server code. However there seems to be no reference to state.attack_continue in clif.cpp that could do that. So this also seems impossible. In the end, these test results contradict each other and shouldn't be possible. I admit, my memories of the last time I played the game are not very clear. I vaguely remember playing Sniper and having to hold down my mouse button to attack which would imply I wasn't using noctrl, probably due to this problem. But I'm not entirely sure about that either. Anyway, I have no idea where the problem is coming from. But I definitely hope someone can figure it out and fix it.
  4. Not 100% sure this is a client bug but most likely. So when I attack a monster and have noctrl enabled to keep attacking, while the attack is ongoing, if I click on another monster, the target does not change to that monster and if I try to use a skill, for example Double Strafe, nothing happens, the skill is not used. This effect lasts until the target is dead or I walk away to interrupt my own attacking. This makes the game nearly unplayable, and I'm pretty sure it wasn't like this last time I was playing... How do I fix this? I don't see anything like this in Nemo but maybe I just didn't notice?
  5. Wasn't able to reproduce the above bug with a non-AI character. Instead I got cases where the character walked to the monster I clicked, properly following it after it moved away, then upon reaching it, not attacking. Eh. This whole movement code is a mess. Edit : nevermind, I don't think I can fix this, I don't understand enough about how it should work. I'll just make sure in the future the AI doesn't try to walk-to-attack ever, and wherever possible, moves one tile at a time.
  6. There is probably a serious bug in the code that moves characters. I've always noticed how the game has a hard time moving to and attacking moving enemies, often walking to the tile they used to be then turning around and going back to the new position the monster meanwhile moved to. I always assumed that is some sort of a position lag thing between the client and server but... the AI is entirely server based and it still does this. I don't understand the code for walking and attacking very well, with all the timers and stepaction stuff it seems crazy overcomplicated for what feels like it should be a really simple thing but I do see that walktobl, if the unit is already busy, stores a timer that calls walktoblsub to do it later, but walktoblsub does a walktoxysub instead of an actual walktobl. Which basically means if this happens, then moving to a bl will instead do a move to an xy position which is no longer the same thing as it no longer follows the movement of the bl (if walktobl even does that in the first place, it should but I have no idea). Now so far this is just speculation but some evidence - two pieces of code I used and what they actually did. unit_attack(&sd->bl, foundtargetID, 1); This orders the unit to attack the target continuously. What actually happens with this code...the unit starts moving towards the target. If nothing else happens and they reach it, everything works as intended. However, if I shoot an arrow at the monster then my AI turns around and returns to my position, almost as if it was targeting the target position of the monster's movement (which is me) instead of the monster itself. Basically, positions are like this : Me.....AI.......Enemy. Once the arrow hits the enemy, the AI moves towards me. This of course makes it them meet the enemy much later than if they were moving correctly. So I tried a different code, the one I used for "cautious" movement elsewhere before : if ((sd->battle_status.rhw.range >= targetdistance)) { unit_attack(&sd->bl, foundtargetID, 1); } else { struct walkpath_data wpd1; if (path_search(&wpd1, sd->bl.m, bl->x, bl->y, targetbl->x, targetbl->y, 0, CELL_CHKWALL)) newwalk(&sd->bl, bl->x + dirx[wpd1.path[0]], bl->y + diry[wpd1.path[0]], 8); return 0; } What this does is, it orders the attack if and only if the enemy is already in range to attack, and if they aren't, then orders them to take a single step of the walkpath that leads to that enemy. In theory this should do the exact same thing as the previous one (move towards monster and attack), but without relying on the default code to follow the enemy. With this code, however, my tank does not turn around and keeps heading to the monster and attacks it, even if I shoot an arrow at them. Which proves the characters failing to properly engange moving monsters is not a lag issue but a major serverside bug. As I changed absolutely nothing else, it also proves the bug isn't in my AI code elsewhere - if there was something in the AI making these buggy moves, it would still happen even with the newer code - the two should be functionally equivalent afterall. I remember you mentioning walktobl has problems, but it's more than that - following enemies in general is affected. I'm tempted to think this issue is the exact same problem but for ranged attacks : https://github.com/rathena/rathena/issues/1602 It appears to be still unfixed after two years. Any chance someone will fix this in a reasonably short amount of time? (Days preferred... personally I would say hours but I know that's not realistic :P) If not, I'd like to fix it myself but I most definitely need help in doing that. I don't really understand how the existing code works... and by that I mean I haven't really figured out where attacks trigger and how they get turned into a walk if the enemy is outside range. That's probably where the issue is whether it's walktobl or somewhere else, idk. Of course, first I'd like to clarify that this is indeed a bug and not just my misunderstanding of something? ( I haven't actually tested on a human controlled character this time but I do remember having problems engaging a moving target in the past) Edit : here is a video of what I mean :
  7. Wait if Provoke is not good for drawing monsters, what is it even for? Pretty much any skill that deals damage can change the monster's target, whether it does or not depends on how the monster is configured I think. But I assume Provoke also changes the target for monsters that don't otherwise do so. I can make the two Boomerang skills have the same triggers as Provoke in addition to their normal uses, but higher priority than it, so 2nd job characters will then no longer use Provoke. I guess this is one of those things I have to figure out while actually playing, too bad I don't have a swordsmen class character yet. (on the bright side, it's good to be further ahead in AI coding than my actual player characters available...) No, I don't play Dungeon Siege.
  8. I'm unsure how to handle the tanking mode. So far I have tried two options but each had problems. 1. If the tank targets the enemy nearest to the leader, it can react to approaching threats better because all non-tank characters stay near the leader. However, this also causes a lot of needless switching of targets and moving back/forth, actually pulling the monsters on the party. If the tank is on one side of the party and a monster approaches from the other side, eventually it'll be closer than the current target, and so the tank moves to the other side to engage it, pulling the previous monster with him (and through the rest of the party). Even if the monster doesn't actually move, the leader might move away from the tanked monster, and closer to another one. 2. If the tank targets the enemy nearest to itself, it will never pull monsters on the party and will be much more effective and gathering mobs on himself due to generally staying further away from the party than the previous method - but then they won't be able to do anything about monsters attacking other party members, unless they have a skill that has AI coded to to draw monster attention which currently includes Provoke and Throw Stone only, limiting this to thief and swordsmen classes. Other classes don't have such a skill available or at least none are coded to be used for that purpose. (In both cases the target has to be in X range from the leader, to ensure the tank doesn't leave the party. Unless the tank is also the leader, in which case others will follow him so it's fine.) So far I think option 2 was maybe slightly superior, but maybe someone has a better idea?
  9. The problem with broken weapon is that even if repaired automatically, it stays in the inventory, and I can't make the AI equip itself because it might equip the wrong items if there is more than one in inventory. However, I guess I can do the poor man's solution and make the AI complain in chat if they don't have anything equipped in one of the slots, like "omg, I'm not wearing any armor!" . In fact I probably should because monsters can break or strip them as well... Alternately maybe the AI could store the index of the equipped item in inventory to reequip the same thing. But that can only work if the index in the inventory never changes when picking up or dropping other items, not sure if that's the case. Depends on how inventory is implemented...
  10. Thanks! Halfway done with LK though only the coding, everything is still untested. I've made Frenzy and Spear Dynamo optional sub-modes for tanking as they are important enough to be used but not the kind of stuff the AI can tell when to use. I remember LKs used to ask me to dispel their frenzy to avoid some of the drawbacks, is that still a thing? What would be a good trigger to do that, at low health with no enemies left around? Head Crush - Does Bleeding work on monsters? Is the damage percentage based? If yes, I can see this being useful against very high HP enemies, otherwise useless. Joint Beat - this seems useless? Reducing soft defense isn't really all that great, even reducing hard defense would only be useful against very powerful enemies like bosses. Movement is irrelevant because we are tanking the monster, it won't move. ASPD or ATK reduction is useful but the chance of landing exactly that effect is small. Charge attack - this would be a great skill to get close to the enemy faster which is very useful for tanking mode, except...it pushes the target away which completely defeats the purpose of the skill. What were they thinking? Still it helps the tank get ahead of the other players and possible teleport into a group of enemies so might be useful as is? I'm tempted to change this skill and remove the knockback but I'm worried that might actually be TOO effective. Wait there is a cast time, so it's only a little bit better than walking, yes, might as well remove the knockback. Seems to be equally useful for the AI either way if I set it to only be used when the nearest target is far away. After LK, there are only 4 more 2nd job classes left, the most problematic ones. Stalkers... Chase Walk I don't even know how this works, it doesn't seem you can attack in that status, not even with Backstab and Raid but then why does it boost STR? Makes no sense? Generally hiding and attacking that way would function as a nontanking DPS so in theory it would be possible to tell the AI to hide, go behind a monster and backstab them then hide again when set to "skill" mode. Strip, this might be actually useful to against bosses, but reducing their VIT and DEF would make Acid Demonstration deal less damage to them? So should only be used if there is no Creator in the party? But the chance of success is very low and the amount of reduction isn't that great either. I might need to consider changing these skills to work better in PVE. Plagirize should in theory already work because it's a passive that only enables the character to "learn" other skills. Snipers, using various ranged DPS skills should be pretty straightfoward but traps might be difficult. As far as I remember they weren't all that useful either, except for the Snare. Whitesmith actually isn't so bad, Cart Termination will be a separate option the player can enable. However the buffs breaking party equipment is a problem, as the AI can't reequip them, even if I manage to make the smith fix them. I think the latest kro update removed some (maybe all?) equipment breaking though so that might help. Alchemist is what I'm most worried about, both the homunculus and the fact most of their attacks cost items so it is a problem if the AI wastes them on unworthy targets.
  11. I'm wondering what to do with skills that cause significant knockback like Spear Stab and Shield Charge. On one hand, allowing Tank mode to use these at low health to reduce damage taken sounds like a good idea but on the other, it comes with the risk of knocking enemies out of range of skills used by others, or worse, pushes them towards their direction. Also, what is Brandish Spear good for? I'm thinking but can't really come up with a reason why the AI would want to use it instead of other skills. Bowling Bash does more damage and is AOE, and while the area might be smaller, the enemies will move to 1 distance of you anyway if you are the tank. Casting time is equal, and BB has no additional restrictions either. I'm not very experienced with the Knight class but I feel this skill might just be one of those useless ones?
  12. Well, actually, AI set to Tank mode can seek out enemies on their own, but I was playing the only character with that role this time so you didn't see any of that. It's also possible to make the Tank AI lead the party but then you have to make sure you are properly following, they won't wait for you if you don't ? It's safer to lead yourself though, especially on maps that have bosses.
  13. For some reason the first thing I found only displayed the message for the person saying it which wasn't useful. Well, there are dozens or functions that display messages so it simply wasn't the right one I guess. I actually was planning to make a video, I already have the replays saved. Which do you want, Magma dungeon or the White Lady MVP? Wait, what? If they don't attack, what are they good for? It's not like all types are support... oh they mean it can attack but you have to manually order them to for every single enemy, right? That's a pain, even PETS do better than that. Yes, giving them server side AI can definitely help with it... ah, there is so much to do...
  14. Oh, you mean I should hardcode it into the source? Yeah that could work but I need to make it different based on class... priests will need their blue gems, but alchemists need their stems, fabrics and bombs instead, every class uses different stuff. And it can be well over a dozen items for some, like archers need all the arrow types and quivers. Doable of course, but it's seems to actually take more time and effort that way than making the SQL table...
  15. Thanks, was able to make characters talk. The one I found in script didn't work well though, but party_send_message did. Finding it was a bit of a pain though. Haven't tested swapping arrows yet but did find the equip procedure. Should work in theory, we'll see soon. Wait, homunculus AI is no longer a thing? That's sad... well I guess I can do the same for homunculus, but there has to be some sort of existing AI for them somewhere, right? Otherwise they'd just never do anything at all... so I'll need to replace/improve that one I guess? We'll see once I reach the alchemist class... Right now I've implemented Dispell, made it target boss enemies only for now. I'm not really sure what buffs there are that monsters use and what is actually worth removing, If you have some specific ones in mind, do let me know, I could use more ideas. For now I added Assumptio but for some reason, skill.cpp contains case SC_ASSUMPTIO: if( bl->type == BL_MOB ) continue; break; According to my understanding that means it can't be dispelled from mobs, only...everything else. Is this official? I don't see it mentioned on the list of undispellable things in irowiki. If official, I need to decide if I want to overrule it for my server or not... considering it's PVE only, Dispell has to be able to remove at least a relevant amount of mob buffs, but I have no idea what else it can remove. I already know it can't remove NPC_POWERUP either but that one is probably fine. I think that was the main thing I had to dispel last time I actually played online, but it was like, 6-7 years ago...
  16. I've discovered that no matter how many times I put my Blue Gemstones into the favorites tab, they keep going back to to the etc tab soon after. The reason seems to be very simple - whether something has been moved to the tab or not is stored in the item itself. Once I use up the gemstones and refill them from a shop or storage, they are new gemstones so they server won't remember they were set to be in the favorites tab. This is a problem especially because I changed my storeall and gstoreall commands to not store favorites, and use those to clean my inventory from loot but even otherwise, the point of the favorites tab is to have the items you need to keep in your inventory at all time separated. Gems, potions, arrows, quivers, etc are definitely those kinds of items. So I request a way to PERMANENTLY store an item on the favorites tab, even if it's consumable and gets used up. Normally I'd do it myself but I'm pretty sure this requires adding a new database field or table and storing the favorites there, and I have no idea whatsoever how to do that. Basically, if something that isn't an equipment is set to a favorite, the item ID+char ID pair should be stored in a separate database table, and restored from there whenever a new instance of the matching item is placed into the inventory. (In case of equipment, they won't ever leave your inventory in the first place, and they are unique pieces, so the existing system is perfect for them.) I don't know how this works on official - so this might actually be a bug, or might not, but it's certainly a missing, critically useful feature even if not a bug.
  17. I have a new question : -Is there a procedure I can call if I want a character to say something in public or party chat? It would be nice if the AI could give a warning if a character is low on SP or overweight. And something for the future but might as well ask in advance, what procedure do I call to equip different arrows? The AI can already tell what enemy is weak or strong against which element, so might as well take advantage of that for the hunter class as well. I haven't yet tried but I'm guessing it's won't be the same call as using a consumable item. btw roughly half the second/rebirth classes are done, so "only" the other half, then 3rd classes and extended classes left to do...
  18. Ok, I peeked into the source meanwhile. So basically, what I see here is : // regenerate change_level_2nd if (!sd->change_level_2nd) { if (sd->class_&JOBL_THIRD) { // if neither 2nd nor 3rd jobchange levels are known, we have to assume a default for 2nd if (!sd->change_level_3rd) sd->change_level_2nd = job_info[pc_class2idx(pc_mapid2jobid(sd->class_&MAPID_UPPERMASK, sd->status.sex))].max_level[1]; else sd->change_level_2nd = 1 + skill_point + sd->status.skill_point - (sd->status.job_level - 1) - (sd->change_level_3rd - 1) - novice_skills; } else { sd->change_level_2nd = 1 + skill_point + sd->status.skill_point - (sd->status.job_level - 1) - novice_skills; } That assumes you had exactly (level-1) skill points for your previous jobs. That's wrong. That assumes you never gained or lost skill points and always have the default amount. You probably can't gain or lose any on official servers so I guess it makes no difference if the goal is strictly to emulate an official server but... if we want something more flexible then the actual amount of skill points at the time of job change should be stored, not the job level... this pretty much answers my question, the existing source doesn't support adding or losing skill points, unless you turn the skillup_limit option off. Which I guess is a good enough solution if every single jobchanger npc checks for all skill points being used up. So... short answer, player_skillup_limit: no should fix both the characters and the feature to work as intended as long as I'm careful to not add any jobchangers that work on players who have leftover skill points, is that right? (also, this means no reset NPCs...)
  19. Okay so I have max job of 90 but some classes don't have that much skills. I do not want 1st job points to be spent on 2nd job so if there are any excess, I want them to disappear because I can't change my job with them still being there. I don't want to ignore the skill tree either. So I don't see how those options would help me? I have the settings exactly as you quoted which seems to match what I want. Simply put, if I want my job level 61 archer to change into a bard, what do I do? (and what do I do to fix the characters already broken? GM commands? Direct database access?) ...or maybe I'm looking at this from the wrong direction. If the job change can't happen with unspent skillpoints then the option that allows spending 1st points on 2nd skills actually doesn't really enable that and instead fixes this problem indirectly is that what you're trying to say?
  20. I added the npc I found here : It works as intended, I was able to get rid of excess 1st job skill points and change to second job. However, after that the characters who used this NPC seem to be unable to learn any of their second job skills. I assume it's because the missing skill points are still causing trouble somehow and the server thinks I'm spending 1st job skill points on 2nd job skills perhaps? All my other characters who never used this NPC work fine, only the two who used it are broken. How do I fix this? (both the characters and the feature as a whole)
  21. The unrelated commits are the update, remember I started with a 6 months outdated rathena. So I have autopilot commits before, and after that 6 month worth of commits. As there were conflicts resolved at the time of updating, not including them seemed like a bad idea. Someone changed the syntax of timers, so it did affect the autopilot feature. ... I have no idea why those update commits show up on compare, the contents should be the same - but I can see that being inconvenient. ...going to the .patch page crashed my browser ? (PS : it's outdated anyway, since then I implemented like 5 more classes.)
  22. Did I do it wrong? I'm worried now.
  23. No, I understand what fixed casting time is. What I don't understand is, WHEN does the option override the value specified in the database, and what does it do when set to "0". As far as I see all skills in the database do have their fixed cast time properly set up to be 20% of the full amount (unless the official amount is different). I don't know how the option is supposed to interact with that. Based on the description that would mean it doesn't override the amount then because it wasn't zero which would imply this is an obsolete option that was meant for older databases with no fixed cast time data. However, Charge Arrow, has 1500ms fixed cast time and no variable casting time in the database (official amounts). When this option was set to 0, I was able to cast it instantly, meaning it changed the amount but if the option was set to 20, the casting time remained 1500 ms. So 0 reduced it to 0% but 20 didn't reduce it to 20%. So either the description is wrong, or I misunderstand it, or the option has a bug.
  24. Ok, I hope this is correct : https://github.com/SeravySensei/rathena/tree/%40autopilot
×
×
  • Create New...