Jump to content

Adding Magic, Items, And Majesty Style Stuff


Recommended Posts

So about 8 years ago I did an extensive modification of the Glest Advanced Engine to support a Majesty style fantasy kingdom builder with some major additional features. However relative to GAE, or Glest or MegaGlest, 0AD supports a highly superior unit/building model system and just looks prettier. Although neither engine has a proven 64bit version as far as I know.

I'd like to do a fantasy Majesty like thing for 0AD but I'm not sure what parts of the source code I'd be modifying. I think maybe a lot of the unit/building code is JS stuff? After a huge hassle because Visual Studios is annoying for every little thing I got the latest SVN version to compile and run. Going through the code didn't reveal many files obviously related to what I was trying to do. Simulation2 seems promising but where else should I be looking for unit/structure code?

For instance I want to add some relevant stuff like mana and potentially and RPGesque attribute thing. Magic shields and so forth. I'd also like to add items. One problem with Glest derivatives is aside from the outdated and obscure model code you can't swap meshes. So if a Majesty style "Hero" buys a new sword or w/e you can't display that really.

One thing GAE did have was a particle system with lots of flashy "magic" effects, but presumably 0AD could do that but it doesn't currently happen since the factions are historical.

Is there any good guide into what files I would want to look at and then modify for this kind of stuff?

Link to comment
Share on other sites

4 minutes ago, wowgetoffyourcellphone said:

You want to look at the component files in binaries/data/mods/public/simulation/components. 

Okay so I see a file for health. Suppose I wanted to add something that functioned like a second health pool. I'd clone health and fiddle with the code. How do I connect that to units? And how do you make it show up on the unit data panel?

I guess I'm just more used to C++ doing things directly. Both the modified GAE codebase I used years ago and code bases for my grand strategy game have a quite different format for the code so I'm having a bit of trouble figuring out what is going on in the JS files.

Link to comment
Share on other sites

@MoLAoS Welcome back. :)

You'll find quite some information on trac (http://trac.wildfiregames.com) especially in the modding guide (https://trac.wildfiregames.com/wiki/Modding_Guide). There are also quite some resources on the forums, like:

In short: the components defined in JS can be added to an unit by fidling with the template XML.

Link to comment
Share on other sites

1 hour ago, Freagarach said:

@MoLAoS Welcome back. :)

You'll find quite some information on trac (http://trac.wildfiregames.com) especially in the modding guide (https://trac.wildfiregames.com/wiki/Modding_Guide). There are also quite some resources on the forums, like:

In short: the components defined in JS can be added to an unit by fidling with the template XML.

So if I'm understanding right the issue is more of a language problem. There is so much more going on in the JS than you'd expect such that "modding" doesn't properly encapsulate the breadth of what you can do.

 

If I wanted to add "items" could I do that in just the JS section? You could probably just make units that only exist in garrisons and load them from "production" buildings into "units" that way. Could I just give all units "weapon" and "armor" prop points for visual effects? Or would I need to modify the mesh swapping/combining engine code?

Additionally for structures is there a way to add structure "components" at all in JS? Could I connect "additions" or "rooms" to a base mod using an upgrade or something.

Can I restrict structure placement based on nearby buildings or map features?

I have a "Guild" in the Majesty:TFKS style that I want to give extra crafting and unit production options to if it is built "on" or at least "directly adjacent to a volcano.

I can handle the changes myself as long as I have an idea of what needs engine vs JS changes.

Edited by MoLAoS
Link to comment
Share on other sites

4 hours ago, MoLAoS said:

Although neither engine has a proven 64bit version as far as I know.

It is in the works 

 

4 hours ago, MoLAoS said:

One thing GAE did have was a particle system with lots of flashy "magic" effects, but presumably 0AD could do that but it doesn't currently happen since the factions are historical.

You could look at HC (

) It is getting there files at https://www.moddb.com/mods/hyrule-conquest

BTW @MoLAoS Welcome back. :)

5 hours ago, MoLAoS said:

RPGesque attribute thing

Two years ago @Angen did prototype rpg where you could pic up items in 3rd camera view (maybe first) built in 0ad 0.23 I believe. 

Link to comment
Share on other sites

43 minutes ago, asterix said:

It is in the works 

 

You could look at HC (

) It is getting there files at https://www.moddb.com/mods/hyrule-conquest

BTW @MoLAoS Welcome back. :)

Two years ago @Angen did prototype rpg where you could pic up items in 3rd camera view (maybe first) built in 0ad 0.23 I believe. 

@The Undying NephalimCan you make magic particles or are you limited to arrow stuff?

I am actually thinking of something more Majesty style even with the RPG elements which would be 3rd person but maybe @Angenhas thoughts on items.

The Hyrule thread at least answers some questions.

https://sourceforge.net/projects/mandateengine/files/

You can download the PRMandate zip at that link and run my Mandate/GAE/Glest to see what the game is like or simply watch the videos here: https://www.youtube.com/user/MatrimCuathon/videos

Particularly the Item video.

The game looks ugly cause the faction scavenges models from Glest mods but some of the key functionality should be apparent.

 

Link to comment
Share on other sites

1 hour ago, asterix said:

Although neither engine has a proven 64bit version as far as I know.

Do note that Linux and macOS builds are 64bits.

Also, you need to pass --large-adress-aware when running update-workspaces.bat to be able to use up to 4GB of RAM. Else you'll be limited to 2GB. (Autobuilds have that flag)

  • Thanks 1
Link to comment
Share on other sites

8 hours ago, Stan` said:

Do note that Linux and macOS builds are 64bits.

Also, you need to pass --large-adress-aware when running update-workspaces.bat to be able to use up to 4GB of RAM. Else you'll be limited to 2GB. (Autobuilds have that flag)

So I just add that to the file to do that? Don't really know anything about bat files. I added it, and after getting an error a few times added the second to address and rebuilt. No idea if it worked, though. Not sure how to check.

Any particular reason Linux and Mac are 64bit but no Windows? Just because VC++ is weird and stupid and that makes it harder to do?

Link to comment
Share on other sites

On 04/09/2021 at 1:41 AM, MoLAoS said:

@The Undying NephalimCan you make magic particles or are you limited to arrow stuff?

Magic projectiles are not hard to do, just add the particles in question as a prop to a unit's actor file and attach it to the "projectile" bone.

Particle actors to attach to bones are found in art\actors\particle

and particle behavior is found in art\particles

Link to comment
Share on other sites

26 minutes ago, The Undying Nephalim said:

Magic projectiles are not hard to do, just add the particles in question as a prop to a unit's actor file and attach it to the "projectile" bone.

Particle actors to attach to bones are found in art\actors\particle

and particle behavior is found in art\particles

@The Undying NephalimDo you have a video of HC with lots of particle action happening?

I'm getting ready to do the Mandate style health/shields/mana changes and then probably adding items and the new construction styles but I'll probably get around to particles after that.

Link to comment
Share on other sites

1 hour ago, MoLAoS said:

@The Undying NephalimDo you have a video of HC with lots of particle action happening?

I'm getting ready to do the Mandate style health/shields/mana changes and then probably adding items and the new construction styles but I'll probably get around to particles after that.

I don't have a dedicated video trying to show particles, but I'm sure there are instances in a lot of my videos. A lot of my Zora units use particle effects, such as the Sapphire Warden. The Gerudo Ice Archers have an arrow/particle effect combo.

Link to comment
Share on other sites

15 minutes ago, The Undying Nephalim said:

I don't have a dedicated video trying to show particles, but I'm sure there are instances in a lot of my videos. A lot of my Zora units use particle effects, such as the Sapphire Warden. The Gerudo Ice Archers have an arrow/particle effect combo.

@The Undying NephalimWell defined or like sparkle beams?

With multiple attack skills, especially for mages, and the "Hero" AI for making Majesty style stuff I'm curious how good you can get particles to look, like lightning, shadow, fire, ice, water, etc. I think Heroes from the Wizards Guild would have several elements available and typically have 3-8 attack skills depending on how the player specializes the Guild. Would stink to mostly have different colored masses of sparkles like Glest particles.

Edited by MoLAoS
Link to comment
Share on other sites

28 minutes ago, MoLAoS said:

@The Undying NephalimWell defined or like sparkle beams?

With multiple attack skills, especially for mages, and the "Hero" AI for making Majesty style stuff I'm curious how good you can get particles to look, like lightning, shadow, fire, ice, water, etc. I think Heroes from the Wizards Guild would have several elements available and typically have 3-8 attack skills depending on how the player specializes the Guild. Would stink to mostly have different colored masses of sparkles like Glest particles.

I feel like the way particles work right now is good for most effects, especially things like fire, cloud or smokey effects, sparkles, and bolts of lightning. The only particle that I've not been able to recreate well in 0AD is a solid beam like some kind of laser. There are always gaps in the laser beam even when I set the particle spawn rate to an absurdly high number.

  • Like 1
Link to comment
Share on other sites

6 minutes ago, The Undying Nephalim said:

I feel like the way particles work right now is good for most effects, especially things like fire, cloud or smokey effects, sparkles, and bolts of lightning. The only particle that I've not been able to recreate well in 0AD is a solid beam like some kind of laser. There are always gaps in the laser beam even when I set the particle spawn rate to an absurdly high number.

@The Undying NephalimOkay good news. So mostly the limit on particles is performance.

Do auras of particles work well? For the new structure building options I want a couple to have glows and stuff.

Edited by MoLAoS
Link to comment
Share on other sites

2 hours ago, The Undying Nephalim said:

The only particle that I've not been able to recreate well in 0AD is a solid beam like some kind of laser. There are always gaps in the laser beam even when I set the particle spawn rate to an absurdly high number.

Perhaps create a Trac ticket and someone might pick it up and solve this for you.

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...