* *

News

Nexon has recently updated Mabinogi to a 64 bit client. This update has broken many mods in memory patchers for the time being. The mod creators are working hard to essentially rebuild all mods from scratch, and this process will take some time. Please be patient, and stay tuned for more updates.

Keep in mind that you must register an account, and be logged in to view any content on this site.

Mabinogi Status

Erinn Timer

Time
Erinn Time 14:58
Local 01:34
Server 01:34
Moongate Prior G16 [ + / - ]
11:11 Tir Chonaill
12:22 Dunbarton
13:33 Emain Macha
14:44 Bangor
14:44 Emain Macha
16:66 Emain Macha

Ceo in days.

Price [ + / - ]
01:12 Emain Macha - Island in South Pathway
01:48 Sen Mag 5th house from West
Rua [ + / - ]
01:39 Resting
02:15 Resting

Themes





Author Topic: An Introduction to Modding  (Read 8891 times)

0 Members and 2 Guests are viewing this topic.

Offline Amblegrove Esper

An Introduction to Modding
« on: May 18, 2013, 09:16:13 pm »
An Introduction to Modding
an attempt to comprehensively cover beginner modding

This is for people that wish to learn about how mods work, what files do what, and how to change things yourself. Those who can’t be bothered to learn what they’re doing to their computer; feel free to skip this guide.
Also; I am incredibly stupid, like most humans, keep this in mind as you read.

The Basics
   
   You’ll be dealing with a few things in you modding career, if you have one.

The Directory

   In your Mabinogi directory (steamapps\common\Mabinogi if you installed through Steam) you’ll see a few things, quite a few if you’re already knee-deep in modding.
   You have your executables, the Dynamic Link Libraries (.dlls,) some folders, etc.
   We’re mainly interested in the package folder, which is where the flesh of the game lies.

Flesh and Bone

   The dynamic link libraries handle most of the under-the-hood stuff of Mabinogi: how things work, what to do if so and so is currently active, the whole deal. These are the bones and muscles of Mabinogi; what drives everything.

   The package folder holds .pak files, compressed data files making up everything you see in Mabinogi. At the surface, these are unreadable, but a simple program like Mabi Unpack will decompress and extract all your greatest desires. Modifying pack files is usually harmless, making only small glitches if you screw up. .dll modification is a whole new ballpark, requiring stuff I, at this moment, have no deep understanding of.

   Don’t mess around with .dll’s unless you’re actively trying to learn about them or know what you’re doing, because like the muscles they are, if you screw up the sphincters: stomach acid will rise into your esophagus, you will uncontrollably poo, and you’re blood flow will look like rush hour in New York.
   Thankfully, .dll modification is pretty hard for someone to actually put into effect.

Package Unpacking

   Go to the Files section on this website and download Mabi Unpack, which will be the main way of you accessing files in the package folder. Once inside the package folder, you’ll see, depending on how long you’ve played, a large number or small number of files. At the bottom should be language.pack, at the top is the original package file you downloaded for Mabinogi. All files in between are updates and patches installed to your computer by the Launcher.

        Using Mabi Unpack, open the uppermost pack file, and you’re greeted by a square with a plus sign in it and the word “data.” Click the square, and you'll see an array of files! These host the flesh of Mabinogi, and where mods such as “Prop Names” and interface edits come from.
   Get used to them.
   Keep on digging through folder structures and you’ll see specific files: .pmgs, .xmls, .dds’, .datas, .areas, etc.
   Let’s go over those.

File Types

   PMG - Pleione Mesh Group - These are in-game models of everything. Buildings, players, weapons, etc. They are composed of individual “pieces” jointed together, each individual piece is mapped with a .dds graphic. If you can touch it, it’s a pmg.

   DDS - Direct Draw Surface - These are what Mabinogi uses for graphics, including model rendering and GUI elements. If you can see it (or have a lack thereof of seeing it,) it’s a dds.

   XMLS - eXstensible Markup Language - Are what Mabinogi uses to apply effects to weapons, when to display them, etc. It essentially ‘calls’ a specific effect when conditions are met. It also ‘calls’ in-game text from .txt files.

   AREAS - areas? - Maps where barriers/terrain/buildings are by calling .pmgs and using .xmls to modify said .pmgs (or their graphic effects.) If it’s built into the world, it’s an .area

   ANIS - ANImations - Used to move the individual parts of a .pmg, if it moves, it’s an .ani (with a few exceptions.)

        FRM - FRaMework - These are the 'skeletons' for pmgs, what the individual parts joint to, etc.

How Files Apply

WARNING: I DO NOT KNOW HOW MABINOGI HANDLES PACKAGE OVERLAY, THE FOLLOWING EXPLANATION IS NOT SUBSTANTIATED BY ANYTHING OTHER THAN CONJECTURE.

   From the architecture of the package folder, I think that the client, when needing to access a file, searches from the most-recent .packs until it finds the specific file. Thus, overlaying the newest .pack file (not language.pack) with modified files, changes what Mabinogi displays (or doesn’t.)
   Doing this is as easy as using the DATA Packer. Heck, the DATA packer even saves what files were modified so you can easily revert them!

Using the DATA Packer

   To use the DATA Packer, we create a new folder in the Mabinogi directory called \data\ , this folder will mimic the architecture of a update .pack. If we want to add say, a replacement of the apricot GUI interface, under \data\ we would make the folders \gfx\gui\gui_ver2, then in \gui_ver2\ place our .dds called apricot.dds. We would then launch DATA Packer, hit find, check to make sure the file was registered as found, and hit Modify!

Using a Patcher

   Using data mods (edits to the package files) is fine and dandy, but you want to see CP, or switch your default ranged attack! This is accomplished by using a Patcher, which modifies the .dlls. Doing this is much easier said than done, and explaining what I don’t know is useless. So let’s just talk about how most patchers will work.
   You download ExamplePatcher, which comes with ScrewHackshield.exe, allyouneed.dll, and changethisstuff.ini. ScrewHackshield.exe must be activated before launch, as it stops the efforts of Hackshield, Mabinogi’s method of stopping .dll modification. allyouneed.dll does the magic. We’ll be most interested in changethisstuff.ini, which can be opened by any old text editor. Each patcher is different, but generally it will list the patches it can perform, each patch followed by an equal sign then a 0 or 1. 1 generally means enabled, 0 means not-enabled. Multi-option patches may have multiple numbers, and patches like permanent-time specification will let you input the exact time.
   Pick what you want and let it work it’s magic. Exit ScrewHackshield.exe when updating, though.

Mods Provided by this Site / Using the Forums

The Types of Mods

   There are different kinds of mods you should be atleast on a first name basis with

   Patchers - This is where the magic happens, these are what gives CP reading, ranged attack swap, etc. Abyss is the one used on this site, at the moment.

   Mod Packs - These are a compilation of data mods that add utility or remove annoyances (Trading Imp,) among other things, and sometimes come with a Patcher. Tiara’s Moonshine Mod is the most popular one on this site.

   Sound/Music Packs - Replaces the .mp3 files of mabinogi with different music. This doesn’t require any DATA Packing, unless you’re dealing with files in \data\sound\

   Bots - Admit it, winemaking is a pain and so is fossil restoration. We have dedicated ‘bots’ for these kinds of annoyances. There’s two kinds; AI-modification ‘bots’ and actual ‘bots’ that take control of your computer to perform a task.
   AI-modification includes music-training bots, where you change the AI .xmls so that you, or your pets, do things differently. This has the advantage of freeing your computer to do other things, with Mabinogi minimized and your character toiling away.
   Actual ‘bots’ use various scripting languages (e.g. AutoIt) to command certain keystrokes and mouse movements to your computer. Many of these rely on user-input to locate what they're supposed to do, but some, such as fossil restoration bots, simply identify the image and go to town. AutoBot by ShaggyZE is the go-to bot for all your troubles.

   Launchers - These swap out Mabinogi’s original launchers for custom made ones. They provide debug information, look nicer, and do a lot of other cool stuff. The most prevalent one is PowerPatcher.


Using the Forums

   The Forums at Mabimods are here to help you, and also for discussion. There are a few things you need to know before you start posting, though.

   1. If you’re asking for help with an error, refer to the Error Compilation or use the Search bar to try and find your error. If the error has never appeared, or the threads that have it do not provide a solution, make a new post. Paste the error, when it happens, when it started happening, and anything else special you may notice. Most of the time errors are caused by outdated mods, so if you crash after an update, be sure to update your mods.

   2. Don’t be arrogant or haughty about things. You don’t need to make something out to be a really important or great mod, the community will do that for you if it’s honestly a decent/awesome mod.

   3. Don’t demand things. Ask for help, with a nice please and a cherry on top.

Your First Mod: From Finding the Files to Playing the (Modded) Game

What we’re doing

   We’ll be swapping the .pmgs of two weapons (Longsword and War Sword, respectively) and assigning the same effect as an ego to the Longsword. This will not involve modifying the .pmgs themselves, rather what .pmg is assigned to display a Longsword.

Finding What We’re Looking For

   First, we need to find the Longsword and War Sword’s .pmgs. We could endlessly search for them, or we could use the convenient itemdb.xml. Either extract the most recent one from the package, or the modified one you're currently using (Both should be in \data\db\)

   I highly recommend downloading Notepad++ for your .xml editing or searching, it’s highly customizable and really convenient (and free, as in free beer!)

   Anyways, press Ctrl+F and search for “Longsword” you’ll see many things, and if you keep searching you’ll see other lines of .xmls. How can we determine what we’re trying to find? By the “Text_Name0=” value, which is what the in-game name for it is. On our first search you should see something like this:
   If you have difficulty distinguishing between Text_Name0’s, you can use the ‘Generation’ ‘Season’ and ‘Sub_Season’ values to tell when that specific weapon was implemented. Our first search yields a Text_Name0="Long Sword" Generation="0" Season="0" SubSeason="0", meaning this is most likely what we’re looking for.

   Do the same for the War Sword. You should get Text_Name0="War Sword" Generation="9" Season="1" SubSeason="0" Since the War Sword was implemented by Synthesis in G9, this looks like our deal.

Navigating MabiUnpack to Find Your Items

   You should locate the “File_MaleMesh=” values on each Weapon’s code line, do so by just scrolling to the right. Followed by these are the “File_FemaleMesh=” and other values. File_MaleMesh applies to male humans and elves, File_FemaleMesh applies to female humans and elves, and File_GiantMaleMesh + File_GiantFemaleMesh apply to giants (and giantesses.)

   Pick which one(s) you’ll be using and remember their names (or write them down, having a pen+pad is always a good use for remembering what you’ve modded, or coordinating actual Mabinogi activity!)

   Now we must sift through MabiUnpack to find them. Which, honestly, isn’t too hard if you know what you’re looking for. A few key vocabulary terms when dealing with .pmgs in the package:

   Tool = Anything equipable into your arms slots: weapons, actual tools, etc.
   Mantle = Robes
   Wear = Clothing

   Most .pmgs (dealing with equippable objects) will be in \data\gfx\char\, and here’s a picture guide to what you’ll mostly be dealing with.

   So let’s navigate to \chapter3\, then to \chapter3\human (since the War Sword is not a race exclusive weapon), then to \tool\ and scroll down until you find weapon_c3_syntheticsword01.pmg. Click it and press Extract then Selected Files. Extracting to your desktop is the easiest way to quickly access your files.

   Now return to \char\, go to \human\tool\ and find weapon_longsword.pmg. You don’t need to extract this, but you do need to know where it is in the folder architecture, because you’re going to make the same folders in your \data\ folder.

   Open your mabinogi directory, and make in the \data\ folder data\gfx\char\human\tool, if you don’t already have the folders. Place inside it weapon_c3_syntheticsword01.pmg, and rename that to weapon_longsword.pmg. Do not mess around with the file type, or else Mabinogi won’t read it.

   DATA Pack it and launch Mabinogi, you should see, when equipping a Longsword, that it appears as a War Ssword!

Applying the Ego Effect: XML modding

Mabinogi’s .xml’s are a very odd business. Trying to figure out what values cause what is a trial and error run. But, that’s the fun of it!

   So, we want to apply the effect of an ego onto our new “War Sword.” Firstly, we need to know what files we’re changing. Since Mabinogi still recognizes your “War Sword” as a Longsword in every way except how it appears; we’ll be changing something about the Longsword’s files.

        Well, all tools have a .pmg, but some have a .xml of the same name which is called at the same time as the .pmg. Mabinogi automatically searches for .xml, so we don’t have to change some kind of register of what Mabinogi looks for, simply add a .xml!

        We’ll be using the War Sword’s ego specific .xml, which will allow us to have an effect matched with the .pmg we’re using. Go grab \data\gfx\char\chapter3\human\tool\weapon_c3_syntheticsword01_ego.xml then rename the file to weapon_longsword.xml and place it in \data\gfx\char\human\tool.
DATA Pack and bam! You’ll see a glowing ego effect on your Warsword!

        Let’s change it up a bit, let’s move the actual ego glow center to the tip of the sword! To do this, we’ll need to change the .xml to suit our needs.
   So open it up with Notepad++ or whatever you prefer, and you’ll see this:
   
   To save time, the offset to put the ego glow center around the tip of the War Sword should be on the L_ego_sword_body_lv1 lines and be offset=”0 -8 -52”.
   Load up Mabinogi and it’s not exactly as cool as expected, but hey, we did what we set out to do! And you have made your first mod!

Editing Files for Yourself: How to Analyze and Edit

   You’ve made your first mod, so now let’s go over each file type and what you’ll need to know when editing and what to use to edit each type!

DDS - Direct Draw Surface

   Nexon uses DDS for it’s GUI and graphics, thus meaning you’ll deal with it if you’re looking to spruce your game up. To edit it, I recommend the free Paint.NET, a low-powered kind of Photoshop, that should suffice for your editing.

   Most texture files will look like an acid trip, this is to be expected. .xmls handle what pixels show where, so a disjointed mess changes into a beautiful set of wings! For our example mod, let’s change Cichol’s wing’s to have pretty pink flowers!

   First, we have to locate Cichol’s wings, which should be in \data\material\char\etc\cichol as cichol_wing.dds. Open it up and take a look at his majestic pair!... of wings!
   It may be pertinent to ‘cordone off’ the specific areas for each texture block, be it on another layer or just mentally. Knowing which texture block goes where on a mesh is help, but sometimes undiscernable from a texture file. Thankfully, that doesn’t matter for our soon to be very kawaii Cichol wings! Grab a pretty pink flower http://www.clker.com/cliparts/3/4/y/M/K/l/pink-flower-hi.png and go to town! Save and DATA Pack to have a super kawaii Cichol!

   All joking aside, DDS modification has a wide range of use, from minimizing Mabinogi’s GUI to bringing new life to Mabinogi.

XML - eXstensible Markup Language

   Modding .xmls is a tricky business. Everyone is different from the other, but they all share basic markup syntax. So I made a cheatsheet. (This will stand until I can finalize the example mod)


    So let’s get on to our example. We’ll be applying the effect of the Grim Reaper robe to a Highlander Longbow. First off, we’ll need to find out what the Grim Reaper Robe and Highlander Longbow is called. So, if we remember correctly, we should load up itemdb.xml and get to work!

   We should find that the Grim Reaper robe (called Robe for the Grim Reaper in itemdb.xml) is under the name male_contest2010_robe_korea01. Navigate to \data\gfx\char\chapter4(when the robe was released for NA)\human\male\mantle, and grab male_contest2010_robe_korea01.xml. Open it up with Notepad++ to see what we’re dealing with.
   Next, navigate to \data\gfx\char\chapter3\human\tool and grab weapon_c3_highlanderbow01_ego.xml. While we’re not applying the ego effect on our Highlander, we are going to use it’s ego’s xml as a template and reference on where to put our effects.

   Open it up and you’ll see the effect for the ego glow center(it uses the same effect as a healing wand ego.) Copy and paste the ARM2L and ARM2R data tags under that. You’ll notice the ‘parent’ attributes are different. The parent attribute determines where the effect originates if the offset is set to “0 0 0.” We want it to be at the glow center, so change the parent attribute for both data tags to “HandtoolL.” Now delete the ego data tag, and save+rename as weapon_c3_highlanderbow01.xml under \data\gfx\char\chapter3\human\tool. Data Pack and you'll have a Highlander Longbow oozing black DEATH.

Until I can get my PMG Editor to work, comprehensive PMG and ANI editing guides will be unavailable. I apologize.


A Compiled List of Useful Links, Mods, Threads, Et Cetera.


The Essentials: Basics and Forum Usage

M - Mabinogi Frontend 6.1 / The Proffessor - [Uses Nova datapacking and is an automated beast of a mod system by one of the best]
M - The Unofficial Tiara's Moonshine Mod R151 / ShaggyZE - [Maintained data mods with PowerPatcher and Abyss patching system in a convenient installation]
M - Abyss Patcher R149 / Blade3575 - [Main patching system for the public, with support for Windows 8]
G - Master Guide to Modding / Playtime - [Still applicable despite being slightly outdated]
G - Almost all the useful things you'll need from Mabimods / Spitfire - [Once again, slighty outdated but applicable]
G - Mabiunpack and Datapacker / Fl0rn - [Much more indepth tutorial of data packing and MabiUnpack]
G - A guide for MabiMods BBCode! / Playtime - [How to use the forum's BBCode to make neat and tidy posts]
T - Rules / Marck - [Read 'em]
P - MabiUnpack / ??? - [ESSENTIAL TO MODDING]
P - MabiPackageTool / Aldeel - [Think MabiUnpack but made more UI friendly. Untranslated, though. May not open large pack files]

Offline Lady Playtime

Re: An Introduction to Modding
« Reply #1 on: May 18, 2013, 10:28:30 pm »
Very well done, my good sir.

Though, that last little bit about mods provided by this site, my thread I made should still be stickied in the client mod board.  I made a complete list of every single mod on the site, from both the forum uploaded mods, and the files section.  (outdated now, by a few months, but contains a couple years worth of mods), the thread is named "MabiMods Archive" I believe...  If you planned to have the mods themselves linked within your guide.  Otherwise, you can just ignore this completely.

I also have my master-guide to modding also stickied in the client mod board, which contains the more important guides from around the site as a compilation, as well as vast catch-all guide by me that is very much unfinished.

Within my guide for example, is Fl0rn's guide on everything data packer related, along with many other such things.

NoOneHere also has some information posted about animations and more in-depth information on PMG editing, unsure of thread locations though.


I hope the above helps you expand this, or even learn something new yourself.
Join me on Twitch, I stream!
^ Click to join me ^




Contact me by email: [email protected]. by Skype: Playtime.xel, PM me here, or say my name in a post and I'll find you!
Quote from: Marck
[12:37:42 AM] Marck: ...
[12:37:44 AM] Marck: Adam
[12:37:50 AM] Marck: You can take over MM now, I'm freaking stupid

chaoticoracle225

  • Guest
Re: An Introduction to Modding
« Reply #2 on: May 19, 2013, 02:43:02 am »
gj, we should make this a main thread topic just because you know people are...
"Erh mah gerd! I be nub, give me mods! Make me look like sailormoon transformer with wings!"

Offline Amblegrove Esper

Re: An Introduction to Modding
« Reply #3 on: May 19, 2013, 06:31:04 am »
Very well done, my good sir.
Though, that last little bit about mods provided by this site, my thread I made should still be stickied in the client mod board.  I made a complete list of every single mod on the site, from both the forum uploaded mods, and the files section.  (outdated now, by a few months, but contains a couple years worth of mods), the thread is named "MabiMods Archive" I believe...  If you planned to have the mods themselves linked within your guide.  Otherwise, you can just ignore this completely.
I also have my master-guide to modding also stickied in the client mod board, which contains the more important guides from around the site as a compilation, as well as vast catch-all guide by me that is very much unfinished.
Within my guide for example, is Fl0rn's guide on everything data packer related, along with many other such things.
NoOneHere also has some information posted about animations and more in-depth information on PMG editing, unsure of thread locations though.
I hope the above helps you expand this, or even learn something new yourself.

Thank you! I saw these, and I will link to these guides in my own. The aim of this is to provide a step-by-step, interactive approach to learning the very basics of modding so new players/modders can effectively contribute to this site. Beginners with understanding of mods are more likely to be able to address a problem themselves if they now how mods work and which files do what.

I'd like this guide to become the 'go here first, after the Rules page, guide' to new modders, with yours and many others compilation threads and specialized guides for people who want to see even more into how modding has come this far, and what they can do to go the next step!

Offline Lady Playtime

Re: An Introduction to Modding
« Reply #4 on: May 19, 2013, 08:18:33 am »
I'd like this guide to become the 'go here first, after the Rules page, guide' to new modders, with yours and many others compilation threads and specialized guides for people who want to see even more into how modding has come this far, and what they can do to go the next step!


You manage to do a better job than my guide currently is, I will very gladly make that happen for you.
You'll also need to outdo this antique guide as well.

They are currently the go-to guides for anything modding.

And as it stands, all you need to do is FINISH the guide, and you'll probably have both beat.  I gotta say, it's a darn good guide, just missing it's lower sections since it's new.
Join me on Twitch, I stream!
^ Click to join me ^




Contact me by email: [email protected]. by Skype: Playtime.xel, PM me here, or say my name in a post and I'll find you!
Quote from: Marck
[12:37:42 AM] Marck: ...
[12:37:44 AM] Marck: Adam
[12:37:50 AM] Marck: You can take over MM now, I'm freaking stupid

Offline Amblegrove Esper

Re: An Introduction to Modding
« Reply #5 on: May 19, 2013, 02:09:24 pm »
Updated guide for First Part of making your own mod.

Also, thanks for the complements Playtime and chaoticoracle! The bad thing: I have a fever, so may only update the guide once every two days or so x_x

Offline Axel!

Re: An Introduction to Modding
« Reply #6 on: May 21, 2013, 05:39:19 pm »
OH MY GOODNESS GET ME A SAILORMOON MOD WITH WINGS
Anyone mine giving me more - karma.

IGN
Miku21

Offline Amblegrove Esper

Re: An Introduction to Modding
« Reply #7 on: May 23, 2013, 11:03:11 am »
Added to the guide, fever broke after finals, so expect more content much more soon!

Offline Lady Playtime

Re: An Introduction to Modding
« Reply #8 on: June 01, 2013, 09:40:56 am »
Bumped for the sake of new content + sticky.
Join me on Twitch, I stream!
^ Click to join me ^




Contact me by email: [email protected]. by Skype: Playtime.xel, PM me here, or say my name in a post and I'll find you!
Quote from: Marck
[12:37:42 AM] Marck: ...
[12:37:44 AM] Marck: Adam
[12:37:50 AM] Marck: You can take over MM now, I'm freaking stupid

Offline M.Moses

  • Newbie
  • Posts: 1
  • 8 credits
  • View Inventory
  • Send Money To M.Moses
  • Total upvotes: 0
  • Joseph Krefetz a graduate of the [url=https://en.search.wordpress.com/?q=University]University[/url] Of Miami and longtime Florida resident Joseph "Joey" Krefetz has been an entrepreneur ever after graduating from college. Joey immediately st
Im glad I finally registered
« Reply #9 on: November 29, 2022, 08:43:49 pm »
Nicely put, Thank you!
Also visit my webpage - Maximus Moses