HomePortalCalendarFAQSearchUsergroupsRegisterLog in

Share | 
 

 Adding a new item type

Go down 
AuthorMessage
Soul
Newb
Newb


Innlegg : 17
Join date : 2009-10-18

PostSubject: 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.
UNTESTED

Client 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 NEWITEMTYPE

Under 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 Razz, but I'll try to add something more to it.
Back to top Go down
Aksel
Admin
avatar

Innlegg : 283
Join date : 2009-06-20
Age : 22

PostSubject: 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.

_________________
Back to top Go down
http://www.akselscape.com
Soul
Newb
Newb


Innlegg : 17
Join date : 2009-10-18

PostSubject: 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).
Back to top Go down
Sponsored content




PostSubject: Re: Adding a new item type   

Back to top Go down
 
Adding a new item type
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Potato2D :: Game Development :: Source Coding-
Jump to: