AscensionGameDev / Intersect-Engine

Intersect provides a complete game development suite for creating 2d mmorpgs with no programming experience required!
https://www.freemmorpgmaker.com/
Other
220 stars 351 forks source link

feat: CustomTags with Entity Lists #580

Closed blinkuz closed 1 year ago

blinkuz commented 3 years ago

Is your feature request related to a problem? Please describe. Seeing the functionality of the new PR https://github.com/AscensionGameDev/Intersect-Engine/pull/577 for the tags there is a small problem of redundancy of files on the client side, where each of the entities that use the same tag would need to have a repeated PNG file, this in medium-large projects is a problem to maintain tags updated in case of changes.

Describe the solution you'd like The ideal would be to have a list of names of the customTags (in case you want to use them) that would look like this:

customTags: ['GM', 'Donor', 'VIP']

customTagsPlayers: [ {player: 'Blinkuz', tagName: 'GM'}, {player:'Arufonsu': tagName: 'VIP'} ]

This list would be for each type of tags, that is, for NPCS a list and another for Players in case you want to have everything organized

Then in the search for tags it would be to look for: GM_tag.png from the list of tags in the resources folder and assign it to the Blinkuz player, this allows the same png file to be reused in multiple players.

NOTE: The lists should be as generic as possible due to the variety of uses that can be given to them, I do not recommend making GMCustomTags, or VIPCustomTags lists, with only having 1 list for each type of entity that would be npc and player should be flexible enough to give it different uses, an example of npcs would be labels for BOSS and for ELITES enemies, where the same labels can be reused for multiple enemies.

Cheshire92 commented 3 years ago

Why not simply have a drop-down with tag files to choose from per entity. It really doesn't need to be that complicated.

There's already a separate folder and texture type they're stored in so would be minimal work and allow them to be reused.

Arufonsu commented 3 years ago

Why not simply have a drop-down with tag files to choose from per entity. It really doesn't need to be that complicated.

i know, its possible, i even had the GUI coded and everything, i just needed to find how the server creates columns in the db tables and then call that information of each entity into this draw function >.< (so far i managed it for the editor to write the tag file name into a "tag" (text sized) column in the Npcs tables, but then, since im not very skilled around this source yet, decided to do this though the Json config files).

Doing it in the editor makes it handy for Npcs, but for players, it may have to be handled in the Json files. (unless we add a "tags" list in the editor itself, which could link the tags to x players if x condition is met - sort of like titles now lol? ) OG

Cheshire92 commented 3 years ago

You'd likely want to add the Tag property to the base entity class and run a migration on the player and gamedata databases. That way the field would be available and stored on everything that inherited from the base entity class.

Would make it available just about everywhere and store it in the db as well as allow for it to be integrated into the event system as well for setting player tags.

JSON files should be reserved for values that basically should never change on runtime. Anything else should really not be in the server config.

Arufonsu commented 3 years ago

You'd likely want to add the Tag property to the base entity class and run a migration on the player and gamedata databases.

Thanks! will take a look on it once i get back from work today!

blinkuz commented 3 years ago

@Arufonsu I was thinking about the same thing as Cheshire92, I was even going to write to you by discord that I can help you implement the database part since I have made custom changes for my project by adding new fields to the database, which is relatively easy, I can also give you a hand with adding functionality from the event system to make changes to player tags in runtime.

Arufonsu commented 1 year ago

Closing this one down as not planned for now since this feature has been purged off from the engine for a while already.