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

santa-clause

Members
  • Posts

    705
  • Joined

  • Last visited

    Never

Everything posted by santa-clause

  1. Mrmiguu can you add quests ,pets and the ban system was broke in the next update of PVO???? And BTW i love the engine (Im also using it and adding the pets and quests myself) i fixed the ban system by changing filename into "appdata/data/banlist.txt" or something like that And the map properties is also bugged especially the music
  2. the pet system is freezing and the petis attacking the dude that summoned the pet and also if the summoner attacks the pet it also crashes) i think the feeze is cause of that there is only a left and a right direction and a jump and fall down. anyway here is the source codes (srry but i couldnt add some screenshots cause my pc was lagging) music in map isnt working also (doesnt save or load) BTW i use PVO (Project Vertigo) engine I FIXED IT MYSELF
  3. I wasnt misleading you all i was just showing some examples of how the engine looks like now.
  4. It is an engine that is made by Ryzom dudes i just downloaded it and i am making my own graphics at the moment and developing it for the rest so its not the same like Ryzom. Link to engine website(i searched a hole week to find this engine and i love it) : [http://dev.ryzom.com/projects/ryzom/wiki](http://dev.ryzom.com/projects/ryzom/wiki) It isn't plagiarism cause it is open-source (:P) I'M NOT A THIEF!!!!!
  5. Recruiting: * Gui designer * C++ programmer (doesn't need lots of experience) * Web developer (with Mysql and php experience This game is fully free so all the developers have to work for free screenshots (Is from the engine maps are still undr construction fully redoing the hole engine): >! ![](http://www.freemmorpgmaker.com/files/imagehost/pics/f2c9d0868ba9a2877fea3565e293039d.jpg) ![](http://www.freemmorpgmaker.com/files/imagehost/pics/504602652da0fb722bb4e3070af7b85c.jpg) ![](http://www.freemmorpgmaker.com/files/imagehost/pics/44bfb711cfde4052f0326e1c25b4eddd.jpg) Trailer: >! Coming soon… Story: >! A long time ago in the great kingdom of Shalasna. There was a king faranar and a Quin named Sharila. On a day the dragons came and they where destroying everything. So the king and the quin went to there great warrior named Garok the undefeatable and they asked him to create an army but also to train that armie to defeat the dragons. So Garok went to the inn to drink a couple of beers and chat a bit with hes friends but he also asked them to help searching for strong farmers to join his army, the friends accepted. The next day Garok and hes friends went to a bulletin board and pasted an announcement to join the army of Garok. So they don't need to search for farmers cause the farmers can find them. There where lots of farmers that wanted a job in the army and they went to the training. The Generals there names was Barrel, Karak and ofcourse Garok. After a lot of hard militairy trainings the armie tried to kill a dragon but they all died two survived and that persons where Garok and Brakor. Brakor he became a new general and he also became a knight. He searched a new armie and he also needed to train the new farmer boys. >! Maybe you can defeat the dragons…?
  6. Btw its working for my game so shut up i will help them What do you guys mean with event system 2.3 Please post a screenshot of the error thats easier for me
  7. santa-clause

    Icon

    Just convert an image to icon file here [http://converticon.com/](http://converticon.com/)
  8. Are you that lazzy i did the tutorials in like 20 minutes but i will not give you the client but i will send vb6 in a pm
  9. I also wich you luck Marshy Dearest.
  10. Ok there are some bugs left i removed them from my own game engine but i will explain all the problems you have just post tem and i will fix them. Autotile works for me (Reason i didnt posted the bugs i found in my own source is an error when i use more words and then i cant post it =p)
  11. We just need a pixel artist and maybe a programmer me and my friends will do the rest
  12. I know but i just forgot a little part and i cant find it And one little fix already: Open frmEditor_MapProperties, click the OK button and replace the entire sub with the following: ``` Private Sub cmdOk_Click() Dim i As Long Dim sTemp As Long Dim x As Long, x2 As Long Dim y As Long, y2 As Long Dim tempArr() As TileRec Dim TempArr2() As AutotileRec ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Not IsNumeric(txtMaxX.text) Then txtMaxX.text = Map.MaxX If Val(txtMaxX.text) < MAX_MAPX Then txtMaxX.text = MAX_MAPX If Val(txtMaxX.text) > MAX_BYTE Then txtMaxX.text = MAX_BYTE If Not IsNumeric(txtMaxY.text) Then txtMaxY.text = Map.MaxY If Val(txtMaxY.text) < MAX_MAPY Then txtMaxY.text = MAX_MAPY If Val(txtMaxY.text) > MAX_BYTE Then txtMaxY.text = MAX_BYTE With Map .Name = Trim$(txtName.text) If lstMusic.ListIndex >= 0 Then .Music = lstMusic.List(lstMusic.ListIndex) Else .Music = vbNullString End If .Up = Val(txtUp.text) .Down = Val(txtDown.text) .Left = Val(txtLeft.text) .Right = Val(txtRight.text) .Moral = cmbMoral.ListIndex .BootMap = Val(txtBootMap.text) .BootX = Val(txtBootX.text) .BootY = Val(txtBootY.text) ' set the data before changing it tempArr = Map.Tile TempArr2 = Autotile x2 = Map.MaxX y2 = Map.MaxY ' change the data .MaxX = Val(txtMaxX.text) .MaxY = Val(txtMaxY.text) ReDim Map.Tile(0 To .MaxX, 0 To .MaxY) ReDim Autotile(0 To .MaxX, 0 To .MaxY) If x2 > .MaxX Then x2 = .MaxX If y2 > .MaxY Then y2 = .MaxY For x = 0 To x2 For y = 0 To y2 .Tile(x, y) = tempArr(x, y) Autotile(x, y) = TempArr2(x, y) Next Next ClearTempTile End With Call UpdateDrawMapName Unload frmEditor_MapProperties ' Error handler Exit Sub errorhandler: HandleError "cmdOk_Click", "frmEditor_MapProperties", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ```That will fix the crash you'll get when you change the map size.
  13. Thanks to Robin for making the autotiles. Thanks to Scypher for vonverting the autotiles in his engine ED. **Client Side** In Frmeditor_map: add scrollbar named scrlAutotile make a textbox named lblAutotile and with caption normal double click scrlAutotile and add: ``` Private Sub scrlAutotile_Change() Select Case scrlAutotile.Value Case 0 ' normal lblAutotile.Caption = "Normal" Case 1 ' autotile lblAutotile.Caption = "Autotile" Case 2 ' fake autotile lblAutotile.Caption = "Fake" Case 3 ' animated lblAutotile.Caption = "Animated" Case 4 ' cliff lblAutotile.Caption = "Cliff" Case 5 ' waterfall lblAutotile.Caption = "Waterfall" End Select End Sub ``` now open Modconstants after: ``` Public Const MENU_STATE_INIT As Byte = 8 ``` add this: ``` ' Autotiles Public Const AUTO_INNER As Byte = 1 Public Const AUTO_OUTER As Byte = 2 Public Const AUTO_HORIZONTAL As Byte = 3 Public Const AUTO_VERTICAL As Byte = 4 Public Const AUTO_FILL As Byte = 5 ' Autotile types Public Const AUTOTILE_NONE As Byte = 0 Public Const AUTOTILE_NORMAL As Byte = 1 Public Const AUTOTILE_FAKE As Byte = 2 Public Const AUTOTILE_ANIM As Byte = 3 Public Const AUTOTILE_CLIFF As Byte = 4 Public Const AUTOTILE_WATERFALL As Byte = 5 ``` In modDatabase find: ``` Public Sub LoadMap ``` then find : ``` ClearTempTile ``` after that add ``` initAutotiles ``` Now open modDirectdraw7 Find: ``` Public Sub BltMapTile(ByVal x As Long, ByVal y As Long) ```then after: ``` ' render Call Engine_BltFast(ConvertMapX(x * PIC_X), ConvertMapY(y * PIC_Y), DDS_Tileset(.Layer(i).Tileset), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) End If ```add ``` ElseIf Autotile(x, y).Layer(i).renderState = RENDER_STATE_AUTOTILE Then ' Draw autotiles BltAutoTile i, ConvertMapX(x * PIC_X), ConvertMapY(y * PIC_Y), 1, x, y BltAutoTile i, ConvertMapX((x * PIC_X) + 16), ConvertMapY(y * PIC_Y), 2, x, y BltAutoTile i, ConvertMapX(x * PIC_X), ConvertMapY((y * PIC_Y) + 16), 3, x, y BltAutoTile i, ConvertMapX((x * PIC_X) + 16), ConvertMapY((y * PIC_Y) + 16), 4, x, y End If ```Add this add the bottom of modDirectdraw7: ``` Public Sub BltAutoTile(ByVal layerNum As Long, ByVal destX As Long, ByVal destY As Long, ByVal quarterNum As Long, ByVal x As Long, ByVal y As Long) Dim YOffset As Long, XOffset As Long Dim aRECT As RECT ' calculate the offset Select Case Map.Tile(x, y).Autotile(layerNum) Case AUTOTILE_WATERFALL YOffset = (waterfallFrame - 1) * 32 Case AUTOTILE_ANIM XOffset = autoTileFrame * 64 Case AUTOTILE_CLIFF YOffset = -32 End Select With aRECT .top = Autotile(x, y).Layer(layerNum).srcY(quarterNum) + YOffset .Left = Autotile(x, y).Layer(layerNum).srcX(quarterNum) + XOffset .Bottom = .top + 16 .Right = .Left + 16 End With ' Draw the quarter Engine_BltFast destX, destY, DDS_Tileset(Map.Tile(x, y).Layer(layerNum).Tileset), aRECT, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY End Sub ```Now open ModGameEditors then find: ``` Public Sub MapEditorSetTile(ByVal x As Long, ByVal y As Long, ByVal CurLayer As Long, Optional ByVal multitile As Boolean = False) ```after: ``` If Options.Debug = 1 Then On Error GoTo errorhandler ```add: ``` If theAutotile > 0 Then With Map.Tile(x, y) ' set layer .Layer(CurLayer).x = EditorTileX .Layer(CurLayer).y = EditorTileY .Layer(CurLayer).Tileset = frmEditor_Map.scrlTileSet.Value .Autotile(CurLayer) = theAutotile cacheRenderState x, y, CurLayer End With ' do a re-init so we can see our changes initAutotiles Exit Sub End If ```Now find: ``` Public Sub MapEditorMouseDown(ByVal Button As Integer, ByVal x As Long, ByVal y As Long, Optional ByVal movedMouse As Boolean = True) ```Make it look something like this: ``` Public Sub MapEditorMouseDown(ByVal Button As Integer, ByVal x As Long, ByVal y As Long, Optional ByVal movedMouse As Boolean = True) Dim i As Long Dim CurLayer As Long Dim tmpDir As Byte ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler ' find which layer we're on For i = 1 To MapLayer.Layer_Count - 1 If frmEditor_Map.optLayer(i).Value Then CurLayer = i Exit For End If Next If Not isInBounds Then Exit Sub If Button = vbLeftButton Then If frmEditor_Map.optLayers.Value Then ' no autotiling If EditorTileWidth = 1 And EditorTileHeight = 1 Then 'single tile MapEditorSetTile CurX, CurY, CurLayer, , frmEditor_Map.scrlAutotile.Value Else ' multi tile! If frmEditor_Map.scrlAutotile.Value = 0 Then MapEditorSetTile CurX, CurY, CurLayer, True Else MapEditorSetTile CurX, CurY, CurLayer, , frmEditor_Map.scrlAutotile.Value End If End If ElseIf frmEditor_Map.optAttribs.Value Then With Map.Tile(CurX, CurY) ' blocked tile If frmEditor_Map.optBlocked.Value Then .Type = TileBlocked ' warp tile If frmEditor_Map.optWarp.Value Then .Type = TileWarp .Data1 = EditorWarpMap .Data2 = EditorWarpX .Data3 = EditorWarpY End If ' item spawn If frmEditor_Map.optItem.Value Then .Type = TileItem .Data1 = ItemEditorNum .Data2 = ItemEditorValue .Data3 = 0 End If ' npc avoid If frmEditor_Map.optNpcAvoid.Value Then .Type = TileNPCAvoid .Data1 = 0 .Data2 = 0 .Data3 = 0 End If ' resource If frmEditor_Map.optResource.Value Then .Type = TileResource .Data1 = ResourceEditorNum .Data2 = 0 .Data3 = 0 End If ' npc spawn If frmEditor_Map.optNpcSpawn.Value Then .Type = TileNPCSpawn .Data1 = SpawnNpcNum .Data2 = SpawnNpcDir .Data3 = 0 End If ' shop If frmEditor_Map.optShop.Value Then .Type = TileShop .Data1 = EditorShop .Data2 = 0 .Data3 = 0 End If ' bank If frmEditor_Map.optBank.Value Then .Type = TileBank .Data1 = 0 .Data2 = 0 .Data3 = 0 End If ' heal If frmEditor_Map.optHeal.Value Then .Type = TileHeal .Data1 = MapEditorHealType .Data2 = MapEditorHealAmount .Data3 = 0 End If ' trap If frmEditor_Map.optTrap.Value Then .Type = TileTrap .Data1 = MapEditorHealAmount .Data2 = 0 .Data3 = 0 End If ' slide If frmEditor_Map.optSlide.Value Then .Type = TileSlide .Data1 = MapEditorSlideDir .Data2 = 0 .Data3 = 0 End If End With End With ElseIf frmEditor_Map.optBlock.Value Then If movedMouse Then Exit Sub ' find what tile it is x = x - ((x \ 32) * 32) y = y - ((y \ 32) * 32) ' see if it hits an arrow For i = 1 To 4 If x >= DirArrowX(i) And x = DirArrowY(i) And y 0 Then .Autotile(CurLayer) = 0 ' do a re-init so we can see our changes initAutotiles End If cacheRenderState x, y, CurLayer End With ElseIf frmEditor_Map.optAttribs.Value Then With Map.Tile(CurX, CurY) ' clear attribute .Type = 0 .Data1 = 0 .Data2 = 0 .Data3 = 0 End With End If End If CacheResources ' Error handler Exit Sub errorhandler: HandleError "MapEditorMouseDown", "modGameEditors", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ```Replace: ``` Public Sub MapEditorClearLayer() ```with: ``` Public Sub MapEditorClearLayer() Dim i As Long Dim x As Long Dim y As Long Dim CurLayer As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler ' find which layer we're on For i = 1 To MapLayer.Layer_Count - 1 If frmEditor_Map.optLayer(i).Value Then CurLayer = i Exit For End If Next If CurLayer = 0 Then Exit Sub ' ask to clear layer If MsgBox("Are you sure you wish to clear this layer?", vbYesNo, Options.Game_Name) = vbYes Then For x = 0 To Map.MaxX For y = 0 To Map.MaxY Map.Tile(x, y).Layer(CurLayer).x = 0 Map.Tile(x, y).Layer(CurLayer).y = 0 Map.Tile(x, y).Layer(CurLayer).Tileset = 0 cacheRenderState x, y, CurLayer Next Next ' re-cache autos initAutotiles End If ' Error handler Exit Sub errorhandler: HandleError "MapEditorClearLayer", "modGameEditors", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ```replace : ``` Public Sub MapEditorFillLayer() ```with : ``` Public Sub MapEditorFillLayer() Dim i As Long Dim x As Long Dim y As Long Dim CurLayer As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler ' find which layer we're on For i = 1 To MapLayer.Layer_Count - 1 If frmEditor_Map.optLayer(i).Value Then CurLayer = i Exit For End If Next ' Ground layer If MsgBox("Are you sure you wish to fill this layer?", vbYesNo, Options.Game_Name) = vbYes Then For x = 0 To Map.MaxX For y = 0 To Map.MaxY Map.Tile(x, y).Layer(CurLayer).x = EditorTileX Map.Tile(x, y).Layer(CurLayer).y = EditorTileY Map.Tile(x, y).Layer(CurLayer).Tileset = frmEditor_Map.scrlTileSet.Value Map.Tile(x, y).Autotile(CurLayer) = frmEditor_Map.scrlAutotile.Value cacheRenderState x, y, CurLayer Next Next End If ' Error handler Exit Sub errorhandler: HandleError "MapEditorFillLayer", "modGameEditors", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ```Now open modgamelogic after: ``` tmr25 = Tick + 25 End If ```add: ``` If MapTimer < Tick Then ' animate waterfalls Select Case waterfallFrame Case 0 waterfallFrame = 1 Case 1 waterfallFrame = 2 Case 2 waterfallFrame = 0 End Select ' animate autotiles Select Case autoTileFrame Case 0 autoTileFrame = 1 Case 1 autoTileFrame = 2 Case 2 autoTileFrame = 0 End Select ' Skip half a second before animating again MapTimer = Tick + 500 End If ```after : ``` Public Sub dialogueHandler(ByVal Index As Long) ' find out which button If Index = 1 Then ' okay button ' dialogue index Select Case dialogueIndex End Select ElseIf Index = 2 Then ' yes button ' dialogue index Select Case dialogueIndex Case DialogueTrade SendAcceptTradeRequest Case DialogueForget ForgetSpell dialogueData1 Case DialogueParty SendAcceptParty End Select ElseIf Index = 3 Then ' no button ' dialogue index Select Case dialogueIndex Case DialogueTrade SendDeclineTradeRequest Case DialogueParty SendDeclineParty End Select End If End Sub ```add: ``` Public Sub placeAutotile(ByVal layerNum As Long, ByVal x As Long, ByVal y As Long, ByVal tileQuarter As Byte, ByVal autoTileLetter As String) With Autotile(x, y).Layer(layerNum).QuarterTile(tileQuarter) Select Case autoTileLetter Case "a" .x = autoInner(1).x .y = autoInner(1).y Case "b" .x = autoInner(2).x .y = autoInner(2).y Case "c" .x = autoInner(3).x .y = autoInner(3).y Case "d" .x = autoInner(4).x .y = autoInner(4).y Case "e" .x = autoNW(1).x .y = autoNW(1).y Case "f" .x = autoNW(2).x .y = autoNW(2).y Case "g" .x = autoNW(3).x .y = autoNW(3).y Case "h" .x = autoNW(4).x .y = autoNW(4).y Case "i" .x = autoNE(1).x .y = autoNE(1).y Case "j" .x = autoNE(2).x .y = autoNE(2).y Case "k" .x = autoNE(3).x .y = autoNE(3).y Case "l" .x = autoNE(4).x .y = autoNE(4).y Case "m" .x = autoSW(1).x .y = autoSW(1).y Case "n" .x = autoSW(2).x .y = autoSW(2).y Case "o" .x = autoSW(3).x .y = autoSW(3).y Case "p" .x = autoSW(4).x .y = autoSW(4).y Case "q" .x = autoSE(1).x .y = autoSE(1).y Case "r" .x = autoSE(2).x .y = autoSE(2).y Case "s" .x = autoSE(3).x .y = autoSE(3).y Case "t" .x = autoSE(4).x .y = autoSE(4).y End Select End With End Sub Public Sub initAutotiles() Dim x As Long, y As Long, layerNum As Long ' Procedure used to cache autotile positions. All positioning is ' independant from the tileset. Calculations are convoluted and annoying. ' Maths is not my strong point. Luckily we're caching them so it's a one-off ' thing when the map is originally loaded. As such optimisation isn't an issue. ' For simplicity's sake we cache all subtile SOURCE positions in to an array. ' We also give letters to each subtile for easy rendering tweaks. ;] ' First, we need to re-size the array ReDim Autotile(0 To Map.MaxX, 0 To Map.MaxY) ' Inner tiles (Top right subtile region) ' NW - a autoInner(1).x = 32 autoInner(1).y = 0 ' NE - b autoInner(2).x = 48 autoInner(2).y = 0 ' SW - c autoInner(3).x = 32 autoInner(3).y = 16 ' SE - d autoInner(4).x = 48 autoInner(4).y = 16 ' Outer Tiles - NW (bottom subtile region) ' NW - e autoNW(1).x = 0 autoNW(1).y = 32 ' NE - f autoNW(2).x = 16 autoNW(2).y = 32 ' SW - g autoNW(3).x = 0 autoNW(3).y = 48 ' SE - h autoNW(4).x = 16 autoNW(4).y = 48 ' Outer Tiles - NE (bottom subtile region) ' NW - i autoNE(1).x = 32 autoNE(1).y = 32 ' NE - g autoNE(2).x = 48 autoNE(2).y = 32 ' SW - k autoNE(3).x = 32 autoNE(3).y = 48 ' SE - l autoNE(4).x = 48 autoNE(4).y = 48 ' Outer Tiles - SW (bottom subtile region) ' NW - m autoSW(1).x = 0 autoSW(1).y = 64 ' NE - n autoSW(2).x = 16 autoSW(2).y = 64 ' SW - o autoSW(3).x = 0 autoSW(3).y = 80 ' SE - p autoSW(4).x = 16 autoSW(4).y = 80 ' Outer Tiles - SE (bottom subtile region) ' NW - q autoSE(1).x = 32 autoSE(1).y = 64 ' NE - r autoSE(2).x = 48 autoSE(2).y = 64 ' SW - s autoSE(3).x = 32 autoSE(3).y = 80 ' SE - t autoSE(4).x = 48 autoSE(4).y = 80 For x = 0 To Map.MaxX For y = 0 To Map.MaxY For layerNum = 1 To MapLayer.Layer_Count - 1 ' calculate the subtile positions and place them calculateAutotile x, y, layerNum ' cache the rendering state of the tiles and set them cacheRenderState x, y, layerNum Next Next Next End Sub Public Sub cacheRenderState(ByVal x As Long, ByVal y As Long, ByVal layerNum As Long) Dim quarterNum As Long ' exit out early If x < 0 Or x > Map.MaxX Or y < 0 Or y > Map.MaxY Then Exit Sub With Map.Tile(x, y) ' check if the tile can be rendered If .Layer(layerNum).Tileset NumTileSets Then Autotile(x, y).Layer(layerNum).renderState = RENDER_STATE_NONE Exit Sub End If ' check if it's a key - hide mask if key is closed If layerNum = MapLayer.Mask Then If .Type = TileKey Then If TempTile(x, y).DoorOpen = NO Then Autotile(x, y).Layer(layerNum).renderState = RENDER_STATE_NONE Exit Sub Else Autotile(x, y).Layer(layerNum).renderState = RENDER_STATE_NORMAL Exit Sub End If End If End If ' check if it needs to be rendered as an autotile If .Autotile(layerNum) = AUTOTILE_NONE Or .Autotile(layerNum) = AUTOTILE_FAKE Then ' default to... default Autotile(x, y).Layer(layerNum).renderState = RENDER_STATE_NORMAL Else Autotile(x, y).Layer(layerNum).renderState = RENDER_STATE_AUTOTILE ' cache tileset positioning For quarterNum = 1 To 4 Autotile(x, y).Layer(layerNum).srcX(quarterNum) = (Map.Tile(x, y).Layer(layerNum).x * 32) + Autotile(x, y).Layer(layerNum).QuarterTile(quarterNum).x Autotile(x, y).Layer(layerNum).srcY(quarterNum) = (Map.Tile(x, y).Layer(layerNum).y * 32) + Autotile(x, y).Layer(layerNum).QuarterTile(quarterNum).y Next End If End With End Sub Public Sub calculateAutotile(ByVal x As Long, ByVal y As Long, ByVal layerNum As Long) ' Right, so we've split the tile block in to an easy to remember ' collection of letters. We now need to do the calculations to find ' out which little lettered block needs to be rendered. We do this ' by reading the surrounding tiles to check for matches. ' First we check to make sure an autotile situation is actually there. ' Then we calculate exactly which situation has arisen. ' The situations are "inner", "outer", "horizontal", "vertical" and "fill". ' Exit out if we don't have an auatotile If Map.Tile(x, y).Autotile(layerNum) = 0 Then Exit Sub ' Okay, we have autotiling but which one? Select Case Map.Tile(x, y).Autotile(layerNum) ' Normal or animated - same difference Case AUTOTILE_NORMAL, AUTOTILE_ANIM ' North West Quarter CalculateNW_Normal layerNum, x, y ' North East Quarter CalculateNE_Normal layerNum, x, y ' South West Quarter CalculateSW_Normal layerNum, x, y ' South East Quarter CalculateSE_Normal layerNum, x, y ' Cliff Case AUTOTILE_CLIFF ' North West Quarter CalculateNW_Cliff layerNum, x, y ' North East Quarter CalculateNE_Cliff layerNum, x, y ' South West Quarter CalculateSW_Cliff layerNum, x, y ' South East Quarter CalculateSE_Cliff layerNum, x, y ' Waterfalls Case AUTOTILE_WATERFALL ' North West Quarter CalculateNW_Waterfall layerNum, x, y ' North East Quarter CalculateNE_Waterfall layerNum, x, y ' South West Quarter CalculateSW_Waterfall layerNum, x, y ' South East Quarter CalculateSE_Waterfall layerNum, x, y ' Anything else Case Else ' Don't need to render anything... it's fake or not an autotile End Select End Sub ' Normal autotiling Public Sub CalculateNW_Normal(ByVal layerNum As Long, ByVal x As Long, ByVal y As Long) Dim tmpTile(1 To 3) As Boolean Dim situation As Byte ' North West If checkTileMatch(layerNum, x, y, x - 1, y - 1) Then tmpTile(1) = True ' North If checkTileMatch(layerNum, x, y, x, y - 1) Then tmpTile(2) = True ' West If checkTileMatch(layerNum, x, y, x - 1, y) Then tmpTile(3) = True ' Calculate Situation - Inner If Not tmpTile(2) And Not tmpTile(3) Then situation = AUTO_INNER ' Horizontal If Not tmpTile(2) And tmpTile(3) Then situation = AUTO_HORIZONTAL ' Vertical If tmpTile(2) And Not tmpTile(3) Then situation = AUTO_VERTICAL ' Outer If Not tmpTile(1) And tmpTile(2) And tmpTile(3) Then situation = AUTO_OUTER ' Fill If tmpTile(1) And tmpTile(2) And tmpTile(3) Then situation = AUTO_FILL ' Actually place the subtile Select Case situation Case AUTO_INNER placeAutotile layerNum, x, y, 1, "e" Case AUTO_OUTER placeAutotile layerNum, x, y, 1, "a" Case AUTO_HORIZONTAL placeAutotile layerNum, x, y, 1, "i" Case AUTO_VERTICAL placeAutotile layerNum, x, y, 1, "m" Case AUTO_FILL placeAutotile layerNum, x, y, 1, "q" End Select End Sub Public Sub CalculateNE_Normal(ByVal layerNum As Long, ByVal x As Long, ByVal y As Long) Dim tmpTile(1 To 3) As Boolean Dim situation As Byte ' North If checkTileMatch(layerNum, x, y, x, y - 1) Then tmpTile(1) = True ' North East If checkTileMatch(layerNum, x, y, x + 1, y - 1) Then tmpTile(2) = True ' East If checkTileMatch(layerNum, x, y, x + 1, y) Then tmpTile(3) = True ' Calculate Situation - Inner If Not tmpTile(1) And Not tmpTile(3) Then situation = AUTO_INNER ' Horizontal If Not tmpTile(1) And tmpTile(3) Then situation = AUTO_HORIZONTAL ' Vertical If tmpTile(1) And Not tmpTile(3) Then situation = AUTO_VERTICAL ' Outer If tmpTile(1) And Not tmpTile(2) And tmpTile(3) Then situation = AUTO_OUTER ' Fill If tmpTile(1) And tmpTile(2) And tmpTile(3) Then situation = AUTO_FILL ' Actually place the subtile Select Case situation Case AUTO_INNER placeAutotile layerNum, x, y, 2, "j" Case AUTO_OUTER placeAutotile layerNum, x, y, 2, "b" Case AUTO_HORIZONTAL placeAutotile layerNum, x, y, 2, "f" Case AUTO_VERTICAL placeAutotile layerNum, x, y, 2, "r" Case AUTO_FILL placeAutotile layerNum, x, y, 2, "n" End Select End Sub Public Sub CalculateSW_Normal(ByVal layerNum As Long, ByVal x As Long, ByVal y As Long) Dim tmpTile(1 To 3) As Boolean Dim situation As Byte ' West If checkTileMatch(layerNum, x, y, x - 1, y) Then tmpTile(1) = True ' South West If checkTileMatch(layerNum, x, y, x - 1, y + 1) Then tmpTile(2) = True ' South If checkTileMatch(layerNum, x, y, x, y + 1) Then tmpTile(3) = True ' Calculate Situation - Inner If Not tmpTile(1) And Not tmpTile(3) Then situation = AUTO_INNER ' Horizontal If tmpTile(1) And Not tmpTile(3) Then situation = AUTO_HORIZONTAL ' Vertical If Not tmpTile(1) And tmpTile(3) Then situation = AUTO_VERTICAL ' Outer If tmpTile(1) And Not tmpTile(2) And tmpTile(3) Then situation = AUTO_OUTER ' Fill If tmpTile(1) And tmpTile(2) And tmpTile(3) Then situation = AUTO_FILL ' Actually place the subtile Select Case situation Case AUTO_INNER placeAutotile layerNum, x, y, 3, "o" Case AUTO_OUTER placeAutotile layerNum, x, y, 3, "c" Case AUTO_HORIZONTAL placeAutotile layerNum, x, y, 3, "s" Case AUTO_VERTICAL placeAutotile layerNum, x, y, 3, "g" Case AUTO_FILL placeAutotile layerNum, x, y, 3, "k" End Select End Sub Public Sub CalculateSE_Normal(ByVal layerNum As Long, ByVal x As Long, ByVal y As Long) Dim tmpTile(1 To 3) As Boolean Dim situation As Byte ' South If checkTileMatch(layerNum, x, y, x, y + 1) Then tmpTile(1) = True ' South East If checkTileMatch(layerNum, x, y, x + 1, y + 1) Then tmpTile(2) = True ' East If checkTileMatch(layerNum, x, y, x + 1, y) Then tmpTile(3) = True ' Calculate Situation - Inner If Not tmpTile(1) And Not tmpTile(3) Then situation = AUTO_INNER ' Horizontal If Not tmpTile(1) And tmpTile(3) Then situation = AUTO_HORIZONTAL ' Vertical If tmpTile(1) And Not tmpTile(3) Then situation = AUTO_VERTICAL ' Outer If tmpTile(1) And Not tmpTile(2) And tmpTile(3) Then situation = AUTO_OUTER ' Fill If tmpTile(1) And tmpTile(2) And tmpTile(3) Then situation = AUTO_FILL ' Actually place the subtile Select Case situation Case AUTO_INNER placeAutotile layerNum, x, y, 4, "t" Case AUTO_OUTER placeAutotile layerNum, x, y, 4, "d" Case AUTO_HORIZONTAL placeAutotile layerNum, x, y, 4, "p" Case AUTO_VERTICAL placeAutotile layerNum, x, y, 4, "l" Case AUTO_FILL placeAutotile layerNum, x, y, 4, "h" End Select End Sub ' Waterfall autotiling Public Sub CalculateNW_Waterfall(ByVal layerNum As Long, ByVal x As Long, ByVal y As Long) Dim tmpTile As Boolean ' West If checkTileMatch(layerNum, x, y, x - 1, y) Then tmpTile = True ' Actually place the subtile If tmpTile Then ' Extended placeAutotile layerNum, x, y, 1, "i" Else ' Edge placeAutotile layerNum, x, y, 1, "e" End If End Sub Public Sub CalculateNE_Waterfall(ByVal layerNum As Long, ByVal x As Long, ByVal y As Long) Dim tmpTile As Boolean ' East If checkTileMatch(layerNum, x, y, x + 1, y) Then tmpTile = True ' Actually place the subtile If tmpTile Then ' Extended placeAutotile layerNum, x, y, 2, "f" Else ' Edge placeAutotile layerNum, x, y, 2, "j" End If End Sub Public Sub CalculateSW_Waterfall(ByVal layerNum As Long, ByVal x As Long, ByVal y As Long) Dim tmpTile As Boolean ' West If checkTileMatch(layerNum, x, y, x - 1, y) Then tmpTile = True ' Actually place the subtile If tmpTile Then ' Extended placeAutotile layerNum, x, y, 3, "k" Else ' Edge placeAutotile layerNum, x, y, 3, "g" End If End Sub Public Sub CalculateSE_Waterfall(ByVal layerNum As Long, ByVal x As Long, ByVal y As Long) Dim tmpTile As Boolean ' East If checkTileMatch(layerNum, x, y, x + 1, y) Then tmpTile = True ' Actually place the subtile If tmpTile Then ' Extended placeAutotile layerNum, x, y, 4, "h" Else ' Edge placeAutotile layerNum, x, y, 4, "l" End If End Sub ' Cliff autotiling Public Sub CalculateNW_Cliff(ByVal layerNum As Long, ByVal x As Long, ByVal y As Long) Dim tmpTile(1 To 3) As Boolean Dim situation As Byte ' North West If checkTileMatch(layerNum, x, y, x - 1, y - 1) Then tmpTile(1) = True ' North If checkTileMatch(layerNum, x, y, x, y - 1) Then tmpTile(2) = True ' West If checkTileMatch(layerNum, x, y, x - 1, y) Then tmpTile(3) = True ' Calculate Situation - Horizontal If Not tmpTile(2) And tmpTile(3) Then situation = AUTO_HORIZONTAL ' Vertical If tmpTile(2) And Not tmpTile(3) Then situation = AUTO_VERTICAL ' Fill If tmpTile(1) And tmpTile(2) And tmpTile(3) Then situation = AUTO_FILL ' Inner If Not tmpTile(2) And Not tmpTile(3) Then situation = AUTO_INNER ' Actually place the subtile Select Case situation Case AUTO_INNER placeAutotile layerNum, x, y, 1, "e" Case AUTO_HORIZONTAL placeAutotile layerNum, x, y, 1, "i" Case AUTO_VERTICAL placeAutotile layerNum, x, y, 1, "m" Case AUTO_FILL placeAutotile layerNum, x, y, 1, "q" End Select End Sub Public Sub CalculateNE_Cliff(ByVal layerNum As Long, ByVal x As Long, ByVal y As Long) Dim tmpTile(1 To 3) As Boolean Dim situation As Byte ' North If checkTileMatch(layerNum, x, y, x, y - 1) Then tmpTile(1) = True ' North East If checkTileMatch(layerNum, x, y, x + 1, y - 1) Then tmpTile(2) = True ' East If checkTileMatch(layerNum, x, y, x + 1, y) Then tmpTile(3) = True ' Calculate Situation - Horizontal If Not tmpTile(1) And tmpTile(3) Then situation = AUTO_HORIZONTAL ' Vertical If tmpTile(1) And Not tmpTile(3) Then situation = AUTO_VERTICAL ' Fill If tmpTile(1) And tmpTile(2) And tmpTile(3) Then situation = AUTO_FILL ' Inner If Not tmpTile(1) And Not tmpTile(3) Then situation = AUTO_INNER ' Actually place the subtile Select Case situation Case AUTO_INNER placeAutotile layerNum, x, y, 2, "j" Case AUTO_HORIZONTAL placeAutotile layerNum, x, y, 2, "f" Case AUTO_VERTICAL placeAutotile layerNum, x, y, 2, "r" Case AUTO_FILL placeAutotile layerNum, x, y, 2, "n" End Select End Sub Public Sub CalculateSW_Cliff(ByVal layerNum As Long, ByVal x As Long, ByVal y As Long) Dim tmpTile(1 To 3) As Boolean Dim situation As Byte ' West If checkTileMatch(layerNum, x, y, x - 1, y) Then tmpTile(1) = True ' South West If checkTileMatch(layerNum, x, y, x - 1, y + 1) Then tmpTile(2) = True ' South If checkTileMatch(layerNum, x, y, x, y + 1) Then tmpTile(3) = True ' Calculate Situation - Horizontal If tmpTile(1) And Not tmpTile(3) Then situation = AUTO_HORIZONTAL ' Vertical If Not tmpTile(1) And tmpTile(3) Then situation = AUTO_VERTICAL ' Fill If tmpTile(1) And tmpTile(2) And tmpTile(3) Then situation = AUTO_FILL ' Inner If Not tmpTile(1) And Not tmpTile(3) Then situation = AUTO_INNER ' Actually place the subtile Select Case situation Case AUTO_INNER placeAutotile layerNum, x, y, 3, "o" Case AUTO_HORIZONTAL placeAutotile layerNum, x, y, 3, "s" Case AUTO_VERTICAL placeAutotile layerNum, x, y, 3, "g" Case AUTO_FILL placeAutotile layerNum, x, y, 3, "k" End Select End Sub Public Sub CalculateSE_Cliff(ByVal layerNum As Long, ByVal x As Long, ByVal y As Long) Dim tmpTile(1 To 3) As Boolean Dim situation As Byte ' South If checkTileMatch(layerNum, x, y, x, y + 1) Then tmpTile(1) = True ' South East If checkTileMatch(layerNum, x, y, x + 1, y + 1) Then tmpTile(2) = True ' East If checkTileMatch(layerNum, x, y, x + 1, y) Then tmpTile(3) = True ' Calculate Situation - Horizontal If Not tmpTile(1) And tmpTile(3) Then situation = AUTO_HORIZONTAL ' Vertical If tmpTile(1) And Not tmpTile(3) Then situation = AUTO_VERTICAL ' Fill If tmpTile(1) And tmpTile(2) And tmpTile(3) Then situation = AUTO_FILL ' Inner If Not tmpTile(1) And Not tmpTile(3) Then situation = AUTO_INNER ' Actually place the subtile Select Case situation Case AUTO_INNER placeAutotile layerNum, x, y, 4, "t" Case AUTO_HORIZONTAL placeAutotile layerNum, x, y, 4, "p" Case AUTO_VERTICAL placeAutotile layerNum, x, y, 4, "l" Case AUTO_FILL placeAutotile layerNum, x, y, 4, "h" End Select End Sub Public Function checkTileMatch(ByVal layerNum As Long, ByVal x1 As Long, ByVal y1 As Long, ByVal x2 As Long, ByVal y2 As Long) As Boolean ' we'll exit out early if true checkTileMatch = True ' if it's off the map then set it as autotile and exit out early If x2 < 0 Or x2 > Map.MaxX Or y2 < 0 Or y2 > Map.MaxY Then checkTileMatch = True Exit Function End If ' fakes ALWAYS return true If Map.Tile(x2, y2).Autotile(layerNum) = AUTOTILE_FAKE Then checkTileMatch = True Exit Function End If ' check neighbour is an autotile If Map.Tile(x2, y2).Autotile(layerNum) = 0 Then checkTileMatch = False Exit Function End If ' check we're a matching If Map.Tile(x1, y1).Layer(layerNum).Tileset Map.Tile(x2, y2).Layer(layerNum).Tileset Then checkTileMatch = False Exit Function End If ' check tiles match If Map.Tile(x1, y1).Layer(layerNum).x Map.Tile(x2, y2).Layer(layerNum).x Then checkTileMatch = False Exit Function End If If Map.Tile(x1, y1).Layer(layerNum).y Map.Tile(x2, y2).Layer(layerNum).y Then checkTileMatch = False Exit Function End If End Function ```Now open modGlobals After: ``` ' Amount of blood decals Public BloodCount As Long ```add: ``` ' autotiling Public autoInner(1 To 4) As PointRec Public autoNW(1 To 4) As PointRec Public autoNE(1 To 4) As PointRec Public autoSW(1 To 4) As PointRec Public autoSE(1 To 4) As PointRec ' Map animations Public waterfallFrame As Long Public autoTileFrame As Long ```Now open modhandledata find: ``` Sub HandleMapData(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) ```after: ``` Map.Tile(x, y).Layer(i).Tileset = Buffer.ReadLong ```add: ``` Map.Tile(x, y).Autotile(i) = Buffer.ReadByte ```after: ``` ClearTempTile ```add: ``` initAutotiles ``` **Server Side** open modhandledata: find: ``` Map(mapnum).Tile(x, y).Layer(i).Tileset = buffer.ReadLong ```add: ``` Map(mapnum).Tile(x, y).Autotile(i) = buffer.ReadByte ``` open modserverTCP: find: ``` buffer.WriteLong .Layer(i).Tileset ```add: ``` buffer.WriteByte .Autotile(i) ``` open modtypes find: ``` Layer(1 To MapLayer.Layer_Count - 1) As TileDataRec ```add: ``` Autotile(1 To MapLayer.Layer_Count - 1) As Byte ```
  14. Just make a button and double click it and add ``` frmReport.visible=true ```
  15. Ok i will post some examples here is the example: ![](http://kingdomofdainasta.cixx6.com/imagehost/up/4a2a7d5bbd8d4a27dbe0dde9a04e4bc3.png) if you want more then i want money cause i don't want to give away lots of paperdolls for free
×
×
  • Create New...