Jump to content

Health, Mana, Shields, And Other Stats(Fantasy/Mythology/Sci-fi Mods)


MoLAoS
 Share

Health/Mana/Energy/Armor/Shields Implementation  

5 members have voted

  1. 1. How useful would you find the system described in the post?

    • Dream Come True
      1
    • Moderate Interest
      4
    • Apathetic
      0


Recommended Posts

Spoiler for personal activity stuff and open source experience:

Spoiler

I spent several years working on the open source Glest project. Specifically I forked the single-player focused GAE overhaul of Glest. My primary focus was enabling a Majesty: The Fantasy Kingdom Sim clone[Majesty Wikipedia Page]. Additionally I did some work to upgrade several features and add several major new game systems.

Mandate Binaries

The link above has Windows 7 32bit binaries. Works on Windows 7 64 bit too. You can see some of the code and how the features work. Youtube link to some initial videos below:

Item System, other videos by clicking account name

I considered swapping to pyrogensis a few years in but the art asset system and some other factors weren't mature enough at the time to justify it.

I ended up going on hiatus to play EVE Online obsessively, where I did pretty well but burnt out a few months before getting my own titan built. I could pay, I just didn't have a well trained character yet. 5 of my 136 characters were training Titans and quite close to done.

After that I moved on to a personal grand strategy game, since I got really into those when I was relaxing from playing EVE, because Paradox games didn't provide any fantasy options or real DIP[Diplomacy/Intrigue/Politics] features.

Then I got involved in the Bernie Sanders campaign, went back to EVE, did the 2020 Bernie thing, etc.

I decided to work on something more relaxing as a break. Modding with a bit of source fiddling.

Anyway the engine is pretty close to some of the major features I wanted to use, especially dynamic mesh swapping/prop attachment, and that Hyrule overhaul showed you can do magic stuff pretty well. My first goal is to reimplement a bunch of key Mandate[GlestAE] features for Majesty stuff and get a functioning item system and advanced production possibilities. I've always wanted Majesty with deeper Guilds and more city building.

Main Topic

However the topic of this thread is unit stats.

In Mandate I implemented layered "health" stats plus mana and a couple other stats. For my overhaul for pyrogenesis I'd like to advance farther than that.

I'd like to set up a vector of highly customizable health stats, ideally you'd be customizing in xml and not js files. You'd have the basic health stat that functions like standard RTS health. Then you'd have an arbitrary number of optional health stats that you could customize. This is a pretty abstract description so I'll try to give a good set of examples.

You can set the display name of the stat. So shield. You could use the custom tags + some associated values to set it up like the Protoss shields in Star craft.

You could make shields that block specified damage types. So spell shield that blocks all magic but not physical attacks. You could do a shield that blocks all ranged attacks until it is used up.

If you were doing a sci fi game you might want to make layered shields. The first layer could regen at 10/s but it is only 50hp. Second shield is 1000 hp but it regens at 1s. Not sure what the lore explanation would be for that but you could do it if you wanted.

These shields would ignore non-listed damage types. In theory this would allow you to create an "ethereal" unit by having the base health not list crush/pierce/hack. Might confuse the AI though. In GAE and Mandate units have as many attack skills as you like and in Mandate specifically there is a damage calculation the AI performs to decide what skill to use. So a Wizard has several attacks with different cooldowns and mana costs and damage types and the Hero AI checks what the most ideal wizard skill to use on a particular enemy would be.

Mandate also has a "resource-pool" vector that defines energy/stamina/mana w/e else you wanna use. That is a bit more straight forward. Also you can link resource pools to "health/shields/armor" so one unit in Mandate has a mana shield skill.

I believe Health, Shields, and Armor can all be defined by a single vector. For sci fi you could use ablative armor that ablates, hehe, like health but it would take more or less damage from like lasers vs kinetic vs gravitic or w/e. Should also be relatively simple to add a +/- so fire damage could heal one kind of shield or something. The human context is irrelevant to the code.

"Resources" would also be defined in a single vector with customization options.

I am also planning to look at the damage system as well. I would like to add a malady system. DoT damage with like poison or disease magic is the iconic ability for one of the "Guilds".

I also plan to give damage types custom options. Skills as well. Like for magic stuff: There is an Arcane spell school. One Arcane ability would allow you to ignore specific health/shield/armor elements in vector. XML would be like <ignore>[name of xml defined health/armor/shield]<ignore>. That way if I added an ability in enchanting called imbue that let a specific H/A/S change the resistance to a damage type it wouldn't conflict.

One part of the magic system I implemented in my grand strategy game was attribute transfering. With a vector of H/A/S elements you could apply "bark skin" or something to someone. Instead of a resistance buff it would be a well defined ablative armor type thing.

From my experience forking GAE to make Mandate there shouldn't be any difficulty defining the code so that the xml files don't need to be modified in "public". Obviously mods that change js files would be impacted.

For upgrades, items in my case, and such you should be able to simply add a "stats" section to the XML which would be loaded then the js code would have a combine() function or something.

A primary goal I have is to move a lot of unit/skill/item/structure/upgrade customization from the js files to xml. Just as a convenience factor.

This stuff is all functional in my old Glest fork but sadly it is done purely with xml and c++ so I'll have to figure out an implementation for javascript.

I'm going to look at changing the mesh/prop code to enable items, the same changes should also allow use by upgrades and promotions, to apply models to prop points dynamically. That is one of the key things I like about pyrogenesis, even with the variant system. I think it would be a big improvement to just employ dynamic changes, though. You'd still probably use variants for some stuff.

Link to comment
Share on other sites

My personal impression is that the 0 AD development community is extremely apathetic, verging on hostile, to the kind of thing you are proposing. They are not developing a general-purpose game engine, even though that seems to have been the intention at one point. Rather the project is very narrowly focused on supporting its own vision of itself as an extremely conservative historical-ancient-warfare RTS.

That's not to say they would try to stop you developing these features, but don't expect any assistance. And be prepared for a cool reception when trying to get your changes into the official code base.

  • Haha 1
Link to comment
Share on other sites

5 hours ago, ChronA said:

but don't expect any assistance

I think the modding forum speaks for itself? I can't really speak for the pre-2019 era, but from my experience people are always trying to help modders/newcomers. That said, it happens that the people with the right knowledgde are not active enough to help someone create their dream.

5 hours ago, ChronA said:

cool reception when trying to get your changes into the official code base.

This cool -> B)

  • Like 1
Link to comment
Share on other sites

7 hours ago, ChronA said:

My personal impression is that the 0 AD development community is extremely apathetic, verging on hostile, to the kind of thing you are proposing. They are not developing a general-purpose game engine, even though that seems to have been the intention at one point. Rather the project is very narrowly focused on supporting its own vision of itself as an extremely conservative historical-ancient-warfare RTS.

That's not to say they would try to stop you developing these features, but don't expect any assistance. And be prepared for a cool reception when trying to get your changes into the official code base.

A few team members have been helpful when you account for the fact that they don't exist purely to serve my needs as FAQ minions.

The changes I outlined here are primarily JS changes from what I can tell which technically falls under the purview of modding/scripting, very little c++ work should be involved, so it wouldn't really impact the public mod and therefore doesn't even require team approval. Some of the other changes not discussed in this thread might require some sort of approval.

Note that the tag was modder feedback not dev feedback. Hyrule Conquest is a mod and would certainly qualify as a significant departure from 0AD even though they both use Pyrogenesis.

On the other hand this thread has 82 views and no one voted on my poll so perhaps you have a good point or two :P

Oh also I saw your post in the multi-attack thread. That is gonna happen. Half a dozen attacks for wizards.

 

 

Skip to 1:55 or so for the shooty part. They get wrecked cause of a lot of demons but you can see their attack stuff. Also all the particles were scavenged from user mods, I don't really do art, so they look a bit unfancy to me.

@ChronA

Edited by MoLAoS
Link to comment
Share on other sites

3 minutes ago, Stan&#x60; said:

Right. I've voted moderate interest because it gives me an excuse to slack off on my heroic fantasy, ww2 and futuristic mods on https://github.com/0ADMods

You can see a, low quality, video of wizards being wizards from GAE/Mandate above. Only the one orange lightning bolt particle effect doesn't look like trash because I used generic attack skills from other units since I am not an artist.

You have a fantasy mod? With magic stuff or just like the Illiad or something? Have a lot of people implemented magic stuff? I know HC kinda did though I haven't played it so I'm not sure how much.

Link to comment
Share on other sites

26 minutes ago, MoLAoS said:

You have a fantasy mod? With magic stuff or just like the Illiad or something? Have a lot of people implemented magic stuff? I know HC kinda did though I haven't played it so I'm not sure how much.

Sadly for now it's only some dwarves and two elven buildings. I didn't have much time to experiment as we've been quite busy with the main game :)

Link to comment
Share on other sites

22 minutes ago, Stan&#x60; said:

Sadly for now it's only some dwarves and two elven buildings. I didn't have much time to experiment as we've been quite busy with the main game :)

Ah you do a lot of your own art assets as well. Yeah I imagine that makes stuff take longer. My plan is probably to grab houses from one of the base game factions as well as use the HC structures for guild buildings. The units might be trickier. That way I can focus on the mechanics of the game.

Link to comment
Share on other sites

13 hours ago, ChronA said:

My personal impression is that the 0 AD development community is extremely apathetic, verging on hostile, to the kind of thing you are proposing. They are not developing a general-purpose game engine, even though that seems to have been the intention at one point. Rather the project is very narrowly focused on supporting its own vision of itself as an extremely conservative historical-ancient-warfare RTS.

That's not to say they would try to stop you developing these features, but don't expect any assistance. And be prepared for a cool reception when trying to get your changes into the official code base.

The real work is done on Phab ( http://code.wildfiregames.com ) and Trac ( http://trac.wildfiregames.com ). We can discuss cool stuff ( Battalions! ) on the forum until we're blue in the face, but unless someone wants to put in the hard work to make their dream a reality, there's nothing much someone else can do for you (unless your ideas are truly inspiring). To get stuff added to the base game or game engine, you have to participate in Phab and Trac (and on IRC to a lesser extent)*. It's a long process, especially if you don't come to the project with a battery of programming languages already in your repertoire. A few contributors started with few requisite skills and have learned over time to make valuable contributions. That process isn't necessarily hostile or apathetic; it just takes lots of dedication and discipline. :) 

 

*I don't participate enough on Phab and Trac, which is probably why my preferences are not taken into account when designing the game. It's my fault, not theirs. 

  • Like 1
Link to comment
Share on other sites

IRC survives especially in the Open Source community because of it's lack of commercial/corporate connections though one of the founder IRC providers Freenode has gone corporate and is shedding staff and client projects besides it maybe old but it still works as it was designed and is very light weight and you don't need an IRC client just click the link in the forum header and use your web browser.

Enjoy the Choice :)        

Edited by Loki1950
  • Like 1
Link to comment
Share on other sites

2 hours ago, MoLAoS said:

Phab and Trac are cool but who still uses IRC? If 0AD community moved to discord or something that would be a huge boost because no one wants to download a program that was deprecated before they were even born.

You mean no one wants to use a web browser to use a chat application? :) (webchat.quakenet.org)

More seriously though, you can find some devs on Discord (like me!) but some others disagree totally with the philosophy of this app, the fact that isn't open source, etc.

Link to comment
Share on other sites

31 minutes ago, Stan&#x60; said:

You mean no one wants to use a web browser to use a chat application? :) (webchat.quakenet.org)

More seriously though, you can find some devs on Discord (like me!) but some others disagree totally with the philosophy of this app, the fact that isn't open source, etc.

Ah an ideological dispute. I suppose as a Bernie Bro I can understand some level of principle over power.

  • Like 2
Link to comment
Share on other sites

(A little fire wakes the dead around here.;)) Developmental focus is not a bad thing. On the contrary, it is necessary to prevent feature bloat turning a project into vaporware. However, especially with an open source project, you also need to be able to attract talented developers to contribute. With 0 AD something about that balance feels off kilter to me. A gentle reminder: it is actually possible to publish FOSS games that are both feature-rich and polished. I'd point to Zero-K and The Dark Mod. I'd characterize the former as even more insular against public contributors than 0 AD, and the latter as more welcoming (they have actual up-to-date tutorials for how to build original fan missions, and if you have a cool idea often the community will actively collaborate to build it). So there are multiple equilibria. (Or maybe there are other factors entirely to why these projects have matured so much faster than 0 AD.:huh:)

Anyway back to @MoLAoS's topic... If your ambition is just to create a gameplay mod that other modders can use as an addon for building their own fantasy/sci-fi projects, I'm not sure how much traction you can expect to get. There is a chicken an egg problem. Your mod would be an additional dependency that any down-stream modders would have to keep track of. Can they trust that you will keep everything up to date and compatible with the ongoing updates to vanilla 0 AD in a timely manner? Can they trust your updates not to break their projects? (Hyrule is having trouble even keeping up with the alpha 25 update.) Conversely, how long are you prepared to maintain assets that no one else seems to be using?

That's why I assumed you wanted to hitch your horse to the 0 AD wagon proper, and not just ride along side as another mod in the database. Incorporating these feature into the official release would engender a lot more confidence for any aspiring sci-fi/fantasy modders that they have a solid foundation to build from. As it is, what you are outlining sounds great. I particularly like the idea of more customizable health and stamina fields (and of course multiple weapons), they would be very helpful even in a low-fantasy setting...:) However, I wouldn't be making any plans to incorporate your addon into any projects I (hypothetically) had on the back burner. There is just too much uncertainty.

Sorry to be the wet blanket here. I don't like being a negative Nancy, but I don't think hiding problems from people is a good idea either. If 0 AD and Pyogenesis were more feature-mature, I think I would be more enthusiastic, but for now you are building on quicksand IMHO. I think you might even be better off trying to fantasy-up a Spring engine derivative (like starting with Zero-K). The game systems and assets would require more work to bring into line with fantasy tropes, but the technical side would be more stable and I think you could possibly get some community support for trying something new.

With 0 AD... well... it doesn't even do ordinary sword-and-board combat that well right now if we're being honest with ourselves.  Maybe we should fix that before trying to introduce support for deep and complicated magic systems.

Edited by ChronA
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...