├── VUPSimulator.Interface.Demo ├── 1100_CheatEngine │ ├── plugin │ │ ├── CheatEngine.lps │ │ ├── Panuon.WPF.dll │ │ ├── CheatEngine.dll │ │ ├── LinePutScript.dll │ │ ├── Panuon.WPF.UI.dll │ │ ├── TextToDocument.dll │ │ └── VUPSimulator.Interface.dll │ ├── icon.png │ ├── info.lps │ └── image │ │ └── software │ │ └── CheatEngine.png ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── packages.config ├── CheatEngine.cs ├── MainPlugin.cs ├── Theme.xaml ├── winCheatEngine.xaml.cs ├── VUPSimulator.Interface.Demo.csproj └── winCheatEngine.xaml ├── VUPSimulator.png ├── README.assets └── image-20220708233151685.png ├── .editorconfig ├── VUPSimulator.Interface ├── UI │ ├── IMCTag.cs │ ├── IWidget.cs │ ├── IWindows.cs │ ├── WidgetHandle.cs │ └── WindowsPageHandle.cs ├── Items │ ├── Draw.cs │ ├── Paint.cs │ ├── L2D.cs │ ├── Item.cs │ └── Food.cs ├── Image │ ├── GenImage.xaml │ ├── GenImageTemplate.cs │ └── ProfileImage.cs ├── Core │ ├── Theme.cs │ ├── Core.cs │ └── Resources.cs ├── Data │ ├── CommentBase.cs │ ├── VideoEditorType.cs │ ├── Statistics.cs │ ├── Comment.cs │ ├── Video.cs │ └── UIData.cs ├── Handle │ ├── SoftWare.cs │ ├── MainPlugin.cs │ └── IMainWindow.cs ├── Type │ ├── Music.cs │ ├── Users.cs │ ├── StudyContent.cs │ ├── UserNili.cs │ ├── OldPainterAuthor.cs │ └── PlayerState.cs └── VUPSimulator.Interface.csproj ├── VUPSimulator.Interface.sln ├── README.md └── .gitignore /VUPSimulator.Interface.Demo/1100_CheatEngine/plugin/CheatEngine.lps: -------------------------------------------------------------------------------- 1 | plugin#CheatEngine:| 2 | dll:| -------------------------------------------------------------------------------- /VUPSimulator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LorisYounger/VUPSimulator.Interface/HEAD/VUPSimulator.png -------------------------------------------------------------------------------- /README.assets/image-20220708233151685.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LorisYounger/VUPSimulator.Interface/HEAD/README.assets/image-20220708233151685.png -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/1100_CheatEngine/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LorisYounger/VUPSimulator.Interface/HEAD/VUPSimulator.Interface.Demo/1100_CheatEngine/icon.png -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/1100_CheatEngine/plugin/Panuon.WPF.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LorisYounger/VUPSimulator.Interface/HEAD/VUPSimulator.Interface.Demo/1100_CheatEngine/plugin/Panuon.WPF.dll -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/1100_CheatEngine/plugin/CheatEngine.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LorisYounger/VUPSimulator.Interface/HEAD/VUPSimulator.Interface.Demo/1100_CheatEngine/plugin/CheatEngine.dll -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cs] 2 | 3 | # CS1998: 异步方法缺少 "await" 运算符,将以同步方式运行 4 | dotnet_diagnostic.CS1998.severity = suggestion 5 | 6 | # CS1591: 缺少对公共可见类型或成员的 XML 注释 7 | dotnet_diagnostic.CS1591.severity = suggestion 8 | -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/1100_CheatEngine/info.lps: -------------------------------------------------------------------------------- 1 | vupmod#CheatEngine:|author#lorisyounger:|gamever#100:|ver#100:| 2 | intro#添加一个修改器到应用程序上/com这算是代码嵌入类型MOD的DEMO:| 3 | authorid#253101309:| 4 | itemid#2821702097:| -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/1100_CheatEngine/plugin/LinePutScript.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LorisYounger/VUPSimulator.Interface/HEAD/VUPSimulator.Interface.Demo/1100_CheatEngine/plugin/LinePutScript.dll -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/1100_CheatEngine/plugin/Panuon.WPF.UI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LorisYounger/VUPSimulator.Interface/HEAD/VUPSimulator.Interface.Demo/1100_CheatEngine/plugin/Panuon.WPF.UI.dll -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/1100_CheatEngine/plugin/TextToDocument.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LorisYounger/VUPSimulator.Interface/HEAD/VUPSimulator.Interface.Demo/1100_CheatEngine/plugin/TextToDocument.dll -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/1100_CheatEngine/image/software/CheatEngine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LorisYounger/VUPSimulator.Interface/HEAD/VUPSimulator.Interface.Demo/1100_CheatEngine/image/software/CheatEngine.png -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/1100_CheatEngine/plugin/VUPSimulator.Interface.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LorisYounger/VUPSimulator.Interface/HEAD/VUPSimulator.Interface.Demo/1100_CheatEngine/plugin/VUPSimulator.Interface.dll -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/CheatEngine.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using VUPSimulator.Interface; 7 | namespace CheatEngine 8 | { 9 | public class CheatEngine : ISoftWare 10 | { 11 | public string SoftwareName => "CE修改器"; 12 | public string SoftwareInfo => "可以修改绝大部分游戏数据,是通关利器"; 13 | 14 | public WindowsPageHandle NewSoftWare(IMainWindow mw, string args) 15 | { 16 | return new winCheatEngine(mw); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /VUPSimulator.Interface/UI/IMCTag.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace VUPSimulator.Interface 8 | { 9 | /// 10 | /// 消息窗口 11 | /// 12 | public interface IMCTag 13 | { 14 | /// 15 | /// 类型 16 | /// 17 | EventBase.VisibleType Type { get; } 18 | /// 19 | /// 主窗口 20 | /// 21 | IMainWindow MW { get; } 22 | /// 23 | /// 当被事件激活时事件 24 | /// 25 | void MW_TimeUIHandle(TimeSpan span, IMainWindow mw); 26 | 27 | 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/MainPlugin.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using VUPSimulator.Interface; 7 | 8 | namespace CheatEngine 9 | { 10 | public class MainPlugin : VUPSimulator.Interface.MainPlugin 11 | { 12 | 13 | public MainPlugin(IMainWindow mw) : base(mw) { } 14 | 15 | /// 16 | /// 初始化游戏数据库 17 | /// 18 | /// 19 | public override async Task Load() 20 | { 21 | //添加窗体到游戏三方菜单栏 22 | MW.Core.SoftWares.Add(new CheatEngine()); 23 | } 24 | 25 | //因为不需要对游戏数据干啥,所以这些类保持为空即可 26 | //public override async void EndGame() 27 | //{ 28 | //} 29 | //public override async void StartGame() 30 | //{ 31 | //} 32 | //public override async void Save() 33 | //{ 34 | //} 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace CheatEngine.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /VUPSimulator.Interface/Items/Draw.cs: -------------------------------------------------------------------------------- 1 | using LinePutScript; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace VUPSimulator.Interface 9 | { 10 | /// 11 | /// 所有的画基础类 12 | /// 13 | public class Draw : Item 14 | { 15 | public Draw(ILine line) : base(line) { } 16 | /// 17 | /// 画师 18 | /// 19 | public string Painter 20 | { 21 | get => this[(gstr)"painter"]; 22 | set => this[(gstr)"painter"] = value; 23 | } 24 | /// 25 | /// 星级 26 | /// 27 | public double Score 28 | { 29 | get => this[(gdbe)"score"]; 30 | set => this[(gdbe)"score"] = value; 31 | } 32 | /// 33 | /// 画等级 34 | /// 35 | public double Rank 36 | { 37 | get => Find("rank").InfoToDouble; 38 | set => FindorAdd("rank").InfoToDouble = value; 39 | } 40 | 41 | } 42 | /// 43 | /// 老画师画作管理接口 44 | /// 45 | public interface IOldPainterDraw 46 | { 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /VUPSimulator.Interface/Image/GenImage.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /VUPSimulator.Interface/UI/IWidget.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace VUPSimulator.Interface 8 | { 9 | /// 10 | /// UI显示桌面组件 会自动生成可修改大小的控件和倍率调整器 11 | /// 12 | public interface IWidget 13 | { 14 | /// 15 | /// 缩放倍率比率 16 | /// 17 | double ZoomSize { get; set; } 18 | IMainWindow IMW { get; } 19 | /// 20 | /// 执行关闭窗口 21 | /// 22 | void Close(); 23 | /// 24 | /// 关闭窗口 无确认 25 | /// 26 | void CloseForce(); 27 | /// 28 | /// 更新 修改控件大小状态 29 | /// 30 | void SetThumb(); 31 | /// 32 | /// 设置当前widget为顶层 33 | /// 34 | void SetTop(); 35 | /// 36 | /// 设置当前widget为底层 37 | /// 38 | void SetBotton(); 39 | /// 40 | /// 控件透明度 41 | /// 42 | double Opacity { get; set; } 43 | /// 44 | /// 允许移动设置 45 | /// 46 | bool AllowMove { get; set; } 47 | /// 48 | /// 允许修改大小 49 | /// 50 | bool AllowChangeSize { get; set; } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /VUPSimulator.Interface/Core/Theme.cs: -------------------------------------------------------------------------------- 1 | using LinePutScript; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows.Media; 9 | 10 | namespace VUPSimulator.Interface 11 | { 12 | /// 13 | /// 游戏主题 14 | /// 15 | public class Theme 16 | { 17 | public string Name; 18 | public string xName; 19 | public string Image; 20 | public ImageResources Images; 21 | public LPS ThemeColor; 22 | public Theme(LPS lps) 23 | { 24 | xName = lps.First().Name; 25 | Name = lps.First().Info; 26 | Image = lps.First().Find("image").info; 27 | 28 | lps.RemoveAt(0); 29 | ThemeColor = lps; 30 | 31 | Images = new ImageResources(); 32 | } 33 | } 34 | /// 35 | /// 字体 36 | /// 37 | public class IFont 38 | { 39 | public string Name; 40 | public string Path; 41 | public IFont(FileInfo path) 42 | { 43 | Name = path.Name.Substring(0, path.Name.Length - path.Extension.Length); 44 | Path = path.Directory.FullName + @"\#" + Name; 45 | } 46 | public FontFamily Font 47 | { 48 | get 49 | {//file:///D:\Documents\Visual Studio 2022\Projects\VPet\VPet-Simulator.Windows\Res\#凤凰点阵体 12px 50 | return new FontFamily(@"file:///" + Path); 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /VUPSimulator.Interface/UI/IWindows.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | 8 | namespace VUPSimulator.Interface 9 | { 10 | /// 11 | /// UI显示窗体 会自动生成外边框和底部栏 12 | /// 13 | public interface IWindows 14 | { 15 | Visibility Visibility { get; set; } 16 | IMainWindow IMW { get; } 17 | 18 | /// 19 | /// 执行关闭窗口 20 | /// 21 | void Close(); 22 | /// 23 | /// 关闭窗口 无确认 24 | /// 25 | void CloseForce(); 26 | 27 | /// 28 | /// 居中窗口 29 | /// 30 | void CenterScreen(); 31 | 32 | /// 33 | /// 软件标题 34 | /// 35 | string Title { get; set; } 36 | 37 | /// 38 | /// 设置图标 39 | /// 40 | /// new Uri($"pack://application:,,,/images/my.jpg") 41 | /// application->应用内 42 | /// siteoforigin->应用外 43 | Uri Icon { set; } 44 | 45 | /// 46 | /// 当关闭文件后进行操作 47 | /// 48 | event Action DeActive; 49 | 50 | /// 51 | /// 修改窗口大小状态 52 | /// 53 | void ChangeMax(); 54 | 55 | /// 56 | /// 当前窗体是否为置顶窗体 57 | /// 58 | public bool NowTop { get; set; } 59 | /// 60 | /// 更新 修改窗口大小状态 61 | /// 62 | public void SetThumb(); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /VUPSimulator.Interface/Data/CommentBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using LinePutScript; 7 | using static VUPSimulator.Interface.Comment; 8 | 9 | namespace VUPSimulator.Interface 10 | { 11 | /// 12 | /// 评论数据表 13 | /// 14 | public class CommentBase : Line 15 | { 16 | /// 17 | /// 类型 18 | /// 19 | public CommentType Type; 20 | /// 21 | /// 评论内容 22 | /// 23 | public new string Comments; 24 | 25 | public CommentBase(ILine line) : base(line) 26 | { 27 | Comments = line.Text; 28 | Type = (CommentType)Enum.Parse(typeof(CommentType), line.info, true); 29 | } 30 | /// 31 | /// 绑定的游戏名称 (若为Type:Game) 32 | /// 33 | public string Game 34 | { 35 | get 36 | { 37 | if (game == null) 38 | game = this[(gstr)"game"]; 39 | return game; 40 | } 41 | } 42 | private string game = null; 43 | 44 | 45 | public Comment Create() 46 | { 47 | switch (Type) 48 | { 49 | case CommentType.Game: 50 | return new Comment_Game(this) { Comments = Comments }; 51 | //case CommentType.Video: 52 | // break; 53 | //case CommentType.Stream: 54 | // break; 55 | default: 56 | return new Comment(this) { Comments = Comments }; 57 | } 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /VUPSimulator.Interface/Handle/SoftWare.cs: -------------------------------------------------------------------------------- 1 | using LinePutScript; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Media; 8 | 9 | namespace VUPSimulator.Interface 10 | { 11 | /// 12 | /// 软件类, 添加至软件列表 以在软件中心显示 13 | /// 14 | public interface ISoftWare 15 | { 16 | /// 17 | /// 软件名 18 | /// 19 | string SoftwareName { get; } 20 | /// 21 | /// 软件介绍 22 | /// 23 | string SoftwareInfo { get; } 24 | 25 | /// 26 | /// 窗体内控件, 由开发者设计和提供 27 | /// 28 | /// 主窗体 29 | /// 软件启动参数 30 | WindowsPageHandle NewSoftWare(IMainWindow mw, string args = null); 31 | 32 | } 33 | /// 34 | /// 桌面组件类, 添加至控件列表 以在桌面组件中心显示 35 | /// 36 | public interface IDesktopWidget 37 | { 38 | /// 39 | /// 桌面组件名 40 | /// 41 | string WidgetName { get; } 42 | /// 43 | /// 软件介绍 44 | /// 45 | string WidgetInfo { get; } 46 | /// 47 | /// ID,用于防止重复打开 48 | /// 49 | string ID { get; } 50 | /// 51 | /// 软件截图 52 | /// 53 | ImageSource WidgetScreenShort { get; } 54 | 55 | /// 56 | /// 桌面组件, 由开发者设计和提供 57 | /// 58 | /// 主窗体 59 | /// 桌面组件设置相关参数 60 | WidgetHandle NewWidget(IMainWindow mw, ILine data); 61 | 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /VUPSimulator.Interface/Handle/MainPlugin.cs: -------------------------------------------------------------------------------- 1 | using LinePutScript; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | namespace VUPSimulator.Interface 8 | { 9 | /// 10 | /// 这是插件的主体内容 请继承这个类 11 | /// 12 | public abstract class MainPlugin 13 | { 14 | /// 15 | /// 主窗体, 主程序提供的各种功能和设置等 大部分参数和调用均在这里 16 | /// 17 | public IMainWindow MW; 18 | /// 19 | /// MOD插件初始化 20 | /// 21 | /// 主窗体 22 | /// 请不要加载游戏和玩家数据,仅用作初始化 23 | /// 加载数据(CORE),请使用 Load 24 | /// 加载游戏(SAVE),请使用 Start 25 | public MainPlugin(IMainWindow mainwin) 26 | { 27 | //此处主窗体玩家,Core等信息均为空,请不要加载游戏和玩家数据 28 | MW = mainwin; 29 | } 30 | /// 31 | /// 加载游戏主题 32 | /// 33 | /// 主题 34 | public virtual void LoadTheme(Theme theme) { } 35 | /// 36 | /// 初始化程序, 37 | /// 38 | /// 例如, 添加自定义窗体至主程序 39 | /// MW.Core.SoftWares.Add(ISoftWare); 40 | public abstract Task Load(); 41 | /// 42 | /// 游戏开始 (可以读取Save存档) (如果玩家登出后重新开始游戏,将会被再次调用) 43 | /// 44 | /// 或添加自己的Tick到 mw.TimeHandle 45 | public virtual void StartGame() { } 46 | 47 | /// 48 | /// 游戏结束 (可以保存或清空等,不过保存有专门的Save()) 49 | /// 50 | public virtual void EndGame() { } 51 | 52 | /// 53 | /// 储存游戏 (可以写 Save.Other 储存设置和数据等) 54 | /// 55 | public virtual void Save() { } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // 有关程序集的一般信息由以下 8 | // 控制。更改这些特性值可修改 9 | // 与程序集关联的信息。 10 | [assembly: AssemblyTitle("CheatEngine")] 11 | [assembly: AssemblyDescription("作弊引擎")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("VUPSimulator.Interface.Demo")] 15 | [assembly: AssemblyCopyright("Copyright © exLB.org 2022")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // 将 ComVisible 设置为 false 会使此程序集中的类型 20 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 21 | //请将此类型的 ComVisible 特性设置为 true。 22 | [assembly: ComVisible(false)] 23 | 24 | //若要开始生成可本地化的应用程序,请设置 25 | //.csproj 文件中的 CultureYouAreCodingWith 26 | //例如,如果您在源文件中使用的是美国英语, 27 | //使用的是美国英语,请将 设置为 en-US。 然后取消 28 | //对以下 NeutralResourceLanguage 特性的注释。 更新 29 | //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly:ThemeInfo( 35 | ResourceDictionaryLocation.None, //主题特定资源词典所处位置 36 | //(未在页面中找到资源时使用, 37 | //或应用程序资源字典中找到时使用) 38 | ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置 39 | //(未在页面中找到资源时使用, 40 | //、应用程序或任何主题专用资源字典中找到时使用) 41 | )] 42 | 43 | 44 | // 程序集的版本信息由下列四个值组成: 45 | // 46 | // 主版本 47 | // 次版本 48 | // 生成号 49 | // 修订号 50 | // 51 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 52 | //通过使用 "*",如下所示: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | -------------------------------------------------------------------------------- /VUPSimulator.Interface/UI/WidgetHandle.cs: -------------------------------------------------------------------------------- 1 | using LinePutScript; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Collections.ObjectModel; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows; 9 | using System.Windows.Controls; 10 | using static VUPSimulator.Interface.Function; 11 | 12 | namespace VUPSimulator.Interface 13 | { 14 | /// 15 | /// 桌面组件接口 16 | /// 17 | public interface WidgetHandle 18 | { 19 | /// 20 | /// 宽度 21 | /// 22 | double Width { get; set; } 23 | /// 24 | /// 高度 25 | /// 26 | double Height { get; set; } 27 | //这些不需要手动继承, Grid/UC原本就有 28 | double MaxWidth { get; set; } 29 | double MaxHeight { get; set; } 30 | double MinWidth { get; set; } 31 | double MinHeight { get; set; } 32 | /// 33 | /// 允许修改大小 34 | /// 35 | WindowsSizeChange AllowSizeChange { get; } 36 | 37 | /// 38 | /// 执行关闭程序 39 | /// 40 | /// 反馈是否关闭 41 | bool Closeing(); 42 | 43 | /// 44 | /// 该窗口的host 45 | /// 46 | IWidget Host { get; } 47 | /// 48 | /// 这个Gird/桌面组件 49 | /// 50 | FrameworkElement This { get; } 51 | 52 | /// 53 | /// 桌面组件名 用于显示 54 | /// 55 | string WidgetName { get; } 56 | /// 57 | /// 右键菜单,如需自定义请修改设置 MenuItems 58 | /// 59 | ContextMenu ContextMenu { set; } 60 | /// 61 | /// 右键菜单详细设置 如需自定义请添加 请使用dispatch 62 | /// 63 | ObservableCollection MenuItems { get; } 64 | /// 65 | /// 是否为等比缩放 66 | /// 67 | bool IsUniformSizeChanged { get; } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /VUPSimulator.Interface.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.3.32519.111 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VUPSimulator.Interface", "VUPSimulator.Interface\VUPSimulator.Interface.csproj", "{3C3A998F-2995-48C3-B083-639A6013DC5F}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VUPSimulator.Interface.Demo", "VUPSimulator.Interface.Demo\VUPSimulator.Interface.Demo.csproj", "{9A1C85CB-E534-430A-9836-E8A88503463B}" 9 | EndProject 10 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F5E21ABC-7F73-4EDD-AE30-C7FBAF977CD9}" 11 | ProjectSection(SolutionItems) = preProject 12 | .editorconfig = .editorconfig 13 | EndProjectSection 14 | EndProject 15 | Global 16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 17 | Debug|Any CPU = Debug|Any CPU 18 | Release|Any CPU = Release|Any CPU 19 | EndGlobalSection 20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 21 | {3C3A998F-2995-48C3-B083-639A6013DC5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 22 | {3C3A998F-2995-48C3-B083-639A6013DC5F}.Debug|Any CPU.Build.0 = Debug|Any CPU 23 | {3C3A998F-2995-48C3-B083-639A6013DC5F}.Release|Any CPU.ActiveCfg = Release|Any CPU 24 | {3C3A998F-2995-48C3-B083-639A6013DC5F}.Release|Any CPU.Build.0 = Release|Any CPU 25 | {9A1C85CB-E534-430A-9836-E8A88503463B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 26 | {9A1C85CB-E534-430A-9836-E8A88503463B}.Debug|Any CPU.Build.0 = Debug|Any CPU 27 | {9A1C85CB-E534-430A-9836-E8A88503463B}.Release|Any CPU.ActiveCfg = Release|Any CPU 28 | {9A1C85CB-E534-430A-9836-E8A88503463B}.Release|Any CPU.Build.0 = Release|Any CPU 29 | EndGlobalSection 30 | GlobalSection(SolutionProperties) = preSolution 31 | HideSolutionNode = FALSE 32 | EndGlobalSection 33 | GlobalSection(ExtensibilityGlobals) = postSolution 34 | SolutionGuid = {639E6919-A776-4D11-8FBD-8B49D38AF51F} 35 | EndGlobalSection 36 | EndGlobal 37 | -------------------------------------------------------------------------------- /VUPSimulator.Interface/Image/GenImageTemplate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using LinePutScript; 7 | 8 | namespace VUPSimulator.Interface 9 | { 10 | /// 11 | /// 生成图片用的模板 12 | /// 13 | /// 可能的使用例子: 14 | /// NiliNili视频封面 15 | /// 16 | public class GenImageTemplate : Line 17 | { 18 | public enum GIType 19 | { 20 | Nili, 21 | } 22 | public GIType Type; 23 | public GenImageTemplate(ILine line) : base(line) 24 | { 25 | Type = (GIType)Enum.Parse(typeof(GIType), info, true); 26 | } 27 | /// 28 | /// 生成Nili视频的封面 29 | /// 30 | /// 31 | public GenBase genImageNili(string text,string usrimg,string bgimg) 32 | { 33 | //Nili图片模板可能用到的参数 34 | ILine clom = new Line(this); 35 | clom["GIText"].Infos["t"] = text; 36 | clom["GIImage"].Infos["p"] = usrimg; 37 | clom["GIBackGround"].Infos["bg"] = bgimg; 38 | return new GenBase(clom); 39 | } 40 | /// 41 | /// 生成Nili视频的封面 42 | /// 43 | /// 44 | public GenBase genImageNili(ISub gi) 45 | { 46 | //Nili图片模板可能用到的参数 47 | ILine clom = new Line(this); 48 | clom["GIText"].Infos["t"] = gi.Infos["git"]; 49 | clom["GIImage"].Infos["p"] = gi.Infos["gii"]; 50 | clom["GIBackGround"].Infos["bg"] = gi.Infos["gibg"]; 51 | return new GenBase(clom); 52 | } 53 | } 54 | 55 | /// 56 | /// 自动生成图片基本类, 可以生成图片控件,方便多次调用 57 | /// 58 | public class GenBase : Line 59 | { 60 | public GenBase(ILine line) : base(line) { } 61 | public GenImage Create(IMainWindow mw) 62 | { 63 | return new GenImage(mw, this); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /VUPSimulator.Interface/Type/Music.cs: -------------------------------------------------------------------------------- 1 | using LinePutScript.Localization.WPF; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace VUPSimulator.Interface 10 | { 11 | /// 12 | /// 音乐文件 13 | /// 14 | public class Music 15 | { 16 | /// 17 | /// 音乐类型 18 | /// 19 | public enum MusicType 20 | { 21 | /// 22 | /// 默认 23 | /// 24 | Default, 25 | /// 26 | /// 欢快 27 | /// 28 | Cheerful, 29 | /// 30 | /// 悲伤 31 | /// 32 | Sad, 33 | /// 34 | /// 自定义: 不允许抽取 35 | /// 36 | DIY 37 | } 38 | /// 39 | /// 音乐类型 40 | /// 41 | public MusicType Type; 42 | /// 43 | /// 音乐名字 44 | /// 45 | public string Name; 46 | /// 47 | /// 音乐文件路径 48 | /// 49 | public string Path; 50 | 51 | private string transname = null; 52 | /// 53 | /// 翻译后的名字 54 | /// 55 | public string TransName 56 | { 57 | get 58 | { 59 | if (transname == null) transname = Name.Translate(); 60 | return transname; 61 | } 62 | } 63 | public Music(FileInfo path) 64 | { 65 | Name = path.Name; 66 | Path = path.FullName; 67 | if (Enum.TryParse(path.Directory.Name, true, out var musictype)) 68 | { 69 | Type = musictype; 70 | } 71 | else 72 | { 73 | Type = MusicType.Default; 74 | } 75 | } 76 | public Music() 77 | { 78 | 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /VUPSimulator.Interface/Items/Paint.cs: -------------------------------------------------------------------------------- 1 | using LinePutScript; 2 | using LinePutScript.Localization.WPF; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace VUPSimulator.Interface 10 | { 11 | /// 12 | /// 由画师绘制的物品,例如L2D等 13 | /// 14 | public class Item_Paint : Item 15 | { 16 | public Item_Paint(ILine line) : base(line) 17 | { 18 | 19 | } 20 | /// 21 | /// 最大星级 22 | /// 23 | public double Max => Find("max").InfoToDouble; 24 | /// 25 | /// 最小星级 26 | /// 27 | public double Min => Find("min").InfoToDouble; 28 | /// 29 | /// 基础价格 30 | /// 31 | public double PriceBase => GetDouble("pricebase", 1000); 32 | /// 33 | /// 预计花费时长 34 | /// 35 | public double Spendtime => GetDouble("spendtime",14); 36 | /// 37 | /// 画师 (用于定位) OldPainterAuthor (ID) 38 | /// 39 | public string Painter => this[(gstr)"painter"]; 40 | /// 41 | /// 真画师 (部分作者会被塞到其他集团名下) 42 | /// 43 | public string PainterReal 44 | { 45 | get 46 | { 47 | if (Find("painterreal") == null) 48 | { 49 | return Painter; 50 | } 51 | else 52 | { 53 | return Find("painterreal").Info; 54 | } 55 | } 56 | } 57 | 58 | /// 59 | /// 实际综合等级 (星级) 60 | /// 61 | public virtual double TotalRank 62 | { 63 | get => Find("totalrank").InfoToDouble; 64 | set => FindorAdd("totalrank").Info = value.ToString(); 65 | } 66 | /// 67 | /// 物品介绍 (包括属性等) 68 | /// 69 | public virtual string PaintIntroduce => "作品名称: {0}\n画师: {1}".Translate(ItemDisplayName, PainterReal); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /VUPSimulator.Interface/UI/WindowsPageHandle.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using static VUPSimulator.Interface.Function; 9 | 10 | namespace VUPSimulator.Interface 11 | { 12 | /// 13 | /// 窗体内控件 请同时继承与Grid/UC以便进行窗体设计 14 | /// 15 | public interface WindowsPageHandle 16 | { 17 | //public WindowsPageHandle(MainWindow mainw) 18 | //{ 19 | // Host = new Windows(mainw,this); 20 | //} 21 | /// 22 | /// 宽度 23 | /// 24 | double Width { get; set; } 25 | /// 26 | /// 高度 27 | /// 28 | double Height { get; set; } 29 | //这些不需要手动继承, Grid/UC原本就有 30 | double MaxWidth { get; set; } 31 | double MaxHeight { get; set; } 32 | double MinWidth { get; set; } 33 | double MinHeight { get; set; } 34 | 35 | /// 36 | /// 程序ID 用于重复性检查 37 | /// 38 | string ID { get; } 39 | /// 40 | /// 执行关闭程序 41 | /// 42 | /// 反馈是否关闭 43 | bool Closeing(); 44 | /// 45 | /// 最大化处理 46 | /// 47 | void Max(); 48 | /// 49 | /// 正常化处理 50 | /// 51 | void Min(); 52 | /// 53 | /// 隐藏处理 54 | /// 55 | void Hide(); 56 | /// 57 | /// 显示处理(一般为第二次显示) 58 | /// 59 | void Show(); 60 | /// 61 | /// 允许修改大小 62 | /// 63 | WindowsSizeChange AllowSizeChange { get; } 64 | /// 65 | /// 允许隐藏 66 | /// 67 | bool AllowHide { get; } 68 | /// 69 | /// 该窗口的host 70 | /// 71 | IWindows Host { get; } 72 | /// 73 | /// 这个Gird/MW窗口 74 | /// 75 | FrameworkElement This { get; } 76 | 77 | /// 78 | /// 电脑使用性能与配置 79 | /// 80 | ComputerUsage Usage { get; set; } 81 | /// 82 | /// 是否储存窗体大小设置 83 | /// 84 | bool StoreSize { get; } 85 | /// 86 | /// 是否为等比缩放 87 | /// 88 | bool IsUniformSizeChanged { get; } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /VUPSimulator.Interface/VUPSimulator.Interface.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net8.0-windows 4 | Library 5 | 11.0 6 | false 7 | true 8 | true 9 | AnyCPU;x64;x86 10 | Debug;Release;Test 11 | 12 | 13 | bin\Release\VUPSimulator.Interface.xml 14 | 15 | 16 | bin\Release\VUPSimulator.Interface.xml 17 | 18 | 19 | bin\Release\VUPSimulator.Interface.xml 20 | 21 | 22 | bin\Release\VUPSimulator.Interface.xml 23 | 24 | 25 | bin\Release\VUPSimulator.Interface.xml 26 | 27 | 28 | bin\Release\VUPSimulator.Interface.xml 29 | 30 | 31 | 32 | .editorconfig 33 | 34 | 35 | 36 | 37 | 1.11.9 38 | 39 | 40 | 1.0.7 41 | 42 | 43 | 44 | 1.1.3 45 | 46 | 47 | 1.2.4.10 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/Theme.xaml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace CheatEngine.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// 一个强类型的资源类,用于查找本地化的字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// 返回此类使用的缓存的 ResourceManager 实例。 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CheatEngine.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// 重写当前线程的 CurrentUICulture 属性,对 51 | /// 使用此强类型资源类的所有资源查找执行重写。 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 虚拟主播模拟器 程序接口 2 | 3 | 4 | 通过使用虚拟主播模拟器程序接口, 您可以修改游戏中绝大部分内容和软件 5 | 6 | ***注意: 虚拟主播模拟器还在开发阶段,程序接口变动可能会比较大, 新版本可能不兼容旧版本接口或需要升级** 7 | 8 | ## 安装和引用 9 | 10 | 引用项目 `VUPSimulator.Interface` 11 | 12 | 或使用 [nuget.org](https://www.nuget.org/packages/VUPSimulator.Interface/) ^(暂未发布,因为还在开发中,变动比较频繁,就懒得上传了,请手动编译引用下)^ 13 | 14 | ```bash 15 | Install-Package VUPSimulator.Interface 16 | ``` 17 | 18 | ## 编写 19 | 20 | 新建类库^(仅后端)^或WPF类库^(包括软件等前端)^项目 21 | 游戏与接口均使用 .net framework 4.8 22 | 23 | 新建类并继承 `VUPSimulator.Interface.MainPlugin`, 这将是游戏调用主要端口 24 | 25 | ## 项目结构 26 | 27 | 详细请参见代码注释,基本上都有且很详细 28 | 29 | * Core - 核心 30 | * Core: 游戏文本/图片/资源等数据, 可以通过 `MW.core`调用 31 | * Save: 玩家存档数据 若未开始游戏则为空. 可以通过 `MW.save`调用 32 | * Source: 资源集格式 33 | * Theme: 游戏主题 34 | * Data - 游戏数据 35 | * Handle - 接口 36 | * Function: 游戏通用方法, 常用的有 `Rnd`随机数生成 等 37 | * IMainWindow: 主窗体接口 开发者可通过此接口获取游戏信息和进行高级代码MOD开发 38 | * MainPlugin: 这是插件的主体内容 请继承这个类 39 | * SoftWare: 软件类, 添加至软件列表 以在软件中心显示 40 | * Image 41 | * GenImage: 图片生成器 42 | * GenImageTemplate: 图片生成器模板 43 | * ProfileImage: 随机头像生成器 44 | 45 | * Items - 物品类 46 | * Base: 物品基础类 47 | * Computer: 计算机相关物品类 48 | * Game: 游戏类 49 | * Type - 其他类型 50 | * Comment: 评论类 包括视频,直播,游戏评价等 51 | * Event: 事件 从小的扣体力到大的故事链均使用这个类 52 | * UsersNili: Nili用户类 53 | * Users: 用户信息 54 | * Video: 视频类 一般由玩家录制的视频(也有网站视频变种等) 55 | * VideoEditorType: 视频编辑选项类 编辑视频的选项 56 | * VideoNili: Nili视频类 57 | * UI - 用于显示的相关类型 58 | * IMCTag: 弹窗消息窗口,显示消息/日历 59 | * IWindows: 窗体, 会自动生成外边框和底部栏 60 | * WindowsPageHandle: 窗体内控件 请同时继承与Grid/UC以便进行窗体设计 61 | 62 | ## 编写dll描述文件 63 | 64 | 生成程序, 在生成位置找到你的dll 在本例中为`CheatEngine.dll` 65 | 新建同名文件以lps为后缀 `CheatEngine.lps` 66 | 编辑此LPS文件 67 | 68 | ```lps 69 | plugin#CheatEngine:| 70 | github#https://github.com/LorisYounger/VUPSimulator.OpenResources:| 71 | ``` 72 | 73 | plugin为你的mod名称 74 | github为开源页面地址 75 | 76 | ## 发布 77 | 78 | 参考虚拟主播模拟器游戏MOD,编写相应 `info.lps` 和 将生成的文件夹置入 `plugin`目录下 79 | 记得把编写好的dll描述文件一起放入plugin文件夹 80 | 81 | 如下方例子所示: [文件夹链接](https://github.com/LorisYounger/VUPSimulator.OpenResources/tree/main/VUPSimulator.Interface.Demo/1100_CheatEngine) 82 | 83 | ``` 84 | 游戏目录\mod 85 | - \1100_CheatEngine 86 | - \image 87 | .... 88 | - \plugin 89 | - CheatEngine.dll 90 | - CheatEngine.lps 91 | - LinePutScript.dll 92 | - ... 93 | - info.lps 94 | ``` 95 | 96 | 接着前往游戏上传至[SteamWorkshop](https://steamcommunity.com/app/1352140/workshop/)或[pull到Github](https://github.com/LorisYounger/VUPSimulator.WorkShop)即可 97 | 98 | ***发布至Steam创意工坊需遵循[创意工坊协议]()及[虚拟主播模拟器创意工坊协议]()** 99 | 100 | ***发布DLL插件需要开源并遵循[虚拟主播模拟器创意工坊协议#代码插件协议]()** 101 | 102 | ## 案例 103 | 104 | 参见 [CheatEngine](https://github.com/LorisYounger/VUPSimulator.OpenResources/tree/main/VUPSimulator.Interface.Demo) 游戏内数据修改作弊器 105 | 106 | ![image-20220708233151685](README.assets/image-20220708233151685.png) 107 | -------------------------------------------------------------------------------- /VUPSimulator.Interface/Type/Users.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Media.Imaging; 7 | using LinePutScript; 8 | 9 | namespace VUPSimulator.Interface 10 | { 11 | /// 12 | /// 所有用户信息的表, 所有人用同一套用户信息系统 13 | /// 表头 user 14 | /// 15 | public class Users : Line 16 | { 17 | public Users(ILine line) : base(line) { } 18 | /// 19 | /// 新建标准随机普通用户 20 | /// 21 | /// 用户名 22 | public Users(string userName) 23 | { 24 | UserName = userName; 25 | //全部为随机用户 26 | this["vtag"].Info = "rnd"; 27 | this["gtag"].Info = "rnd"; 28 | this["stag"].Info = "rnd"; 29 | this[(gint)"friendliness"] = Function.Rnd.Next(20, 80); 30 | } 31 | ///// 32 | ///// 全局用户信息设置 33 | ///// 34 | //public ILine ALLUserSetting = null; 35 | //public CoreUsers(ILine line,ILine set): base(line) 36 | //{ 37 | // ALLUserSetting = set; 38 | //} 39 | /// 40 | /// 用户名 41 | /// 42 | public string UserName 43 | { 44 | get => this[(gstr)"name"]; 45 | set => this[(gstr)"name"] = value; 46 | } 47 | /// 48 | /// 头像 49 | /// 50 | public string Photo 51 | { 52 | get => this[(gstr)"photo"]; 53 | // set => this[(gstr)"photo"] = value; 54 | } 55 | /// 56 | /// 获得头像图片 57 | /// 58 | /// 59 | /// 60 | public BitmapImage PhotoImage(IMainWindow mw) => string.IsNullOrEmpty(Photo) ? mw.Core.ProfileImage.GetRndImage(UserName) : mw.Core.ImageSources.FindImage("profile_" + Photo, "profile_nomal"); 61 | 62 | /// 63 | /// 对主人公的好感度 64 | /// 65 | public double GetFriendliness(ILine globaluserset) 66 | { 67 | ISub gs = globaluserset.Find(UserName); 68 | if (gs == null) 69 | { 70 | return this[(gdbe)"friendliness"]; 71 | } 72 | return gs.Infos[(gflt)"friendliness"]; 73 | } 74 | /// 75 | /// 对主人公的好感度 76 | /// 77 | public void SetFriendliness(ILine globaluserset, int value) 78 | { 79 | globaluserset[UserName].Infos[(gflt)"friendliness"] = value; 80 | } 81 | 82 | /// 83 | /// 人物视频标签,方便拉取 84 | /// 85 | public string[] VideoTag 86 | { 87 | get 88 | { 89 | ISub s = Find("vtag"); 90 | if (s == null) 91 | return null; 92 | s.info = s.GetString().ToLower(); 93 | return s.GetInfos(); 94 | } 95 | } 96 | /// 97 | /// 人物游戏标签,方便拉取 98 | /// 99 | /// 一些常用的标签: 100 | /// 101 | public string[] GameTag 102 | { 103 | get 104 | { 105 | ISub s = Find("gtag"); 106 | if (s == null) 107 | return null; 108 | s.info = s.GetString().ToLower(); 109 | return s.GetInfos(); 110 | } 111 | } 112 | /// 113 | /// 确认类型,用户可以为多个类型 114 | /// 常见类型: 画师,建模师,虚拟主播等, 确认类型后可以获取些特殊的数据 115 | /// nomal 标准,空类型 116 | /// nili nili视频发布者 117 | /// 以下类型有专门的auth类用于老画师 118 | /// painter 画师 119 | /// 120 | public string[] UsersType => Info.ToLower().Split(','); 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /VUPSimulator.Interface/Core/Core.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using LinePutScript; 8 | 9 | namespace VUPSimulator.Interface 10 | { 11 | /// 12 | /// 游戏核心数据 13 | /// 14 | public class ICore 15 | { 16 | /// 17 | /// 游戏校验码 18 | /// 19 | public long HashCode; 20 | /// 21 | /// 游戏窗口 22 | /// 23 | public IMainWindow IMW; 24 | 25 | //所有游戏需要的资源: 26 | 27 | /// 28 | /// 所有L2D立绘 29 | /// 30 | public List L2DBase = new List(); 31 | /// 32 | /// 所有图片链接,从图片库获取l2d图片 33 | /// 34 | public ImageResources ImageSources = new ImageResources(); 35 | /// 36 | /// 所有其他文件/文件夹的链接 37 | /// 38 | public Resources Resources = new Resources(); 39 | /// 40 | /// 音乐列表 41 | /// 42 | public List BGMusic = new(); 43 | /// 44 | /// 所有事件库 45 | /// 46 | public List EventBases = new List(); 47 | /// 48 | /// 所有可出售物品 49 | /// 50 | public List Items_Salability = new List(); 51 | /// 52 | /// 所有Steam游戏 53 | /// 54 | public List Game = new List(); 55 | /// 56 | /// 所有用户 57 | /// 58 | public List Users = new List(); 59 | /// 60 | /// 所有老画师作者 61 | /// 62 | public List Authors = new List(); 63 | 64 | /// 65 | /// 所有评论 66 | /// 67 | public List Comments = new List(); 68 | /// 69 | /// 所有游戏评论 70 | /// 71 | public List Comments_Game = new List(); 72 | 73 | /// 74 | /// 所有长视频剪辑类型 75 | /// 76 | public List VideoEditorsLong = new List(); 77 | /// 78 | /// 所有短视频剪辑类型 79 | /// 80 | public List VideoEditorsShort = new List(); 81 | /// 82 | /// 所有特效视频剪辑类型 83 | /// 84 | public List VideoEditorsEffects = new List(); 85 | /// 86 | /// 所有其他视频剪辑类型 87 | /// 88 | public List VideoEditorsOther = new List(); 89 | /// 90 | /// 所有主题 91 | /// 92 | public List Theme = new List(); 93 | /// 94 | /// 所有字体(位置) 95 | /// 96 | public List Fonts = new List(); 97 | 98 | /// 99 | /// 随机生成的头像工具 100 | /// 101 | public ProfileImage ProfileImage = new ProfileImage(); 102 | /// 103 | /// 图片生成模板 104 | /// 105 | public List GenImageTemplates = new List(); 106 | 107 | 108 | /// 109 | /// 所有三方软件 110 | /// 111 | public List SoftWares = new List(); 112 | /// 113 | /// 所有桌面组件 114 | /// 115 | public List Widgets = new List(); 116 | /// 117 | /// 所有三方插件 118 | /// 119 | public List Plugins = new List(); 120 | 121 | } 122 | 123 | 124 | } 125 | -------------------------------------------------------------------------------- /VUPSimulator.Interface/Data/VideoEditorType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using LinePutScript; 7 | namespace VUPSimulator.Interface 8 | { 9 | /// 10 | /// 视频编辑选项类 11 | /// 12 | public class VideoEditorType : Line, IComparable, IComparable 13 | { 14 | public VideoEditorType(ILine line) : base(line) { } 15 | 16 | /// 17 | /// 显示的文本 18 | /// 19 | public string Content => Info; 20 | /// 21 | /// 显示的注释 22 | /// 23 | public string Tips => GetString("tips"); 24 | /// 25 | /// 全称注释 26 | /// 27 | /// 主窗口 28 | public string FullTips(IMainWindow mw) 29 | { 30 | string wp = WhyPass(mw); 31 | return Tips + (wp == null ? "" : ('\n' + wp)); 32 | } 33 | /// 34 | /// 判断该Type前置条件是否满足,是Enabled的一部分 35 | /// 36 | /// 主窗口 37 | /// True:可以运行该事件 38 | public bool StartDecied(IMainWindow mw) => Function.Cal.DataEnable(mw, this); 39 | /// 40 | /// 判断该Type前置条件是否满足,是Enabled的一部分 41 | /// 42 | /// 主窗口 43 | public string WhyPass(IMainWindow mw) => Function.Cal.DataEnableString(mw, this); 44 | 45 | int sort = int.MinValue; 46 | public new int CompareTo(object obj) 47 | { 48 | return Sort.CompareTo(((VideoEditorType)obj).Sort); 49 | } 50 | public int CompareTo(VideoEditorType other) 51 | { 52 | return Sort.CompareTo(other.Sort); 53 | } 54 | 55 | /// 56 | /// 所需要的时间 (剪辑前x(倍率)) 57 | /// 58 | public double TimeUseBefore => GetDouble("timeusebefore"); 59 | /// 60 | /// 所需要的时间 (剪辑后x(倍率)) 61 | /// 62 | public double TimeUseAfter => GetDouble("timeuseafter"); 63 | /// 64 | /// 所需要的时间 (固定值,单位:分钟) 65 | /// 66 | public double TimeUse => GetDouble("timeuse"); 67 | /// 68 | /// 排序顺序 69 | /// 70 | public int Sort 71 | { 72 | get 73 | { 74 | if (sort == int.MinValue) 75 | sort = GetInt("sort", 500); 76 | return sort; 77 | } 78 | } 79 | /// 80 | /// 所属分类 long/short/effect/other 81 | /// 82 | public string Type => GetString("type", "other"); 83 | 84 | /// 85 | /// 质量乘数:其他 0.01-0.99/1.00+ 86 | /// 87 | public double Quality 88 | { 89 | get => this[(gdbe)"quality"]; 90 | set => this[(gdbe)"quality"] = value; 91 | } 92 | /// 93 | /// 质量乘数:视频录制 0.01-0.99/1.00+ 94 | /// 95 | public double QualityVideo 96 | { 97 | get => this[(gdbe)"qualityvideo"]; 98 | set => this[(gdbe)"qualityvideo"] = value; 99 | } 100 | /// 101 | /// 质量乘数:声音 0.01-0.99/1.00+ 102 | /// 103 | public double QualityVoice 104 | { 105 | get => this[(gdbe)"qualityvoice"]; 106 | set => this[(gdbe)"qualityvoice"] = value; 107 | } 108 | /// 109 | /// 质量乘数:有趣 0.01-0.99/1.00+ 110 | /// 111 | public double QualityFun 112 | { 113 | get => this[(gdbe)"qualityfun"]; 114 | set => this[(gdbe)"qualityfun"] = value; 115 | } 116 | /// 117 | /// 时长乘数:有趣 0.01-0.99/1.00+ 118 | /// 119 | public double Length 120 | { 121 | get => this[(gdbe)"length"]; 122 | set => this[(gdbe)"length"] = value; 123 | } 124 | /// 125 | /// 视频渲染时长Buff 用于计算所需渲染时间 126 | /// 127 | public double RenderBuff 128 | { 129 | get => GetDouble("renderbuff", 1); 130 | set => this[(gdbe)"renderbuff"] = value; 131 | } 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/winCheatEngine.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | using VUPSimulator.Interface; 16 | 17 | namespace CheatEngine 18 | { 19 | /// 20 | /// UserControl1.xaml 的交互逻辑 21 | /// 22 | public partial class winCheatEngine : UserControl, WindowsPageHandle 23 | { 24 | IMainWindow mw; 25 | public winCheatEngine(IMainWindow mainwin) 26 | { 27 | InitializeComponent(); 28 | mw = mainwin; 29 | host = mw.ShowWindows(this, "Cheat Engine", mw.Core.ImageSources.FindImageUri("software_CheatEngine")); 30 | 31 | //初始化 32 | for (int i = 0; i < mw.Core.GenImageTemplates.Count; i++) 33 | { 34 | Did.Items.Add(i); 35 | } 36 | Did.SelectedIndex = 0; 37 | } 38 | 39 | public string ID => "winCheatEngine"; 40 | 41 | public bool AllowHide => true; 42 | 43 | private IWindows host; 44 | public IWindows Host => host; 45 | 46 | public FrameworkElement This => this; 47 | 48 | public ComputerUsage Usage { get => usage; set => usage = value; } 49 | 50 | public Function.WindowsSizeChange AllowSizeChange => Function.WindowsSizeChange.Fixed; 51 | 52 | public bool StoreSize => false; 53 | 54 | public bool IsUniformSizeChanged => false; 55 | 56 | private ComputerUsage usage = new ComputerUsage("CheatEngine") 57 | { 58 | CPUUsage = 2, 59 | GPUUsage = 0.2, 60 | MemoryUsage = 40, 61 | Import = 10 62 | }; 63 | 64 | public bool Closeing() 65 | { 66 | return true; 67 | } 68 | 69 | public void Hide() { } 70 | 71 | public void Max() 72 | { 73 | throw new NotImplementedException(); 74 | } 75 | 76 | public void Min() 77 | { 78 | throw new NotImplementedException(); 79 | } 80 | 81 | public void Show() 82 | { 83 | Host.Visibility = Visibility.Visible; 84 | mw.Toppext(Host); 85 | } 86 | 87 | 88 | public void ADDP(double i) 89 | { 90 | mw.Save.Pidear += i; 91 | mw.Save.Pspeak += i; 92 | mw.Save.Poperate += i; 93 | mw.Save.Pimage += i; 94 | mw.Save.Pclip += i; 95 | mw.Save.Pdraw += i; 96 | mw.Save.Pgame += i; 97 | mw.Save.Psong += i; 98 | } 99 | 100 | private void C_ADD1(object sender, RoutedEventArgs e) 101 | { 102 | ADDP(1); 103 | } 104 | 105 | private void C_ADD_5(object sender, RoutedEventArgs e) 106 | { 107 | ADDP(5); 108 | } 109 | 110 | private void C_HealthFull(object sender, RoutedEventArgs e) 111 | { 112 | mw.Save.Health = 100; 113 | } 114 | 115 | private void C_ADD_MONEY_10(object sender, RoutedEventArgs e) 116 | { 117 | mw.Save.Money += 100000; 118 | } 119 | 120 | private void C_ADD_MONEY_1(object sender, RoutedEventArgs e) 121 | { 122 | mw.Save.Money += 10000; 123 | } 124 | 125 | private void C_ST_FULL(object sender, RoutedEventArgs e) 126 | { 127 | mw.Save.StrengthFood = mw.Save.Health; 128 | mw.Save.StrengthSleep = mw.Save.Health; 129 | } 130 | 131 | private void btngi_Click(object sender, RoutedEventArgs e) 132 | { 133 | var tmp = mw.Core.GenImageTemplates[Did.SelectedIndex]; 134 | ImageDes.Child = tmp.genImageNili(Dtext.Text, Dimage.Text, Dbg.Text).Create(mw); 135 | } 136 | 137 | private void GIIMGDown(object sender, MouseButtonEventArgs e) 138 | { 139 | var tmp = mw.Core.GenImageTemplates[Did.SelectedIndex]; 140 | mw.winImageBoxShow("生成的图片", tmp.genImageNili(Dtext.Text, Dimage.Text, Dbg.Text).Create(mw)); 141 | } 142 | 143 | private void RName_TextChanged(object sender, TextChangedEventArgs e) 144 | { 145 | if (string.IsNullOrEmpty(RName.Text)) 146 | return; 147 | RID.Content = RName.Text.GetHashCode(); 148 | } 149 | 150 | private void RGen_Click(object sender, RoutedEventArgs e) 151 | { 152 | Rimage.Source = mw.Core.ProfileImage.GetRndImage(RName.Text); 153 | } 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /VUPSimulator.Interface/Data/Statistics.cs: -------------------------------------------------------------------------------- 1 | using LinePutScript; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace VUPSimulator.Interface 9 | { 10 | /// 11 | /// 统计 12 | /// 13 | public class Statistics : IGetOBJ 14 | { 15 | public Statistics() { } 16 | public Statistics(IEnumerable subs) 17 | { 18 | AddRange(subs); 19 | } 20 | public void AddRange(IEnumerable subs) 21 | { 22 | foreach (var sub in subs) 23 | { 24 | Data.Add(sub.Name, sub.info); 25 | } 26 | } 27 | /// 28 | /// 统计变化通知事件 29 | /// 30 | /// 发送的统计(this) 31 | /// 变动的名称 32 | /// 变动的值 33 | public delegate void StatisticChangedEventHandler(Statistics sender, string name, SetObject value); 34 | 35 | public event StatisticChangedEventHandler StatisticChanged; 36 | /// 37 | /// 统计数据字典 38 | /// 39 | public SortedDictionary Data = new SortedDictionary(); 40 | 41 | #region IGetOBJ 42 | public DateTime this[gdat subName] 43 | { 44 | get => GetDateTime((string)subName); 45 | set => SetDateTime((string)subName, value); 46 | } 47 | public FInt64 this[gflt subName] 48 | { 49 | get => GetFloat((string)subName); 50 | set => SetFloat((string)subName, value); 51 | } 52 | public double this[gdbe subName] 53 | { 54 | get => GetDouble((string)subName); 55 | set => SetDouble((string)subName, value); 56 | } 57 | public long this[gi64 subName] 58 | { 59 | get => GetInt64((string)subName); 60 | set => SetInt64((string)subName, value); 61 | } 62 | public int this[gint subName] 63 | { 64 | get => GetInt((string)subName); 65 | set => SetInt((string)subName, value); 66 | } 67 | public bool this[gbol subName] 68 | { 69 | get => GetBool((string)subName); 70 | set => SetBool((string)subName, value); 71 | } 72 | public string this[gstr subName] 73 | { 74 | get => GetString((string)subName); 75 | set => SetString((string)subName, value); 76 | } 77 | public SetObject this[string subName] { get => Find(subName) ?? new SetObject(); set => Set(subName, value); } 78 | public SetObject Find(string subName) 79 | { 80 | if (Data.TryGetValue(subName, out SetObject value)) 81 | return value; 82 | else 83 | return null; 84 | } 85 | public void Set(string subName, SetObject value) 86 | { 87 | StatisticChanged?.Invoke(this, subName, value); 88 | Data[subName] = value; 89 | } 90 | /// 91 | /// 输出统计数据 92 | /// 93 | public List ToSubs() 94 | { 95 | List subs = new List(); 96 | foreach (var item in Data) 97 | { 98 | subs.Add(new Sub(item.Key, item.Value)); 99 | } 100 | return subs; 101 | } 102 | 103 | public bool GetBool(string subName) => Find(subName)?.GetBoolean() ?? false; 104 | 105 | public void SetBool(string subName, bool value) => Set(subName, value); 106 | 107 | public int GetInt(string subName, int defaultvalue = 0) => Find(subName)?.GetInteger() ?? defaultvalue; 108 | 109 | public void SetInt(string subName, int value) => Set(subName, value); 110 | 111 | public long GetInt64(string subName, long defaultvalue = 0) => Find(subName)?.GetInteger64() ?? defaultvalue; 112 | 113 | public void SetInt64(string subName, long value) => Set(subName, value); 114 | 115 | public FInt64 GetFloat(string subName, FInt64 defaultvalue = default) => GetFloat(subName, defaultvalue); 116 | 117 | public void SetFloat(string subName, FInt64 value) => Set(subName, new SetObject(value)); 118 | 119 | public DateTime GetDateTime(string subName, DateTime defaultvalue = default) => Find(subName)?.GetDateTime() ?? defaultvalue; 120 | 121 | public void SetDateTime(string subName, DateTime value) => Set(subName, value); 122 | 123 | public string GetString(string subName, string defaultvalue = null) => Find(subName)?.GetString() ?? defaultvalue; 124 | 125 | public void SetString(string subName, string value) => Set(subName, value); 126 | 127 | public double GetDouble(string subName, double defaultvalue = 0) => Find(subName)?.GetDouble() ?? defaultvalue; 128 | 129 | public void SetDouble(string subName, double value) => Set(subName, value); 130 | #endregion 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/VUPSimulator.Interface.Demo.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {9A1C85CB-E534-430A-9836-E8A88503463B} 8 | library 9 | CheatEngine 10 | CheatEngine 11 | v4.8 12 | 512 13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 14 | 4 15 | true 16 | 17 | 18 | 19 | true 20 | full 21 | false 22 | bin\Debug\ 23 | DEBUG;TRACE 24 | prompt 25 | 4 26 | 27 | 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | ..\packages\LinePutScript.1.5.4\lib\net48\LinePutScript.dll 38 | 39 | 40 | ..\packages\Panuon.WPF.1.0.1\lib\net48\Panuon.WPF.dll 41 | 42 | 43 | ..\packages\Panuon.WPF.UI.1.1.6.5\lib\net48\Panuon.WPF.UI.dll 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 4.0 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | MSBuild:Compile 63 | Designer 64 | 65 | 66 | MSBuild:Compile 67 | Designer 68 | 69 | 70 | 71 | 72 | winCheatEngine.xaml 73 | Code 74 | 75 | 76 | 77 | 78 | Code 79 | 80 | 81 | True 82 | True 83 | Resources.resx 84 | 85 | 86 | True 87 | Settings.settings 88 | True 89 | 90 | 91 | ResXFileCodeGenerator 92 | Resources.Designer.cs 93 | 94 | 95 | 96 | SettingsSingleFileGenerator 97 | Settings.Designer.cs 98 | 99 | 100 | 101 | 102 | {3c3a998f-2995-48c3-b083-639a6013dc5f} 103 | VUPSimulator.Interface 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /VUPSimulator.Interface.Demo/winCheatEngine.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 |