NewArmoursMod v1.3 Available

Talk about Severance Blade of Darkness modifications and maps here. No tips or tech support questions please, use the forum above. Note that the game is rated 18 so some content may be unsuitable for younger readers.

Moderators: Ade, prospero

User avatar
IrateGiant
Dragon
Posts: 328
Joined: Fri Jan 08, 2010 12:35 pm
Location: Spain
Contact:

NewArmoursMod v1.3 Available

Postby IrateGiant » Mon Apr 26, 2010 12:54 pm

Hey guys!

I have the idea of creating a mod that adds to the main game the heavy armor and medium armor of the dwarf and the barbarian, but the problem is that it is necessary to change many files. [:(]

Can you explain in steps how to create a mod that works from the "BODLoader" and replace the neccessary files? [;)]

Sir Random
Dragon
Posts: 737
Joined: Thu Nov 15, 2001 12:58 am
Location: Ireland
Contact:

Postby Sir Random » Mon Apr 26, 2010 1:32 pm

You just need to add a copy of BLModInfo.py to your mod folder, and edit it to show Your Modname and install Your files.

The syntax for replacing files is:
############## 'MOD VERSION of FILE' ###### /DESTINATION FOLDER
RepFiles[0] = {'File': 'Your_New_System_File_1', 'Dest': '../../Scripts'}
RepFiles[1] = {'File': 'Your_New_System_File_2', 'Dest': '../../Scripts'}

What files do you need to replace? There may be a way to do what you want without actually replacing system files.

User avatar
IrateGiant
Dragon
Posts: 328
Joined: Fri Jan 08, 2010 12:35 pm
Location: Spain
Contact:

Postby IrateGiant » Mon Apr 26, 2010 2:24 pm

Thanks SR, I need to modify the following files:

Replace: "dwf.mmp"

Add: "BarSkin3.mmp" to "3DChar"

Edit: "BodLink.list", "Reference.py", "ObjIds/Spanish.py" and "Enemies.py"

Finally: edit all files ".lvl" of the main game to display the textures. [xx(]


P.S. Tomash, I used your skin "Barskin3.mmp" from "Diablozation" for the Mod, thanks again. [;)]

User avatar
Tomash
Dragon
Posts: 246
Joined: Sat Oct 25, 2008 11:23 am
Location: Russia
Contact:

Postby Tomash » Mon Apr 26, 2010 3:04 pm

Barskin3 is not my work, russian BoDer Raukangren made it for me

About BodList
It is not good to replace it, because some old mods do it too. And the same about Reference.py.
U can make this changes in the maps using levelmaker's methods. So your mod will add the modified version of Reference.py and LVL-file to folder of each map. And u can use "InitNewChars" method to load the new custom BOD's without replacing of BodList. It need some more code but it is easy and "painless"

About dwf.mmp
Some BoDers like to replace it and textures of other characters for fun. So it is not good to replace it with mod too. If u add the new file BarSkin3.mmp and add the path in LVL-files then u can make the new file DwfHA.mmp with your textures and use the same way.

User avatar
prospero
Ancient Dragon
Posts: 1725
Joined: Wed Nov 21, 2001 1:42 am
Location: United Kingdom

Postby prospero » Mon Apr 26, 2010 3:26 pm

Beware the RepFiles thing. The problem is, if you install a mod with this feature and then you install another one that replaces files and uninstall it, the files that were originally replaced get overwritten by the files from the new mod. The whole thing could become very confusing and the original files may be lost. RepFiles works OK if only one mod at a time does it. [;)]

Sir Random
Dragon
Posts: 737
Joined: Thu Nov 15, 2001 12:58 am
Location: Ireland
Contact:

Postby Sir Random » Mon Apr 26, 2010 4:09 pm

Ok,
you may have a problem replacing "ObjIds/Spanish.py", because "Spanish.py" is only in the Spanish version (my installation has "English.py")

You'll need to use something like this:

Code: Select all

import Language if Language.Current == 'Spanish': RepFiles[0] = {'File': 'Spanish.py', 'Dest': '../../Data/ObjIds/'} elif Language.Current == 'English' RepFiles[0] = {'File': 'English.py', 'Dest': '../../Data/ObjIds/'}
With an 'elif' clause for each languages (or is it just Spanish & English?)

Obviously, you'll need to make a new version of English.py, and any other 'Language.py' supported by BoD.


It's a lot of work, editing all the .lvl files etc., but I don't see any way around it. Just make sure to test everything thoroughly before releasing (like saving/loading games while wearing the new armour).

EDIT\
As Tomash & Pro pointed out, replacing system files can have a knock-on effect for other mods.
If someone installs your mod, and then UNinstalls another mod which had also replaced 'Reference.py', then your mod will stop working.

How will players get the new armours? will you be placing them in certain maps?

User avatar
IrateGiant
Dragon
Posts: 328
Joined: Fri Jan 08, 2010 12:35 pm
Location: Spain
Contact:

Postby IrateGiant » Mon Apr 26, 2010 9:21 pm

Thanks SR, Tomash and Pro for the clarification, but certainly, i have no idea how to do the Mod. [V]

Could you explain me a little tutorial as I should do the Mod to avoid the knock-on effect to the other mods? [:(]

SR:

The armours, they 'll be placed in hidden locations. [:D]

Tomash:

Thanks to Raukangren by the skin. [;)]

EDIT\

One idea, the mod may be enabled or disabled with the "BODLoader?, Could restore the old files? [B)]

User avatar
prospero
Ancient Dragon
Posts: 1725
Joined: Wed Nov 21, 2001 1:42 am
Location: United Kingdom

Postby prospero » Tue Apr 27, 2010 11:49 am

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by IrateGiant</i>



One idea, the mod may be enabled or disabled with the "BODLoader?, Could restore the old files? [B)]
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

This ia exactly my point. The BODloader will replace the original files, but it someone else's mod is installed and it uses the same method, when you install your mod the original files will not be there.


If I understand your intention correctly, you want to place a number of objects - armour in this case in various locations in all the maps thoughout the game. Easy enough. You just need to copy the objs.py from all the maps, add the creation code for your new armour and put them in separate subfolders within your mod. If you need to alter the stats for the objects, you would need to put some code in DefFuncs.py of all the maps and add them to your mod. New .mmps would have to be loaded in the .lvl files of all the maps. You <i>could</i> use the RepFiles method to save copies of the original files. But as I say, this only works until someone else makes another mod that does the same.

User avatar
Tomash
Dragon
Posts: 246
Joined: Sat Oct 25, 2008 11:23 am
Location: Russia
Contact:

Postby Tomash » Wed Apr 28, 2010 9:26 am

If i would make this mod then i'll do it so:

Mod includes files:
BarSkin3.mmp
Edited DefFuncs.py and edited LVL-file for each map
Edited Objs.py for maps where the armour is placed
BLModInfo.py
Readme.txt


BLModInfo contains code like:

import os

global ModName
global ModDesc
global ModVersion
global ModAuthor
global ModAuthorInfo
global NewFiles
global RepFiles

####################################################################################
# Mod Info
####################################################################################
# Mod Name
ModName = "Armour Mod"
ModDesc = (""" New armour """ )
# Mod Version
ModVersion = "1.0"
# Author name
ModAuthor = "IrateGiant"
# Author info
ModAuthorInfo = "somethingl"

####################################################################################
# Mod Data
####################################################################################

# New Files added by Mod and destination directory

NewFiles[ 0] = {'File': 'BarSkin3.mmp' , 'Dest': '../../3DChars'}

# Volcano
RepFiles[0] = {'File': 'Volcano/DefFuncs.py', 'Dest': '../Volcano_M14'}
RepFiles[1] = {'File': 'Volcano/volcano.lvl', 'Dest': '../Volcano_M14'}
RepFiles[2] = {'File': 'Volcano/objs.py', 'Dest': '../Volcano_M14'}

# Tel Halaf
RepFiles[3] = {'File': 'TelHalaf/DefFuncs.py', 'Dest': '../Labirinth_M6'}
RepFiles[4] = {'File': 'TelHalaf/labyr.lvl', 'Dest': '../Labyrinth_M6'}

# Nemrut
... and the same for all maps

User avatar
Tomash
Dragon
Posts: 246
Joined: Sat Oct 25, 2008 11:23 am
Location: Russia
Contact:

Postby Tomash » Wed Apr 28, 2010 9:59 am

Be careful with file-names and paths. If there is wrong one then mod can't be installed

Edited LVL-file

#U should add lines

Bitmaps -> ..\\..\\3dchars\\BarSkin3.mmp # Armoured person
Bitmaps -> ..\\Barb_M1\\NOBJS.mmp # Coraza3

Edited DefFuncs

# Add lines

Reference.DefaultObjectData['Coraza3']= [11, "Bar", 2 , 50] # Turn the obj to armour type, the last param (50) is a defense that armour gives
Reference.DefaultSelectionData['Coraza3']=(8.0,4000.0, "Barbarian Medium Armour") # May be lost after the loading of the saved game

bar=Bladex.GetCharType("Barbarian_N","Bar")
bar.MedArmour="BarSkin2" # Link a mesh (3D model, not textures) to the level of armour

Edited objs.py

# U know what to do

It is nice that Barb can use original model BarSkin2 and original model Coraza3 and u don't need to load a new custom models. But Dwarf need the new model

User avatar
IrateGiant
Dragon
Posts: 328
Joined: Fri Jan 08, 2010 12:35 pm
Location: Spain
Contact:

Postby IrateGiant » Wed Apr 28, 2010 2:27 pm

Thanks Tomash!, now i´m editing the files but i have many doubts:

1)I create the file "BLModInit.py", but i don´t understand the code that i need to put here.

2)Need i edit all "DefFuncs" files for all maps or only for the maps where is the armours?

3)Here i put a image from my mod the folder:

Image

User avatar
Tomash
Dragon
Posts: 246
Joined: Sat Oct 25, 2008 11:23 am
Location: Russia
Contact:

Postby Tomash » Wed Apr 28, 2010 3:46 pm

2) Yes, edited DefFuncs is required only for the maps where armours are placed
3) If you edit DefFuncs then you don't need to edit Enemies.py and Reference.py
1) About BLModInit. Hmm... It seems you can make a module with the code of your mod and import it with BLModInit. It may make the work easy. But i need to test it.

User avatar
IrateGiant
Dragon
Posts: 328
Joined: Fri Jan 08, 2010 12:35 pm
Location: Spain
Contact:

Postby IrateGiant » Wed Apr 28, 2010 9:05 pm

Ok, this is the code for the file "BLModInfo.py":


####################################################################################
## BODLoader
####################################################################################

####################################################################################
# Global variables
####################################################################################

import os

global ModName
global ModDesc
global ModVersion
global ModAuthor
global ModAuthorInfo
global NewFiles
global RepFiles

####################################################################################
# Mod Info
####################################################################################
# Mod Name
ModName = "NewArmoursMod"
ModDesc = (""" New armours for Dwarf and Barbarian """ )
# Mod Version
ModVersion = "1.0"
# Author name
ModAuthor = "IrateGiant"
# Author info
ModAuthorInfo = "..............."

####################################################################################
# Mod Data
####################################################################################

# New Files added by Mod and destination directory

NewFiles[0] = {'File': 'BarSkin3.mmp' , 'Dest': '../../3DChars'}

# New Files replaced by Mod and destination directory

RepFiles[0] = {'File': 'Enemies.py' , 'Dest': '../Scripts'}
RepFiles[1] = {'File': 'Reference.py' , 'Dest': '../Lib'}
RepFiles[2] = {'File': 'BODLink.list' , 'Dest': '../Blade'}
RepFiles[3] = {'File': 'Spanish.py' , 'Dest': '../ObjIds'}
RepFiles[4] = {'File': 'dwf.mmp' , 'Dest': '../../3DChars'}
RepFiles[5] = {'File': 'Dwfskin2.mmp' , 'Dest': '../../3DChars'}

# Mine
RepFiles[6] = {'File': '/mine.lvl', 'Dest': '../Mine_M5'}

# Tel Halaf
RepFiles[7] = {'File': 'TelHalaf/labyr.lvl', 'Dest': '../Labyrinth_M6'}

# QueensT
RepFiles[8] = {'File': '/tomb.lvl', 'Dest': '../Tomb_M7'}

# Karum
RepFiles[9] = {'File': '/island.lvl', 'Dest': '../Island_M8'}

.
.
.

Here my doubts:

1)How I do put the maps "_back" in this file?

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">
Originally posted by Tomash

3) If you edit DefFuncs then you don't need to edit Enemies.py and Reference.py<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
2)You mean it isn´t necessary to include the files "Enemies.py" and "Reference.py" in my folder, if I edit "DefFuncs.py?

EDIT\

I remember one thing, besides of "BarSkin3" and "dwf.mmp", also i need replace a texture: "DwfSkin2" [:D]

This is starting to be very confusing [xx(] [:)]

User avatar
Tomash
Dragon
Posts: 246
Joined: Sat Oct 25, 2008 11:23 am
Location: Russia
Contact:

Postby Tomash » Thu Apr 29, 2010 9:25 am

Good news!
I found a way to make what you want with minimum changing of the source files.
Only objs-files for armour-including maps need to be edited.
And you can load the custom models and textures easily

What maps do you want to place the new armours?

User avatar
IrateGiant
Dragon
Posts: 328
Joined: Fri Jan 08, 2010 12:35 pm
Location: Spain
Contact:

Postby IrateGiant » Thu Apr 29, 2010 11:56 am

Great news Tomash! [:D]

I want to put the new armours in "Dwarf_M3" and "Volcano", and I hope to show it soon. [;)]

Thanks again


Return to “Severance BoD: Modding Community”

Who is online

Users browsing this forum: No registered users and 2 guests

cron