Author Topic: An inquiry!  (Read 3049 times)

Tiel

  • Archer
  • *
  • Posts: 30
    • View Profile
An inquiry!
« on: 10 December 2013, 19:57:27 »
So I've been really lazy lately but just started generating ideas in el cabeza, when the prospect of squad combat inevitably broke the surface of the murk. Naturally, I furiously googled the subject to find that GAE's pet system might offer a solution!

Basically, a pet is a unit made by another unit for maximum unitception. So, okay, what if instead of making a unit, the barracks created a Sergeant instead, who could then create lesser units up to a cap before charging into combat? And if they fell it's only natural that the squad would be 'broken', in keeping with all pets dying upon owner death!

My question here is whether pets are selectable, if they follow their 'owner', and if there's a way to rectify those two issues with my little scheme if the answers are yes and no, respectively.

(Also, as a sidenote, is there a way to have multiple sounds per unit on being selected, etc?)

Thank you for your time, this community is awesome, and I am hyper as all hell right now.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: An inquiry!
« Reply #1 on: 10 December 2013, 23:15:20 »
Yes, pets are selectable. In fact, for the most part, pets are completely normal units except for their pet flag. By using this flag with emanations and effects, we can make pets act differently around their master.

For example, the original "Four path magitech" techtree that was supposed to demo GAE (and was never completed) had a pet which had negative HP regeneration. However, the master had an emanation that made nearby pets gain a boost to HP regen. Thus, while the pet was near its master, it gained HP. If it got too far from the master, it lost HP.

So yes, you could have an army hierarchy based on these pets, using a long range emanation to keep HP regen positive while the master survives and slowly killing the units off if their master dies.

I can't recall whether or not pets follow their owner and attack the same targets. I believe not, and that the GAE devs planned to add such a functionality, but the engine's development has died again.

Regarding your side note, the sounds for selection are listed in the selection-sounds XML element. There can be any number of sounds and the one played is chosen at random. See: https://docs.megaglest.org/XML/Unit
« Last Edit: 18 June 2016, 18:53:01 by filux »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Tiel

  • Archer
  • *
  • Posts: 30
    • View Profile
Re: An inquiry!
« Reply #2 on: 11 December 2013, 02:03:35 »
Thank you for the response.

I found out on an earlier thread for GAE that pets automatically are set to Guard the unit that produces them, which I'm according to the wiki "is a new command in GAE using existing skills. It causes the unit to follow another, attacking nearby enemies, but always returning to guard that unit." Which is absolutely perfecto for what I'm thinking of. And just to be sure I'm being understandable here, here's the idea -

  • Barracks produces a squadleader of a given unit type
  • He has the ability to produce squadmembers (pets) up to a cap designated in the XML file
  • Squadmembers follow their squadleader and do things already implemented for pets like attack nearby enemies and such
  • On death they can be replenished at a slow rate (again, functionality already there)

So that leaves a few things up in the air for me:

a) Is it possible to make units unselectable, then? What would probably happen with the emanations is people would just camp out their sergeants and use them as mobile production centers (albeit with limited range), to say nothing of what a micro nightmare that could pose.
b) Given the above, is there a way to eh, tighten the formation? To make units prioritize following over breaking off from the group and attacking forlorn enemies? Or is that already the case?
c) I recall reading something about multiproduction someplace, where you could state that unit x has to be produced in multiples of two or three. I have no idea if any relation can be made here, but could one set it up so a unit spawn with several pets when constructed? I imagine the main problem there would be setting an owner.
d) Does there exist a method for editing the selection circles for units? If not, can they be made larger artificially?

Also, last question, I swear: does geometry for structures have to be open bottomed? It seems like that's a trend and I just want to be sure it's not due to a technical limitation.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: An inquiry!
« Reply #3 on: 11 December 2013, 03:58:10 »
a) Is it possible to make units unselectable, then? What would probably happen with the emanations is people would just camp out their sergeants and use them as mobile production centers (albeit with limited range), to say nothing of what a micro nightmare that could pose.
No. Technically, size zero units are unselectable, but they're also immune to all damage (except regen), which is not generally desirable.

b) Given the above, is there a way to eh, tighten the formation? To make units prioritize following over breaking off from the group and attacking forlorn enemies? Or is that already the case?
Not without changes to the engine.

c) I recall reading something about multiproduction someplace, where you could state that unit x has to be produced in multiples of two or three. I have no idea if any relation can be made here, but could one set it up so a unit spawn with several pets when constructed? I imagine the main problem there would be setting an owner.
https://docs.megaglest.org/GAE/Multiproduce

d) Does there exist a method for editing the selection circles for units? If not, can they be made larger artificially?
They can't be edited, no. The size of the circle will correspond to the size of the unit (roughly).

Also, last question, I swear: does geometry for structures have to be open bottomed? It seems like that's a trend and I just want to be sure it's not due to a technical limitation.
There's practically no limitation on the model. You could even give a small, size one unit a massive castle as a model and that will work. It is not necessary to have an open bottom. That is just a common choice because in most cases, the bottom cannot be viewed.

All of your desires, of course, could be done by changing the engine itself (open source C++, if you're wondering), but would take considerable skill as a programmer.
« Last Edit: 18 June 2016, 14:27:27 by filux »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: An inquiry!
« Reply #4 on: 11 December 2013, 10:04:42 »
Most of this is available in my fork of GAE. While the game I am working on is not finished, and has been further delayed by my plan to hit 1trillion isk a year in income in EVE Online, individual features are functioning properly.

As far as "squads" go, I don't use the GAE pet behavior. Its quite limited. Rather you will specify behaviors for units in a special AI file. For instance the defend behavior causes units to, assuming it has the highest priority, attack units which are attacking their owner. The rest behavior causes units to load themselves into their owner, where they then heal, which although not appropriate for squads of humans, could work for a carrier, or a spaceship with drones and so forth. There is not currently a follow behavior to be paired with the defend behavior or a behavior which causes units to attack their owners target, but this would be trivial to implement. Note that these are not commands, and you cannot control a unit that follows AI routines. Well, you can because I haven't added the flag to block hide commands and block right click orders, but that is a small change I am waiting to make after I finish some stuff.

Units can be assigned owners, based on a flag in the produce command, and owners have specific caps for how much of each unit type they control. Automatic generation of units and manual produce commands will not function if the control limit is capped. Note also that units can be set to automatically create other units, which they can own and to which their cap applies. Spawn of controlled units is based on a timer which you can set.

IIRC Hailstone is possibly working on multiplayer for GAE, I don't think there are any plans to add other features in the mean time.

Tiel

  • Archer
  • *
  • Posts: 30
    • View Profile
Re: An inquiry!
« Reply #5 on: 11 December 2013, 12:55:37 »
Most of this is available in my fork of GAE. While the game I am working on is not finished, and has been further delayed by my plan to hit 1trillion isk a year in income in EVE Online, individual features are functioning properly.

As far as "squads" go, I don't use the GAE pet behavior. Its quite limited. Rather you will specify behaviors for units in a special AI file. For instance the defend behavior causes units to, assuming it has the highest priority, attack units which are attacking their owner. The rest behavior causes units to load themselves into their owner, where they then heal, which although not appropriate for squads of humans, could work for a carrier, or a spaceship with drones and so forth. There is not currently a follow behavior to be paired with the defend behavior or a behavior which causes units to attack their owners target, but this would be trivial to implement. Note that these are not commands, and you cannot control a unit that follows AI routines. Well, you can because I haven't added the flag to block hide commands and block right click orders, but that is a small change I am waiting to make after I finish some stuff.

Units can be assigned owners, based on a flag in the produce command, and owners have specific caps for how much of each unit type they control. Automatic generation of units and manual produce commands will not function if the control limit is capped. Note also that units can be set to automatically create other units, which they can own and to which their cap applies. Spawn of controlled units is based on a timer which you can set.

IIRC Hailstone is possibly working on multiplayer for GAE, I don't think there are any plans to add other features in the mean time.

I'd love to use Mandate given all the features it has, but to be honest no multiplayer kinda kills me. GAE itself only has the most rudimentary of networking functionality, but it's important for the project I'm working on. At least now. If I ever get off my lazy bum and brainstorming a companion singleplayer experience I'd love to go the route of MoH 2010 as far as SP vs MP in engines.

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: An inquiry!
« Reply #6 on: 11 December 2013, 22:00:51 »
Well in theory Mandate has the same multiplayer capability as GAE since its a fork. Although I haven't actually tested it to see if I broke anything.

Tiel

  • Archer
  • *
  • Posts: 30
    • View Profile
Re: An inquiry!
« Reply #7 on: 11 December 2013, 22:30:19 »
It's not something you plan on supporting though, right?

I could use Mandate in its current form (if it works over mp), but it depends what's there right now.

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: An inquiry!
« Reply #8 on: 11 December 2013, 23:29:33 »
It's not something you plan on supporting though, right?

I could use Mandate in its current form (if it works over mp), but it depends what's there right now.

If you really want multiplayer MegaGlest is a better choice than Mandate or GAE. It has pretty solid cross platform stable multiplayer.

Tiel

  • Archer
  • *
  • Posts: 30
    • View Profile
Re: An inquiry!
« Reply #9 on: 12 December 2013, 01:11:38 »
Megaglest doesn't have a lot of features that are essential to the gameplay experience I'm planning out.