Jump to content

How to add extra equipment slots to a character's inventory page.


Recommended Posts

How to add extra equipment slots to a character's inventory page.

UI_scale_Off.thumb.jpg.22adf85502b1ac620c0b7ed11113de35.jpgUI_Seraphim_Inventory_modded07.thumb.jpg.b139cd53008e6be80da9f06d710a9546.jpg
Note, that:

a) This doesn't create new slots but adds existing slots from other classes to a class which doesn't have them. Namely 2 more ring slots, an extra amulet slot, the shrunken head from the Dryad, and the battery from the temple guardian.
b) There's no model for the battery. I had thought that it appeared on the Temple guardian, but after checking an actual temple guardian, it doesn't get displayed.
c) You don't get the ability to shoot with it. Probably a specific skill that only the temple guardian gets that requires a battery to be equipped.
d) I didn't implement the shrunken head as well, but unless that does something different, I don't see how that wouldn't work.
e) Combat art bonuses that spawn on the battery will probably be only for the temple guardian. I didn't look at the specific bonuses that the bonus lists choose from.
f) When you select an equipped weapon, it's damages appears to change based on the damage of the battery, but I don't think it actually applies(My limited testing didn't show any difference in damage actually dealt). If you select an empty weapon slot your damage doesn't appear to change. But you do get the additional bonuses. Well they appear on the stats tool tip anyway.
g) This isn't an actual mod, but more an example of research showing that equipment slots can be added. That's how it started out anyway.

Now onto the method.
First open scripts/shared/creatureinfo.txt.
The first entry is the Seraphim.
Change line 20, validEquipSlots = "", to include the 2 additional rings, 1 additional amulet, the battery, and shrunken head, as shown in the picture.

ValidEquipSlots.thumb.JPG.8ecdf5f4537754f14b68a1f86facc636.JPG
Save and close the file.

Second, open scripts/server/blueprint.txt.
Search for: hero_battery_normal
It'll probably be around line 3249.
Change the wearergroups so that it is WEARGROUP_DEFAULT, just like in the picture.

Blueprint.JPG.1f3468422e3be796c6889b8cab4466ed.JPG
Save and close the file.
Notice the 2 itemtypes: 8635, 8636.

Third open scripts/server/itemtype.txt
Search for 8635. About line 212196.
You should see: mgr.typeCreate(8635, newItemType);
On line 212187, change user = so that is WEARGROUP_DEFAULT.
Do the same for the next itemtype which will be 8636.Itemtypes.thumb.JPG.7d2443bb37f62c41bf0900472852fd87.JPG
Refer to the picture.


Save and close the file.
These changes allow the seraphim to equip the batteries.
Now, we'll cover adding the equipment slots to the user interface(UI).

In your Sacred 2/pak folder, create 2 new folders, one named Windows and another named orig_skin-xml, and extract the contents of skin-xml.zip into it.
From orig_skin-xml/Windows copy Inventory.xml, and Inventory_Seraphim.xml, then paste them into your Sacred 2/pak/Windows folder.

I do plan on providing an overview for the xml files at a later time.

Open Inventory.xml.
Search for: handicap. if you're using CM 1.60 it should be around line 156.
On the next line, change the value for x to 328.

Inventory.JPG.31a9908beaec314003821be3c0554122.JPG
Save and close the file.

Open Inventory_Seraphim.xml.
Make the necessary changes as can be seen in the picture. Pretty vague, yes, but there are a large number of changes.

Inventory_Seraphim.thumb.JPG.24b005c148ecbb7c2b02316d5ece44b6.JPG
Save and close the file.
Run the game and start a new seraphim. You could use an existing seraphim, in which case I recommend backing it up just in case.
Any batteries, well as long as they're of the first 2 types, will go into the equipment slot, the same with the extra rings and amulet.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...
Please Sign In or Sign Up