KirieZ
Core Developers-
Content Count
234 -
Joined
-
Last visited
-
Days Won
23
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by KirieZ
-
The link I posted is basically a diff file. Since it is small, you can manually edit your code following it. Red lines should be removed, green ones added. But if you are starting now. Please, prefer using a fresh copy of the current hercules from our github repo. It will save you trouble in many aspects. Current herc will be betterfor support, features and shouldn't have issues that blocks you from using.
-
as far as I know, not possible. Current clients no longer have the old character selection/creation window. the game simply moved on and no longer supports this. I don't think there is a NEMO patch for that, and creating one is likely to be quite hard. If you really must use the old UI, you will need to go back to an older client
-
That's weird... The only way I can think this issue would happen is if "max_sp" in player.conf was changed... Changing the max level shouldn't cause this in latest Hercules. Just reverting those level changes fixes the issue? If yes, please, give more details about what exactly you have changed. Also, check out if there are no errors before this list of warnings, sine something else may be broken and affecting this (e.g. you broke a config file)
-
Hello and welcome to Hercules I can't answer all of those topics, and I think some of them would be really dependent on your project/team (like how to prioritize -- you can use general software development techniques, I guess, but it really depends on your team). But, let me try to give some tips: 1. I am not sure what you mean by "improve NPC interactions", but everything boils down to coding your changes. I think the best place to go for is to read scripts and check the commands at https://github.com/HerculesWS/Hercules/blob/stable/doc/script_commands.txt This will tell what you can do with the script engine, and if it is not there, you can go to source next to implement what you need. 2. For seasonal events, you can either use time commands to enable/disable stuff, or simply enable/disable stuff during server maintenance. Depends on what you are trying to accomplish, but Hercules has events for dates. 3. For performance, I usually start thinking about how much load my changes would cause based on what they are. But I think you can use any performance tooling that works for C... I haven't tried those though, so I can't give a suggestion there. But for example, avoiding your npcs/map-server running lots of SQL queries -- which would block the process -- is one kind of thing that is easy to note that would be bad and should be avoided
-
Weirdness with Novice Academy. Do I need a certain client version?
KirieZ replied to Cobbler5428's question in Client-Side Support
For the map, you are correct, you need the old map files since RO changed the academy several times. I have uploaded the files here: For a clean hercules, you should use Academy 2012 and start 2015 (2018 also works ok). I noticed that RE map cache is wrong for iz_ac02, so until this gets merged: https://github.com/HerculesWS/Hercules/pull/3316 you have to update your map cache for iz_ac02 for it to work properly. About the combination kit, I think it is not implemented yet. -
Version 1.0.0
22 downloads
Since RO starting point in renewal changed several times, and finding those files are getting increasingly hard, I decided to group them all and release here. This only includes the original map files, no changes, no NPCs adjustments. When downloading, you will find 6 options, pick the ones that you need. Hercules is currently (as of v2024.08) using 2012 Academy and 2015 Start Point (or 2018 with wrong map cache?). Files: - academy_2012 -- Criatura Academy 2012 version. Corridors in both floors, everything linked together - academy_2015 -- Criatura Academy 2015 version. 2nd floor changed to have rooms separate from the corridor ("making it smaller") - academy_2017 -- Criatura Academy 2017 version. 1st floor changed to a big open area - start_2012 -- iz_int is a boat for players to leave to izlude (NPCs not included) - start_2015 -- iz_int is a sunken ship; int_land is a island linking the sunken ship to the new one. Players can walk over the ship. - start_2018 -- the ship at int_land is no longer walkable Usage: - Download the ones that you need, - extract it somewhere - copy the content of the data folder to your data folder or GRF - you may need to regenerate your map cache and adjust the NPCs if the map is not the one for your Hercules version -
View File All versions of Start Island and Criatura Academy (iz_ac01, int_land, iz_int) Since RO starting point in renewal changed several times, and finding those files are getting increasingly hard, I decided to group them all and release here. This only includes the original map files, no changes, no NPCs adjustments. When downloading, you will find 6 options, pick the ones that you need. Hercules is currently (as of v2024.08) using 2012 Academy and 2015 Start Point (or 2018 with wrong map cache?). Files: - academy_2012 -- Criatura Academy 2012 version. Corridors in both floors, everything linked together - academy_2015 -- Criatura Academy 2015 version. 2nd floor changed to have rooms separate from the corridor ("making it smaller") - academy_2017 -- Criatura Academy 2017 version. 1st floor changed to a big open area - start_2012 -- iz_int is a boat for players to leave to izlude (NPCs not included) - start_2015 -- iz_int is a sunken ship; int_land is a island linking the sunken ship to the new one. Players can walk over the ship. - start_2018 -- the ship at int_land is no longer walkable Usage: - Download the ones that you need, - extract it somewhere - copy the content of the data folder to your data folder or GRF - you may need to regenerate your map cache and adjust the NPCs if the map is not the one for your Hercules version Submitter KirieZ Submitted 08/31/24 Category Maps & Textures
-
Endless Tower Instance with Difficulties
KirieZ replied to Louis T Steinhil's topic in Event & Game Releases
Hello, I think you have uploaded the wrong file here it is a card collector.txt, not endless tower. On a side note, doing this change in setunitdata: case UDT_DMOTION: //setunitdata_check_bounds(4, 0, USHRT_MAX); <---comment out then add setunitdata_check_min(4, 0); break; is not increasing the limit. You just disabled the safety check and is letting the compiler set whatever value it wants (there is a logic to what is setting but this is a bit level and I don't know 100% how to expain/whether it is consistent on all compilers). These variables are not big enough to support values higher than ~65000 (USHRT_MAX). It doesn't error out because the code is doing a cast, and it will simply ignore part of the value and go ahead with whatever the casting resolves to. (Which will be between 0 and ~65000). From an online compiler, 96,000 will actually become 30,464 and 120,000 will actually be 54,464. Try doing a getunitdata after you set it and you will see the real value. To go over 65k at least the variables needs to be changed from short to int, I am not sure if this would be enough or this would cause issues in other parts, but unless this is done, you can't set a value higher than 65k (and that's why you see this error in vanilla herc) -
I've never done it and this answer may not be totally accurate... But I think the following is what you need to keep in mind: 1. NEMO probably won't be able to patch it, you will have to do by hand 2. The hardest part is not using the client, but usually each official server uses a different combination of packets. For example, if packet A was added in kRO in 2015, and packet B in 2016. For another server it may be the case that packet B was added in 2020 and packet A never came. Thus, relying in PACKETVER config will most of the time not work. So you will certainly need knowledge on how to customize packets read/sent by herc -- specailly clif.c and related packet structures (and their counterparts in char/login server) PEEK or BPE (Links to their topics below) may help you find the list of packets currently defined for the client. I did not test BPE for that, but I do remember PEEK being able to extract packet length table -- which would include the packet ID too. For packet structures (if any of them changed for any reason -- should not be the case, usually only versions change) that will be harder. If you need a different structure, I think you have 2 options: 1. Reverse engineer the client and find where it sends the packet you need with some reverse engineering tool (IDA, Ghidra, etc) 2. Capture the packet and find the data by trial and error and guessing -- A good amount of guessing is needed here, and you may get some thing wrong I am not sure if I can give much more info than that. But I guess it is better than nothing If you are really going this route, do know that it is some quite advanced stuff with barely any public info
-
What's best in storing items and not duplicating by mistake?
KirieZ replied to Louis T Steinhil's question in Script Support
Yes, you are right about the cause. Your case seems to be causing a similar effect of a server crash, when it gets terminated in an abnormal situation. I am not sure if there is really something that can be done in this case... while you could create a script command to force saving the character data for this case, you would still have it open for others. I think the best option would be to: 1. When doing a production server normal shutdown, always do it properly. Kick all players (even better: do something to prevent them from logging back in) and wait some time (I think ~5 minutes would be more than enough). I think if map server is shut down separately first, it will send all data to char, but this is something that would need to be done manually 2. If there was a server crash, which could cause those dupes, you probably need to either review your logs of the last few minutes and check if actions are needed, or rollback to a recent backup if you think it would be safer -
Most likely your db is too new for your code. Try copying this commit: https://github.com/HerculesWS/Hercules/commit/bb5064f4f8e63364ddc8cb7523ebc3a7def905ed
-
setunitdata UDT GROUP & setunittitle
KirieZ replied to Louis T Steinhil's question in Script Support
The error is due to the main NPC not being in a map. As it is not in a map, Herc most likely didn't initialize unit data for it (since it would be useless). Either put it in a map or add a check to not apply unitdata for it. Here is how to do the 2nd option: OnInit: if (strnpcinfo(NPC_MAP) == "") // Not in a map, can't set view data end; setunitdata(getnpcid(), UDT_GROUP, 1); setunittitle(getnpcid(), "Goddess Statue"); end; -
That's weird... cvc was implemented together with the clan system, not having cvc would mean you don't have the clan system too. I do recommend updating though, since it is there since 2017. But here is the PR that introduced it: https://github.com/HerculesWS/Hercules/pull/1718
-
This seems somewhat undocumented, but there is a "cvc" mapflag that should make a clan vs clan. https://github.com/HerculesWS/Hercules/blob/stable/src/map/map.c#L5428 does that work for you? or there is a specific reason why you need to use gvg?
-
setunitdata UDT GROUP & setunittitle
KirieZ replied to Louis T Steinhil's question in Script Support
what if you simply use "getnpcid()" without the NPC name? or use the full name. I am assuming your duplicates have a hidden or unique name added to them, so this getnpcid is not picking it and all of them are targeting the main one. Try to either use just "getnpcid()" (which should target the current NPC), or if this doesn't work, use strnpcinfo to get the full name instead of the display name -
setunitdata UDT GROUP & setunittitle
KirieZ replied to Louis T Steinhil's question in Script Support
How are you setting the title/group for the first one? OnInit should be called in every duplicate, so you could just use it to set the title/group -
Is that from rA? does areamonster there sets this variable? this does not happen in herc: https://github.com/HerculesWS/Hercules/blob/stable/doc/script_commands.txt#L695 Ah, the answer went up and I didn't saw it 😅 Glad you got it working
-
I am not sure what exactly is wrong, but as far as I can tell, this code doesn't make much sense... I have only skimmed through the initial part, but: $@mobid is an empty array, and is being copied into .@GID (Thus, .@GID would be an array too?), but then .@GID is passed to getunitdata, which doesn't expect an array... and getunitdata result is not used at all.. So I am really not sure what it is trying to do
-
I think your options are: 1. Recreate the script command in herc, shouldn't be that hard, I believe this info is available, just need to make a script command to get it 2. Save a dynamic global variable using the instance ID as suffix using setd between instance_create and instance_init. Once the instance starts, you can copy the value from the global variable into an instance variable. Something like that: // create instance .@instanceId = instance_create(...) // Make global var setd(sprintf("$@instance_type_%d", .@instanceId), 1 /* whatever you need to store */); // Init it instance_init(...) // ------ // This is called on instance_init OnInstanceInit: .@varName$ = sprintf("$@instance_type_%d", instance_id()); 'instanceType = getd(.@varName$); setd(.@varName$, 0); // Clean up so you don't mess up future id reuses end; References: - OnInstanceInit: https://github.com/HerculesWS/Hercules/blob/stable/doc/script_commands.txt#L1151 - instance_create: https://github.com/HerculesWS/Hercules/blob/stable/doc/script_commands.txt#L9730 - instance_init: https://github.com/HerculesWS/Hercules/blob/stable/doc/script_commands.txt#L9793
-
script:parse_callfunc: not enough arguments, expected ','
KirieZ replied to chojuro's question in Script Support
message expects 2 parameters: https://github.com/HerculesWS/Hercules/blob/stable/doc/script_commands.txt#L4810 parameters should be separated by "," looks like your script has a ";" instead. so just change to "," messsage strcharinfo(0), ".... Note: best-practices/standards would also suggest using () around script commands, e.g. message(....) and use constants instead of magic numbers where possible (strcharinfo(PC_NAME) instead of strcharinfo(0)) -
I can't give much details, but will give you some ideas: Most likely you have changed the part that sends the data from server to client, (clif->something), but once the player clicks something in the client, client tells the server the items it is buying, and server needs to process it. At that time, the code are probably still looking for cash. So it is like you are telling a lie to the client saying it they have N amount of cash (where N is Zeny) but once it tries to pay you go "hmm you don't have all that money -- because you are now looking for their cash" The communication from client to server also starts at clif.c, but those will be in clif->ParseXXX functions. You are probably missing this part. If you can't find which parse function is being used just by looking at their names, you can use packetlogger plugin (see staff plugins repo in hercules org) to log the packets coming and from their ID you can get to the right parse function. Hope this helps
-
I don't know the details about anaconda's pack, but eden group is only available in Renewal. Is your server running in Renewal mode? "hercules_pre" gives a feeling about being pre-renewal, but again, I am not sure about how this pack works.
-
Hercules Versioning and Available Features
KirieZ replied to Geras's question in General Server Support
You are welcome Regarding a roadmap, not really. We do track missing features and bugs in GitHub issues: https://github.com/HerculesWS/Hercules/issues There are some milestones regarding content, but they are more for organization purposes, as we don't have a roadmap like "We are trying to get X done next" -
Hercules Versioning and Available Features
KirieZ replied to Geras's question in General Server Support
Well, the short answer is: It depends. But let's go for the long answer: RO is a game that uses client/server model, and the server (in our case, Hercules) is the one which holds most of the game logic. What this mean is, pretty much everything only happens in the game because the server tells the client to do so. To name a few examples: - When you click to walk, Hercules is the one saying the client it can walk, and Hercules is the one letting other knows the player is walking - A monster spawn only happens because Hercules is creating it and just letting the client knows the monster is there - An attack (and a skill) only happens because Hercules calculated it and told the client that it happened - A NPC is only shown in the screen because Hercules created it and told the client about its existence - A Quest is received by the player because, for example, a NPC in Hercules added a quest to the player, and thus Hercules told the client about that So, as you can see, pretty much everything requires something on Hercules side to work. The client also plays some part on this: - There are hardcoded limits of which IDs can be used - For example, an item which has an ID > 32k would only work on clients that supports IDs above 32k - Certain IDs for monsters/NPCs/etc won't be properly recognized in certain client versions - There are some hardcoded logic on how skills works or shows up - For example, the old, ground-based effect of bard/dancer performances doesn't show in 2019 clients and newer (unless you use a patch to restore the old code in client). The ground effect would still happen (Because Hercules is controlling it), but the player would see nothing in the ground. - UI elements are part of the client, so an older client may not have certain windows - But depending on the window, Hercules also needs to implement the network code to allow that window to work (e.g. Achievements, RoDEX, Equipment switch, etc) Going back to your example about 4th jobs. Having a 2022 client means: 1. The visual effect for the 4th job skills are there 2. If the server says your job is one of the 4th jobs, you will see the sprite and it will be treated as a player sprite 3. You can see the new attributes window 4. You can see the new AP bar But: 1. You don't have job change quests (Hercules must have the NPCs, which we don't as of April/2024) 2. You don't have a working skill tree and skills (Hercules must have the skill trees and skills coded, which we don't as of April/2024) 3. You don't have the effect of the new attributes being applied to your damage (Hercules must have new formulas for it, which we don't as of April/2024) So: Base client: kRO 2023 08 04 This means your resource files (sprites, luas, textures, maps, etc. the "visual" content and config files are from how kRO looked like in 2023-08-04). For example, if a new hat is released in 2023-05, you will have the .spr file in your data.grf (but you can't get it in game if Hercules doesn't have it) Client exe: 2022-04-06_Ragexe_1648707856 This means that your client will process client sided things as kRO did in 2022-04-06, this means it will be affected by client limitations from this date, and it will only load files that were expected at that time. For example: - if a new UI was released in 2023, you won't see it in a 2022 client, because the code was not there yet. (even if you have the images for that UI in your data.grf, you don't have the code to actually use them) - if there is a new map format released in 2023 (map format meaning the structure of the files in the data.grf), this map file won't work here. On the other hand, if a map was released in 2023 using a structure that is compatible with a 2022 client, you can use it just fine. Generally, having too different dates between Client exe and Base client may give you issues, because: 1. You have incompatible lua files (usually worked around by using translation projects) 2. You have new resources that are not compatible with your client (usually worked around by replacing the files or avoiding certain things) Hercules: v2024.03 This is Hercules release date. This just means this is the state of Hercules code as of March/2024. Hercules makes a new release every month, which may include bug fixes, new features, some custom code for something Hercules thinks is worth having, etc. You can see the changelog here: https://github.com/HerculesWS/Hercules/blob/stable/CHANGELOG.md This date has pretty much nothing to do with the other 2. The only thing that it may suggest is that a 2018 Hercules will probably not work with a 2020 client, because we couldn't even imagine what 2020 client would look like when developing code in 2018. But a 2024 Hercules doesn't mean it supports features from 2024 official servers, nor that a 2024 client would flawlessly work in Hercules. Currently, Hercules v2024.03 is a mix of content: 1. NPC/quest/job/monsters wise, I think we are around kRO 2015 2. Our client support is better, I think a 2022 client should work fine most of the time (some buttons won't work, though -- e.g. Equipment Switch is not there) Hope this clarifies a bit -
by "hpm overload things" you mean hookPre/hookPost? As far as I remember, overloading, as in "I want to completely skip hercules original function" (maybe it should actually be called override?) were always made with a direct assignment to the interface (like in the original post here), while hookPre/hookPost would be used if you want to keep the original code running, but wants to do something else before/after it. Example: https://github.com/HerculesWS/Hercules/blob/stable/src/plugins/db2sql.c#L1180 I am not aware of another method for overloading/overriding. I do agree that you should only do it if you have a reason to, but is there a better way to overload/override than a direct assignment?