Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Which classes and properties are a "must have"? #261

Open
ramonmolossi opened this issue Jul 14, 2020 · 3 comments
Open

Which classes and properties are a "must have"? #261

ramonmolossi opened this issue Jul 14, 2020 · 3 comments

Comments

@ramonmolossi
Copy link

Hi,

I am in the process of learning the framework and after reading all the wiki pages and some of the closed issues I was able to put everything running, which includes Unity Client and debug both client and server in vsCode.

When I started to try some modifications in the Logic Classes I could not, cause I am using a Manjaro Linux and Libre Office.
LibreOffice generates excel files differently when using boolean values, zeros and ones, and the NFFileProcess and "miniExcel" couldn't read my files anymore after modifications.

So I started to write a new "Generator", written in Java using a relational database.

One of the final steps I have create was a validation to the "ref" properties and have found in the NPC Class you included a "DropProbability" property with Ref="1", is this correct?

I'm trying to get rid of everything that is not essencial to the core framework, cause 'less is more' when you are learning the basics.

But I found that, for example, I can't mark NPC::EffectData as non-Ref and remove EffectData without getting an error message. I can't remove InitProperty and niether the 'DefaultObject' NPC.

It's really hard to understand this part of the logic of the 'startup'.

I would appreciate if u please took some time to explain:
- What can get removed.
- InitProperties, Job and Levels.
- DefaultObject
- Records

The wiki is actually very good, I was able to implement the chat system, new messages in the UnityClient, listeners, but the topics above have been forgotten.

Some others considerations:

  • The script kill.sh should kill just NFServer processs, it's currently killing the Unity Process(client) as well (Linux)

    • Maybe changing grep from NF* to NFServer could fix.
  • VSCode complains the Mac configurations in launch.json, I don't know how to fix, I'm justing commenting the line // "MIMode": "lldb" in each server configuration.

  • NFScriptSystem.lua, line 128, I got a NullPointer, missing if clause:

    • "if ScriptList then" should fix
    • same in the methods: module_awake, module_init, module_after_init, module_ready_execute, module_before_shut
  • Wiki:

    • How-to-add-new-attributes: You have a broken image at the end.
  • Consider to open a "Discord server" or something like that to answer messages.

One additional contribution:

-I am running redis on a docker system, you should consider to dockerize the GameServers:

DOCKER - https://hub.docker.com/_/redis?tab=description

Pull image
docker pull redis:6.0.5-alpine

docker run -v /home/yourusername/GameDev/redis-6.0.5/redis.conf:/usr/local/etc/redis/redis.conf -p 6379:6379 --name redis-0 -d redis:6.0.5-alpine redis-server /usr/local/etc/redis/redis.conf

Below parameters explanation:

set the redis.conf
-v /home/yourusername/GameDev/redis-6.0.5/redis.conf:/usr/local/etc/redis/redis.conf

expose port to access from Host
-p 6379:6379

set the container name
--name redis-0

set the image to run detached
-d

set the image version
redis:6.0.5-alpine

command line to run
redis-server /usr/local/etc/redis/redis.conf

Starting docker container
docker start redis-0

Stopping docker container
docker stop redis-0

@ketoo
Copy link
Owner

ketoo commented Jul 14, 2020

Thanks for your high-value feedback.

  • In terms of Generator, you don't need to rewrite a new Generator and you can do the modification via XML files.

  • One of the final steps I have create was a validation to the "ref" properties and have found in the NPC Class you included a "DropProbability" property with Ref="1", is this correct? -----Absolutely correct, the "Ref=1" is to check that the value our designer full is a correct config id from other XML files. Here have some errors that come from my config file NPC.xlsx, the property "DropProbability" and property "DropPackList" should Ref=0 as it doesn't need to ref to a new config id. I will modify it soon.

  • To setup a minimal requirements game server, we need some basic logic:
    For players, we need to know the basic attributes come from job and level, if you don't need that, just use job = 0 and level = 1, but this system is a universal system to support the different game genres. So you don't need to remove InitProperty.xlsx and you can reuse it as it is the basic system for a game.

  • For DefaultObject, you can remove this one if you don't need it as this one is to let designers have a quick way to reuse a game object when need.

  • In terms of Record EffectData, as we all know that the property "prefab" will tell players what the game object looks like, but the EffectData is different as we will use it to tell players how sharp a game object(or a hero) is. For instance, you can fill a high value for MAXHP and Armor which means the other players can't get kills from you. You could remove this record if you want to redesign a new one. I will put some new doc for this system as it is useful for developers.

  • kill.sh, NFScriptSystem.lua, and the broken image will be fixed soon.

  • Dockerize, I have provided the Dockerfile for game server, people can use it by modifying a bit code if they want to use it.

@ramonmolossi
Copy link
Author

ramonmolossi commented Jul 15, 2020

I'll use some Wow Classic references to better try to explain and you let me know if I understand all correctly.

In Wow Classic "Job" could be Hunter, Warrior, Mage...
And "Level" is 1 to 60.

When first start your character have certain Job(chosen by you) and Level 1 as default.

Then the framework will search for this pair(Job/Level) in the InitProperty.xml and get the "HeroConfigID" attribute.
Probably HeroConfigIDEx is not used.

Since this HeroConfigID is a Ref=1, it gonna search for it in any class. By your default game design you chosen "DefaultObject", an instance of NPC class which have the attribute EffectData(ref=1).

You said this "DefaultObject" act as just a guideline for your designers.
So each pair of Job/Level probably need your own NPC instance(ini values) to act as a placeholder for values used as constraints of the Player(both NPC atrributes and effectData attributes:maxHP,minHP,etc)
And some NPCs attribute are not used in these cases, for example ShowName.

That said, lets get some example,
Hunter(Job=0) Level 1 can have maxHP 200.
Hunter(Job=0) Level 2 can have maxHP 300.
Warrior(Job=1) Level 1 can have maxHP 400.
Warrior(Job=1) Level 2 can have maxHP 800.

If you have 5 Jobs, 60 Levels, you'll need 300 "Dummy NPCs" and 300 different EffectData(of course u can reuse them, as well as NPCs).

And problably these "Dummy NPCs" will not be used in your Scenes Xml ("Scenes/1.xml", etc..)

ENPCType is not used for this purpose, is it?
enum ENPCType
{
NORMAL_NPC = 0; //
HERO_NPC = 1; //
TURRET_NPC = 2; //
};

@ketoo
Copy link
Owner

ketoo commented Jul 15, 2020

Yours understand all correct.

Normally all you only need the ENPCType is NORMAL_NPC if you are not developing a game like DOTA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants