Soul Newb
Innlegg : 17 Join date : 2009-10-18
| Subject: Adding a new item type Thu Nov 19, 2009 7:28 pm | |
| Well, you probably won't have to, but in case someone would ever want to, it's here. WARNING: This (might) make you have to reset your Items, I didn't have too, but my items were empty, so that might be why.UNTESTEDClient Side: In modEnumerations under Public Enum Equipment before Equipment Count add: - Code:
-
NEWITEMTYPE
In modGameLogic under Sub UpdateDescription, find the ' Check and write item type and under the if that follows add before the End If: - Code:
-
ElseIf Item(GetPlayerInvItemNum(MyIndex, InventoryItemSelected)).Type = ITEM_TYPE_NEWITEMTYPE Then frmInventory.lblType.Caption = "NEWITEMTYPE"
Under in frmItemEditor (Code) under Sub cmbType_Click() add: - Code:
-
If (cmbType.ListIndex = ITEM_TYPE_NEWITEMTYPE) Then fraEquipment.Visible = True scrlStrength_Change scrlDurability_Change End If
This part is a little tricky if you know what your don't know doing: Under frmItemEditor, in cmdType, go to "List" and add NEWITEMTYPEUnder modConstants, go to Item Constants and add: - Code:
-
Public Const ITEM_TYPE_NEWITEMTYPE As Byte = 20
Now, under modConstants, go to the Equipment Constants and add: - Code:
-
Public Const EQUIP_TYPE_NEWITEMTYPE As Byte = 20
Now, under frmEquip copy an existing picture box, and change it's Index to 20. ------------------------------------------------------------------------------------------------------------------------------------------------------------ This part is Server-Side: Under modConstants, under Item Constants, add: - Code:
-
Public Const ITEM_TYPE_NEWITEMTYPE As Byte = 20
Under modConstants, under Equipment Constants, add: - Code:
-
Public Const EQUIP_TYPE_NEWITEMTYPE As Byte = 20
Under modEnumerations under Public Enum Equipment add: - Code:
-
NEWITEMTYPE
------------------------------------------------------------------------------------------------------------------------------------------------------------ Done, change NEWITEMTYPE to the name of the new item you want to make. Essentially, this does absolutely nothing yet , but I'll try to add something more to it. | |
|
Aksel Admin
Innlegg : 283 Join date : 2009-06-20 Age : 28
| Subject: Re: Adding a new item type Fri Nov 20, 2009 12:07 am | |
| Nice job!
I've added lots of item types myself this way. | |
|
Soul Newb
Innlegg : 17 Join date : 2009-10-18
| Subject: Re: Adding a new item type Fri Nov 20, 2009 3:20 pm | |
| - Aksel wrote:
- Nice job!
I've added lots of item types myself this way. I'm going to try and make them do something, like run something in the source (Sourced Items). | |
|
Sponsored content
| Subject: Re: Adding a new item type | |
| |
|