Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/06/23 in Posts

  1. then find in db folder pre-re or re named item_flag.txt
    1 point
  2. https://github.com/rathena/rathena/blob/master/doc/yaml/db/item_db.yml Rynbef~
    1 point
  3. - Id: 7783 AegisName: Silver_Key77 Name: Episode 13.2 Poring Key Type: Etc Weight: 10 Flags: DropAnnounce: true
    1 point
  4. View File Market Clone (No SRC modification needed) This is exactly the same concept as the original file by Annieruru/Dastgir which is found on this post : @marketclone - creates a clone of your self as if you are making a chatroom. @marketkill - removes the clone you spawned. Yes, there is no need for SRC modification. This is purely done script wise but this will only work for latest server files. Any server files later than October 2, 2022 shouldn't have any troubles running this script. Otherwise, you are required to apply this commit: https://github.com/rathena/rathena/commit/9c2576f47ac12f54738bc714b858fde3a9d6315b to work. Any issues regarding the script, leave me a message or tag me on the support page of this script. If there is any good suggestions for improvements I do wont give support if compatibility is the issue. Compatibility is your responsibility. Use at your own risk. Submitter pajodex Submitted 06/22/23 Category Utilities Video Content Author pajodex, Annieruru, Dastgir, Napster  
    1 point
  5. I saw a lot of posts about this over the years, but none seemed updated for the most recent version. I recently spent a lot of time on pets, so here's a quick guide. I did everything for pre-renewal, but I would imagine most of this would work for renewal too, you might just need to add some stuff about evolution. What you'll need: GRF Editor SDE (Server Database Editor) Both of these can be found elsewhere on this forum and are used for most things involving editing your server. Understanding GRF files: When the client needs a file, it searches through the GRF files in a certain order to find it. The order it uses is specified in data.ini in the client's root folder. Mine looks like this. [Data] 0=rathena_resources.grf 1=pre20190427.grf 2=renewal20190427.grf 3=palettes.grf 4=data.grf 5=rdata.grf It looks in files that are higher in the list first. This means rathena_resources.grf is checked first, and rdata.grf is checked last. This means that if I need to override a file which is normally in data,grf, I can simply add it to any grf file that is higher in the list, and it will be used instead of the one in data.grf, without having to modify that file. Since rathena_resources.grf is first in the list, it's easiest to add your files to that. Getting started with your custom pet: The first two things your pet needs are an egg and a taming item. For eggs, I simply chose to replace an existing pet egg that was unused. In Pre-Re, there aren't any unused eggs, but we can fix that. In a text editor, open up the item_db.txt file for renewal, which is under your db/re folder. Search for 9001, which will get you to the beginning of the pet eggs. Renewal has tons of them! Copy and paste all the eggs that renewal's item_db has into pre-re's item db, and now they'll be available for pre-re to use. Now open up SDE. To add an egg for your new pet, all we have to do is rename it. Use the item search and find an egg you don't care about. Change its Aegis Name and Name to be the one of the pet you want. For example, I made Garm Baby, so the Aegis name is Garm_Baby_Egg and the Name is Garm Baby Egg. This part is done. Now we need a taming item. It's easiest to make a taming item by using a miscellaneous item. For Garm Baby, I used Nursing Bottle. To turn this item into a taming item, first we have to change it from a Misc Item to a Usable item, which is done using the dropdown in the upper right. We then need to set the Applicable Job to FFFFFFFF, upper to 7, and Gender to Both. Now we need to set the script. The script must look like this: pet 1515; Except that the number must match the id number of the enemy you want to be able to capture. Look this up in the mob database. You might want to modify the drop rates on your item through the mob database too, particularly if it's an item that no one in the game drops. Most pet items also have a sell price of 2500 and a weight of 50, if you want to be consistent. Use "save database (quick)" to save your changes. We're done with SDE for now. Adding your pet to the game: The next thing to do is to add your pet to pet_db.yml so it can spawn into the game. The installation I have actually breaks pet_db.yml into two parts. There's one file inside pre-re that contains the pet's basic information, and one inside import that contains its skill information. You could merge these files if you wanted, but if not you'll need to update both. There are already a bunch of entries in this file, so you can probably just copy one. Note that when it comes to yaml files, the spacing of the file is important, so make sure you copy it exactly including the spacing. Here's the one I used for Garm Baby. - Mob: GARM_BABY TameItem: Milk_Bottle EggItem: Garm_Baby_Egg FoodItem: Ice_Piece Fullness: 4 IntimacyFed: 10 CaptureRate: 500 Script: > .@i = getpetinfo(PETINFO_INTIMATE); if( .@i >= PET_INTIMATE_LOYAL ){ bonus2 bResEff,Eff_Freeze,5000; } The entries for MOB, TameItem, EggItem, and FoodItem are all Aegis_Names, you can look these up through SDE. For example, the Nursing Bottle's Aegis Name is actually Milk_Bottle. The script is something you'll have to come up with on your own. There's a bunch of examples in the file already you can draw on. My script makes the pet give you 50% resistance to the freeze status. If you want the pet to use skills, you'll need to update the other yml file inside import. Garm Baby has this inside that file: - Mob: GARM_BABY AttackRate: 8000 RetaliateRate: 8000 ChangeTargetRate: 800 SupportScript: > petskillattack "MG_FROSTDIVER",5,10,30; The main thing we care about is the SupportScript. This is what attack your pet will use. Here, this pet uses Frost Driver level 5, between 10-30% of the time depending on how happy it is. For a support skill, you use petskillsupport instead, with values like this one: petskillsupport "HP_ASSUMPTIO",1,80,100,100; This pet would cast Assumptio level 1 with an 80 second delay, when your hp and sp are 100% or less. There's also stat bonuses available: petskillbonus bLuk,5,20,40; This pet gives a bonus of 5 luck for 20 seconds, with a 40 second delay between uses. For more detail, look in script_commands.txt within Rathena's doc folder. With this, you can now restart your server and your pet will exist in the game! There will still be a bit of jank, for example its egg won't show the right name on the client, it won't have a picture, and it won't talk, we'll discuss how to fix that next. Fixing your pet's egg entry: This one is fairly easy. Navigate to your client folder and open up System/iteminfo.lua This is where the game stores all the item translations. Find the egg that you used by searching for its item id inside square brackets, like this [9001]. The description will be listed here. If you added a completely new egg, it won't be in this file and you'll need to add an entry for it. Update the name so it shows the right name. You can also add a description if you want. Mine looks like this, but it doesn't need to be this fancy. [9108] = { unidentifiedDisplayName = "Garm Baby Egg", unidentifiedResourceName = "¾ðµ¥µå¾Ë", unidentifiedDescriptionName = { "..." }, identifiedDisplayName = "Garm Baby Egg", identifiedResourceName = "¾ðµ¥µå¾Ë", identifiedDescriptionName = { "An egg in which a Garm Baby Cute Pet rests.", "Can be hatched by using a ^33CC33Pet Incubator^000000.", "^33CC33Special Power ^000000:", "Casts level 5 Frost Driver against the enemy", "^33CC33Loyal Bonus^000000", "Increases resistance to the Freeze status by 50%", "Class:^6666CC Monster Egg^000000" }, slotCount = 0, ClassNum = 0 }, Adding a picture for your pet: Every pet has a little picture that is displayed in their pet window. If you don't do this step, it'll just display NO IMAGE. This is not cool, so let's add an image. This requires GRF editor. To start with, you should probably open up data.grf, just to know how it's structured. Images for pets are stored in data/texture/userinterface/illust . If you search this folder for "pet", you'll see the existing images. They are all 90x134 pixels, your image will need to be this size too. Name it something like pet_garm_baby.bmp. You could just upload your file into data.grf, but data.grf is huge and thus it's slow to send update to this file to your players. Instead, it's easier to put it into rathena_resources.grf. It does not have this folder, but you can create it using GRF editor. Remember, any files you put inside something higher in the list of GRF files will override the earlier files. After adding your file, you'll notice that it won't actually display in game. This is because there is also a table of pets in the application that maintains the paths to the images that you need to update. This file is called petinfo.lub, and it is stored inside data.grf in the folder data/luafiles514/lua files/datainfo. We'll need to make a copy of this file, so extract it using right click extract with GRF editor. This file needs specific encoding to read the Korean characters, so make sure to save the file with ANSI encoding when you're done. There are many tables in this file that you'll need to add your pet to. Generally, you can follow the format they use. You'll notice that most of the entries use an identifier that looks like this: [jobtbl.JT_GARM_BABY] = "GARM_BABY", This is an entry into the file jobidentity.lub, which is in the same folder. You should not need to modify that file, pretty much every enemy in the game is already in there, just enter your pet's Aegis name here, in all caps. When you come to this table: PetEggItemID_PetJobID You'll need to give your pet a new JobID, you can just assign a new one at the end. When you're finished updating this file, add it into your rathena_resources.grf, making the same folder path for it as above, so it will overwrite the one in the base game. Make sure to save your GRF afterwards. If you find that the pet accessories on your server no longer work after doing this, you saved the file with the wrong encoding. I fixed this by switching all the pet accessory files to the english names and adding them all to my GRF files, but the smart way is probably just to use a text editor that handles encoding properly, like notepad++. Making your pet talk: To make your pet talk, it needs entries in pettalktable.xml. For me, this file was in my renewal.grf file, in the data folder. This is fairly straightforward, you can just copy and then modify Poring's entry. You just need to know what to put for the enclosing tags. The name must match the entry you made in the PetNameTable inside petinfo.lub. I put the name "GARM_BABY" for my pet, so the tag must say <GARM_BABY>. For some reason, my pets only talked when I put their entries near the beginning of the file. I suspect one of the entries inside the default file has an error in it, but I haven't found it. Either way, adding them to the top of the file is safe. With all of this stuff done, just save your GRF edits and restart the game (it's not necessary to restart the server for GRF changes) and hopefully your pet should talk and have a picture! Once you confirm everything works, you'll need to distribute the changed grf files and iteminfo.lua to your players. It's probably worth adding all your custom pets to the server first before you open in to the public! I'm sorry that this was long, no one said custom pets were going to be easy. Hopefully it all works for you.
    1 point
  6. Hi everyone ! I'm on a project and I thought some of you might be interested in one topic I'm currently working on. I'm sharing with you 3 different multi-language system I made. 1. Multi-language support + Compact Automatic NPC Structure System alberta Sample V1.txt In this file, all npcs are calling one function with an ID per npc, everything or almost everything is defined in this function (texts, menus, commands script, set, conditions, input). The script is then reading a common function-code that will generate the whole npc depending on the numbers ID in front of each line. There is no need of a npc structure anymore with this code. It calculates how many texts the npc should say, when to "next", when to "close", when to show a menu, set a variable, put a if condition, etc... All managed by numbers in the variable. Of course, the system is not fully done but it works. As I wrote on comment, I still need to change the conditions system to be able to read many conditions separately from each other but on the same dialogue. So far, it can read one/many conditions in one sentence and return false(0)/true(1) if the PJ has it. Also, It does need a duplication of menus/menus choices so the script can go on and on infinitely. Still in process.. But it is currently functional if you make sure 2 sub-menus are not displaying at the same time (same text number) in the choice of either menu- case1 or menu case-2 or menu case-3. I probably also need to create an array table with ID/values for each and put the common code in a different function just to be more clean. 2. Multi-language support + Same old NPC structure alberta Sample V2.txt In this file, all npcs are calling one function to determine in which language the texts will be. Simpler than the one above, variables names are only t1, t2, t3 etc.... t3a t3b only if there are many texts in the same window npc. It returns to each individual npcs that has the same structure (a for was made when there are many dialogues before a menu to make it compact). I also need to set the variables to 0 before each reading. 3. Multi-Language npcs alberta.txt In this file, all npcs are individual from each other, depending on the #langtype, it will display the texts in the same old structure. Language default is english in case there aren't a translation available in the language associated with #langtype. #langtype is a variable already existed in rathena, depending on the value of your #langtype (english is default), the messages from msg_conf will appear in the appropriate language that is located in conf/msg_conf. Also, a line has to be changed in src/common/msg_conf.hpp: When the first system will be fully done, It would be great if someone can create an .exe that can automatically replace "mes" "menu" etc in all npcs at once by a variable$ number that follows a certain direction. I'm interested to read your feedbacks, impressions, comments, suggestions, perhaps modifications? If you have enough knowledge and are interested to help, please PM me. Thank you ?
    1 point
  7. set .@Total,12; setarray .@P1[0],1,1230,1; //Ice Pick setarray .@P2[0],1,5135,1; //Cyclops setarray .@P3[0],1,4365,1; // HW Card setarray .@P4[0],1,4451,1; // Crothen Card setarray .@P5[0],1,18885,1; // Jejecap setarray .@P6[0],1,20036,1; // Sword Master Crown setarray .@P7[0],1,4357,1; // LK Card setarray .@P8[0],1,4403,1; // kiel card setarray .@P9[0],20,12210,20; // BGUM setarray .@P10[0],30,7227,20; // TCG setarray .@P11[0],100,7227,2; // TCG setarray .@P12[0],100,7227,2; // TCG do{ set .@i, rand(1,.@Total); }while( rand(1,100) > getd(".@P"+.@i+"[0]") ); for(set .@j,1; .@j<getarraysize(getd(".@P"+.@i)); set .@j,.@j+2) { getitem getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]"); if (!.@k[0]) { set .@gz,.@i; setarray .@k[0], getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]"); break; } } if( .@gz && .@gz <= 10 ) // 10% equal or below will announce announce "Congratulations! "+strcharinfo(0)+" just received "+getitemname(.@k[0])+" x "+.@k[1]+" from Lotti Girl",0; specialeffect2 248; close;
    1 point
  8. hello if you want pets to help master at lower intimacy, then u should modify these: // Minimum intimacy necessary for a pet to support their master. Default is 900 // (intimacy goes from 0 to 1000). At this minimum, support rate is 50% of pet's normal value. // At max (1000) support rate is 150%. pet_support_min_friendly: 900 // Whether or not the pet's will use skills. (Note 1) // Note: Offensive pet skills need at least pet_attack_support or // pet_damage_support to work (they trigger while the pet is attacking). pet_status_support: yes pet_support_min_friendly: 900 <------should be 100 for shy cause at 900 it will only support the user at loyal
    1 point
×
×
  • Create New...