骑马与砍杀中文站论坛

 找回密码
 注册(Register!)

QQ登录

只需一步,快速开始

搜索
购买CDKEY 小黑盒加速器
查看: 2457|回复: 10

[分享] 骑砍战场小地图添加工具

[复制链接]

42

主题

475

回帖

390

积分

见习骑士

Rank: 3

UID
3398051
第纳尔
1397
精华
0
互助
39
荣誉
4
贡献
10
魅力
300
注册时间
2022-8-13
鲜花(46) 鸡蛋(0)
发表于 2023-12-1 12:04:31 | 显示全部楼层 |阅读模式
本帖最后由 ggfgfgf 于 2023-12-3 09:51 编辑

使用VB开发,开源,可以为几乎所有mod添加战场小地图功能,只需选择mod所在文件夹
汉匈和战团均可用!
下载:
BattleMiniMapMB战场小地图添加工具.zip (1.07 MB, 下载次数: 267)
源码:
VB_BattleMiniMapMB.zip (6.01 KB, 下载次数: 68)

鲜花鸡蛋

karl-leung  在6 天前  送朵鲜花  并说:我非常同意你的观点,送朵鲜花鼓励一下

30

主题

200

回帖

169

积分

见习骑士

Rank: 3

UID
2462463
第纳尔
1472
精华
0
互助
20
荣誉
0
贡献
0
魅力
50
注册时间
2015-3-3
鲜花(43) 鸡蛋(0)
发表于 2023-12-4 16:33:06 | 显示全部楼层
本帖最后由 战争傀儡阿格兰 于 2023-12-4 16:38 编辑

这也太冷清了。。战团人气越来越低啊
工具实际效果:右上方出现个地图。没错,很多mod都有,但是有些热门mod居然没有。。
工具使用方式:解压BattleMiniMapMB战场小地图添加工具.zip ,点击exe文件,按下“选择模组文件夹”,选择mod位置(main.bmp所在的文件夹位置),然后点击“添加”即可。

已知bug:如果某mod,在战场启用了其他界面,那么这个战场小地图会和自带界面疯狂抢控制权(因为战团只允许一个带mesh的present)。可以再次点击exe文件,恢复原样

123.png

0

主题

7

回帖

2

积分

平民

Rank: 1

UID
3541067
第纳尔
18
精华
0
互助
0
荣誉
0
贡献
0
魅力
0
注册时间
2023-7-18
鲜花(0) 鸡蛋(0)
发表于 2023-12-8 17:24:39 | 显示全部楼层
6666666666666666666666666666

0

主题

3

回帖

6

积分

平民

Rank: 1

UID
3441360
第纳尔
41
精华
0
互助
1
荣誉
0
贡献
0
魅力
0
注册时间
2022-11-9
鲜花(0) 鸡蛋(0)
发表于 2023-12-10 13:54:19 | 显示全部楼层
6666666666666666

0

主题

22

回帖

7

积分

平民

Rank: 1

UID
3050572
第纳尔
226
精华
0
互助
0
荣誉
0
贡献
0
魅力
0
注册时间
2018-12-28
鲜花(0) 鸡蛋(0)
发表于 2024-2-18 19:33:50 | 显示全部楼层
感谢楼主奉献

1

主题

4

回帖

12

积分

随仆

Rank: 1

UID
3619016
第纳尔
20
精华
0
互助
2
荣誉
0
贡献
0
魅力
20
注册时间
2024-2-14
鲜花(0) 鸡蛋(0)
发表于 2024-2-19 14:16:11 | 显示全部楼层
我这里好像有问题源码下不下来,想请问楼主是如何实现读取游戏局内数据的?我的思路有点卡住了

42

主题

475

回帖

390

积分

见习骑士

Rank: 3

UID
3398051
第纳尔
1397
精华
0
互助
39
荣誉
4
贡献
10
魅力
300
注册时间
2022-8-13
鲜花(46) 鸡蛋(0)
 楼主| 发表于 2024-2-19 14:23:06 | 显示全部楼层
Sorobot 发表于 2024-2-19 14:16
我这里好像有问题源码下不下来,想请问楼主是如何实现读取游戏局内数据的?我的思路有点卡住了 ...

源码能下啊,是不是报病毒,这是中文站问题,点更多,保留就行,没有病毒

42

主题

475

回帖

390

积分

见习骑士

Rank: 3

UID
3398051
第纳尔
1397
精华
0
互助
39
荣誉
4
贡献
10
魅力
300
注册时间
2022-8-13
鲜花(46) 鸡蛋(0)
 楼主| 发表于 2024-2-19 14:26:04 | 显示全部楼层
Sorobot 发表于 2024-2-19 14:16
我这里好像有问题源码下不下来,想请问楼主是如何实现读取游戏局内数据的?我的思路有点卡住了 ...

VERSION 5.00
Begin VB.Form Form1
   BorderStyle     =   1  'Fixed Single
   Caption         =   "BlooyMount&blade"
   ClientHeight    =   4860
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6750
   BeginProperty Font
      Name            =   "宋体"
      Size            =   12
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4860
   ScaleWidth      =   6750
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command2
      Caption         =   "添加"
      Enabled         =   0   'False
      Height          =   495
      Left            =   4320
      TabIndex        =   3
      Top             =   1560
      Width           =   2415
   End
   Begin VB.TextBox Text1
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      BorderStyle     =   0  'None
      BeginProperty Font
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   0
      Locked          =   -1  'True
      TabIndex        =   2
      Top             =   840
      Width           =   4335
   End
   Begin VB.CommandButton Command1
      Caption         =   "选择模组文件夹"
      BeginProperty Font
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   4320
      TabIndex        =   0
      Top             =   840
      Width           =   2415
   End
   Begin VB.Label Label3
      Caption         =   "由ggfgfgf制作"
      BeginProperty Font
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000080&
      Height          =   375
      Left            =   4920
      TabIndex        =   5
      Top             =   0
      Width           =   2415
   End
   Begin VB.Image Image2
      Height          =   1095
      Left            =   5400
      Picture         =   "Form1.frx":030A
      Stretch         =   -1  'True
      Top             =   3600
      Width           =   1215
   End
   Begin VB.Label Label1
      Caption         =   "关于"
      BeginProperty Font
         Name            =   "宋体"
         Size            =   21.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   615
      Left            =   4440
      TabIndex        =   4
      Top             =   3840
      Width           =   1575
   End
   Begin VB.Image Image1
      Height          =   3330
      Left            =   0
      Picture         =   "Form1.frx":0614
      Stretch         =   -1  'True
      Top             =   1440
      Width           =   4050
   End
   Begin VB.Label Label2
      Caption         =   "模组文件夹:"
      BeginProperty Font
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   120
      TabIndex        =   1
      Top             =   600
      Width           =   2055
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim re As New RegExp
Dim retest As Boolean
Dim Sencep As Long
Const Sencestr As String = "10808639105"
Const Sencenum As Long = 68919039
Dim str As String
Dim i As Long

Private Sub Command1_Click()
    str = GetFolder(Me.hWnd, "浏览module文件夹")
   
    If str <> "" Then
        Text1.Text = str
        If Dir(str & "\module.ini", vbArchive) <> "" Then 'module.ini
            Command2.Enabled = True
            If Dir(str & "\bloodybackup", vbDirectory) <> "" Then
              Command2.Caption = "退回"
            Else
              Command2.Caption = "添加"
            End If
        Else
            MsgBox "文件夹错误!", vbCritical
            Command2.Enabled = False
        End If
    End If
End Sub

Private Sub Command2_Click()
On Error Resume Next
If Command2.Caption = "添加" Then
Command2.Enabled = False
MkDir (str & "\bloodybackup")
MkDir (str & "\bloodybackup\Resource")
MkDir (str & "\bloodybackup\Textures")
CreateObject("scripting.filesystemobject").copyfolder str & "\Resource", str & "\bloodybackup\Resource"
CreateObject("scripting.filesystemobject").copyfolder str & "\Textures", str & "\bloodybackup\Textures"
CreateObject("scripting.filesystemobject").copyfolder App.Path & "\Resource", str & "\Resource"
CreateObject("scripting.filesystemobject").copyfolder App.Path & "\Textures", str & "\Textures"
CreateObject("scripting.filesystemobject").copyfile str & "\module.ini", str & "\bloodybackup\", 1
CreateObject("scripting.filesystemobject").copyfile str & "\scene_props.txt", str & "\bloodybackup\", 1
CreateObject("scripting.filesystemobject").copyfile str & "\mission_templates.txt", str & "\bloodybackup\", 1

Open str & "\module.ini" For Append As #1
    Print #1,
    Print #1, "load_mod_resource = blood"
Close #1

Dim m As String
Dim linenum As Long
Open str & "\scene_props.txt" For Input As #1
Open str & "\scene_props2.txt" For Append As #2
    Line Input #1, m
    Print #2, m
    Line Input #1, m
    Sencep = CInt(m)
    linenum = CInt(m) + 5
    Print #2, linenum
    Do While Not EOF(1)
    Line Input #1, m
    Print #2, m
    Loop
    Print #2,
    Print #2, "spr_blood1 0 0 blood_spray1 0 0"
    Print #2,
    Print #2,
    Print #2, "spr_blood2 0 0 blood_spray2 0 0"
    Print #2,
    Print #2,
    Print #2, "spr_blood3 0 0 blood_spray3 0 0"
    Print #2,
    Print #2,
    Print #2, "spr_blood_hit 0 0 blood_spray 0 0"
    Print #2,
    Print #2,
    Print #2, "spr_blood_hit2 0 0 blood_spray_2 0 0"
    Print #2,
    Print #2,
Close #2
Close #1
Kill str & "\scene_props.txt"
Name str & "\scene_props2.txt" As str & "\scene_props.txt"

Open str & "\mission_templates.txt" For Input As #1
Open str & "\mission_templates2.txt" For Append As #2

Do While Not EOF(1)
    Line Input #1, m
    m = Trim(m)
    If m = "You_lead_your_men_to_battle." Or m = "Alley_fight" Or m = "Town_Fight" Then '开始ms过程
        retest = True
        Do While retest
            Print #2, m
            Line Input #1, m
            retest = Not RegExpnum(m)
        Loop
        linenum = CInt(m) + 2
        Print #2, CStr(linenum)
        For i = 1 To linenum - 2
            Line Input #1, m
            Print #2, m
        Next i
        Print #2, "-28.000000 0.000000 0.000000  0  53 2071 1 1224979098644774912 2073 1 1224979098644774913 2124 1 100 1710 2 0 1224979098644774912 2136 3 1224979098644774914 -135 135 725 2 0 1224979098644774914 700 2 1 0 700 2 2 0 721 2 1 100 721 2 2 -100 722 2 1 -50 722 2 2 -50 791 1 1 791 1 2 728 2 1224979098644774915 1 728 2 1224979098644774916 2 2106 2 1224979098644774915 1224979098644774916 2108 2 1224979098644774915 2 2142 2 1224979098644774917 1224979098644774915 738 2 0 1224979098644774917 4 0 2113 1 1224979098644774915 33 3 1224979098644774915 -201 ";
        Print #2, "201 721 2 1 -100 721 2 2 100 720 2 1 -100 720 2 2 100 722 2 1 -50 722 2 2 -50 791 1 1 791 1 2 728 2 1224979098644774915 1 728 2 1224979098644774916 2 2106 2 1224979098644774915 1224979098644774916 2108 2 1224979098644774915 2 2142 2 1224979098644774917 1224979098644774915 739 2 0 1224979098644774917 791 1 0 722 2 0 10 3 0 4 0 2113 1 1224979098644774915 33 3 1224979098644774915 -201 201 4 0 33 3 1224979098644774913 10 30 1970 1 0 1974 1 " & Sencestr & CStr(Sencep + Sencenum + 4) & " 5 0 32 2 1224979098644774913 10 1970 1 0 1974 1 " & Sencestr & CStr(Sencep + Sencenum + 4) & " 3 0 3 0 "
        Print #2, "-26.000000 0.000000 0.000000  0  61 2071 1 1224979098644774912 2073 1 1224979098644774913 2124 1 100 31 2 1224979098644774913 0 1710 2 0 1224979098644774912 2136 3 1224979098644774914 -135 135 725 2 0 1224979098644774914 700 2 1 0 700 2 2 0 721 2 1 100 721 2 2 -100 722 2 1 -50 722 2 2 -50 791 1 1 791 1 2 728 2 1224979098644774915 1 728 2 1224979098644774916 2 2106 2 1224979098644774915 1224979098644774916 2108 2 1224979098644774915 2 2142 2 1224979098644774917 1224979098644774915 738 2 0 1224979098644774917 4 0 2113 1 1224979098644774915 33 3 1224979098644774915 -201 201 721 2 1 -100 721 2 2 100 720 2 1 -100 720 2 2 100 722 2 1 -50 722 2 2 -50 791 1 1 791 1 2 728 2 1224979098644774915 1 728 2 1224979098644774916 2 2106 2 1224979098644774915 1224979098644774916 2108 2 1224979098644774915 2 2142 2 1224979098644774917 1224979098644774915 739 2 0 1224979098644774917 791 1 0 722 2 0 10 3 0 2136 3 1224979098644774914 1 3 4 0 2113 1 1224979098644774915 33 3 1224979098644774915 -201 201 ";
        Print #2, "4 0 31 2 1224979098644774914 1 1970 1 0 1974 1 " & Sencestr & CStr(Sencep + Sencenum + 1) & " 3 0 4 0 31 2 1224979098644774914 2 1970 1 0 1974 1 " & Sencestr & CStr(Sencep + Sencenum + 2) & " 3 0 4 0 31 2 1224979098644774914 3 1970 1 0 1974 1 " & Sencestr & CStr(Sencep + Sencenum + 3) & " 3 0 3 0 "
'        Print #2, "-28.000000 0.000000 0.000000  0  45 2071 1 1224979098644774912 2073 1 1224979098644774913 1710 2 0 1224979098644774912 700 2 1 0 700 2 2 0 721 2 1 100 721 2 2 -100 791 1 1 791 1 2 728 2 1224979098644774914 1 728 2 1224979098644774915 2 2106 2 1224979098644774914 1224979098644774915 2108 2 1224979098644774914 2 2142 2 1224979098644774916 1224979098644774914 738 2 0 1224979098644774916 4 0 2113 1 1224979098644774914 2147483678 2 1224979098644774914 400 721 2 1 -100 721 2 2 100 720 2 1 -100 720 2 2 100 791 1 1 791 1 2 728 2 1224979098644774914 1 728 2 1224979098644774915 2 2106 2 1224979098644774914 1224979098644774915 2108 2 1224979098644774914 2 2142 2 1224979098644774916 1224979098644774914 739 2 0 1224979098644774916 722 2 0 7 3 0 4 0 2113 1 1224979098644774914 2147483678 2 1224979098644774914 400 4 0 33 3 1224979098644774913 10 30 1970 1 0 1974 1 ";
'        Print #2, Sencestr & CStr(Sencep + Sencenum + 4) & " 5 0 32 2 1224979098644774913 10 1970 1 0 1974 1 " & Sencestr & CStr(Sencep + Sencenum + 5) & " 3 0 3 0 "
'        Print #2, "-26.000000 0.000000 0.000000  0  53 2071 1 1224979098644774912 2073 1 1224979098644774913 31 2 1224979098644774913 0 1710 2 0 1224979098644774912 700 2 1 0 700 2 2 0 721 2 1 100 721 2 2 -100 791 1 1 791 1 2 728 2 1224979098644774914 1 728 2 1224979098644774915 2 2106 2 1224979098644774914 1224979098644774915 2108 2 1224979098644774914 2 2142 2 1224979098644774916 1224979098644774914 738 2 0 1224979098644774916 4 0 2113 1 1224979098644774914 2147483678 2 1224979098644774914 400 721 2 1 -100 721 2 2 100 720 2 1 -100 720 2 2 100 791 1 1 791 1 2 728 2 1224979098644774914 1 728 2 1224979098644774915 2 2106 2 1224979098644774914 1224979098644774915 2108 2 1224979098644774914 2 2142 2 1224979098644774916 1224979098644774914 739 2 0 1224979098644774916 722 2 0 10 3 0 2136 3 1224979098644774917 1 3 4 0 2113 1 1224979098644774914 2147483678 2 1224979098644774914 400 4 0 31 2 1224979098644774917 1 1970 1 0 1974 1 ";
'        Print #2, Sencestr & CStr(Sencep + Sencenum + 1) & " 3 0 4 0 31 2 1224979098644774917 2 1970 1 0 1974 1 " & Sencestr & CStr(Sencep + Sencenum + 2) & " 3 0 4 0 31 2 1224979098644774917 3 1970 1 0 1974 1 " & Sencestr & CStr(Sencep + Sencenum + 3) & " 3 0 3 0 "
    Else
    Print #2, m
    End If
Loop
Close #2
Close #1
Kill str & "\mission_templates.txt"
Name str & "\mission_templates2.txt" As str & "\mission_templates.txt"

Command2.Caption = "退回"
Command2.Enabled = True
Else
Command2.Enabled = False
CreateObject("scripting.filesystemobject").deletefolder str & "\Resource"
CreateObject("scripting.filesystemobject").deletefolder str & "\Textures"
CreateObject("scripting.filesystemobject").copyfolder str & "\bloodybackup\Resource", str & "\Resource", 1
CreateObject("scripting.filesystemobject").copyfolder str & "\bloodybackup\Textures", str & "\Textures", 1
CreateObject("scripting.filesystemobject").copyfile str & "\bloodybackup\module.ini", str & "\", 1
CreateObject("scripting.filesystemobject").copyfile str & "\bloodybackup\scene_props.txt", str & "\", 1
CreateObject("scripting.filesystemobject").copyfile str & "\bloodybackup\mission_templates.txt", str & "\", 1
CreateObject("scripting.filesystemobject").deletefolder str & "\bloodybackup"
Command2.Caption = "添加"
Command2.Enabled = True
End If

End Sub

Function RegExpnum(restr As String) As Boolean
    With re
        RegExpnum = .Test(restr)
    End With
End Function


Private Sub Form_Load()
    With re
            .Global = True
            .IgnoreCase = False
            .MultiLine = False
            .Pattern = "(^\d[0-9]*$)"
    End With
End Sub

Private Sub Image2_Click()
MsgBox "由ggfgfgf制作,为你的mount&blade模组添加地面血迹效果.感谢幼道和阿格兰的指导."
End Sub

Private Sub Label1_Click()
MsgBox "由ggfgfgf制作,为你的mount&blade模组添加地面血迹效果.感谢幼道和阿格兰的指导."
End Sub

42

主题

475

回帖

390

积分

见习骑士

Rank: 3

UID
3398051
第纳尔
1397
精华
0
互助
39
荣誉
4
贡献
10
魅力
300
注册时间
2022-8-13
鲜花(46) 鸡蛋(0)
 楼主| 发表于 2024-2-19 16:06:05 | 显示全部楼层
Sorobot 发表于 2024-2-19 14:16
我这里好像有问题源码下不下来,想请问楼主是如何实现读取游戏局内数据的?我的思路有点卡住了 ...

哥们准备写点啥啊

1

主题

4

回帖

12

积分

随仆

Rank: 1

UID
3619016
第纳尔
20
精华
0
互助
2
荣誉
0
贡献
0
魅力
20
注册时间
2024-2-14
鲜花(0) 鸡蛋(0)
发表于 2024-2-19 22:02:54 | 显示全部楼层
ggfgfgf 发表于 2024-2-19 14:23
源码能下啊,是不是报病毒,这是中文站问题,点更多,保留就行,没有病毒 ...

确实是中文站的问题,点来一直没反应 ,按你说的方法可以了。我现在做的是预览全地图地点和人物位置,现在做的效果只能读parties.txt,这样的话不能覆盖局内信息,也就是人一旦走动位置就变了,想着多参考参考大佬

0

主题

3

回帖

1

积分

平民

Rank: 1

UID
414039
第纳尔
1
精华
0
互助
0
荣誉
0
贡献
0
魅力
0
注册时间
2011-4-20
鲜花(0) 鸡蛋(0)
发表于 2024-3-19 17:31:22 | 显示全部楼层

感谢楼主分享
您需要登录后才可以回帖 登录 | 注册(Register!)

本版积分规则

Archiver|手机版|小黑屋|骑马与砍杀中文站

GMT+8, 2024-4-28 12:44 , Processed in 0.139279 second(s), 35 queries , Gzip On, MemCached On.

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表