flareteam / flare-engine

Free/Libre Action Roleplaying Engine (engine only)
http://flarerpg.org/
GNU General Public License v3.0
1.08k stars 189 forks source link

Arbitrary definition of resources (e.g. HP and MP) #1776

Closed dorkster closed 1 year ago

dorkster commented 3 years ago

Currently, the engine has two fixed player resources: HP and MP. I think it would be a good idea to add some flexibility here. HP is pretty standard, but MP might not fit the theme of many games. Instead of MP, maybe a game would want to define this resource as "Energy" or something similar. It may also be desirable to add more resources, such as "Stamina".

The process for implementing this should be similar to when we added arbitrary primary stats.

dorkster commented 2 years ago

Many areas of the engine assume the existence of both HP and MP. I think HP could be treated as a special case, but MP shouldn't be a requirement. Here's a list of all the engine properties that are affected by both HP & MP or just MP:

WithinAmnesia commented 2 years ago

@dorkster So can you confirm that if this works I could be able to create a 'Spirit' resource alongside a 'Mana' resource'; and abilities could require X amount of 'Spirit' and or X amount of 'Mana'? Also can HP and MP be able to be renamed to 'Health' and Mana' with this feature as well?

dorkster commented 2 years ago

That is correct. You'll be able to have more than one non-HP resource, and all resources will be able to have arbitrary names.

WithinAmnesia commented 2 years ago

Also with this feature can I also be able to add a 'Spirit' resource bar for the HUD beside the 'Mana' resource bar?

dorkster commented 2 years ago

Yes, a filename for a statbar menu will be one of the properties of a resource.

WithinAmnesia commented 2 years ago

Can HP be able to have an arbitrary name like how elements work? For example 'Health' or 'Hit Points' or even ~'Hull Structure' (for people wanting to make Sci-Fi Flare engine games)? I take that there is a plan for arbitrary names for arbitrary resources where resource like these could be possible 'Mana' and 'Spirit'?

WithinAmnesia commented 2 years ago

Prospection: I'm hoping to have "Health", "Mana" and "Spirit" with (at least) +0.1% to +0.9% or -0.1% to -0.9% to 'Health' or 'Mana' or 'Spirit'. With stats like -0.1% Health Regeneration or -0.1% Mana Regeneration or -0.1% Spirit Regeneration (and +X% Regeneration as well). Also + or - % to total 'Health' or 'Mana' or 'Spirit'. I am not sure if this is possible in Flare but I think Diablo II has this as well + or - % to current 'Health' or 'Mana' [or 'Spirit'].

I am hoping to make the core of my video game's progression around itemization and creature attributes that are near mirrors of the player attributes. These 1.14, arbitrary resources, % and fractional decimal values are key / core elements / pieces of my progression system / game design. I would like to get the 'game play core' / player progression working, attributes with statistics and elements working (1.14 issues), get the abilities / skill tree and play style progression working (skill tree horizontal scroll bar), creature encounter attributes and abilities and random drop table reward system working (needs skill tree testing), quests and other elements of civilization interaction (e.g. questing, trading and crafting) working (these are 9/10 working, maybe mercenaries / pets but that is a bonus for later; possibly reasonable ~'player housing' down the road).

I wish to do all of that before making the art and areas look very pretty. I want to get the 'core gameplay' / 'core player progression' working before I go crazy on the art and level design. For all of those visual details are mostly for making a video game 'wide'. Yet I feel that I need to get my video game to be 'deep' first to get my properties straight and be efficient with my time and avoid mechanic / core gameplay bloat and log jams and avoid retrofit hell (like with my RPG Maker nightmare XD).

I have been experimenting / tinkering to find what is doable / feasible for art and other 'wide' game development fields / content creation areas. I hope to avoid retrofit hell and have all of the major gameplay building tools ready to start building a core first (hopefully deep) chunk of my overall video game plan first to get my priorities straight and make a well 'core' of player progression and content experience for my video game.

Flare is successfully proven / experimented to work with 4K art assets and to I found run smoothly and be future proof for the 2020's and 2030's with the power offered from the 64-bit executable. A solution has been found for making 4K animations and tilesets for Flare. I have a rough working prototype for dual wielding and an ad hoc animation system 2H weapons; both of these can work with Flare 4K. Enough to build out a future proof / reasonably grow-able prototype that can support key gameplay experience components for my video game from the start. Also of which working prototype components can be feasibly replaced in retrospect for better polish. As in swapping out the working prototype animations for dual wielding and 2H animations with better player presentation versions without breaking the game engine in the future. I also just recently found a working solution to render Flare 4K high resolution tileset assets in 8 directions (4 conventional angle renders plus 4 changed angle renders to build out 8 direction renders for tilesets).

All of these Flare engine and art, mechanics and concept feasibility experiments and proof of concepts I have been working on to see what 'creative' tools I can have to work within my 'creative tool box' at the approximate start of building the core of my video game. I am hoping to have all of my 'core creative tools' at the start and make sure I can get all of the critical 'core creative tools' first before I make ~50 areas of 1,000 x 1,000 tiles populated with ~2,000+ creatures and other layers of depth and player progression and exploration systems. I hope to have all of the critical 'core creative tools' working before endeavouring to create en masse all of those large scale and intricate details all compositely interwoven throughout the first initial 'large chunk' of my overall video game world design developed hopefully for a 'commercially viable' video game of which I hope is worth playing.

I don't want to pressure / rush anything; that is not how I operate. Yet I figured to get some clarity / share my perspective / tell why am I doing what I am doing to hopefully give reasonable explanations as to what I am up to; and where I hope to go in the near future. Also to kind of show where I am at with all of this related work for all of this Flare related video game development.

. . . Introspection: I hope to not be too overly wordy / become over-encumbersome in my medium of communication / waste people's time and focus. Yet I do wish to be understood if possible with high degrees of detail; if people are interested that is. So I hope this general overview of my immediate Flare ecosystem related video game development related plan / loose structure / ~'work flow skeleton' gives insight to my modus operandi / mode of operation.

Also I hope to not keep asking for feature after feature either for that can become wasteful of people's time and good will after a point. So whatever I do, I am trying to avoid feature bloat and to also stay focused on this 'core game play experience' with trying to get my decades aged game play designs translated into a video game without going nuts and trying to stay reasonable and on track to avoid feature bloat, workflow bottle necks and most of all retrofit hell. I realize that I cannot make massive mistakes with engine development and wasting people's time asking for too much and being unseasonable in my requests. Thus I must stay on track for 'low input; high output' to keep the dreams alive of singular video game developers making great games that can go toe to toe with the titans of industry and win.

I do try to fight for features that have the potential to give a big increase to the overall quality of player experience; Deep Arbitrary Attributes and Statistics for Deep Itemization, Multiple Layered Creature (e.g. Humanoid) Sprite Animations for Deep Encounter Possibilities, Flare 4K for 2020's and 2030's Fighting Chance at Creating Classic Video Games, Dual Wielding and 2H Animation Support for Deep Character Play-style Diversity and Customization, 8 Direction Flare Tileset Rendering Tileset Art Asset Standards. The 8 direction tileset art is massive for basically adding double the possible world detail. 8 Direction tileset asset rending can enable efficient in game literal world building for intuitive non contrived 'natural looking video game worlds; that are still within reason to implement. Even with tiled art assets of the Flare ecosystem, with the 4K 8 direction rendered tileset art assets; a Flare Engine video game utilizing these 4K 8 directional tileset innovations can have a fighting chance to visually compete against and go toe to toe verses a full 3D game, and win.

All of these kinds of features are more than I feel comfortable to ask for and a lot of the solutions that I provided I went in blind with a hope and the will power to keep failing until I found a working prototype. Every solution provided by the community and especially @dorkster are something that I treasure for I know the value of theses often high complexity solutions. For I know how hard it is to battle with difficult high complexity problems. Often where there are many rounds of initial discouraging and frustrating failures and or requiring years of skill mastery to earn victory with and find ways to properly solve.

Also I feel guilty asking for anything more than what I absolutely would struggle perhaps indefinitely with in the near future with to solve on my own. Most all of every ask and or request I currently have in the Github 'Issues' pages of the Flare Engine and Flare Game I try hard to not have more than I absolutely require within reason, feasibility and in keeping / upholding with and operating in good faith and in good will of the community (also to be legal as well if I find the issue to be within ~'murky waters'). I have more things I would like (up-gradable player housing, wow-like enchanting, diablo-like gems and item socket support, epic sieges and ruling castles with chunks of land and settlements, online support etc. lots of big and or complex 'grand features' and so on). Yet these are not absolutely necessary to start building a core and or they are overly complex and or not reasonable nor feasible to ask for on a pro bono / hobby basis given the high complexity and or work load present for possible solutions.

So I try to ask only for things that I absolutely need to build the core of my already ambitious scale and feature driven video game. I need to stay away from 'wouldn't it be cool if so and so and bla bla bla?' / feature creep in order to stay focused. So as to stay away from endless feature bloat / creep and to keep on track for hopefully a successful efficient work flow and reasonable / do-able development path / make it happen / build and realize for an already ambitious multi-decade project that I have been struggling to get to the point where I am at now. To build a powerful deep core for a video game with all of the deep player progression and itemization systems and mechanics. To get all of these ambitious player experience and progression systems into a big full fledged / video game-afide / realized video game playable world of my medieval fantasy setting. Finally to become a video game developer with full creative power and to be able to be paid for my work and to more over to be able to empower a world community that wants to play games worth playing.

. . . Retrospection: It feels kind of surreal being so close after so many years of failing and failing to get closer and closer and more and more creatively powerful after each failure, near miss and salvaged video game development project after salvaged video game development project. I started out playing video games on 80's and 90's [also I think an Atari and a Sega] console(s) in the mid to late 90's as soon or earlier than I could properly hold a controller. I remember gumming a SNES controller and seeing the dark world from The Legend of Zelda A Link to the Past. On the screen of a large, blocky and heavy living room centerpiece of an early 90's wood accented colour CRT television set with silvery spinning dials to spin and buttons to press on the side and bunny ears on top with and free CBC. It is crazy now watching the old red green show and 90's art attack show (and most all of 80's and 90's VHS cartoons and animated ~'kids movies' like the Black Cauldron or even Krull and other common 70-90's adventure movie VCR tapes). These are like watching a fever dream for myself now in my more grown up years lol. I remember what they looked like but when I was so little I had no idea what the film was about. Yet when I am re-watching these with a developed brain I do now :-P. I remember these primordial recollections of my meekest days of youth when I was at least a 1 year old XD.

I remember being amazed and wanting more to experience in each video game world behind each mystery and secret and every sense of wonder that populated these early video games of my childhood. These early video game experiences were often on the Super Nintendo Entertainment System with such examples as The Legend of Zelda A Link to the Past, Super Mario RPG, J.R.R. Tolkien's The Lord of the Rings, Vol. I, Also with NES mixed in with various Zeldas, Final Fantasies, Castlevanias, Dragon Quest, Aladdin / Princes of Persia etc. Also I liked the N64 Zelda Ocarina of Time, Banjo Kazooie and Tooie and Turok and Super Mario 64 + Mario Kart 64 and Golden Eye as well. I was 9 years old and I could not read when I first played Diablo 1 on a floppy disk, I got to the butcher at my grandmother's place and then all the gore was cool to myself but not my grandma lol. Then banned from Diablo 1, I played Baldur's Gate Tales of the Sword Coast in 2005 and pretty much since then I have been on this journey to make a great video game series worth playing. I remember fondly the sense of wonder and exploration given from experiencing Early 2000's / Old School Runescape, Diablo II on an early to mid 2000's Dial Up Internet, beige CRT Monitor and Slow-Ass PC, Mid-2000's Oblivion on a better but still clunky-ass PC and then 2000's World of Warcraft. All of these and other kinds of 2000's high quality RPGs that I played back in the day also inspired myself to create something truly special for the entire world to enjoy together as one rich or poor.

I do not really that I can really forget World of Warcraft after 15 years playing all kinds of World of Warcraft; retail Scarlet Crusade west coast retail server, various private servers including Kronos WoW, and tinkering, exploring and learning the schematics of grand scale game development to become a better experienced game developer on my own personal developmental servers of various client versions of WoW. I started playing WoW with the retail launch of TBC in 2007 until 2010 pre-patch of Cataclysm. Then I tinkered around with free accounts (some multi-boxing to see if I could PvP at level 19) to mess around with low level areas until MoP in 2012. Then I hoped around private servers in 2012 (custom content servers like Heroes WoW and Chaos WoW I remember briefly), then I played Molten WoW [WotLK] from ~2012 to the Moltdown in 2015, then I started playing on Kronos WoW [the known world's greatest private server of arguably the known world's greatest M.M.O.R.P.G.] in 2015 and played vanilla WoW until early 2020 after farming end game Naxxramas (hard core raiding with my old Guild - Unite and Vanquish as Core Raider from 2018-2019) on multiple characters and getting BiS on my 300 ms Ping Night Elf Warrior Veldryn. Then I kept playing and raiding on Kronos (after my guild effectively disbanded) in helping use my hardcore Raiding experience and BiS gear with the server to keep raiding end game / progress through Naxxramas on a composite 'survivor' guild called Legacy from 2019 to 2020. After WoW Classic retail launched in 2019 that gutted the server and my old Guild in 2019. Also in 2019 I think that I started to play a custom vanilla WoW server called Turtle WoW and I helped a bit with development with items / quests / end game from 2019-2021. I last raided Naxxramas on Kronos in 2021 as a guild anniversary get together event after a year of not playing on Kronos. I recorded the whole raid and saved other people's videos and how usual Ping high level hardcore player gameplay looks like from a guildy's twitch stream of the whole raid.

I started hardcore raiding vanilla WoW on Kronos to innately understand what the highest point of an MMORPG progression could be to experience; I did so just 2 runs before Unite and Vanquish stopped raiding and went to Retail Classic WoW. After over 12 months without missing a raid I earn Gressil, Dawn of Ruin; dropped from the hardest encounter from the hardest raid in all of vanilla WoW and 2000's WoW, being the irrefutably best in slot one-handed weapon of all melee characters and the most sought after item bar none in all of vanilla World of Warcraft. I was not the best Warrior literally in the world with 300 ms ping but I was the most dedicated Warrior; and I still got to the very top even with 300 ms of Ping. Where when I logged on at least 40% of my D.P.S. was instantly gone via Satellite internet and a server hosted on the other side of the planet and as such I was render mechanically unable to properly 40-raid main tank. Yet would be damned if I didn't off-tank in full DPS spec and playing to tier 3 and near-BiS a melee Hunter with no pet (for the A.I. pathfinding was atrocious with 300 ms ping and I played a tight technical game where I could make no stupid raid wipe mistakes and I had to guess and learn where to stand before I could even see the danger with 4D lag compensation) with Nightfall spamming wingclip for bosses that had no drop item to chase for Veldryn XD. Yet in spite of playing on 300 ms Ping hard more of an already up-tuned Naxxramas, the hardest raid of the arguably the best version of version of World of Warcraft from arguably the best era of the franchise being the 2000's World of Warcraft; in spite of all of my set backs and low drop rates, bad RNG and 'unplayable' Ping I was good enough for top 10 active Warriors in the world. I played effectively a one armed petless meme spec melee nightfall hunter to near-BiS as an alt and a main a one-armed warrior in a server where 40% of players main's were a warrior and where over half to nearly 2/3rds of the server's player's mains were either a warrior or a rogue all competing at the very top for one item; Gressil, Dawn of Ruin. In spite of the abysmal odds and seer adversity, being the only raider out of hundreds of raiders to not just survive but thrive with god awful 300 ms Ping, I earned Gressil, Dawn of Ruin after over a year of grinding straight to the very top and at the time to become a top 10 vanilla WoW warrior in the entire world. Shades of Tyr.

I went upon an odyssey and I endeavoured to the very top of the highest peak of the highest mountain of the highest mountain range. Upon the highest peaks of all peaks conquered, the greatest journey arisen, upon the very end of the Saga of Raiding Ascendancy; I earned what I can only describe as a sense of Transcendence, beyond the greatest of challenges of the known world of collective medieval fantasy experience. From enduring nothing, dreams becoming something; to earning everything; I am worthy.

All of that epic tale, that life changing saga, that journey of journeys, so as that I could be so close to the spirit of wonder and challenge and the journey of the deepest most challenging kind of progression to experience; so close I in my heart of hearts I could be at-one-ment with the rhythm of the world beyond dreams. The legendary and irrefutably greatest raiding guild of all classic Everquest, Fires of Heaven. This highest order, world first, record setting, hardest of the hardcore classic Everquest raiding guild was the home of the core staff who where hired onto World of Warcraft to create the raiding and end game experience and progression in the 2000's World of Warcraft. I wanted to not guess and wonder what that could mean in terms of innate understanding of player progression that enables world leading game design. I wanted to live that just like the legends of old and; so I did. I was there when records were set. I earned my veterancy as a core raider with the best in the world; the hardest of the hard core. I was there to be depended on and to never buckle, never bend, never break and never yield. Was there to rally the troops wipe after wipe; hours after the patience and enthusiasm ran out; I inspired the raid to keep pushing time and time again. I was there after 30+ wipes a night and we pressed onwards together as one, greater than the sum of our parts all the way to victory after victory after victory. I was there with the strategy pictures in discord for the hardest boss encounters. When my guild broke, when the entire server broke, when the entire horde broke, I was there rallying a whole server and I took raiding rookies and people who never even set foot in Naxxramas. I was there teaching encounters and inspiring people who had serious self doubts to not give, to not give up, to keep fighting and to be confident that they could do anything. I was there even when everyone thought it was over forever in the darkest day of the server when we wiped again and again. I was there until one day on the foot steps of the final stretch of the raid I could see an unstoppable force that ran out of time; I knew it was time to step back for they didn't need myself any more. Then 2 weeks later they cleared Naxxramas from nobodies to hardcore; everyone doubted them, everyone said it could not be done; but I knew they could do it. Kronos has been raiding and clearing Naxxramas ever since. Some old players came back after Blizzard BS, some new players came with them and the world keeps spinning around and around. Yet I was there at the top and pulling people up with myself along the way, in good times and bad times; being the hardest of the hardcore XD.

I keep going back to classics of the past so I can hope to understand what the 'soul' of these great works is on an innate level so that I can see what the creators were aiming at and trying to realize. So that when I make my works of creation that I am not trying to emulate other's success. Yet I am to take up the creative mantle and uphold the same noble aims and be worthy of the same 'fire of god' / 'fire of humanity' / innate fulfillment of creation that drove those great creators of old to new heights of wonder and awe that inspired world for generations. These are the creative origins, the immortal fonts of creative power that empowered the legendary creators. Then in their due part these creative souls empowered the entire world to dream beyond what can be directly found and readily understood and to aim high and strive deep into wonderment and striking awe in the heart of hearts of all of humanity. Shining ever brilliant in a weary world engulfed in the omnipresent flames of darkness and tyrannized by devils mediocrity-borne; with a body of work that the world now understands as immortal timeless classics; extremely influential if not supernatural pillars of medieval fantasy.

I think in 2022 I have fully switched gears to start fully working toward a commercially viable video game; that is created in the hope of realizing for the entire world to hopefully enjoy a video game world set within my own medieval fantasy universe. So I keep working away on a multi-decades old dream that is almost as old as I am. Perhaps I was born to make video games, perhaps that is what I will be doing until I die. I do not know how long I will live; so every day I realize is not to be wasted, that is why today is called the present. It does not matter as much as where one comes from nor where one currently is but rather it matters so intensely and so immeasurably direly so as in where one is heading upon their current trajectory through the experience of life, the adversities of reality and the infinite weight of existence. Yet what ever I do, I want to work towards realizing this deep dream of mine and share these visions of beauty, senses of wonder and experiences of awe with the entire world. I hope to make an everlasting gem crystalized from the wonders of the deepest of dreams and share its brilliance with the entire world to enjoy; man or woman, old or young, rich or poor, together as one.

dorkster commented 2 years ago

Can HP be able to have an arbitrary name like how elements work? For example 'Health' or 'Hit Points' or even ~'Hull Structure' (for people wanting to make Sci-Fi Flare engine games)? I take that there is a plan for arbitrary names for arbitrary resources where resource like these could be possible 'Mana' and 'Spirit'?

Yes, all the resources will be able to have custom names. The HP stat will still be referenced as hp in the config files because it's a special case. But the in-game display name will be able to be changed.

WithinAmnesia commented 2 years ago

Okay, thank you for the clarity.

WithinAmnesia commented 2 years ago

Is the arbitrary definition of resources thing still planned / needed or has something come up in with adding to the engine made this kind of redundant (like how making infinite talent tree tabs kind of made horizontal scrolling redundant)? Or is there something else related to this?

dorkster commented 2 years ago

It's still planned. I've just shifted it back in favor of scaled items & item generation, which I think are more desired features. I marked it for 1.15, but it may happen for 1.14 depending on how I feel about the eventual implementation.

WithinAmnesia commented 2 years ago

It's still planned. I've just shifted it back in favor of scaled items & item generation, which I think are more desired features. I marked it for 1.15, but it may happen for 1.14 depending on how I feel about the eventual implementation.

Okay that makes sense. I do a lot of what I work on based on how I feel over all. I am quite logical but at times I let the Monkey Lizard Brain win at times (usually when I am really tired or bored) as evidenced here: https://github.com/flareteam/flare-engine/issues/1784#issuecomment-1186717498 so everyone is different. I think most everyone likes ice-cream and I wish I could give you some but there are computers after all even if my monkey lizard brain thinks that is right thing to do XD.

So I hope this all works out and you still find ways to have a bit of fun or what not. When I work I try to make my Monkey Lizard brain happy and it can cure / battle depression / stress / logical hard times and give myself motivation and restore a sense of fun and discovery. So I hope this all works well for you and you can find fullfilment and joy in all of this :-D.

WithinAmnesia commented 1 year ago

This is the last major feature I could ever ask to be implemented to Flare to empower myself to make my dream video game on Flare. I sincerely hope that this feature gets added to the Flare engine. Even if its the last feature I would be empowered to finally bring my dreams to life and have a third resource ~'Spirit' that I have had locked away in my concept books of the medieval fantasy world for years and years that I have been working on for decades. I sent you an Email @dorkster with more details.

dorkster commented 1 year ago

Don't worry. This is still on the roadmap.

I've been rethinking the potential implementation. The existing parts of the mod API that deal with HP and MP don't need to be integrated into this feature in its initial form. I think as long as there's a way to hide the MP stat, this can stand alone as its own thing.

WithinAmnesia commented 1 year ago

Okay. I'd be happy with a third resources called "Spirit" or "SP" and still have HP and MP for a partial implementation.

dorkster commented 1 year ago

Status update: I'm getting close to finishing this feature. Remaining tasks include

I'm looking to finish it this week and get 1.14 out the door. In the meantime, here's the example configuration I've been using that adds a Stamina stat.

[resource_stat]
# engine keys
## base
stat_base=stamina
stat_regen=stamina_regen

## steal/leech
stat_steal=stamina_steal
stat_resist_steal=resist_stamina_steal

## effect heal-over-time
stat_heal=stamina_heal
stat_heal_percent=stamina_heal_percent

# menu
menu_filename=menus/resource_stamina.txt

# text that can be translated
text_base=Max Stamina
text_base_desc=Total amount of Stamina.

text_regen=Stamina Regen
text_regen_desc=Ticks of Stamina regen per minute.

text_steal=Stamina Steal
text_steal_desc=Percentage of Stamina stolen per hit.

text_resist_steal=Resistance to Stamina steal
text_resist_steal_desc=Percentage chance that Stamina steal will be negated.

text_combat_heal=ST
text_log_restore=Stamina restored.
text_log_low=Not enough Stamina.
text_tooltip_heal=Stamina per second
text_tooltip_cost=Stamina cost

Screenshot_20221204_161055

WithinAmnesia commented 1 year ago

That is a dream come true Justin! That looks sooo amazing so far! This is MASSIVE progress. This literally is the keystone feature I've been hoping to get for over a year now and with it I can start large scale itemization and start fleshing out the progression and core gameplay of my RPG.

WithinAmnesia commented 1 year ago

This resource system be affected by player equipped item stats like '+10 Max Stamina'? Or -7.3% Stamina Regeneration?

dorkster commented 1 year ago

This resource system be affected by player equipped item stats like '+10 Max Stamina'? Or -7.3% Stamina Regeneration?

Yes. Everything you can do with MP will be possible here. stat_base, stat_regen, stat_steal, and stat_resist_steal will all be able to be used for item / power bonuses. stat_heal and stat_heal_percent will be able to be used for powers.

WithinAmesia commented 1 year ago

So in theory 4 or more resource bars could be supported from this not only 3? Such as 'Health' 'Stamina' 'Spirit' and 'Mana' for example or whatever people come up with; (I know WoW has over 4 difference class resources)?

dorkster commented 1 year ago

So in theory 4 or more resource bars could be supported from this not only 3? Such as 'Health' 'Stamina' 'Spirit' and 'Mana' for example or whatever people come up with; (I know WoW has over 4 difference class resources)?

Correct. You can have multiple [resource_stat] sections in the config file.

dorkster commented 1 year ago

Completed:

WithinAmnesia commented 1 year ago

Thank you Justin, you are great! This feels like Flare Version 2.0! I hope Patch 1.14 launches great!

WithinAmnesia commented 1 year ago

@dorkster How does one get the character menu screen to show the arbitrary resource stats? What things am I doing incorrect? I got the 4 resource bars to show up on the HUD (Health, Vigour, Spirit, Mana) and use stat values scaling based upon primary stat values yet I cannot seem to get 'Vigour' and 'Spirit' to display in the character menu screen with the rest of the stats. Engine files: resource_stats.txt stats.txt primary_stats.txt elements.txt damage_types.txt Menus Files: character.txt hp.txt mp.txt Vigour.txt Spirit.txt Images/Menus Files: Bar_Health Bar_Health_Background Bar_Vigour(Hue+100) Bar_Vigour_Background Bar_Spirit(Hue+69) Bar_Spirit_Background Bar_Mana Bar_Mana_Background Please feel free to ask any more required files I'd be more than glad to share them. P.S. Also is it possible for 'HP' and 'MP' be renamed to something like Health (from 'HP') and Mana (from 'MP') respectively or are we stuck with 'HP' and 'MP'?

dorkster commented 1 year ago

In menus/character.txt, add the following lines:

show_stat=vigour,true
show_stat=vigour_regen,true
show_stat=vigour_steal,true
show_stat=resist_vigour_steal,true

show_stat=spirit,true
show_stat=spirit_regen,true
show_stat=spirit_steal,true
show_stat=resist_spirit_steal,true

Just change true to false if there are any that you want to hide.

P.S. Also is it possible for 'HP' and 'MP' be renamed to something like Health (from 'HP') and Mana (from 'MP') respectively or are we stuck with 'HP' and 'MP'?

There's currently no way to change HP and MP. But you can hide the MP bar by adding enabled=false to menus/mp.txt, and then create a custom resource named "Mana". Though I doubt there would be much point in doing that where you can't change HP.

WithinAmnesia commented 1 year ago

@dorkster How does one use these arbitrary stats on items such as +1.6% Spirit, -3.72% Spirit Regeneration, +0.75% Vigour Regeneration or -2.1% Vigour and have the item work and have the tool tip display?

dorkster commented 1 year ago

Basically, you take the desired value, add it to 100, and then append a % sign. So for your 4 examples:

bonus=spirit,101.6%
bonus=spirit_regen,96.28%
bonus=vigour_regen,100.75%
bonus=vigour,97.9%
WithinAmnesia commented 1 year ago

@dorkster Where can engine/number_format.txt be found? https://github.com/flareteam/flare-engine/commit/7f67785877a8d8f4b9e379c81fc26075d6e17944

Do I have to make number_format.txt then put it under engine folder and then take my best guess at making the number_format.txt and trying to get .XXX / three digits after the decimal place?

Yet I feel I'm missing a step somewhere?

dorkster commented 1 year ago

Yes, you will need to add it yourself. The attributes should be pretty simple to understand.

For example, if you wanted 3 digits after the decimal place in item tooltips, all you need is:

# engine/number_format.txt
item_tooltips=3