This is Multiplayer RPG Template Documentation,its about configuration and production method of the main system
This case is based on UE4’s ListerServer built-in LAN online game demo, refer to the work WOW
Based on UE4 version 4.25
There are still some imperfections in the demo, which will be followed up for optimization and repair
Skill system
As shown in the above figure, this figure is the configuration information of the skill table. The important parameters are briefly described below
Action: This variable represents the unique ID of this behavior. In principle, it is the same as the RowName of the table. In many logics, you need to use the ID to find all information about the skill, or use the ID to execute the skill
Display(struct):3 parameters are used to display the general information of this skill, such as the display of the name or description and icons, which are related to the UMG, of course, you can also customize
CastData(struct):This is a spell-casting structure, which mainly sets the method and conditions of the spell-casting
Type:For example, the default reading spell casting, continuous casting, attack superimposing casting and other methods
Time:The time it takes to cast, 0 means instant
Duration:If it is a continuous cast, then this parameter means the lead time
KeepAttackStat:After the cast is finished, the normal attack will continue
MotionCast:Move cast, if set to No, you must stand cast, once you move, interrupt cast
NotTargetCast:Does not require target casting, and is generally used for range skills such as Fire and Rain
Mp:Mana cost, Warrior Rage
CD:Cooling time
MaxRange:Maximum release range, calculated in Unreal Units, 0 means unlimited
LearnGold/Level:Prerequisites for learning this skill, 0 means no requirement
RangeSelectRange:If it is a skill selected by range, this parameter indicates the radius of the effect
TargetType:Target type, place of action or friend
SkillClass:Skill class, no need to create manually
SkillRef
This is created by the SkillClass configured in the table, there is no need to manually create it, you only need to make the logic and effects of this class
This class is inherited from BP_BaseSkill, which has some messy blueprint logic, but not all are necessary to use. In this case, you can freely play in many cases. Anyway, after the skill is released, you can control this skill through this class Running the instance
Let’s explain it through the skill class of IceBullet
IceBulletInherit fromProjectileBase,As shown in the figure above, this is the basic parameter type of this class
speed: flight speed, depends on ProjectileComponent
StopDistance: the distance to stop, because this class is to track the target flight, so there will always be when approaching and reaching the target, a logic will be generated after reaching the target and stopping
Duration: Duration, if there is no hit, the time will destroy yourself
Sound / FX: related special effects configuration, Start can be used to play when it is generated, Hit can be used to play after hitting the target, but all need to be manually released - The effect of calling Start after ProjectileBase has realized BeginPlay - The Hit effect has been achieved after hitting the target
BuffData: If this skill has buff / debuff, you can set this class, you need to manually call the method to create and run the buff class, as shown below
BuffRef
This is an instance class of Buff, created by internally calling CreateBuff method of SkillRef
By rewriting the BuffInit and BuffEnd methods to achieve custom logic, if it has a continuous effect, then you can rewrite the BuffDelta method to make the logic of continuous calls
EquipSystem
As shown in the figure above, this is the configuration table of the equipment information. The following briefly introduces the role of the main parameters
BodyPart: the corresponding position of the equipment
Mesh/Mat: Used to display the model of this equipment entity, equipped on the character or discarded into the world
Property: literally means 2 kinds of properties, of which Adv property will change with the change of Base
PropSystem
The prop system is similar to the equipment system
EffectType:Effect type, this case only made the healing effect and the effect of increasing magic
Value: You can set the range value of the effect, of course, this is not necessary, specifically the internal implementation of the following prop class
CanBeStacked:If one item occupies one space in the backpack bar, otherwise it can be stacked together
ActionClass:Prop class implement logic class, refer to Skill instance implementation, specific logic can be written into this class
DropSystem
As shown in the figure above, the configuration of the drop system is placed in the DataSystem class. Why is there no configuration table? O (∩_∩) O
Of course, you can create a similar table yourself and replace the logic in it. This is very simple.
This configuration information is a Map key-value pair, the key corresponds to the role class, and the value is the drop information array
Action:Select the action name of equipment / props, etc.
Type:Choose equipment / props. Of course, if you want to drop skills, you can theoretically do it. Please play freely.
Amount:number of drops
Probability:Probability, this probability calculation is done when the character is created, when not kill
TaskSystem
As shown in the figure above, this is the configuration information of the task table
Titile:the title of the task, which will be displayed in the header section of the task bar
Target:the target of the task
DynamicTargetStat:This will be refreshed dynamically, the specific implementation logic is in the following TaskClass
TaskRef
As shown in the figure above, each time a task is accepted, a task class will be generated as an observer (agent) of the task
Specifically what the task is for, you can manage it by implementing the logic in this class, while setting the dynamic information in the task goal
Other
Monster refresh
Monster refresh is done by placing a BP_AIGenerator management class in the scene
MaxNum: the maximum number of refreshes
AIClass: Set the class for refreshing the character, if more than one, it will be randomly refreshed from it
Range: refresh monsters within a radius centered on the position of the management class
// 删除本地分支 // 注意:删除分支之前要合并分支,不然会报错(或者使用-D强制删除) // error: The branch 'dev' is not fully merged. // If you are sure you want to delete it, run 'git branch -D dev'. git branch -D dev
git status error: bad signature fatal: index file corrupt
这是由于索引损坏造成的,可以通过下面的方式来处理:
1 2
rm -f .git/index git reset
关闭Git的SSL验证
1
git config --global http.sslVerify false
私钥权限过于开放报错
使用git出现如下报错
1 2 3 4 5 6 7 8 9 10 11 12
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0644for'/root/.ssh/id_rsa' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. Load key "/root/.ssh/id_rsa": bad permissions Permission denied(publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
hint: You've added another git repository inside your current repository. hint: Clones of the outer repository will not contain the contents of hint: the embedded repository and will not know how to obtain it. hint: If you meant to add a submodule, use: hint: hint: git submodule add <url> Plugins/VaRest hint: hint: If you added this path by mistake, you can remove it from the hint: index with: hint: hint: git rm --cached Plugins/VaRest hint: hint: See "git help submodule" for more information.
目的就是告诉你你包含了另一个git的仓库。
正确的处理办法是,先把之前clone的B删除,然后使用git submodule来clone B:
1 2 3 4 5 6 7 8 9 10 11
$ git submodule add git@github.com:VJien/img.git Cloning into 'E:/GitTest/img'... remote: Enumerating objects: 123, done. remote: Counting objects: 100% (123/123), done. remote: Compressing objects: 100% (118/118), done. remote: Total 123 (delta 39), reused 0 (delta 0), pack-reused 0 Receiving objects: 100% (123/123), 4.05 MiB | 466.00 KiB/s, done. Resolving deltas: 100% (39/39), done. warning: LF will be replaced by CRLF in .gitmodules. The file will have its original line endings in your working directory
git status Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory)