Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Add multiple npc's to map fast


madyotto
 Share

Recommended Posts

ok so i wanted to try to make a mass AOE type game and change the amount of npc's to a map

now i can have up to 300 npc's on one map i will never use 300 but you have to delete maps to change this so i set it to 300 to play it safe (I only Recommend 100 per map)

i will actually only ever use a max of 150
pics of how this work are now at the bottom of the post

here is a NOOB friendly Tut on how to:
1\. change the max map npc's
2\. allow multi select in the map editor properties box
(so in just 3 clicks i can add 300 npc's THIS IS ALL THANKS TO = Soul and Erwin (And me for the idea lol :P)
Soul you are a real GENT

so here goes

1.  To change the the max amount of npc's per map

open your client VBP file > open mod constants

Find:
```
Public Const MAX_MAP_NPCS As Long = 30
```
you can now change the max limit to what you want
simply replace the 30 with your required amount

NEXT:
repeat the above but with your server.VBP
HINT = client and server max map npc's have to match

after you have done this YOU WILL NEED to delete all of your map files in the server side

you can now add as many as you required 

step 2\. (multi npc add)

Open your client.VBP > Right click frmEditor_MapProperties
and click view object then in the box that appears right click the lstnpc's box
then click properties

Then in the properties box
Find multi select and set the drop down to 2.extended

now right click the lstnpc's box and click view code

Now press Ctrl and F and:
find
```
  ' make sure it's not a clear
    If Not cmbNpc.List(cmbNpc.ListIndex) = "No NPC" Then
        npcNum = CLng(Left$(tmpString(0), Len(tmpString(0)) - 1))
        Map.Npc(lstNpcs.ListIndex + 1) = npcNum
    Else
        Map.Npc(lstNpcs.ListIndex + 1) = 0
    End If
```if the search doesn't find it click the search project button in the bottom left of the find box

now replace that with:
```
' make sure it's not a clear
    If Not cmbNpc.List(cmbNpc.ListIndex) = "No NPC" Then
        npcNum = CLng(Left$(tmpString(0), Len(tmpString(0)) - 1))
    Else
        npcNum = 0
    End If

    For x = 1 To MAX_MAP_NPCS
        If lstNpcs.Selected(x - 1) Then
            Map.Npc(x) = npcNum
        End If
    Next
```
and you are good to go play :)

control keys drag to select with mouse
SHIFT to select many IE. select number one scroll down hold SHIFT and click the last number in the block you want
HOLD CTRL to select only the ones you click on

PS. There is no support offered for the code as this is not my call and i can't do myself
but it is fully tested with EO 2.0.0 :) =D
Link to comment
Share on other sites

  • 4 weeks later...

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
 Share

×
×
  • Create New...