Author Topic: Stopping AI building certain things  (Read 961 times)

Mr War

  • Guest
Stopping AI building certain things
« on: 6 June 2011, 11:39:38 »
Is there an XML way to stop AI building something whilst leaving it ok for human players.

also, is there a way of making a unit die after it's attacked once, like a suicide unit?

Edit by Omega: Merged double post.
« Last Edit: 6 June 2011, 22:48:30 by Omega »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Stopping AI building certain things
« Reply #1 on: 6 June 2011, 22:51:54 »
Is there an XML way to stop AI building something whilst leaving it ok for human players.
Not in MegaGlest. I do believe GAE's wall attribute will currently have the AI ignore the building (for now, until the AI can handle walls), though I could be wrong, and nothing uses walls yet, so pretty untested.

also, is there a way of making a unit die after it's attacked once, like a suicide unit?
Well, you could give it one health (or low health), and have a splash attack with short enough range to ensure it will always be killed by the splash of its own attack. If you don't want others killing it so easily, make a custom armour type and give it extreme weakness to a custom attack type which you'll use for the splash attack.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

titi_son

  • Draco Rider
  • *****
  • Posts: 283
  • titi_son
    • View Profile
Re: Stopping AI building certain things
« Reply #2 on: 13 June 2011, 07:24:54 »

also, is there a way of making a unit die after it's attacked once, like a suicide unit?
Well, you could give it one health (or low health), and have a splash attack with short enough range to ensure it will always be killed by the splash of its own attack. If you don't want others killing it so easily, make a custom armour type and give it extreme weakness to a custom attack type which you'll use for the splash attack.


You can make a new attack type and armor type, then you say that the attack type has a 1000x multiplier to the armor.
Now you can make a Unit that have enough health and dies.
BUT wasn't there a way to make HP using for skills like EP (do anyone know a better word then using ?)
My first Tilseset: SPRING :) (included in Megaglest )

Secret Hint: To play online join the IRC #megaglest-lobby on freenode which is the lobby chat ingame. So you can chat with or wait for people in the lobby without running megaglest all the time.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Stopping AI building certain things
« Reply #3 on: 14 June 2011, 01:46:57 »
BUT wasn't there a way to make HP using for skills like EP (do anyone know a better word then using ?)
In GAE, yes, via a recourse effect.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

 

anything