What is a mod?
A mod is important part of the gnurpgm ecosystem.
It enables every user to ease his game creation by combining often used functions
into a little amount of mods.
You can pack anything into a mod.
For example you can create a new single mod wich starts your very own fight system.
Also, mods that have been developed by more advanced users, can be published into
ressource repositories to help less advanced users archiving their goals more comfortable.
A mod consists of two parts:
For a bigger mind map click here.
Remember this window? This is a mod's HTML interface.
To be precise, this is the "HTML interface" of the "Add Gold Mod".
(That thing within the red border)
But why is it's tab labeld with "CMD Parameter Editor"?
Well, the "Add Gold Mod" is designed to increase a matrix value during the game.
But how much gold shall the player receive?
The interpreter script -formaly know as "the mod" - which we'll have a closer look at later on, does not know anything about this amount by itself.
That's why we have to give the mod one or more so called "parameters".
Let's pretend we want to give the player 120 gold pieces. So we fill in into the HTML interface the amount 120 gold pieces and hit the "validate and submit" button.
Afterwards, we open the "CMD DOM View" tab so we can see what information gnurpgm will use during your game's runtime.
By the way, the "CMD DOM View" represents the execution stack of an event. It shows which mods are going to be called in what order and with what parameters.
If you take a closer look to the highlighted line which begins with "add_gold" you will notice the syntax of those so called "CMD"s and the way they want to tell the mod that we want to add 120 gold pieces.
It goes like this (ignore the whitespaces between the words):
MOD_NAME ( PARAMETER_NAME='PARAMETER_VALUE' );
Multiple parameters are comma seperated, like this:
Before we continue we gonna get our vocabuary straight:
So why am I bothering you with all those dirty details?
Because you might want to check on those things once you encounter any trouble or possible bugs.
So, the HTML interface is basicaly a simple HTML file, but there are some things you must keep in mind, so let's checkout the Add Gold Mod's HTML file:
Is not much for a website, ain't it?
However I highlighted the 4 important areas of this html interface: