Jump to content

TheDragster

Member
  • Posts

    18
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

TheDragster last won the day on March 31 2021

TheDragster had the most liked content!

About TheDragster

Informations

  • Gender
    Male

Recent Profile Visitors

329 profile views

TheDragster's Achievements

Apprentice

Apprentice (3/16)

  • Reacting Well
  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done

Recent Badges

18

Reputation

  1. Hello everyone, As title says, I'm getting this error: Active skills(sura, warrior, shaman buffs ...) are not showing in left upper corner, and their effect(lighting/buff) is not showing in the weapon/character too. The skills work by the way, enhancements/effects(+speed, +damage...) are active Syserrs are empty, both client and serverside, does anyone know how to solve this problem? Thanks
  2. Hello all, I am facing this problem: [Hidden Content] Horse name is not showing, instead, I see the horse's default name(pony, ...) on the head of it. I don't know what could cause this, so I hope anyone could help me. Thanks in advance
  3. Yes there are many faults in this source code By the way, I found maybe how the drop bonus from items are added: There's a Variable : POINT_PC_BANG_DROP_BONUS(iCafe exp bonus? wtf), which has the applytype 76, instead of ITEM_DROP_BONUS(standard one), which has apply_type 45. That variable(76), seems to be used in drop calculation, and also increased. So I guess it should work. Another way to make it work, could be to increase POINT_PC_BANG_DROP_BONUS by POINT_ITEM_DROP_BONUS, this way, in char.cpp: case POINT_EXP_DOUBLE_BONUS: // 71 case POINT_GOLD_DOUBLE_BONUS: // 72 //remove from here case POINT_ITEM_DROP_BONUS: // 73 case POINT_POTION_BONUS: // 74 if (GetPoint(type) + amount > 100) { sys_err("BONUS exceeded over 100!! point type: %d name: %s amount %d", type, GetName(), amount); amount = 100 - GetPoint(type); } SetPoint(type, GetPoint(type) + amount); val = GetPoint(type); break; //add here case POINT_ITEM_DROP_BONUS: // 73 SetPoint(POINT_PC_BANG_DROP_BONUS, amount); val = GetPoint(POINT_PC_BANG_DROP_BONUS); break; Also if you want use this variable in standard drops, check out GetDropPct function, and remove the check to pc is PC_Bang
  4. Yes those are thief gloves, I mean the percent in player’s equip(necklace, bracelet), which gives for example +20% double item drop Pct for both As sonitex said, we played this game in a lie I would probably enable it in the future, and release, if no one will do, a guide to do it
  5. Nice one, there are many generator solutions in them, but you need to find the best bottleneck in terms of performance, because any of them has different efficiency based on generations; I guess the best would be the standard or bool. To solve your issue, if you mean priv(empire) drop rates, then just divide the rate by 100 this formulae: int gain = (100 + priv_drop_rate) /100; and then multiply the percent by gain; Note: I am referring to priv drop rates taken from database(or statically declared in source files), which are usually 100 multipliers(100,200...) The main issue I found indeed, is the gain by items’ drop bonuses(double item chance or something like): Examining files, I didn’t find any drop rate which uses this bonus to increase the drop pct, so I guess it’s not used? I may be wrong, or maybe it’s a mistake only in my rev, but that’s it. I guess items’ drop bonuses should increase some POINT_PC_.._BONUS., but it’s never used. Neither in GetDropPct function, nor that bonus is ever increased. If it is so, then it could be a real problem, you’ll need to work on many files for it lmao
  6. Yes, this function is intended to be used as a replace for drop logics inside the source files. I mean, using this function, you can "skip" the Random range calculation(e.g. 400000) and the rest; Just insert for example a range of 100 to make a drop rate(distribute(Percent,100)). It may be useful if you are planning to make other Drop logics/types, instead of the basic ones. It is less mechanical, and also human-readable and editable, that's the goal. For example if you want to build a new drop logic, in which for example a mob in a map drops at 0.1%, you have to calculate iRandRage, iDelta percent and other useless things, if you do not just copy-paste percent calculation from other drop logics. By applying this function, you will just have to insert a percent(e.g. 1%), in a range(e.g. 100).
  7. UPDATE: -Optimized percent handicaps: now also based on difference between mob and user levels. Now the strategy to generate random numbers is the "real"(hardware based) by default. -Replaced whole logic inside the function, now a random percent(item) inside the ones indicated will be picked. This way percents are real, and there is is also an hugeness of hardware resources saved, because While cycle, which used to iterate all items, has been removed now. -Double_Item_drop Items(like thief gloves) now act like they should(there's a chance to make a "double pick" from the available items). There's also a note for those who wish to apply fairness between items drop rates.
  8. Note: To make real number generations(so real Drop Percents), please refer to this:
  9. Hello all, I recently found how stupid number generators inside source files are. Currently, to generate a "random" number, the system seems to use function number(x,y). I found out that this function is an ugly version of rand() % y + x, which does not really generates random number with real distribution. I really don't know if other files use this or better solutions, but in files related to Drop that's what it is. To make the point on how stupid this (not)random system is, just take a look at this : iRandRange = 4000000; iRandRange = iRandRange * 100 / (100 + CPrivManager::instance().GetPriv(pkKiller, PRIV_ITEM_DROP) + (pkKiller->IsEquipUniqueItem(UNIQUE_ITEM_DOUBLE_ITEM) ? 100 : 0)); //example "random" generation: int random_number = number(1, iRandRange) Why should you make a range of 4000000 to estabilish like 0.1% of drop? lmao Thus I decided to share with you a real solution, that may can help you if you are issuing the same problem/question. I found it in the web. It uses the standard C++ random distribution, and can also be replaced with boost's one. There is needing to spend hardware resources for generating numbers, but I guess it is not this much, so please be careful and test it before using in real servers. Include random c++ library(depending on your c++ version, if not available, then use Boost) #include <random> Then you can use inside cycles(for, while...): std::random_device os_seed; const uint_least32_t seed = os_seed(); std::mt19937 generator(seed); //the hardware number generator std::uniform_int_distribution< uint_least32_t > distribute(1, max_range); //the number distribution Example usage int max_range = 100; int extractions = 100; int percent = 10; int total_found = 0; std::random_device os_seed; const uint_least32_t seed = os_seed(); std::mt19937 generator(seed); std::uniform_int_distribution< uint_least32_t > distribute(1, max_range); for(int i = 0; i < extractions; i++){ if(percent >= distribute(generator)){ std::cout << "Number found at Extraction: "<< i+1 <<"\n"; total_found++; } } std::cout << "Total found: " << total_found << "in " << extractions << "extractions \n"; Obviously you can adapt easily on any Percent you want to obtain in your source files, just work in the max_range variable.
  10. Update: -System now allows of setting fractions Percent(0.x, 0.0x, ....) instead of using big numbers. -Drop Percents depends also on Empire Drop Rate(%) and Exp Rings
  11. Let's assume common_drop_item.txt is almost never used by anyone, but for those who are thinking about using it, here's some (potential) bugs I found inside. Those may or may be not bugs, it depends on what use you want to make for common_drop_item. I think the most useful use would be to set drops easily depending on mob and users' levels, without making it mob-by-mob(mob_drop_item.txt), for those who wish to rewrite all the drops from scratch. It would be a good replace of settings drops via LUA(which may cause performance issues, and also you have to deal also with empire and user's drop rates) too. The bugs I found are: 1) Min and max_level are only based on the user's level. No matter which mob level it is(e.g. min_level=30, max_level=100: if you kill a wolf(level 3) you will get the item anyway). 2) Consequence of (1), if player level is above or below 15 levels(standard level limit for dropping items) than mob's, the item will be dropped anyway. 3) The "count" was declared but never applied, only one item used to be dropped. And so on, thus I decided to rewrite the entire function and make it useful. Renewal Features: 1) If mob level is below or above than for example 15 levels than the common_drop_item, the item won't be dropped. 2) If mob level is above or below than certain levels from user, the item won't be dropped. 3) Just like standard drops, there will be applied handicaps on drop rate %, based on user and mob levels(There is a mid-level between start and end, the farthest difference between this and user or mob level is, the less drop rate % will be) 4) Drops can be also based on mob ranks(like common drop item's concern), and the ranks can be indicated. 5) You can choose in which map the item can be dropped(0=any). 6) Multiple items can be set in the same settings. Other features can be found in the function. Understanding structure: The structure is similar to mob_drop_item's one, but with new(and different) variables, which are: "map": the map index, default 0 "lv_start" and "lv_end": min and max (user)level, default 1-999 "min_rank": and "max_rank": min and max (mob)Rank, starting from 0, which is the 1st rank, default 0-3 "rank_gain": if there are more ranks, each rank will have more % chance to drop the item, based on the previous rank's percent, default 20 "level_diff": the minimum level difference between user and mobs' levels, and also the minimum level difference between mob and lv_start or lv_end, default 15 For item declaration, the syntax is the same as mob_drop_item, with 3 chars: ID VNUM COUNT PERCENT Note: This system has not been tested in real servers, and it may have some bugs or can be optimized, so please analyze it if you are planning to user it in real servers. If you find any bug or you have any advice, please share it here. Replace inside ITEM_MANAGER::CreateDropItem function in item_manager.cpp Replace entire function inside item_manager_read_tables.cpp Replace this class inside item_manager_private_types.h and item_manager.cpp Example Usage(Sword+9 at 0.5%): Note: If you wish to apply fairness between q.ty of items->percents, you can use one of these logics: 1) multiply iPercent by i (inside item_manager.cpp) 2) just multiply manually item percents by count of items inside common_drop_item.txt(e.g. first item(1) percent = 1, item_count=30 -> first_item(1) percent = first_item(1) percent*item_count)
  12. Hello all, I would like to make the REAL % of dragon scroll and other scrolls be visible while refining an item; Right now the percents of dragon scrolls and other Works while refining: The item can be destroyed if the default blacksmith refine % is 100% and dragon scroll has for example 50%, but I can't see the real %. I always see that 100% which isn't obviously real(graphical bug), it's the default taken from refine_proto table.. Does someone know how to make the % of other scrolls visible too? The Percents aren't took from client side(uirefine.py has its own percents arrays, but the %s aren't took from it)
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.