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

Help with lengths


X-Weaver
 Share

Recommended Posts

I think this should be moved to Source Questions. Anyway:

Go in **modTypes** in both the **Server** and **Client** source files. Find this:

```
Type MapRec
    Name As String * 20
```
Change it to this:

```
Type MapRec
    Name As String * #
```
The number you put in the **#** sign will be how long you can make the name of your maps. Remember to change this in both the **Server** and **Client**.

Also, on the **Client**, be sure to open up **frmMapProperties**. Click on the TextBox next to the words "Map Name." Look at its properties. Find something called "MaxLength." It should be set to 20\. Change it to the same number you've changed your map name lengths to.

**If you do this, you will have to either remake all of your maps or make a map converter because it changes the format of the maps. All of the maps you've already created will be unusable unless you create a map converter or remake them.**
Link to comment
Share on other sites

  • 2 weeks later...
@Soroki:

> How does it work? I noticed instead of a number in the Type for NPCs and items, it has NAME_LENGTH or something like that. Do i replace that with numbers?
>
> EDIT:BUMP. Need an answer. Thank you.

What you are looking for is this or something similar In ModTypes:

```
Type MapRec
    name As String * 20
    Revision As Integer
    Moral As Byte
    Up As Integer
    Down As Integer
    Left As Integer
    Right As Integer
    music As String
    BootMap As Integer
    BootX As Byte
    BootY As Byte
    Shop As Integer
    Indoors As Byte
    Tile() As TileRec
    Npc(1 To 15) As Integer
    SpawnX(1 To 15) As Byte
    SpawnY(1 To 15) As Byte
    owner As String
    scrolling As Byte
    Weather As Integer
End Type

```
You want to edit this:
```
Name as String * 20

```
Change the number 20 to what you want the Length to be.
It has to be done BOTH client side and server side…

Note: Read what Kimimaru Said please =D
Link to comment
Share on other sites

Actually I wasn't looking for that at all. I read what the other user was looking for. I was inquiring about changing other attributes such as length of item names.

Example:

> ' General
>     Name As String * NAME_LENGTH
>     Guild As String
>     GuildAccess As Byte
>     Sex As Byte
>     Class As Integer
>     Sprite As Long
>     LEVEL As Integer
>     Exp As Long
>     Access As Byte
>     PK As Byte

Note the line "NAME_LENGTH", I was asking if simply changing "NAME_LENGTH" would work the same way as the map name, or if something different needed to be done. Please read what I wrote, as simple as it was.
Link to comment
Share on other sites

The term **NAME_LENGTH** is a constant variable declared in **modConstants**, I believe. It is equal to **20**. Replacing the entire variable with a number would work. You would probably do it like so:

Original statement:

```
Name As String * NAME_LENGTH
```
Modified statement:

```
Name As String * 40
```
This would work for **items**, **shops**, **elements**, and anything of the sort. I've just changed the maximum length of the name from **20** to **40**.

I hope this answers your question.
Link to comment
Share on other sites

@Soroki:

> Actually I wasn't looking for that at all. I read what the other user was looking for. I was inquiring about changing other attributes such as length of item names.
>
> Example:
> Note the line "NAME_LENGTH", I was asking if simply changing "NAME_LENGTH" would work the same way as the map name, or if something different needed to be done. Please read what I wrote, as simple as it was.
>
> D: Oh dear, I didn't see the change in users asking questions x____x whoops.
Link to comment
Share on other sites

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