Basic getmod php editing tutorial

1 post / 0 new
#1
Basic getmod php editing tutorial

Personally, I feel that one of the most complex part of adding multiple mods to neoscavanger would be editing the getmod.php files for each newly added mod, and I wish to compile a list of things needed to do to edit the php file, and to make the mods load when the game boots up.

So to give you an example, let's start with a clean Neo Scavanger game, with no mods whatsoever. With that in mind, let's add in M(m)Mod into the game. The getmod.php file for the mod looks like this:

nRows=5
&strModName0=FoD&strModURL0=FieldsofDead
&strModName1=0&strModURL1=FieldsZero
&strModName2=SP&strModURL2=SagesPages
&strModName3=MoD&strModURL3=M(m)MoD
&strModName4=0&strModURL4=MoDZero

Before we move on, let's focus on three key parts of this php file: the nRow, &strModName and the &strModURL.
nRow: M(m)Mod contains 5 individual mods, and so the nRow of this file equals to 5; as we add more mods, we need to increase nRow by 1 for each individual mod added.

&strModName and &strMod URL represents the name of the individual mod, and where to look for it in the folder the getmod.php file is in. Please note that you must add the folders with the exact names (i.e. FieldsofDead) into the same folder as the php file, not the "mod" folder some mods come in. The numbers at the end of each string of words (zero, one, two, three, and so on) represents its load order, with zero being loaded first.

Well, let's try adding another mod into the game. Depth of Gyges looks fun; and its php file looks like this:

nRows=2
&strModName0=DoG&strModURL0=Depths of Gyges
&strModName1=0&strModURL1=DoGZero

Great! let's just haphazardly past this file into the php file and see what comes of it:

nRows=5
&strModName0=FoD&strModURL0=FieldsofDead
&strModName1=0&strModURL1=FieldsZero
&strModName2=SP&strModURL2=SagesPages
&strModName3=MoD&strModURL3=M(m)MoD
&strModName4=0&strModURL4=MoDZero
nRows=2
&strModName0=DoG&strModURL0=Depths of Gyges
&strModName1=0&strModURL1=DoGZero

...and the game does not launch anymore. That is because we simply cannot merge two individual mods together without removing and editing the three aforementioned features in the php:

There can only be one nRow in the php, and it must reflect the number of mods you are trying to load.
The &strmodname and &strmodurl needs to have their numbers changed to reflect their load order.

Fortunately for us, M(m)Mod gave us an example of what you're supposed to write for the php file:

nRows=7
&strModName0=FoD&strModURL0=FieldsofDead
&strModName1=0&strModURL1=FieldsZero
&strModName2=SP&strModURL2=SagesPages
&strModName3=MoD&strModURL3=M(m)MoD
&strModName4=0&strModURL4=MoDZero
&strModName5=DoG&strModURL5=Depths of Gyges
&strModName6=0&strModURL6=DoGZero

as you can see, the nRow from Depth of Gyges is removed, and the nRow we've originally had from M(m)Mod is changed to 7 to reflect that there are now 7 files in the game, and the &strmodname and &strmodurl for both the Depth of Gyges and DoGzero (mod files from depth of gyges) is changed from 0 and 1 to 5 and 6 , in order to reflect that the mods needs to be loaded after M(m)Mods.

And that's all there is to editing the php file: nRow strModnames and strModURL are the three features you need to edit in order to make the game work.

As a final exercise, let's add in another mod: Big Bad Cheater. M(m)Mod recommended for the php file to look like this:

nRows=7
&strModName0=FoD&strModURL0=FieldsofDead
&strModName1=0&strModURL1=FieldsZero
&strModName2=SP&strModURL2=SagesPages
&strModName3=BBC&strModURL3=BigBadCheater/New
&strModName4=0&strModURL4=BigBadCheater/Over
&strModName5=MoD&strModURL5=M(m)MoD
&strModName6=0&strModURL6=MoDZero

However, we cannot simply use this getmod.php as we have Depth of Gyges to think about as well! This means that we have to add in lines from the mod the old fashioned way. However, let's note that Both mod files from the big bad cheater file ("New" and "Over) are wedged in between "Sages Pages" mod and "M(m)Mod", which means we have to do that as well. So, with this in mind, we need to load these Big Bad Cheater files before M(m)Mod, and after sages pages. The php file should now look like this:

nRows=9
&strModName0=FoD&strModURL0=FieldsofDead
&strModName1=0&strModURL1=FieldsZero
&strModName2=SP&strModURL2=SagesPages
&strModName3=BBC&strModURL3=BigBadCheater/New
&strModName4=0&strModURL4=BigBadCheater/Over
&strModName5=MoD&strModURL5=M(m)MoD
&strModName6=0&strModURL6=MoDZero
&strModName7=DoG&strModURL7=Depths of Gyges
&strModName8=0&strModURL8=DoGZero

It is important to now that the nRow is now 9, and load order for the depth of Gyges mods, which used to be 5 and 6, is now 7 and 8.

I really hope this example helped you on organizing your getmod.php files; if your file still doesn't work, just remember that you need to edit the numbers for both the &strModName as well as the &strModURL, and don't forget to change the number in nRow as well. Here's hoping your neoscavanger modding adventure is a fun and rewarding experience!