01-06-2006, 10:03 PM
Originally Posted By MisUnderstood
Well I was wondering how to do this myself and I just thought I would share. Though I'm not sure what shannara will think of this since I *think* he has some kinda job with pw, well not a job but ya know... So I wouldn't be too surprised if you delete it.
Well anyway I'm just gonna tell you how to convert to a normal ms rec. Nothing more.
This method works without even knowing the whole pw rec, I think I have it, but I don't know if it would be right to post it so I wont. Its not necessary anyway.
Anyway this is the normal msrec
Heres is the sub I use to convert it, well I don't use this exact sub, but this works.
[code]Public Sub ConvertToMS(ByVal filename As String)
Dim f As Integer
Dim NewMap As MapRec
Dim x As Integer, y As Integer
Dim TempByte as byte
f = FreeFile
With NewMap
Open filename For Binary As #f
Get #f, , .Name
Get #f, , .Revision
Get #f, , .Moral
If .Moral > 1 Then 'Since MS does not have an arena or savage land(I think thats the name of it)
.Moral = 0
End If
Get #f, , .Up
Get #f, , .Down
Get #f, , .Left
Get #f, , .Right
Get #f, , .Music
Get #f, , .BootMap
Get #f, , .BootX
Get #f, , .BootY
Get #f, , .Shop
Get #f, , .Indoors
For x = 0 To 15
For y = 0 To 11
Get #f, , .Tile(x, y)
if .Tile(x,y).Type = 10 Then
.Tile(x,y).Type = 2 'In pw, 10 is the number for the warppoint, which is like warpdoor, only different somehow
'So i'm just changing it to the only one warp Ms has, which is good enough
ElseIf .Tile(x,y).Type > 6 Then 'These don't exist in MS, see the bottom of the tutorial for more information.
.Tile(x,y).type = 0
.Tile(x,y).data1 = 0
.Tile(x,y).data2 = 0
.Tile(x,y).data3 = 0
End If
Next y
Next x
For x = 1 To 14
if x
Well I was wondering how to do this myself and I just thought I would share. Though I'm not sure what shannara will think of this since I *think* he has some kinda job with pw, well not a job but ya know... So I wouldn't be too surprised if you delete it.
Well anyway I'm just gonna tell you how to convert to a normal ms rec. Nothing more.
This method works without even knowing the whole pw rec, I think I have it, but I don't know if it would be right to post it so I wont. Its not necessary anyway.
Anyway this is the normal msrec
Code:
Type TileRec
Ground As Integer
Mask As Integer
Anim As Integer
Fringe As Integer
Type As Byte
Data1 As Integer
Data2 As Integer
Data3 As Integer
End Type
Type MapRec
Name As String * 20
Revision As Long
Moral As Byte
Up As Integer
Down As Integer
Left As Integer
Right As Integer
Music As Byte
BootMap As Integer
BootX As Byte
BootY As Byte
Shop As Byte
Indoors As Byte
Tile(0 To 15, 0 To 11) As TileRec
Npc(1 To 5) As Byte
End Type
Heres is the sub I use to convert it, well I don't use this exact sub, but this works.
[code]Public Sub ConvertToMS(ByVal filename As String)
Dim f As Integer
Dim NewMap As MapRec
Dim x As Integer, y As Integer
Dim TempByte as byte
f = FreeFile
With NewMap
Open filename For Binary As #f
Get #f, , .Name
Get #f, , .Revision
Get #f, , .Moral
If .Moral > 1 Then 'Since MS does not have an arena or savage land(I think thats the name of it)
.Moral = 0
End If
Get #f, , .Up
Get #f, , .Down
Get #f, , .Left
Get #f, , .Right
Get #f, , .Music
Get #f, , .BootMap
Get #f, , .BootX
Get #f, , .BootY
Get #f, , .Shop
Get #f, , .Indoors
For x = 0 To 15
For y = 0 To 11
Get #f, , .Tile(x, y)
if .Tile(x,y).Type = 10 Then
.Tile(x,y).Type = 2 'In pw, 10 is the number for the warppoint, which is like warpdoor, only different somehow
'So i'm just changing it to the only one warp Ms has, which is good enough
ElseIf .Tile(x,y).Type > 6 Then 'These don't exist in MS, see the bottom of the tutorial for more information.
.Tile(x,y).type = 0
.Tile(x,y).data1 = 0
.Tile(x,y).data2 = 0
.Tile(x,y).data3 = 0
End If
Next y
Next x
For x = 1 To 14
if x