Home > other >  RPG game in a mature (task/dialogue/items/skills) of the system development, is how to avoid the use
RPG game in a mature (task/dialogue/items/skills) of the system development, is how to avoid the use

Time:09-19

First of all, I know the attribute types of data, such as the type of an object id, name can be on a file or database in advance, when the game is running is read out and instantiated,
But in addition to the properties of the simple data, there are a lot of operating characteristics,
For example, A task, in addition to the id, name, release the properties, also define his can meet conditions, complete condition, complete the reward, assume that A task can meet condition is complicated, is "(to complete A task and players level greater than N) or (players who have some items and game time for B)", like all this stuff does not share data file editor,
Such as the use of an item, may go, there could be probability effect type, this I think is not share data file editor,
So I'd like to know what in the mature RPG game development is how to deal with these things, is a data file, and external script or some inevitable use hard-coded?
Looked at from a great god answer, hope to be able to detail, thank you very much!

CodePudding user response:

Type according to different types of use, code to do testing, values, as for inspection plan fill in the file,

CodePudding user response:

reference 1st floor yahle response:
different types of use, according to the type to do testing in the code, as for the testing with numerical, fill in the file,

You can say specific? Especially those and or conditions, and a branch this probability

CodePudding user response:

Suppose that A task can meet condition is complicated, is "(to complete A task and players level greater than N) or (players who have some items and game time for B)", like all this stuff does not share data file editor,
========================================================
I realize this in a project on demand, in fact this is a conditional expression parsing, the realization of the online can find ready-made, then it is ok to extend,
The conditions of the above, for example, edit the text that may be

(IsTaskCompleted (ID_A) & amp; & PlayerLevel & gt; N) | | (PlayerItems. Contain (ItemB) & amp; & GameTime & gt; B)

Then scans the expression, IsTaskCompleted PlayerLevel etc. Are you a custom function,

As to how to make the "IsTaskCompleted" such string and function in your application, you can use reflection, or build a Dictionary
For example,
Dict. [" IsTaskCompleted "]=XXXXClass IsTaskCompleted;//key: string value: a function pointer
Then according to the string table lookup,
When a custom function quantity many, require the programmer to provide a visual editing tool, it won't go wrong,
Hope the answer can help you

CodePudding user response:

T refer to world of warcraft editor or J will do
Although the fool here but if designed easy to use

CodePudding user response:

Actually this kind of problem can store not only the universal digital data problem is to get the original poster said some logic digital logic parser can do a series of logical condition decision nodes and then fill out the data of the these nodes meet the jump in the final will be a series of connected nodes that there may be some abstract you can look at UE3 kismit or UE4 blueprint will understand the very good example of digital logic

CodePudding user response:

Tasks can be such a configuration, with XML

 








CodePudding user response:

The script object
  • Related