Author Topic: setting a faction as a human or cpu only  (Read 1117 times)

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
setting a faction as a human or cpu only
« on: 7 January 2012, 18:29:12 »
Hi I'm currently devloping a faction that is built around the cpu and would be op if played by a human. I was wondering if there could be tags that limit weather or not faction could be played by either a human or cpu or both.

Code: [Select]
<playable = "human" />
<playable = "cpu" />

The absence of these should default to both available.

Thank you!
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: setting a faction as a human or cpu only
« Reply #1 on: 7 January 2012, 19:21:56 »
More correctly, the XML would be something more like
Code: [Select]
<playable>
   <player value="human" />
   <player value="cpu" />
</playable>

It's not valid XML to have an equal sign without an attribute name (in this case "value"), and it's rather messy to have single, closed tags of the same name on the same XML level.

I suppose it could be interesting to have two versions of a faction, with the only changes being to the XML, to help the AI. Of course, I'd rather see a stronger AI that doesn't have to cheat, but that's well out of the range of a modder, for now, anyway. Lua AIs, anyone?
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: setting a faction as a human or cpu only
« Reply #2 on: 7 January 2012, 20:15:28 »
More correctly, the XML would be something more like
Code: [Select]
<playable>
   <player value="human" />
   <player value="cpu" />
</playable>

It's not valid XML to have an equal sign without an attribute name (in this case "value"), and it's rather messy to have single, closed tags of the same name on the same XML level.

I suppose it could be interesting to have two versions of a faction, with the only changes being to the XML, to help the AI. Of course, I'd rather see a stronger AI that doesn't have to cheat, but that's well out of the range of a modder, for now, anyway. Lua AIs, anyone?

Suppose faction was built to be a strong opponent in certain scenarios, strong unique units, which would be unfair in a normal game. But It may still fun to give the player the option to face this op faction anyways, like setting up 3 v 1 fights. That isn't solved by Lua AI.
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: setting a faction as a human or cpu only
« Reply #3 on: 7 January 2012, 20:36:01 »
Suppose faction was built to be a strong opponent in certain scenarios, strong unique units, which would be unfair in a normal game. But It may still fun to give the player the option to face this op faction anyways, like setting up 3 v 1 fights. That isn't solved by Lua AI.
If that's the case, I would strongly recommend you do NOT implement a feature to restrict the faction to the AI. A human player is more than capable of giving the AI that specific faction in the new game menu, if they wish, but adding a restriction would prevent humans from ever being able to play the reverse. Suppose I want to play a human versus three CPU match? Obviously I'd need to be either really good, the CPU would need to be really bad, or I'm going to need an over powered faction.

So, please, don't restrict such a thing, or we'll likely see people editing it out of the XML (no multiplayer like that). After all, what is the con to players being able to play this overpowered AI faction? It's totally an option.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: setting a faction as a human or cpu only
« Reply #4 on: 8 January 2012, 03:42:41 »
Suppose faction was built to be a strong opponent in certain scenarios, strong unique units, which would be unfair in a normal game. But It may still fun to give the player the option to face this op faction anyways, like setting up 3 v 1 fights. That isn't solved by Lua AI.
If that's the case, I would strongly recommend you do NOT implement a feature to restrict the faction to the AI. A human player is more than capable of giving the AI that specific faction in the new game menu, if they wish, but adding a restriction would prevent humans from ever being able to play the reverse. Suppose I want to play a human versus three CPU match? Obviously I'd need to be either really good, the CPU would need to be really bad, or I'm going to need an over powered faction.

So, please, don't restrict such a thing, or we'll likely see people editing it out of the XML (no multiplayer like that). After all, what is the con to players being able to play this overpowered AI faction? It's totally an option.

Its all about the presentation. You are assuming that players will all know that this faction may be be overpowered, or strange to play. After all why play the complex, time consuming, carefully planned out detail tech tree when you could play the easy, mass the biggest army faction who can get high tier units much faster and cheaper  and easier, than the others. And secondly this is a sub faction, not well designed, or planned out, lots of holes in tech tree, and most of all not many unique units, after all units are either re skined old models or cut unit ideas that didn't make it into the alliance.

If you want i could add a "test" or "sandbox" tech tree that will allow for them to be played by humans, but for standard play i want them as Ai only.

Anyways im sure there could be other uses for limiting to cpu or player. What about factions that Ai doesen't work at all?
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

Mr War

  • Guest
Re: setting a faction as a human or cpu only
« Reply #5 on: 19 January 2012, 19:15:12 »
I support ishmaru's suggestion.