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

Map converter from Stable to Origins?


Gimulex
 Share

Recommended Posts

@PokemonEarthOnline:

> No help for stables.

Don't backsteat moderate.

I have decided to let this topic stay simply because it is being pointed in the right direction. I hope someone will help you convert over to the EO map format.
Link to comment
Share on other sites

I posted this somewhere else as well, but if you have some basic knowledge of programming and you know what you need to find in this code and change (basicly compare the maprec) then you'll probably be able to do it yourself. Trying to do things yourself is always a great way to learn.

```
Sub ConvertOldMapsToNew()
Dim FileName As String
Dim i As Long
Dim F As Long
Dim X As Long, Y As Long
Dim OldMap As OldMapRec
Dim NewMap As MapRec

    For i = 1 To MAX_MAPS
        FileName = App.Path & "\maps\map" & i & ".dat"

        ' Get the old file
        F = FreeFile
        Open FileName For Binary As #F
            Get #F, , OldMap
        Close #F

        ' Delete the old file
        Call Kill(FileName)

        ' Convert
        NewMap.Name = OldMap.Name
        NewMap.Revision = OldMap.Revision + 1
        NewMap.Moral = OldMap.Moral
        NewMap.Up = OldMap.Up
        NewMap.Down = OldMap.Down
        NewMap.Left = OldMap.Left
        NewMap.Right = OldMap.Right
        NewMap.Music = OldMap.Music
        NewMap.BootMap = OldMap.BootMap
        NewMap.BootX = OldMap.BootX
        NewMap.BootY = OldMap.BootY
        NewMap.Shop = OldMap.Shop
        For Y = 0 To MAX_MAPY
            For X = 0 To MAX_MAPX
                NewMap.Tile(X, Y).Ground = OldMap.Tile(X, Y).Ground
                NewMap.Tile(X, Y).Mask = OldMap.Tile(X, Y).Mask
                NewMap.Tile(X, Y).Anim = OldMap.Tile(X, Y).Anim
                NewMap.Tile(X, Y).Fringe = OldMap.Tile(X, Y).Fringe
                NewMap.Tile(X, Y).Type = OldMap.Tile(X, Y).Type
                NewMap.Tile(X, Y).Data1 = OldMap.Tile(X, Y).Data1
                NewMap.Tile(X, Y).Data2 = OldMap.Tile(X, Y).Data2
                NewMap.Tile(X, Y).Data3 = OldMap.Tile(X, Y).Data3
            Next X
        Next Y

        For X = 1 To MAX_MAP_NPCS
            NewMap.Npc(X) = OldMap.Npc(X)
        Next X

        ' Set new values to 0 or null
        NewMap.Indoors = NO

        ' Save the new map
        F = FreeFile
        Open FileName For Binary As #F
            Put #F, , NewMap
        Close #F
    Next i
End Sub
```(and if it doesnt work out, I'm sure you can PM one of the guys who offered to do it for programming advice, free knowledge yumyum)
Link to comment
Share on other sites

  • 2 years later...
I know this is really REALLY late, but if anyone still needs this i have made a converter - by default it is meant to convert to Eclipse Dream Worlds(needs a little customization done to it even on a clean version cause i changed some values to make it compatabile with a modified Eclipse Evolution engine)

If anyone wants it i can help them fix it to their systems.
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...