Jump to content

b6d4a82c15

Member
  • Posts

    31
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by b6d4a82c15

  1. Take a look at this function from char_skill.cpp

    bool CHARACTER::LearnSkillByBook(DWORD dwSkillVnum, BYTE bProb)

    It's called by the server whenever you read a standard skill book (VNUM 50300).

    Regarding your question: success chance is often retrieved from value0 column belonging to a given skillbook but this isn't always the case so you can use "Find all references" on LearnSkillByBook func to see how it's called.

    In case of a standard skill book it seems like there's no bProb argument provided so it's hardcoded to 65%, search for this bit

    int need_bookcount = GetSkillLevel(dwSkillVnum) - 20;

    and you'll see

    				int percent = 65;
    
    				if (FindAffect(AFFECT_SKILL_BOOK_BONUS))
    				{
    					percent = 0;
    					RemoveAffect(AFFECT_SKILL_BOOK_BONUS);
    				}
    
    				if (number(1, 100) > percent)
    				{
    (...)

    But like I said before sometimes this function is also sometimes called with the second argument (bProb) provided and this is our success chance. It's often modified by special items and whatnot. 

    Grand master skills obviously have a separate routine (LearnGrandMasterSkill) dedicated to chance calculation.

  2. You can actually reopen/save a file with any encoding of your choice (without setting the default encoding) from the quick menu in vscode. Although I wouldn't recommend it because I still can't get it to work properly with some diacritics even after setting it correctly. 

     

    What's worth mentioning also regarding those kind of files with ISO 8859-1 encoding is that when you work with git, you need to set them to binary mode like that and enforce line endings if you work on different environments. Put this in .gitattributes
     

    *.txt eol=crlf
    *.txt binary
    
  3. 11 hours ago, Gurgarath said:

    A bit sad to drop it like this because the finance behind it was considered bad. There are still many things to uncover regardless of how the game was financially designed, let's not forget it is one of the most popular MMO in Europe and probably NA appart of World of Warcraft. This game is a piece of videogame history and the more we can uncover, the best we can grasp the ideas behind. And oh boy, there was and there still is!

    As far as I know, the reason why metin was pulled from korea was exactly this: it wasn't profitable enough.

  4. On 3/8/2024 at 6:17 PM, Distraught said:

    Hi all,

    Yesterday, we brainstormed the concept of hosting a real-life M2Dev conference, akin to a game development day, featuring prominent figures from our community delivering TED-style talks on a variety of subjects.

    As of now, the idea has backing from @ Apranax@ masodikbela@ Zerial@ .plechito'@ Deliris@ VegaS™ and myself, all of whom are committed to speaking at the event. We're targeting this fall, around October or November, in Budapest for the event.

    To gauge interest, I'm putting up a poll. If there's sufficient enthusiasm, we'll kick off the planning process.

    If this is supposed to be an actual conference and not a friend circle meetup... it'd need to be streamed lived and archived for later vieweing. Honestly this is a multi-national online community and I think this event should be kept online also since the community is so small (but its ok cause quality over quantity :))

  5. This thread gave me such a nostalgia hit, I think trivia like this is even more interesting than the game itself.

    Regarding the old client... Im suspecting there should be something like google dorks but in naver? Instead of looking for the binary file itself one could look for other metin specific file names. Although I think it'd have the same success rate as "scanning entire korean ipv4 subnet" lmao.

    I have a chinese connection active in the metin2 community (and surprisingly there are still like 1-2 small chinese servers that still get active players). But Im afraid he wouldn't know any koreans who happen to have the beta client on their pc. And I think that's the most realistic way of obtaining this client. Either through a YMIR employee or through some 20 year old harddrive from a 40 year old korean guy lmao. It's funny when they say nothing is ever lost on the internet... the biggest lie ever

    • Metin2 Dev 1
    • Think 2
    • Good 1
  6. 2 hours ago, Koray said:

    I had tried something similar before through custom GPT via ChatGPT, but instead of searching for bugs/exploits, I attempted to create a simple ping/pong system by providing all the details just to see what it could do for experimental purposes. However, speaking for ChatGPT, it doesn't automatically scan the entire content due to the large number of files. It only makes heuristic-based guesses based on the names or scans the files if specified. Even if it processes the entire content correctly, the whole processing takes a long time, so it starts skipping parts after a while until the main command is given. Additionally, even if you manage to achieve the desired result once, due to temperature imbalances, getting completely unrelated results in subsequent attempts is possible. Therefore, in summary, obtaining efficient results is not quite achievable. It's quite useful for conducting research on specific topics in specific parts rather than scanning the entire content. However, for now fully automating it is not very feasible, at least for ChatGPT.

    ChatGPT is obsolete today honestly. I use claude-3-opus LLM daily for commercial programming and it exceeds chatgpt by a mile.
    When it comes to token size it's like you said, not possible straight away with chatgpt. There's however a way to go around this with some additional layers of complexity like Cursor Editor although be warned its closed source. It's basically a fork of vscode that let's you ask LLMs about your code. Also you can ask it to write anything and it has the context of your entire codebase.

    I tested it a few months back and it wasn't bad honestly. I told it to explain some shit-code written by ymir that I didn't understand and it did quite well.

    • Good 1
  7. Hey guys,

     

    Has anyone of you tried feeding metin2 game/server source to some kind of LLM yet?

    I think best use case would be finding exploits / memory leaks.

    Gemini 1.5 Pro seems especially interesting because it has a large amount of tokens.

     

  8. On 2/23/2024 at 9:56 PM, msnas said:

    That's definitely going to crash the server.
    @ Rakancito, can you explain how you thought process of this code?

    LUA is just a wrapper for C++ and it hardly makes it slower. And like we can see here, some people should stick with what's the most effective and that is LUA which was literally made for video game scripting and that's what official uses for the most part.

    It's not slow. If it was then official wouldn't run well while having thousands of quests running for thousands of players simultaneously. 

    0u8PXhpe2DnzKDDqJPQU0fhRQ4znUhKHEzllElUD

    LUA is on the upper left of this triangle while C++ is high performance and high versatility BUT it carries greater responsibility. This mentioned bit would probably cause core crash 🙂 That's why you should be humble and not reject the best solution.

    btw. metin2 scene is already too cluttered with mediocre developers so I'd recommend against paying someone who has questionable skills and makes too many mistakes in his paid work...

  9. Hello community, its time to give back some knowledge 🙂

    After creating your own map with WorldEditor ReMIX, there are a few steps needed to actually place it on the server.

    Server side

    1. Navigate into

    /share/locale/germany/map


    2. Create a folder, for example `metin2_new_map`, and place the following files inside. Only server_attr and settings.txt, town.txt are required

    - server_attr - copied from your clientside map folder, it holds map attributes like nonpvp zones
    - Town.txt - simply holds [x,y] respawn coords - **remember to set it or you'll spawn at 0,0** 
    - regen.txt - mob regens
    - npc.txt - npc regens
    - boss.txt - mob (boss type) regens
    - stone.txt - metin stone regens
    - Setting.txt - should be copied from clientside map folder, except for `BasePosition` value.

    BasePosition value should be set to a coordinate value of a free chunk map and then it will form a square depending on the map size (for example 6/6 will take up 6 square height and 6 square width starting from the square you picked). This can be easily done via `

    This is the hidden content, please
    ` tool.

    3. Add `metin2_new_map` to `/share/locale/germany/map/index`. Pick unique map index, preferably above 250 to avoid possible issues.
    4. Add that map index you just set to channels of your choice to CORE configs (this is often done via sh scripts depending on your sf)
    5. Run that gen_settings script
    6. Restart the server if it's already running

    More information about Town.txt:

    Town.txt is located in the map folder, on the server side. This file governs respawns (restart in the city and so on). It can contain one line w x,y but this will cause players across all kingdoms to respawn in the same place. It can also contain four lines:
    1. Jinno (Empire C) x,y
    2. Shinsoo (Empire A) x,y
    3. Chunjo (Empire B) x,y
    4. GM related respawn most likely

    Client side

    1. Edit `atlasinfo.txt` file in `pack/root` and add an entry like this:
    > metin2_new_map    BasePosition_x    BasePosition_y    WIDTH_MAP    LENGTH_MAP
    2. Pack your map along with the appropriate model assets into a .epk pack file and add it to `pack/root/index.txt`
    3. Generate Minimap .bmp image inside worldeditor, you can do this in WE sidepanel -> utility -> save atlasmap/mini
    4. Convert .bmp file to .dds with preferred software. Or this web interface
    5. Place this .dds file inside `/pack/etc/ymir work/ui/metin2_new_map.dds`
    6. Create a directory `/pack/etc/ymir work/ui/atlas/metin2_new_map` and place atlas.sub file inside, it should look like this:
     

    title subImage
    version 1.0
    image "yourmap.dds"
    left 0
    top 0
    right 256
    bottom 256

    You need to edit the dds name and right/bottom (actual size of the image).

    **Take note!** a maximum dimension of 256x256 is highly recommended. You should resize you .bmp to this resolution if it's bigger.

    There's also `pack/root/uimapnameshower.py` that's assigning map names to images that are shown upon warp etc.

    Portals (warps)

    Warp portals are a special kind of NPCs. Placing a warp portal on the map requires a few steps.

    1. Go to the coordinates you want the portal to warp to, in game.
    2. Type in `/state` command and look for your coordinates. You should see 3 different types of coordinates (Global/Warp/Local Position), what you need is the Warp Position (red).
    .png
    3. Create a mob with type 0 and battle_type 3, make sure to structure his name and locale_name like this: `name_shown warp_x warp_y`, for instance: `Yayang_Area 4002 8995`. If you don't want the portal to show any name (it will still work with the said coordinates) put a dot instead of the name_shown, like this: `. 4002 8995`
    4. Place this special warp NPC in your map's npc.txt regen `/share/locale/germany/map/metin2_new_map/npc.txt`
    5. You will also may want to place a portal frame in worldeditor.

    Start position (first login)

    If you are trying to change the starting map, it's worth noting that this can be done by editing `game/start_position.cpp`: g_start_map (map indexes) and g_start_position (coords), configurable by empire.

    Name shower

    It's also worth mentioning that `root/uimapnameshower.py` file controls what kind of image will be shown upon entering the map

    • Metin2 Dev 21
    • Good 2
    • Love 2
    • Love 10
  10. Does anyone else also have this issue where changing object Z position (height) doesn't work too well? I can move objects with SCROLL+Q but after saving/loading they're in a totally different place.

    • Good 3
  11. Anyone else has this issue with this system? Im getting it after rewarp/relog. It's caused by RefreshLockedSlot but Im not sure how to fix it

    1220 09:59:50193 :: Traceback (most recent call last):
    
    1220 09:59:50193 ::   File "networkModule.py", line 285, in SetGamePhase
    
    1220 09:59:50193 ::   File "game.py", line 105, in __init__
    
    1220 09:59:50193 ::   File "interfaceModule.py", line 452, in MakeInterface
    
    1220 09:59:50194 ::   File "interfaceModule.py", line 245, in __MakeWindows
    
    1220 09:59:50194 ::   File "uiInventory.py", line 368, in __init__
    
    1220 09:59:50194 ::   File "uiInventory.py", line 581, in __LoadWindow
    
    1220 09:59:50194 ::   File "uiInventory.py", line 679, in SetInventoryPage
    
    1220 09:59:50195 ::   File "uiInventory.py", line 1022, in RefreshBagSlotWindow
    
    1220 09:59:50195 ::   File "uiInventory.py", line 1022, in <lambda>
    
    1220 09:59:50195 ::   File "uiAttr67Add.py", line 474, in RefreshLockedSlot
    
    1220 09:59:50195 :: AttributeError
    1220 09:59:50195 :: : 
    1220 09:59:50196 :: 'int' object has no attribute 'SetCanMouseEventSlot'
    1220 09:59:50196 :: 
    
    1220 09:59:50196 :: Traceback (most recent call last):
    
    1220 09:59:50196 ::   File "game.py", line 773, in RefreshStatus
    
    1220 09:59:50198 ::   File "game.py", line 767, in CheckGameButton
    
    1220 09:59:50198 ::   File "interfaceModule.py", line 1450, in CheckGameButton

     

    • Good 1
  12. That depends on a lot of factors but generally you're looking at 5000-10.000USD if you're talking about a fully fledged server with custom graphics, nice website, some custom systems and efficient marketing. Maintenance will cost whatever you're paying your developer + ~50-100USD for infrastructure. It's a wild guess because it all depends on the type of your server, your abilities, negotiation skills and overall knowledge

  13. Simple yet not common enough QoL feature that lets miners mine in peace, even around aggressive mobs and bosses

    +++ b/Srcs/Server/game/src/char_state.cpp
    @@ -642,6 +642,10 @@ void CHARACTER::__StateIdle_Monster()
     
     	if (victim && !victim->IsDead())
     	{
    +#ifdef MOB_AI_DONT_ATTACK_MINERS
    +		if (victim->m_pkMiningEvent)
    +			return;
    +#endif
     		if (CanBeginFight())
     			BeginFight(victim);
     
    @@ -906,10 +910,17 @@ void CHARACTER::StateBattle()
     		return;
     	}
     
    +#ifdef MOB_AI_DONT_ATTACK_MINERS
    +	if (victim && victim->m_pkMiningEvent) {
    +		SetVictim(NULL);
    +		CowardEscape();
    +		return;
    +	}
    +#endif
    +
     	if (!victim || (victim->IsStun() && IsGuardNPC()) || victim->IsDead())
     	{

     

     

    • Metin2 Dev 13
    • Love 1
  14. On 10/20/2021 at 8:48 PM, EAkar said:

    SetYPosistion

     

    gives the syntax.

    syntax error?

    I think people can do work easier if you give your cpp and h files. Thank you.

    There's an U+FEFF (zero width no-break space) - invisible character near this last return in this function. 

  15. Hello community!

     

    If you're someone interested in metin2 and MMOs in general, I invite you to work with me. We will both have an opportunity to design a new upcoming pserver project.

    I dont require any technical skills as that position is already filled. Im just looking for someone creative that has vast experience with the game, especially on private servers.

     

    Tasks:
    - designing gameplay on paper

    - inventing quests and mechanics

    - judging creative decisions

    - consulting regarding the choice of mobs, dungeons and items

     

    Gratification:

    - money (!)

    - satisfaction

    - GM position possibly

     

    Feel free to send me a private message telling me something about yourself.

    Cheers! 

  16. 18 minutes ago, Karbust said:

    I made it in electron for 2 reasons, I wanted to learn how to use for a long time, and because I could use React to do it, like a website.

    I agree electron uses a lot of memory and the bundle size is big, because it bundles the entire chromium browser.

     

    I have seen an alternative that uses the system browser API instead of bundling an entire browser, however, it is made in Rust, it is Tauri, I'm not interested in learning it.

    You are more than welcome to explore it, if you already know Rust then it should be pretty straightforward.

     

    It is easy to maintain a electron application because you can have it use the same code base as the main website (if that is something the developer wants to do), just needs to add some abstraction layers to determine what API to use, if the electron, or the browser, other than that, it just works.

    And by the way, Adobe software is written in C++ (Qt), as far as I know.

    MS Teams used to use Electron but changed to WebView2: https://techcommunity.microsoft.com/t5/microsoft-teams-blog/microsoft-teams-advantages-of-the-new-architecture/ba-p/3775704

    But yeah, many companies use Electron for their applications because if makes deploying a product fast and easy.

    Not all Adobe products are written in qt, and surely not all their components. Either way, its cost-effective and easy deployment like you said. Javascript developers are also much cheaper to employ hehe

  17. 2 hours ago, FNCX said:

    what's the point of running a browser that consumes memory a lot compared to other drawing guis for patcher lmao

    Nowadays computers are much more powerful and so electron/CEF apps have become the norm. It's also easier to develop and maintain.

    Slack, MS teams, discord, whats, spotify, battle.net client, Adobe Illustrator and many others are running inside embedded browsers.

×
×
  • 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.