• Content Count

  • Avg. Content Per Day

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Neutral

  • Rank
    New Member

Profile Information

  • Gender

Recent Profile Visitors

499 profile views
  1. Hi all, right now I'm working with creating and implementing item bonuses and so far I was pretty successful with implementing my own negate ninja stone item bonus. However for my second item bonus idea I wanted to do something a little more ambitious. For reference sake I'm primarily working with pre-renewal in case that's important information before going forward. Right now we have this item bonus here: bonus2 bMagicAtkEle,e,x; Increases damage of e element magic by x% And basically my idea is I want to create a new version of this bonus only it also includes melee and range damage instead of just magic. So I went ahead and implemented these 2 new item bonuses to start with: bonus2 bRangeAtkEle,e,x; Increases damage of e element range by x% // Custom [Neutral] bonus2 bMeleeAtkEle,e,x; Increases damage of e element melee by x% // Custom [Neutral] Just to make sure I did everything correctly I did some digging around to see how bMagicAtkEle was implemented, and here's a collection of images showing everything I edited here: After I did this I went ahead and did some digging around to see how magic_atk_ele was implemented into the game and I found that it was in battle.c being used in this switch condition here starting at line 579 battle.c: switch( attack_type ) { case BF_MAGIC: // Affected by attacker ATK bonuses if( sd && !(nk&NK_NO_CARDFIX_ATK) ) { cardfix = cardfix * (100 + sd->magic_addrace[tstatus->race] + sd->magic_addrace[RC_ALL] + sd->magic_addrace2[t_race2]) / 100; if( !(nk&NK_NO_ELEFIX) ) { // Affected by Element modifier bonuses cardfix = cardfix * (100 + sd->magic_addele[tstatus->def_ele] + sd->magic_addele[ELE_ALL] + sd->magic_addele_script[tstatus->def_ele] + sd->magic_addele_script[ELE_ALL]) / 100; cardfix = cardfix * (100 + sd->magic_atk_ele[rh_ele] + sd->magic_atk_ele[ELE_ALL]) / 100; } cardfix = cardfix * (100 + sd->magic_addsize[tstatus->size] + sd->magic_addsize[SZ_ALL]) / 100; cardfix = cardfix * (100 + sd->magic_addclass[tstatus->class_] + sd->magic_addclass[CLASS_ALL]) / 100; for( i = 0; i < ARRAYLENGTH(sd->add_mdmg) && sd->add_mdmg[i].rate; i++ ) { if( sd->add_mdmg[i].class_ == t_class ) { cardfix = cardfix * (100 + sd->add_mdmg[i].rate) / 100; break; } } APPLY_CARDFIX(damage, cardfix); } Then I noticed below here that there was a case for BF_WEAPON: where it had an if statement for if the attacking method was range or melee. So based on this what I tried to do was I tried to copy the line in BF_MAGIC: that said this: cardfix = cardfix * (100 + sd->magic_atk_ele[rh_ele] + sd->magic_atk_ele[ELE_ALL]) / 100; I made 2 copies of it and replaced where it said "magic_atk_ele" with "range_atk_ele" and "melee_atk_ele" respectively and placed them where I "thought" it made sense in these locations of battle.c: Starting at line 661 battle.c: if( !(((sd->right_weapon.addele2[i].flag)&flag)&BF_WEAPONMASK && ((sd->right_weapon.addele2[i].flag)&flag)&BF_RANGEMASK && ((sd->right_weapon.addele2[i].flag)&flag)&BF_SKILLMASK) ) continue; ele_fix += sd->right_weapon.addele2[i].rate; } cardfix = cardfix * (100 + sd->range_atk_ele[rh_ele] + sd->range_atk_ele[ELE_ALL]) / 100; cardfix = cardfix * (100 + ele_fix) / 100; } Starting at line 687 battle.c: if( !(((sd->right_weapon.addele2[i].flag)&flag)&BF_WEAPONMASK && ((sd->right_weapon.addele2[i].flag)&flag)&BF_RANGEMASK && ((sd->right_weapon.addele2[i].flag)&flag)&BF_SKILLMASK) ) continue; ele_fix += sd->right_weapon.addele2[i].rate; } cardfix = cardfix * (100 + sd->melee_atk_ele[rh_ele] + sd->melee_atk_ele[ELE_ALL]) / 100; cardfix = cardfix * (100 + ele_fix) / 100; } The reason why I thought to place them in those locations was because I noticed that in BF_MAGIC: the magic_atk_ele line was encased in this if statement here: if( sd && !(nk&NK_NO_CARDFIX_ATK) ) So after I did this I threw bMagicAtkEle, bRangeAtkEle, and bMeleeAtkEle onto 3 separate cards, took it in game after compiling the changes, and then I gave it a go. the results I got were very strange though. The magic part works as intended, it will give me a reasonable number if I say Ele_Fire,100; for instance, I get a result like this: ~350 -> ~700 per hit with fire bolt on average. But then when I try to use the Melee and Range versions that's when things start to get weird. For instance if I try to use it with mammonite I will get a result such as this without fire element: ~550 on average. But then once I introduce the fire element I'll get a result such as this: ~1200 on average, which seems normal. But then I realized that the melee and range value start to stack, because if you combine the melee and range cards with these bonuses together, you'll get a ridiculous number such as this: ~3000 on average. What's even more strange is that if you take off the weapon with the cards on it, switch to a weapon with no cards in it at all, and then enchant fire element into it, it'll still do like ~3000 despite there being no cards there, which is telling me that somehow the effect is carrying over to other weapons. So that's where I am and what I tried at the moment. I thought I knew what I was doing at first but I think I'm either not using the right formula, I didn't implement the item bonus "fully" or "correctly", or it's possible that I just didn't put the damage formula in the right spot in the source. Thank you all for your help and support.
  2. Hello all, I went into mySQL Workbench today under my item_db section and I was going to go and modify some items according to a feature I was working on when suddenly I realized something was off. In case this is important information mySQL Workbench is version 5.2.47 CE revision 10398 and I work with pre-renewal. I tried to filter the database "type" column so I could specifically look for Armor/Garment/Boots/Headgear/Accessory as listed here in rathena/doc/item_db.txt: --------------------------------------- Type: 0 Healing item. 2 Usable item. 3 Etc item 4 Armor/Garment/Boots/Headgear/Accessory 5 Weapon 6 Card 7 Pet egg 8 Pet equipment 10 Ammo (Arrows/Bullets/etc) 11 Usable with delayed consumption (intended for 'itemskill') Items using the 'itemskill' script command are consumed after selecting a target. Any other command will NOT consume the item. 12 Shadow Equipment 18 Another delayed consume that requires user confirmation before using item. --------------------------------------- But what I discovered is that if I try to search for specific types that I get no results in the filter for some reason? Here's what I know: 0 when searched in type brings back filter results. 2 when searched in type brings back filter results. 3 when searched in type brings back filter results. 4 when searched in type gives me no filter results. 5 when searched in type gives me back filter results. 6 when searched in type gives me no filter results. 7 when searched in type gives me no filter results. 8 when searched in type gives me no filter results. 10 when searched in type gives me back filter results. 11 when searched in type gives me back filter results. 12 when searched in type gives me no filter results. 18 when searched in type gives me no filter results. So based on this I know that mySQL Workbench doesn't recognize types 4, 6, 7, 8, 12, or 18. Yet everything else when searched in this program gives me a filter result. So this is when I was starting to wonder if I could find an armor of any kind without using a filter. I scroll down, sure enough, I don't see IDs of armors anywhere. So then I tried searching by IDs. I searched for 2305 (Adventurer's Suit [0]), 2326 (Saint's Robe [1]), and 2328 (Wooden Mail [0]) and once again I get no results for those. So naturally I try to see if I can search for a different item type to see if I'm searching correctly. This time I look up 1713 (Arbalest [1]), sure enough, that gives me a result that being the correct result of Arbalest. So then I made sure that my item_db.txt file wasn't missing any data. So I go to where the item_db.txt is located at rathena\db\pre-re\item_db and I scroll through the file to see if I can find the items I searched for before. Sure enough, they exist in the item_db file and they're under the category of "Armors" so this at least assures me that my item_db file isn't missing any files. I'm under the impression that the workbench either didn't upload correctly, I missed a step, or something else entirely is going on. Is it possible that I need to reload the item_db.txt file into the workbench somehow? Thank you all for your support.
  3. Hello all, I have successfully created a recognizable mapflag after following the helpful instructions located here. With that being said I'm pretty confident this mapflag is working properly since in game if I enter "@mapflag newmapflagtest 1 or @mapflag newmapflagtest 0" it will give me the following messages: [ @mapflag ] newmapflagtest flag has been set to On value = 1 [ @mapflag ] newmapflagtest flag has been set to Off value = 0 So as far as I know what this tells me is that the mapflag itself works and is ready to be used in a map, which is great. But now I feel like I'm ready to take on the next step of the process. What I'm looking to understand now is how to create content for this new mapflag to use. So what I was thinking of doing to learn this was possibly looking at another existing mapflag, such as skill_damage_db (or ADJUST_SKILL_DAMAGE & MF_SKILL_DAMAGE as I think the source is calling it) and maybe breaking it down to see all the components that go into it working so that way I understand how mapflags actually work. That way I could also possibly recreate it (in other words make a copy of it) into my new newmapflagtest flag to see by example how to go about making content in a mapflag. This is because I learn a lot better by examples and looking at existing content; problem is, I don't exactly know where all the components are that make up its content, nor do I understand how mapflags know to go to their appropriate textfiles for variables/changes (skill_damage_db.txt in this case) which is why I'm asking for guidance here. Thank you all very much for your help and support.
  4. Neutral

    How to create a new Mapflag?

    Thank you that guides me in a better direction. Thank you very much Tokei that's very useful information! I'll make sure to put it to great use.
  5. Neutral

    How to create a new Mapflag?

    Hello all, right now I'm in the process of learning how things work in rAthena and I came across mapflags and noticed all my available options and what they offer me and thought it was a really cool feature. However I also wanted to know something in particular. How does one go about adding their own custom/new mapflag if they so desire it? My first instinct was to look on the wiki. I went there and noticed there was a mapflag section under scripting but unfortunately that just directs me to a 404 page so I can't view anything. I also tried googling and searching on the forums but couldn't find an existing topic that already talks about this in particular. I also found the process of adding a new mapflag but it was for hercules on their wiki, I wanted to play it safe though by not following those instructions since I know hercules and rAthena are not one of the same. Therefore I decided to make this thread here since I'm pretty certain making a new mapflag would count as a source edit. Thank you all for your support.
  6. Neutral

    Where to go to modify skills?

    This taught me a lot in a single post, thank you for walking me through all that, it was extremely informative.
  7. Neutral

    Where to go to modify skills?

    Hello all, I'm relatively new to the rAthena scene, and I'm looking to learn more about the inner workings of the game and eventually how to pump out my own custom scripts and modifications. For reference sake I plan on working with pre-renewal primarily in case this is important information. For the time being I've been wondering how to work with skills. For instance if I look at a skill like Envenom... Where is element determined and how can I change that? Where is the poison status proc determined and how can I change that status rate? How do I work with skill damage, sp cost, cast times, delays, etc. Although I do know that in rathena/db there's a file called skill_damage_db for skill damage, but I'd like to know where I could find the raw script anyways just in case or if there's more and/or preferred ways to edit outside of skill_damage_db. I ask these things for a couple reasons, first I tried looking at the source and other available files, but I found it pretty confusing to locate where skills are exactly and what does what. Second, I was using the rAthena wiki before this thread, and it would almost seem as if it's no longer accessible? (404 error) and when I use the wiki available in the docs section at the top I found that a lot of sections were incomplete (if I click on scripting it brings me to a 404) so I'm under the assumption a transfer is currently being place. I didn't know where else to learn about these things except for directly on the forums as a result. Just thought I'd ask on the forums so that way I have a better understanding on where some things are for the future. Thanks for your support.