Author Topic: invulnerable parameter  (Read 2529 times)

treba

  • Guest
invulnerable parameter
« on: 12 April 2011, 05:42:39 »
hey ho!

as i pointed out in this thread, i would like to have a way to create custom neutral objects, because as of now, you can only have a small number of different neutral objects in the editor. some people told me that i should use a faction for that.
but in order to create objects, that on one side will block units, and on the other hand will not be attacked nor by my nor the enemies units, i need a way to make units invulnerable (because obviously, the neutral faction can't be in two teams at the same time). softcoder said units with an empty cellmap can't be attacked, but i can't use this for let's say houses.

so i think it would be optimal to just have a parameter or skill in the unit xml to make a unit invulnerable. and even better would be to also have a lua command to add/remove it.

just as an idea for after the merge :)
« Last Edit: 12 April 2011, 05:45:30 by treba »

Psychedelic_hands

  • Guest
Re: invulnerable parameter
« Reply #1 on: 12 April 2011, 05:55:07 »
A much better way of solving this problem which could be scraping the whole "team" system.
Implementing faction specific titles like "friendly" "neutral" and "hostile" would lead to a whole bunch of cool scenarios, gametypes and multiplayer matches.
The best example of this I can think of is Age of Empires 2. That game was really fun because of how you could play around with the teams.

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: invulnerable parameter
« Reply #2 on: 12 April 2011, 05:57:20 »
A short-term solution is to fill up a tileset with objects e.g. use models of houses instead of trees.

(Would workers try to harvest them? ;) )

treba

  • Guest
Re: invulnerable parameter
« Reply #3 on: 12 April 2011, 06:06:20 »
as i pointed out in the other thread, this is of course a possible solution, but then i don't have trees anymore. i want to be able to create many different neutral objects. but the editor allows only a small number of them. that's why i suggested in the custom doodad thread to make it possible to create custom objects in the editor. but there, people told me to use a faction for it.
so you see, both solutions, modifying existing neutral objects and using own faction, don't work. but the own faction could easily work out if units could have a parameter to be undistructible.

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: invulnerable parameter
« Reply #4 on: 12 April 2011, 06:08:42 »
But you can provide more than one model for each object.  I.e. you could provide 100 houses and 100 trees to be used as alternatives for the "large tree" tile or whatever.

Psychedelic_hands

  • Guest
Re: invulnerable parameter
« Reply #5 on: 12 April 2011, 06:33:29 »
I think it's best if you tell everyone what you want to do exactly... that way it's easier to provide a solution.  :thumbup:

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: invulnerable parameter
« Reply #6 on: 12 April 2011, 15:43:23 »
A much better way of solving this problem which could be scraping the whole "team" system.
Implementing faction specific titles like "friendly" "neutral" and "hostile" would lead to a whole bunch of cool scenarios, gametypes and multiplayer matches.
The best example of this I can think of is Age of Empires 2. That game was really fun because of how you could play around with the teams.
That's too limited. The team system lets you create alliances for AI players too, instead of just yourself, and you can decide if all the AIs are against you individually or as a group, maybe multiple groups, etc...
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

treba

  • Guest
Re: invulnerable parameter
« Reply #7 on: 12 April 2011, 18:26:48 »
I think it's best if you tell everyone what you want to do exactly... that way it's easier to provide a solution.  :thumbup:

i want to be able to create a bunch of different neutral/tileset objects. for example different houses and decorative stuff.
but i definitly don't want them to be randomly placed, because then i never know, how it looks in the end.
so far, there are exactly 10 different neutral objects possible with the editor. in warcraft 3, i can have dozends if not hundrets. that helps a lot to create maps/scenarios with athmosphere.
a simple way to create own neutral objects would be to just use units of a extra faction. but then, it had to be possible to make them invulnerable.

about the team discussion: even if it was possible to make the neutral player everybodys teamate, you could still attack its units. that wouldn't be to nice, for exaple if there is a big custom rock. you could just destroy it. that should not be possible. so for this problem, it would still be no full solution.
« Last Edit: 12 April 2011, 18:31:51 by treba »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: invulnerable parameter
« Reply #8 on: 12 April 2011, 18:34:03 »
You're forgetting the critical flaw though: You can still attack the "unit". It would be far better to change the map format to allow loading of G3Ds at locations than to use a faction.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

treba

  • Guest
Re: invulnerable parameter
« Reply #9 on: 13 April 2011, 08:10:32 »
i totally agree, that's why i came up with this idea before. but it would also take more effort to make it happen.
i thought a invulnerable parameter would be easier to include, especially because i think it should be in the game anyways.
so this could be the first step, and later, we can change the map format.
do you agree?

also, if you want to do the parameter right, you could also make the engine not allow units to attack invulnerable ones. that's how it is in wc3.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: invulnerable parameter
« Reply #10 on: 13 April 2011, 09:48:20 »
This idea is a bit in conflicting with the way glest handles its world.
As you know there are maps and tilesets. So if you want to create an "individual" world environment it gets a bit tricky....
For shure this cannot be done in the map editor without a complete change of the system/idea of glests mapping/tileset system!

What maybe is possible is a way to change an object on the map from a scenario, where you replace the model of an object with an individual one from the scenario, but Its really some work ...
Same way you should be able to add particle system too there.
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

treba

  • Guest
Re: invulnerable parameter
« Reply #11 on: 13 April 2011, 15:45:54 »
if you see the "custom" objects more as "optional" ones, it might work. the engine looks if it can find the object and renders it only, if it's found. the block effect could be archived with invisible blockers.

but what do you think about the invulnerable parameter? would it be hard to implent?

Zoythrus

  • Guest
Re: invulnerable parameter
« Reply #12 on: 13 April 2011, 16:18:55 »
i support the idea of an invulnerable tag or field.

this would be great for "Capture the Structure" type games, where there is something which needs to be fought over that cant be destroyed (it'd be counter-productive if it could be destroyed).