Jump to content

Lighta

Members
  • Posts

    737
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by Lighta

  1. Hoi clycelion, I see what u mean now and in fact that would give +90% delay be default, I guess it was made like this to prevent wrong configuration like 0 delay. (on what you suggest we could have no delay) I think we just need to default as 0 but I wonder why it was set at 190% first ye
  2. Lighta

    Src trouble

    Do you have some custom ? you need to add the spiritball attribut in mmo.h to the s_homunculus structure to fix that. I move it for coherence since the original place I put it wasn't really fit for it.
  3. xd I know =( sorry about that

  4. Lighta

    UseSkillToPC

    Think the sd attachment is a limitation that should be rethinked. (no point to have a player attached for ground skill (only need m,x,y)) Also probably easier to specify target instead taking attached player, so you won't have to detach attach other rid but that less annoying; more optimisation than real issue.
  5. Lighta

    Question.

    That one variable of your map-server project wasn't freed correctly causing it to reserve more place then it should. Like everytime give me 2ko => you'll end up with no more memory available. Dun worry tough once the program is terminated that reservation is gone so you'll be fine but it warm you that you can get issue for server up for long time. Now if you don't have custom you can fill a bug report about it or if you do you can try to ask support about it. Key question is was it your custom or ra that caused the leak.
  6. @Toasty Ye I know but it's a cleaner exemple like this; better to demonstrate imo. But ain't really a perfect exemple cause we don't even need to set the server variable in that case. Anyway if he don't want to deal with tick he could always use YYYYMMDD or YYYYDDD. @Ryokem I understand that you want to keep the subject as the author state, many time I've been on some irc to ask one things and get remark about thing you don't care / was done for the exemple etc... But it's support section, I believe we have to point out that is compception ain't perfect and that he may want to reconsider it. And if we were really upset about what we ask we all awnsered sql but none give a proper exemple wich is not perfect support.. Now let's look it really, he said he want to affect all account, what the difference with this and a server variable ? -That player won't manipulate that server variable but may have another. -That new player will be affect by the server one but not by sql. 2nd point is more interesting imo cause let say he want to do a little freebie : "Ok for noel everyone come see Santa at lutie you'll get a reward". => that suppose we mark valid then false. Well here in sql only already created char will benefit it.
  7. Yes but in this case Toasty awnser ain't too far. not the main subject but there otherway to do daily check quest instead assigning all account. For quick exemple of what he said. OnHour00: //each day set $daily_quest,gettime(8); //save new day end; (on quest part) OnStart: //supposed entry of npc if(#daily_quest >= $daily_quest) { mes "Sorry one char of this account already did this daily quest today"; } .... OnEnd: //suppose end of npc set #daily_quest,gettime(8); //mark day when quest was finished. end; This approch is valid for 1year, assign only variable for player who actually do the quest, (so no useless data), and is ofc faster. But yeah beside looping and having headeach for offline char, sql would be the way to go.
  8. There always a way but sql would be faster here yeah. btw do you really need all account ?, if so I wonder why you bother setting it as account variable instead server if it's for all...
  9. It's a good way to retrive who's on the map for script; like each 10s the people on this map are... That the most simpler/efficient? way in npc, otherwise idk wich iterator you'll use to do so. take all player, attach ? check map ?? Nope, I used back then for statistic. What I agree is that he could be updated to provide other functionnality / option. Actually I added type so he could return char_id, account_id etc for user on map. => think it as list for iterator.
  10. If I do turn them on without fix this would generate lot of warnings for people. Well I can put tjem under debug mode only for gcc but I've got no clue how to set that for VCC. I'd also prefer to not have a huge changeset but this may be complicate for this one, well I sure can do 1 for refactoring then the next one following for type mistmatch fix wich would reduce the amount but the one for refactoring people may not like it since it won't bring any interesting change except that it's easier for us to follow those type. (eg : one refactoring in here is skill_num, skillid, skillnum even sometime skill => skillid) They all represent skill_id but was named differently, not such a big deal but it's easier to track skill_id with the same name then search for those other type, after that I'll put them all to same type with one big change. (currently some are ushort, uint, int, ...) wich is not safe for overflow case could be optimize easily.
  11. int64 would be faster yeah and will keep the actual behaviour. But that mean the actual default if ratio is 0 etc. We probably have some other place where multiplication overflow type limit before whatever division. About macro I already told you to verify their scope (undef) and I think we should keep the actual ATK_RATE2 as it is but declare the 2 new atk macro as ATK_RATER and ATK_RATEL (since it's to increase left or right dammage). This to not shift the actual one in ATK_RATE3 and increase the diff. Finally shifting for multiplication don't really matter since makefile have optimisation on. THat would produce the same code as shifting if this si faster, or will shift on is on.
  12. So this is kinda old stuff but I think we should take more in accounts warnings and if possible fix them. Currently we only have fews build who throwing out warnings : (http://build.rathena...ings (40)]NMAKE[/url]) cause other one are either set as silent or don't got a warnings level sufficient. I'm suggesting to change visual warnings rom lvl 3 to lvl 4 and modify configure to remove -Wno parenthese, -Wno unused -Wno-sign-compare -Wno-pointer-sign. For configure since we trying to optimise and make the code stronger those silent warnings serve againt our purpose, Why do we need to silent parenthese, bettter to let us know if a condition is dubious : if(a && b || c) => do you mean ((a && || c) or (a && (b || c)). unused is trivial and worse is done in Vcc but not in Gcc cause we tell him to shut us, what the logic in that ? The only one I believe should stay is -Wno switch cause we using lot of switch and enum, and he will complaint to not have them all, well we could always put a default path for all of them. If there still some warnings and you feel we should silent them, let at least do it if degug mode is off (--enable debug) so we can easely take a look at it later. Of course I also believe buildbot should have debug mode on for compile so we know what missing. Configure diff Vcc Files If you doing this you'll see those kind of warnings : http://upaste.me/e1dc170363199020 So quick study of them we assigning to smaller type a bigger type like : short a = int b, so ofc only half of b will be assign. Signed to unsigned or unsigned to signed short a = unsigned short b; unsigned short a = short a; So ofc after SHRT_MAX will have some issue of sign nonstandard extension used : bit field types char a:1; unsigned short a:1; All useless we said we wanted only 1 bit assign for this type, putting short or char is useless as we still only gonna have 1bit This only bring confusion as expected type, real declaration is : int a:x (x = number of bit) etc... So just changing those ain't hat hard and will put the code more coherent, they were mostly done by optimisation attempt, like we change mapid to short but not in function call causing those issues or trought scanf... This will also optimise the code cause we will reduce in most case type so less ram reserved. I already starting doing the change, ain't that easy to explain rule change but it's basically : -1) keep struct assign in type if optimise; -2) harmonize other struct we have the same index in there. -3) Update local variable for correct match -4) Update function parameter call -5) cast Here what I've done for the moment : ra_warns2.diff So tell me what u think about it
  13. Tab or space ain't the only thing who's breaking your diff. It just that since there a lot many block was marked as changed in svn, and when a block encounter a local change => boom conflict. I also had lot of src modification, it's quick if you know how to do it and I doubt pserv put as many reference as we do, (track wich revision did what etc) Just : svn co http/ra new_repo/; svn merge -c -16968; diff new_repo myrepo; apply diff
  14. Pretty useless to revert back imo. Yes it do break lot of diff but those was going to be break one day anyways. Updating diff is just a revert patch, KR, update, conflict operation, so yeah it not pleasant but it's not that "omg" and to repeat myself the diff is not for infinite duration so at least we know is up to date. Now let say we revert this and apply KR for new code, what does that mean, that only new file will have that code style ? That only when we edit a module we apply KR ? only for a block ? This was meant to harmonize code style, with this reverse will only get back to square one, but yeah at least we more or less agreed on wich style to configure for IDE. It will just postpond diff breaking when someone will edit the file anyways, so ok some file ain't touch a lot so that a bit less conflicts but that all... Finally replace will break all index we put on bugtracker and in commit message; follow up:x rev:x etc all gonna be wrong. You can always if you don't like it update to head, cherrypick -16968, tryto apply your fix.
  15. Lighta

    Max Level 160

    Need to verify some skillratio bonus for that change as well. Since most time is was x*150/100; plenty or area was written as x+=x/2; Thus to increase spead calc but that wont work for 160 =(
  16. Yeah sorry my awnser was before the code formating, blame GB if it didn't match. Anyway now that you got it let do some math : Assuming data : { mhp=14k, msp=3k, (sound reasonable for RE), skillv=10; blvl=150; chp= 1kp; atk=220; } Litteral simplified flow: dmg = atk*(whatever small range)+bonus; //here will assum dmg=atk skillratio = (hp+sp)/2 * 150/100 = (mhp*(10+2*skilllv)/100 + msp * (6 + skilllv) / 100 )/2 * 3/2; ATK_RATE(skillratio) => dmg = dmg*skillratio ATK_ADD(mhp - chp); => dmg = dmg + mhp - chp; ATK_RATE(harddef) + ATK_ADD(sofdef); Substitution : dmg = (atk*(mhp*(10+2*skilllv)/100 + msp * (6 + skilllv) / 100 )/2*3/2 + mhp - chp)*defense - softdef; dmg = (220*(14000*(10+2*10)/100 + 3000 * (6 + 10) / 100 )/2*3/2 + 14000 - 1000)*defense - softdef; dmg = 785200 before defense reduction So idk how much you wanna reduce this, is just purely math, you could just do : skillratio = (hp+sp) / 4; dmg = 399100 Or change the maxhp or maxsp effect on the formula, anyway you have the simplified flow just do the math to see how much you want to reduce this. just to finish harddef will be [0;1] and soft will be direct dmg = dmg - soft. (yes again simplified for the purist). Take a look at battle.c if you want the exact thing, but just with this you should be able to reduce your dammage as you wished.
  17. I already told you what to change in src to reduce that dammage, src/map/battle.c block 2448:2457 change skillratio formula, dunno make it divide by 2 or whatever fit you.
  18. yep Realusion I got it, I'll need to confirm it's really like that it's suppose to be but I like that it's splitted in module. Sure it will be slower then current 1 big function processing but so much easier to alter/maintain. @Realusion, I had an issue with Irocalc matching the exact dmg value returned following irowiki notes those could you give a try. I'll link my spreadsheet when I recover my gmail account.
  19. Damn I tought the graphic was with real scale xd. Agreing with Euphy for splitting the command and probably renome this one. (map_foreachinrange may be easier to use for area)
  20. Lighta

    UseSkillToPC

    Ok but skill usually use int and dex etc, will right now the statsthing would be a pain since we always using the one from player, need a whole new layer to support that. (Or temporary replace player stats but dunno if that a good idea)
  21. Mastery_atk is done in battle_addmastery, may not be fully updated but wasn't the big issue. Defense is done more or less at the end right now like as you requested but if you look irowiki, only watk and eatk should benefice resistance from card, so I don't think that a good option
  22. Lighta

    UseSkillToPC

    Ohh I see yeah that smart, but we'll need like an array for stats point imo, so you could pass for all. unitskilluseid <GID>,<skill id>,<skill lvl>{,<target id>{,<ref stat point>,<level>}}; where : stpoint[0] = str; stpoint[1] = agi; stpoint[2] = vit; stpoint[3] = int; stpoint[4] = dex; stpoint[5] = luk; Also unitskilluseid won't cover ground skill, well we could auto resolve that, but it's more like what I did in useskill
  23. Lighta

    sc_end

    I think he more want a hook, like when this status is done do that function, but yeah you'll need a little src edit for that.
  24. Lighta

    UseSkillToPC

    they're gonna be pretty much the same anyway but we could give you something more generic or without unit_id to facilitate, something like this : http://upaste.me/1a921649a2c14a5b, thus ground will kinda suck since it will cast on self and it's kinda duplicate unitskillusepos just below. *useskill,<skillid>,<skilllv,>,{<targetid|"targetname">}; What would be the usage of statspoint, npc_level for ??
  25. It's really an improvement for the status in last position on the check, like we could put the less frequent there. I think we should keep it, sure we're not that use too it now and increase debuging but I think it's a good improvement anyway.
×
×
  • Create New...