• Content Count

  • Avg. Content Per Day

  • Joined

  • Last visited

Community Reputation

9 Neutral

About Seravy

  • Rank
    Santa Poring

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Is there some script or function I can use to automatically crop all the images while preserving the correct positioning? I edited hairstyles assuming it doesn't matter but it does seem to position the character's head wrong (unless that's an actual bug, I doubt) on the ALT-G screen. Not a major problem but if there is an easy solution, I might as well do it. Edit : The above script (the first one) doesn't seem to work correctly when I need to change the X position. Animation frames where the sprite appears mirrored get moved to the wrong direction.
  2. Seravy

    Custom "Woe"

    Somewhat related, the TE castles seem to drop item 12399 which is a consumable treasure chest with no script that doesn't sell for zeny either. I did a search for the ID number in the npc folder and nothing came up. So it seems the item is entirely useless, but that can't be right? It's a (common) WOE reward item so it has to have some purpose? I smell a missing item script bug... but even RMS shows no script for that item. Any idea what that item is actually for? I don't want to edit it to generate zeny unless I'm 100% sure it's not an important quest material nor has some hardcoded effect handled by source. Even more confusing is the fact the same castles drop the normal, NPC sellable treasure chest item I'm already used to seeing. I tried searching but I only found information about the normal treasure chest item.
  3. Seravy

    Custom "Woe"

    Tried a Yuno castle yesterday evening and found some unexpected differences. First of all the EMP room doesn't have specific spawns. This isn't a problem, I can make one, I just need to use the same code normal castles do. However, EMP rooms don't seem to be "rooms", in fact I'm starting to vaguely remember SE being special in that there are no warps in the castles, the entire thing is connected. The problem with this is obvious, you can walk into the emp room and break it without fighting bosses, and even if I make a boss spawn at the emperium, it might move away and can be lured away as well. So I decided to implement my original "plan B", require killing the monsters to get the castle. This doesn't seem to be overly difficult, I imagine starting the emp break script with "if there are monsters remaining, respawn emp, otherwise continue" is what I need. However... I want it to be limited to boss monsters only, and I want to display the boss monster's name, like "The Dark Lord has revived the Emperium! You must defeat him to gain ownership of this castle!". I'll try to figure out how to do this on my own, will edit this post if I fail or succeed. I also noticed breaking the emperium in SE castles does not kill the monsters. That's unusual, I'll have to change that too. Novice castles... what are those? I tried a google search but found nothing. Is this an official feature? If it's woe for novices only, I don't think I'll bother with it. I've sent a pull request with the fixes when I found the atk/matk problems, so far it's still open 2 full days later so the bug(s) seem to be real. Edit - this is as far as I was able to do it, now I'm stuck : OnEmpSpawn: callsub(Emprespawn); end; Emprespawn: set [email protected]$, substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); if (mobcount(strnpcinfo(2),"Steward#"[email protected]$+"::OnStartArena")) end; if (compare(strnpcinfo(2),"arug")) { if (strnpcinfo(2) == "arug_cas01") setarray [email protected][0],87,219; else if (strnpcinfo(2) == "arug_cas02") setarray [email protected][0],89,256; else setarray [email protected][0],141,293; // Castles 3,4,5 are identical. } else { if (strnpcinfo(2) == "schg_cas02") setarray [email protected][0],162,193; else if (strnpcinfo(2) == "schg_cas03") setarray [email protected][0],338,202; else setarray [email protected][0],120,272; // Castles 1,4,5 are identical. } monster strnpcinfo(2),[email protected][0],[email protected][1],"Emperium",1288,1,"Steward#"[email protected]$+"::OnStartArena"; return; OnStartArena: set [email protected],getcharid(2); set [email protected]$, (compare(strnpcinfo(4),"arug"))?"Valfreyja":"Nithafjoll"; [email protected] = getmapunits(BL_MOB,[email protected][0]); freeloop(1); // for if the list was too big. for([email protected]=0;[email protected]<getarraysize([email protected]);[email protected]++) getunitdata array[[email protected]],[email protected][0]; if ([email protected][UMOB_MODE] == MD_MVP) { mapannounce [email protected][??? no UMOB_NAME???] +" revives the Emperium!"; callsub(Emprespawn); end; } freeloop(0); // rest of the emperium break script is here So basically, unless there are bugs in it, all I need is a way to get the monster's name.
  4. According to videos and skill descriptions I found online (checked several sites), the Marine Sphere should move when attacked, but mine does not. Is it like this for everyone, in which case I found a bug, or is it just me?
  5. Incremental update sounds like a great idea - makes it easier for server owners to decide which of the skill updates they do (not) want.
  6. This is in the npc I'm using : if((Class >= 0 && Class <= 4052) || (Class >= 4190 && Class <=4244)){ // Job ID check so only 3rd Class chars can change costume.
  7. Seravy

    Custom "Woe"

    Please read the whole thing before posting any answers, as I kept updating it and figured a lot of things out as I made progress. o_O sorry about all the questions, I wasn't expecting an answer this detailed, just wanted to be sure I don't jump into this and find out I can't do it after wasting a lot of time trying. All scripting, easy, good news, I'll try to get all of it done today then. Managed to make monsters take back castles at chance as well as reduce economy, also commented out the lines that make economy levels drop when emperium is broken as that's now unnecessary functionality. I tried your treasure spawn change but it doesn't work. I want the treasure to spawn at the time I break the emperium, exactly once, and never again, until the monsters retake the castle and I clean it out again. "onClock0001" seems to be "do this at midnight" if I understand correctly, so instead, I need the treasure spawn to be turned into a function, which I can call from where the emperium is broken I believe. I'll update this post when there is more progress, it shouldn't be too hard to figure out the correct syntax for that. Couldn't figure out how to make it a procedure but copying the treasure spawn script as is to where the emperium breaks works. I only need it to be executed then, so it doesn't really need to be a procedure. Also removed the onClock0001 line, that should be enough to disable daily respawns. So this is now also solved. Seems investment only takes effect as part of the treasure spawns. Had to change that as well, to apply when the investment is made, wasn't too hard. Maybe I have some use for the guardians after all - if branches can be used in castles and the guardians spawn, they can help killing those mobs. Nothing spectacular but it's something... better than outright disabling the feature. Looks like the castle can be conquered from monsters when WOE is off anyway, so I removed the activation timer file and added nothing to replace it. Somewhat confused on the monster level thing. Do I need to raise monster stats separately, or does raising the level automatically adjust all their stats as if the monster leveled up? (How much stats do monsters gain from leveling anyway, never played with monster level up enabled...) ...maybe I'll scale the type and quantity of mobs instead of their level and stats, idk, might be a better solution. I guess I'll experiment with it and see for myself how it works. Ok, testing shows changing monster level doesn't make it stronger. So I have to change the stats as well if I want them to grow stronger. Okay, not entirely sure what stats need to be changed. there is MINATK, MAXATK, MINMATK MAXMATK but that doesn't make sense to me. These are values calculated from base stats, aren't they? I'm completely unsure which of these I need to modify... I mean a monster only has one atk and one matk stat in the database. Min and max are calculated... (although matk is mislabeled as maxatk but that bug was already fixed in that recent update...) ..oh MOB and UMOB are different things. I think I need to set MOB not UMOB as UMOB seem to be the already calculated values? Wouldn't they get overwritten as soon as the monster is recalculated (for example buffed by a status)? Arrgh this is definitely not trivial at all. Oh, docs\script_commands is a thing. Time to read...well "Note: When adjusting a unit's stat (STR, AGI, etc) the unit's respective statuses are recalculated (HIT, FLEE, etc) automatically. Keep in mind that some stats don't affect a unit's status and will have to directly be modified." Ok, that doesn't really tell me what MIN/MAX ATK and MATK in script actually represent. I need to modify ATK and ATK2 that much I realized. case UMOB_ATKMIN: md->base_status->rhw.atk = (unsigned short)value; calc_status = true; break; case UMOB_ATKMAX: md->base_status->rhw.atk2 = (unsigned short)value; calc_status = true; break; case UMOB_MATKMIN: md->base_status->matk_min = (unsigned short)value; calc_status = true; break; case UMOB_MATKMAX: md->base_status->matk_max = (unsigned short)value; calc_status = true; break; Now let's try to find which of these are actually used for what... return status->int_ + level + status->rhw.matk * 70 / 100; So... rhw.matk. None of those set that so as is script functionality to change monster MATK seems to be broken (probably due to the update that fixed monster matk) - you can only change the stats that get recalculated anyway. I guess I'll try to use it just to make sure it is indeed a bug, then change source to set rhw.matk... so Heaven Drive damage/hit from Evil Druid No script : 94 damage (my mdef is 54, no hard mdef, so monster matk was around 150) Script "setunitdata [email protected][[email protected]], UMOB_MATKMIN, getmonsterinfo( getarg(1), MOB_ATK2 ) *4" for 4x MATK, code changed to set rhw.matk : same 94 damage (what??) Same script but original source : 1313 damage pet hit...that's 10x more not 4x as specified... omg both results are wrong. Well of course... case MOB_ATK2: script_pushint(st,mob->status.rhw.atk2); break; That's the monster's max atk. There is no way to get the monster's base MATK from script at all it seems? More importantly those are not the base amounts, but the calculated ones... running in debug, for Evil Druid, rhw.atk is 302, rhw.atk2 is 453, batk is 142, rhw.matk is 68, matkmin is 172, matk_max is 213. The database entries for the monster are 378 and 68. So let's try to figure out what's what. rhw.matk - this is the database matk stat. I need to get this but can't so I'll need a new MOB_MATK script parameter. I thought I also need to set this but for some reason that isn't the case. Maybe monster stats weren't actually recalculated from it? batk - This is the monster's atk from its stats, we have nothing to do with this (setting level/str/dex/etc should deal with this part) rhw.atk and rhw.atk2 - These are the 80 and 120% of the monster's database ATK stat. So getting and setting these should work for adjusting physical attack as long as they are not recalculated from the base stat. matk_min and matk_max are the effective matk values. It's possible to set these but you can't "get" them from the database. However setting them should be wrong anyway. base matk should be set instead? status.cpp, this : if((!(bl->type&BL_REGEN)) && (!sc || !sc->count)) { // No difference. status_cpy(status, b_status); return; } what is it for? It makes the entire recalculation process skipped for the monster, so no wonder changing the correct, rhw.matk has no effect on the calculated min and max matk... let's see, ///Define to determine who has regen #define BL_REGEN (BL_PC|BL_HOM|BL_MER|BL_ELEM) Oh, I get it. So that code says if the thing can't regenerate hp/sp and has no status effects on it, skip recalculation because there is no way anything actually changed. Isn't that...compeletely wrong to assume? Wouldn't this break monster stat recalculation from script in all cases (not just matk but STR, AGI, etc)? ...then here : status->matk_min = status_base_matk_min(bl, status, lv); status->matk_max = status_base_matk_max(bl, status, lv); while using status instead of base_status is correct here because INT might have been already been changed by effects, and is used by the formula inside, "status->int_ + level + status->rhw.matk * 70 / 100;", it's also wrong because rhw.matk changes in base_status (through the script or otherwise) do not propagate to status anywhere. Status.rhw.matk=base_status.rhw.matk before these function calls seems necessary - unlike atk, matk isn't recalculated anywhere before the call. (or the script should set status instead of base status, or both.) ...adding that line to set status matk to base status matk fixed the problem. Raising monster matk now works, yay! However, raising atk is broken now as recalculation now correctly happens, but script sets base_status and again the data does not propagate to status anywhere. status.cpp line 4979, these two lines were removed by that "fix monster matk" update we discussed last time that was committed in the past 6 months. However, without them, any changes by script to base_status.rhw.atk and atk2 never have an effect similarly to the matk one. status->rhw.atk = status_calc_watk(bl, sc, b_status->rhw.atk); status->rhw.atk2 = status_calc_watk(bl, sc, b_status->rhw.atk2); Are these seriously all existing bugs? I'm not breaking things due to misunderstandings? I made a pull request just to be sure people in charge are at least aware of these problems and a possible way of fixing them. I should probably test other stats too, at this rate, there might be more broken than just atk and matk. WOE+WOE SE+WOE TE total 40 castles but server says "loaded 44 castles" at startup, what are the last 4?
  8. Seravy

    Custom "Woe"

    Asking here because I haven't yet had the time to check whether woe is implemented in script, source or both. I'm playing on my own offline server, so that obviously means no PVP or WOE, as there are no other players. However it would be a waste to not use the castles. So I have been thinking to implement the following instead : -Every X hours (while the server is turned on) there is a chance for each owned castle to be retaken by monsters, or if it's already owned by monsters, chance to lose an investment level. -Treasure does not respawn except after the castle is taken from the monsters and you can invest only once. -Monsters grow stronger the more investment levels there are so each time it's harder to retake the castle (but higher investment means more treasure chest as usual) -Woe is always enabled so I can take the castles from the monsters whenever I feel like doing it. That's all I think. Also, no idea how the guardians could be incorporated into this system, if at all, might be better to get rid of them. How difficult/possible it is do this? Is it as easy as changing some scripts or is it harder? Is it even possible to change the level of the monsters spawned? Do Woe SE castles work the same way as normal castles regarding monsters/chests/investing zeny, so can the same be done for them? It wasn't implemented last time I played so I know nothing about it.
  9. Thanks, searching for hotkey was a good idea, was able to find all the relevant SQL parts through that. So far only tested on my GM account but my implementation seems to work correctly. If no bugs surface in the next few days, I'll consider posting it in source releases.
  10. Seravy


    So far I had #define MAX_WALKPATH 128 and everything was working fine. However I was thinking "hey that's probably way more than I actually need, let's try less." I changed the line to #define MAX_WALKPATH 60 but this caused my characters to be able to move no further than 2 tiles!!! Could this perhaps be a bug? I don't think I have ever changed any of the pathfinding functions. btw my official walkpath is off. (walkpath in client.conf was set to 99 and 60 both, that made no difference.) I'm not that experienced with the C language but maybe the fact 60 is small enough to be signed short but 128 isn't could be what makes this difference? Automatic type conversions and whatnot causing it?
  11. This adds an option to your items.conf file to multiply arrow crafting output globally. For example : // Arrow Crafting created amount. (Note 2) arrowmake_produce_rate: 500 makes arrow crafting produce 5 times the normal amount. Ofc you can manually edit every single entry in create_arrow_db for the same result, but that's not very convenient. My main purpose posting this is to experiment with Git and figure out how to properly make branches for new features, so do let me know if it is/isn't correctly done.
  12. omg, thanks, I'll use that next time, for the current one I already had to do it manually. This should totally be a default feature, isn't replacing images a very common thing to do? I can already rightclick and have "find all usages" so why can't I have basic operations performed on that list?
  13. 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...
  14. 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.
  15. Someone has to try on the official servers.