COPY & PASTE NPC’s
– A tutorial by Xlithan –
Just thought I’d contribute this small piece of code to the community. It makes adding NPCs much easier with just a few clicks of a button.
Anybody who has made large maps with a lot of NPCs knows the frustration of going through each list item one by one.
This tutorial will work for any version of Eclipse Origins, and any source code that uses a similar map properties design (Which as far as I remember,
is pretty much every version dating back to Mirage Source).
Open up your Map Properties form. You will need to create the following items:
2 Labels (Name doesn’t matter)
Place the items next to your NPC listbox like so:
Now you need to add the following code to each item (Code may vary for different sources. This was written for SkyWyre Primitive):
At the very top of the form, add:
Private CopyIndex As Long Private PasteIndex As Long
Private Sub btnPaste_Click() cmbNpc.ListIndex = CopyIndex End Sub
Private Sub btnClear_Click() cmbNpc.ListIndex = 0 End Sub
Private Sub btnClearAll_Click() Dim I As Long For I = 0 To MAX_MAP_NPCS - 1 lstNpcs.ListIndex = I cmbNpc.ListIndex = 0 Next I End Sub
Private Sub btnBatchPaste_Click() Dim I As Long Dim s As Long Dim e As Long s = txtStart.text - 1 e = txtEnd.text - 1 For I = s To e lstNpcs.ListIndex = I cmbNpc.ListIndex = CopyIndex Next I End Sub
Private Sub btnCopy_Click() CopyIndex = cmbNpc.ListIndex End Sub
And that’s all!