Author Topic: Building/Morphing.  (Read 3994 times)

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Building/Morphing.
« on: 23 March 2010, 22:28:42 »
As the title suggest, i need some help about the build command.

Now its some time ive been down into the XML's.

But i would like to when i building a building that the unit is morphing into the building, im not totally sure how i am suposed to do this.the unit need to morph to a building, but i still want to use the build menu, perhaps by doing some command hacks?.
WiP Game developer.
I do danish translations.
"i break stuff"

Zoythrus

  • Guest
Re: Building/Morphing.
« Reply #1 on: 23 March 2010, 22:36:23 »
couldnt you just use a bunch of morph commands instead of build commands?

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: Building/Morphing.
« Reply #2 on: 23 March 2010, 22:38:10 »
i was wondering the same, but i want the building menu, is that still posible?, or simply just make the building consume the unit who initiates the building, and if cancel'ed returns the unit?.

okay, i looked abit into it and it dosnt seem theres anything i can do.

the only thing i looked at who possible could help, dindt work. its marked in blue, drones are starting units,so i did have them, but it dindt consume them.

My Suggestion add a optitonal extra option alike to requrement, but instead Consumes the unit.

something like this:

<unit-consumed>
         <unit name="drone"/>
</unit-consumed>

Hereunder is what i cant get to work, marked with blue text.

<command>
         <type value= "build"/>
         <name value="build_basic"/>
         <image path="images/scv_build_basic.bmp"/>
<unit-requirements>
         <unit name="drone"/>
      </unit-requirements>

         <upgrade-requirements/>
         <move-skill value="move_skill"/>
         <build-skill value="build_skill"/>
         <buildings>
            <building name="spawning_pool"/>
            <building name="hatchery"/>
            <building name="creep_nurisher"/>   
         </buildings>
         <start-sound enabled="false"/>
         <built-sound enabled="true">
            <sound-file path="sounds/scv_work_end1.wav"/>
            <sound-file path="sounds/scv_work_end2.wav"/>
            <sound-file path="sounds/scv_work_end3.wav"/>                     
         </built-sound>   
      </command>
« Last Edit: 24 March 2010, 00:08:45 by Coldfusionstorm »
WiP Game developer.
I do danish translations.
"i break stuff"

Zoythrus

  • Guest
Re: Building/Morphing.
« Reply #3 on: 24 March 2010, 03:17:02 »
ahh, i forgot that you were the guy doing the Starcraft mod...i knew this sounded familiar... :P

i just think that you should have the drones morph into the buildings, its easier. although there wont be a "morph menu," it will still work.

pullo

  • Guest
Re: Building/Morphing.
« Reply #4 on: 24 March 2010, 11:04:23 »
I need this feauture for my mod as well, but as far as I know glest/gae doesnt support it, so I'll have to code it up. Shouldn't be too hard, I think I'll just create a new commnad that combines morph and build command.

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: Building/Morphing.
« Reply #5 on: 24 March 2010, 13:44:20 »
pullo, that would be awsome, could you perhaps post the code when you are done?, i cant code unfortunatly. it would be much apriciated. :).
It would be totally awsome :).
WiP Game developer.
I do danish translations.
"i break stuff"

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Building/Morphing.
« Reply #6 on: 24 March 2010, 13:58:49 »
What do you want exactly?

At the moment we have
1. morph commands
2. build commands ( which can be shown in a build menu )

Is the only problem you see that the morph command cannot be integrated in the build menu?
What about something like a submenu for commands in general.
By this it would be possible to group your commands in any way you want them?
Would this solve all problems?
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

pullo

  • Guest
Re: Building/Morphing.
« Reply #7 on: 24 March 2010, 14:53:49 »
What do you want exactly?

At the moment we have
1. morph commands
2. build commands ( which can be shown in a build menu )

Is the only problem you see that the morph command cannot be integrated in the build menu?
What about something like a submenu for commands in general.
By this it would be possible to group your commands in any way you want them?
Would this solve all problems?


It's not just that, when building a unit you can select where to place it.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Building/Morphing.
« Reply #8 on: 24 March 2010, 15:06:21 »
This can maybe be solved when we think about "command lists" so you can give a unit several commands which are done one after another.
In this case the command queue would look like this:
1. walk there
2. morph
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

jda

  • Guest
Re: Building/Morphing.
« Reply #9 on: 24 March 2010, 15:43:30 »
What do you want exactly?

At the moment we have
1. morph commands
2. build commands ( which can be shown in a build menu )

Is the only problem you see that the morph command cannot be integrated in the build menu?
What about something like a submenu for commands in general.
By this it would be possible to group your commands in any way you want them?
Would this solve all problems?

This sounds very good to me, titi! ;) (though apparently does not solve all of ColdFusion's needs...)

This can maybe be solved when we think about "command lists" so you can give a unit several commands which are done one after another.
In this case the command queue would look like this:
1. walk there
2. morph
I know that works in GAE (using the SHIFT key to sequence commands) and I think not in vanilla Glest.
How does it work in Megaglest?

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Building/Morphing.
« Reply #10 on: 26 March 2010, 12:46:57 »
they have command lists in GAE already  :o !?! I didn't know that!
Thats a nice feature!
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: Building/Morphing.
« Reply #11 on: 26 March 2010, 12:52:34 »
Im not too sure, about que command's, (im missing que in MG, but thats not it).

But yeah, Basically a way to intergrate morph command into building, or any other command for that sake, for the popurse of other stuff :), that's more for if other people would perhaps need it, i dunno for what but fx,a attack that does spash?, fx the sub command sounded like a good idea. :)
WiP Game developer.
I do danish translations.
"i break stuff"

jda

  • Guest
Re: Building/Morphing.
« Reply #12 on: 26 March 2010, 16:58:17 »
they have command lists in GAE already  :o !?! I didn't know that!
Thats a nice feature!
I think GAE has a lot more anyone can remember at any given time. GAE does have TONS of new stuff in and much of it is working properly. ;)
There are almost as many experimental features that make it look somewhat unstable, true. But a lot of good stuff is stable.  :thumbup:

RealtimeFreak

  • Guest
Re: Building/Morphing.
« Reply #13 on: 29 March 2010, 11:23:10 »
i see a thread already exist.

Ok, then writing i here.

Ok indeed,
i have a AI morphing problem.
the AI morphs not from Building to Building
but, from Unit to Unit it works.

its that a bug?

still a Question:
gives because generally a Wishlist for the next GAE version?

jda

  • Guest
Re: Building/Morphing.
« Reply #14 on: 29 March 2010, 12:35:21 »
i have a AI morphing problem.
the AI morphs not from Building to Building
but, from Unit to Unit it works.
If I remember correctly, the Elves faction has a building morhping to another building (it's like the "stable" for producing cavalry (but has a different name) that morphs to a stable with a "nest" allowing it to produce gryphs (flying units).
Check it out, you may find the answer you're looking for in its XML's! ;)

silnarm

  • GAE Team
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Building/Morphing.
« Reply #15 on: 29 March 2010, 13:11:48 »
I've created a ticket for this,
https://sourceforge.net/apps/trac/glestae/ticket/86

The description describes how I intend to support this, if anyone is going to work on this (for any flavour of codebase) before I get around to it, please at least have a look, and contact me if you a disagree with how it should be implemented... I promise I wont bite ;)
Glest Advanced Engine - Code Monkey

Timeline | Downloads

pullo

  • Guest
Re: Building/Morphing.
« Reply #16 on: 29 March 2010, 14:59:20 »
I've created a ticket for this,
https://sourceforge.net/apps/trac/glestae/ticket/86

The description describes how I intend to support this, if anyone is going to work on this (for any flavour of codebase) before I get around to it, please at least have a look, and contact me if you a disagree with how it should be implemented... I promise I wont bite ;)


Will the AI have to be modified as well to support this? What if a faction have buildings that can only be built by morphing? Could it be easier to modify a build command instead? In this way we'll be able to keep the build submenu.

RealtimeFreak

  • Guest
Re: Building/Morphing.
« Reply #17 on: 29 March 2010, 15:35:35 »
Quote
If I remember correctly, the Elves faction has a building morhping to another building (it's like the "stable" for producing cavalry (but has a different name) that morphs to a stable with a "nest" allowing it to produce gryphs (flying units).
Check it out, you may find the answer you're looking for in its XML's!

thats right, morph from Buidling to Building goes for Human Player but not for the AI CPU PLAYERS.

i testet many other factions with the morph Command
but the AI morphs simply not form Building to Building. /:

Quote
I've created a ticket for this,
https://sourceforge.net/apps/trac/glestae/ticket/86

// Is that a bug?

The description describes how I intend to support this, if anyone is going to work on this (for any flavour of codebase) before I get around to it, please at least have a look, and contact me if you a disagree with how it should be implemented... I promise I wont bite

hmm can't not realy understand.
i wont you maker Tickets for Wishes gives it then no generally Wishlist?

jda

  • Guest
Re: Building/Morphing.
« Reply #18 on: 29 March 2010, 15:46:19 »
thats right, morph from Buidling to Building goes for Human Player but not for the AI CPU PLAYERS.

i testet many other factions with the morph Command
but the AI morphs simply not form Building to Building. /:
Oh, sorry, I had not understood that. Ok, it's an AI problem then. :(

Quote
I've created a ticket for this,
https://sourceforge.net/apps/trac/glestae/ticket/86

// Is that a bug?

The description describes how I intend to support this, if anyone is going to work on this (for any flavour of codebase) before I get around to it, please at least have a look, and contact me if you a disagree with how it should be implemented... I promise I wont bite

Quote
hmm can't not realy understand.
i wont you maker Tickets for Wishes gives it then no generally Wishlist?
Tickets can be used to report bugs or make new feature requests or anything else you can do in the given project.
The link silnarm posted is for GAE's development (bugs, feature requests, ...) BUT silnarm said at least for this one, that ticket may be used for another project (e.g. Megaglest)

[I fixed a screwed up quote. :) -- Archmage]
« Last Edit: 30 March 2010, 13:58:06 by -Archmage- »

silnarm

  • GAE Team
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Building/Morphing.
« Reply #19 on: 30 March 2010, 02:02:29 »
Will the AI have to be modified as well to support this? What if a faction have buildings that can only be built by morphing?

Interesting point, I think morph and build are handled 'together' by the AI, but I haven't looked at that in a while, will re-investigate tonight.

Quote
Could it be easier to modify a build command instead? In this way we'll be able to keep the build submenu.

Very good point! Yes, the build command already has the logic to move into position, so only the 'when arrived' logic needs modifying.

For the sub-menu I think there is valid argument to extend the morph command to be more like build, so if the XML has <morph-unit ... /> it acts the same as it currently does, but the you now also have the option to use,
Code: [Select]
<morph-units>
  <unit name="..."/>
  <unit name="..."/>
</morph-units>

Which get put in a submenu, as is done with build.

I think maybe it should still be presented to the user as a modified morph ?? That just seems to make more sense to me, but obviously build makes sense too ... thoughts ?

Edit: My bad, the AI handles produce and morph together...
« Last Edit: 30 March 2010, 11:59:06 by silnarm »
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: Building/Morphing.
« Reply #20 on: 1 April 2010, 19:41:10 »
Yes this is my RECENT topic stupid crash.
WiP Game developer.
I do danish translations.
"i break stuff"

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: Building/Morphing.
« Reply #21 on: 1 April 2010, 20:26:53 »
Will the AI have to be modified as well to support this? What if a faction have buildings that can only be built by morphing?

Interesting point, I think morph and build are handled 'together' by the AI, but I haven't looked at that in a while, will re-investigate tonight.

Quote
Could it be easier to modify a build command instead? In this way we'll be able to keep the build submenu.

Very good point! Yes, the build command already has the logic to move into position, so only the 'when arrived' logic needs modifying.

For the sub-menu I think there is valid argument to extend the morph command to be more like build, so if the XML has <morph-unit ... /> it acts the same as it currently does, but the you now also have the option to use,
Code: [Select]
<morph-units>
  <unit name="..."/>
  <unit name="..."/>
</morph-units>

Which get put in a submenu, as is done with build.

I think maybe it should still be presented to the user as a modified morph ?? That just seems to make more sense to me, but obviously build makes sense too ... thoughts ?

Edit: My bad, the AI handles produce and morph together...

i could not get the method above to work silnarm. with more than one morph options. :/.
WiP Game developer.
I do danish translations.
"i break stuff"

RealtimeFreak

  • Guest
Re: Building/Morphing.
« Reply #22 on: 6 June 2010, 10:19:28 »
i think,

the heavy problem is, the AI Morphs not to from Building to Building

Maybe can one that yes, at the next Version remedy.