Author Topic: questions about unit morphing  (Read 5646 times)

Zoythrus

  • Guest
questions about unit morphing
« on: 17 March 2010, 20:43:57 »
1. can i morph a unit into a unit on another field? (land to air for example)

2. can i morph a unit for free even though the end product would take resources to traditionally make? (is this what the "discount" is for?)

Fluffy203

  • Guest
Re: questions about unit morphing
« Reply #1 on: 17 March 2010, 20:58:41 »
Yes i do believe that is what the discount is for , but why would you need to make the end product cost something. Can you morph and make this unit if not , i would suggest making it cost nothing if you want it for nothing. Also you could try EP just saying

Zoythrus

  • Guest
Re: questions about unit morphing
« Reply #2 on: 17 March 2010, 21:02:14 »
well, the concept is that the unit would be able to freely go between a couple of forms...why would i need to have it cost anything?

Fluffy203

  • Guest
Re: questions about unit morphing
« Reply #3 on: 17 March 2010, 21:19:18 »
ok then you don't need it to cost anything , you made that problem yourself , just make it cost nothing at all  :thumbup:

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: questions about unit morphing
« Reply #4 on: 17 March 2010, 21:51:27 »
The discount is for units that can be morphed into or recruited on their own, like the Guard.  When you morph a Swordman into a Guard, you get some of the price back because you already paid for the Swordman.

ElimiNator

  • Airship
  • ********
  • Posts: 3,391
  • The MegaGlest Moder.
    • View Profile
Re: questions about unit morphing
« Reply #5 on: 17 March 2010, 22:59:17 »
I don't know about land to air you need to ask Titi.
Get the Vbros': Packs 1, 2, 3, 4, and 5!

Zoythrus

  • Guest
Re: questions about unit morphing
« Reply #6 on: 17 March 2010, 23:01:42 »
im saying, that if i morph it back to the original, factory-made unit, it would cost because it costs to build it...will setting a discount of 100 make it free to morph back?

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: questions about unit morphing
« Reply #7 on: 17 March 2010, 23:04:35 »
im saying, that if i morph it back to the original, factory-made unit, it would cost because it costs to build it...will setting a discount of 100 make it free to morph back?
Kinda.  It will deduct the full amount when you start the morph, and then you'll get it all back when it's done.  For example, if the unit costs 100 gold and you have 500, when you start the morph your gold will go down to 400, and then go back up to 500 when it completes.  Also if the unit costs 100 gold and you only have 99, you can't morph into it.

Fluffy203

  • Guest
Re: questions about unit morphing
« Reply #8 on: 17 March 2010, 23:17:56 »
i would suggest making the unit us ep

madmanntis

  • Guest
Re: questions about unit morphing
« Reply #9 on: 18 March 2010, 00:46:22 »
I have an old unit (which hasn't seen the light of these forums... it's the second unit I ever made and it's pretty rough  :-X) which was a mercenary with a two-handed sword that he could sheath (morph) and a bow he could pull out. He could then put away his bow and draw his sword (morph back).

The morph was very quick, as the animation of him switching weapons played once. From what I recall, the AI actually used the unit fairly well. If I attacked their base with an air unit, there'd suddenly be a lot of guys with bows drawn.

Kinda.  It will deduct the full amount when you start the morph, and then you'll get it all back when it's done.  For example, if the unit costs 100 gold and you have 500, when you start the morph your gold will go down to 400, and then go back up to 500 when it completes.  Also if the unit costs 100 gold and you only have 99, you can't morph into it.

What John.d.h says is true. It was fine for the most part, but slightly annoying if you were short of a resource. With hopes of some day remaking my 2-handed-sword/bow unit, I've thought of a way you could sorta work around that.

You could have a sort of neutral unit that costs money to produce (Unassigned Mercenary: Sword and bow sheathed). He can't attack, but he can morph into the other units for free (Mercenary Bowman or Mercenary Archer, with respective weapon drawn) not by any discount, but because their cost would be zero. They'd also be able to morph into each other form for free, but not back to the neutral unassigned form.

Zoythrus

  • Guest
Re: questions about unit morphing
« Reply #10 on: 18 March 2010, 14:47:33 »
i guess i could just duplicate the original unit, turn one into a free, form, and make the other forms morph back into that

Zoythrus

  • Guest
Re: questions about unit morphing
« Reply #11 on: 18 March 2010, 17:18:48 »
sorry for the double post, but i realized that my idea wont work--i would need to rename te new unit the same as the old unit, but i cant do that.

also, even if i use EP, wont i still need to pay to morph it? is there any way that i can make the morphing free?

jda

  • Guest
Re: questions about unit morphing
« Reply #12 on: 18 March 2010, 18:47:42 »
also, even if i use EP, wont i still need to pay to morph it? is there any way that i can make the morphing free?
::)
I may be talking out of my bottom but... have you tried putting, in the XML of the unit to morph to:
Code: [Select]
  <resource name="gold" amount="0" />or even simpler:
Code: [Select]
  <resource-requirements />?

I'd be utterly surprised if that didn't work out into an unit you morph some other to, being that this morph costs nothing at all.
No?...

Zoythrus

  • Guest
Re: questions about unit morphing
« Reply #13 on: 18 March 2010, 19:09:50 »
i want the unit A to cost resources when i build it from a factory, then i want unit A to morph into unit B for free, and lastly i want unit B to be able to morph back into unit A for free...

this is exactly what i am trying to do

madmanntis

  • Guest
Re: questions about unit morphing
« Reply #14 on: 18 March 2010, 23:25:28 »
From my understanding, the closest you can get to that is:

Being able to build unit A and have it cost resources, being able to have unit A morph into unit B for free and being able to have unit B morph into unit A and have it cost resources (but with a 100% discount so you get those resources back at the end of morph).

OR

Being able to build unit C and have it cost resources, being able to have unit C morph into A or B for free, being able to have unit A morph to unit B for free and being able to have unit B morph to unit A for free. ( I hope that wasn't confusing  :confused:)

Someone please correct me if I am wrong and/or just spouting crap.

silnarm

  • GAE Team
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: questions about unit morphing
« Reply #15 on: 18 March 2010, 23:47:53 »
I may be talking out of my bottom but... have you tried putting, in the XML of the unit to morph to:
Code: [Select]
  <resource name="gold" amount="0" />or even simpler:
Code: [Select]
  <resource-requirements />?
I'd be utterly surprised if that didn't work out into an unit you morph some other to, being that this morph costs nothing at all.
No?...

But then it is free to produce (in the first place) as well.

From my understanding, the closest you can get to that is:
...
Someone please correct me if I am wrong and/or just spouting crap.

I think you got it, 'spot on' :)
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Zoythrus

  • Guest
Re: questions about unit morphing
« Reply #16 on: 19 March 2010, 00:21:25 »
that's what we need in MegaGlest--a way to make morphing COMPLETELY free (that means no discounts...)

madmanntis

  • Guest
Re: questions about unit morphing
« Reply #17 on: 19 March 2010, 05:32:41 »
Yeah... that'd be nice. Have it apply the discount before you morph instead of reimbursing you when the morph is complete.

jda

  • Guest
Re: questions about unit morphing
« Reply #18 on: 19 March 2010, 10:00:58 »
i want the unit A to cost resources when i build it from a factory, then i want unit A to morph into unit B for free, and lastly i want unit B to be able to morph back into unit A for free...

this is exactly what i am trying to do
Ok, sorry, I had not understood that.
Yes, that being the case, what I said does not solve it.
And I agree madmanntis is right about your choices.

Hey, if the discount after option does not suit you ... I guess you could sitll make a dirty hack of the other option (you know, the one where C costs money to produce but then it can freely morph to either A or B and between the later two).
Here's my take:
Produce unit C for say 100 gold. Unit C name is Swordman (I've chosen this one on purpose).
Unit C (Swordman) can morph for free to unit A (Swordsman - get the little difference?... ;) It is just an example but...).
Unit A (Swordsman) can morph into Unit B (Archer) for free.
Unit B (Archer) can morph into unit A (Swordsman) for free.

Of course, you would need your units C and A to have names that would enable you that kind of dirty "illusion"...
Alternatively, you could have unit C be called e.g. "Soldier" and unit A be called "Skilled Soldier" or something of the sort.
The models, images and sounds folders of units A and C would be the exact same (link one of them to the other's) and only the respective XML's would differ.

While you wait for that discount before morph to be implemented in megaglest or gae... ;)

Zoythrus

  • Guest
Re: questions about unit morphing
« Reply #19 on: 19 March 2010, 13:31:46 »
i want the unit A to cost resources when i build it from a factory, then i want unit A to morph into unit B for free, and lastly i want unit B to be able to morph back into unit A for free...

this is exactly what i am trying to do
Ok, sorry, I had not understood that.
Yes, that being the case, what I said does not solve it.
And I agree madmanntis is right about your choices.

Hey, if the discount after option does not suit you ... I guess you could sitll make a dirty hack of the other option (you know, the one where C costs money to produce but then it can freely morph to either A or B and between the later two).
Here's my take:
Produce unit C for say 100 gold. Unit C name is Swordman (I've chosen this one on purpose).
Unit C (Swordman) can morph for free to unit A (Swordsman - get the little difference?... ;) It is just an example but...).
Unit A (Swordsman) can morph into Unit B (Archer) for free.
Unit B (Archer) can morph into unit A (Swordsman) for free.

Of course, you would need your units C and A to have names that would enable you that kind of dirty "illusion"...
Alternatively, you could have unit C be called e.g. "Soldier" and unit A be called "Skilled Soldier" or something of the sort.
The models, images and sounds folders of units A and C would be the exact same (link one of them to the other's) and only the respective XML's would differ.

While you wait for that discount before morph to be implemented in megaglest or gae... ;)

i was thinking about doing this...

(it's just crazy enough to work!)

jda

  • Guest
Re: questions about unit morphing
« Reply #20 on: 19 March 2010, 13:48:19 »
Actually, if the names are very similiar it would work best if unit C could morph to B rather than A.
Then B could morph to A.
And A could morph to B.

If the names are different, you might consider doing it as I said before. But I fear that might break the AI's logic. I mean why would the AI morph a unit to another that is almost completely the same (other than the morphing abilities)?!
The AI would probably never get out of unit C state.  :-\ You'd have to test though. ;)

Zoythrus

  • Guest
Re: questions about unit morphing
« Reply #21 on: 19 March 2010, 14:27:34 »
that is also what i was thinking, but its just finding good "renames" for the existing units.

and who knows? the AI might use it...you never know...

Zoythrus

  • Guest
Re: questions about unit morphing
« Reply #22 on: 19 March 2010, 23:28:20 »
sorry once again for a double post, but ive figured out how im going to do it!

sadly, i cant tell you, so you will just have to find out what i did when my mod comes out  :P

(we do need an easier solution to this though...)

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
Re: questions about unit morphing
« Reply #23 on: 20 March 2010, 00:44:03 »
sadly, i cant tell you, so you will just have to find out what i did when my mod comes out  :P
What is your mod about?  ::)  :|

Zoythrus

  • Guest
Re: questions about unit morphing
« Reply #24 on: 20 March 2010, 01:35:43 »
one hint: robots