Author Topic: How do you allow water travel?  (Read 2437 times)

wyvern

  • Guest
How do you allow water travel?
« on: 9 May 2010, 17:30:02 »
How do you allow water travel? I'm just wondering as it would be a nice addition to tech mk2

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: How do you allow water travel?
« Reply #1 on: 9 May 2010, 20:40:34 »
In GAE only:

<field value="amphibious" />

This allows land units to travel over water. Its not very pretty since the unti 'floats' over the top of the water, but it does the job  :thumbup:
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

jda

  • Guest
Re: How do you allow water travel?
« Reply #2 on: 9 May 2010, 21:18:02 »
I whish someone (who knows) would update the wikia with infos on this and other GAE features...  ::)
There are other new fields implemented by GAE, besides amphibious. Is it "deep_water" or just "water" or... ?  :look:

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: How do you allow water travel?
« Reply #3 on: 9 May 2010, 23:44:07 »
The three feilds are:

amphibious = moves over land and water.

any_water = moves in any water cells.

deep_water = only moves in 'deep' water cells.

The amphibious tag is currently the most useful since there are no harbour buildings which can build ships. The only way to place any/deep water units is to place them via LUA in water or morph them from an amphibious unit once in the water.

Using the any/deep water tags on a unit which is also a land unit will crash Glest.
« Last Edit: 10 May 2010, 16:43:41 by wciow »
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

silnarm

  • GAE Team
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: How do you allow water travel?
« Reply #4 on: 10 May 2010, 00:06:10 »
Wiki updates are coming... I promise, but I need to go over all the new additions with a fine toothed combed, and it is taking a while.

The three new water related fields are, amphibious, any_water, and deep_water.

The amphibious tag is currently the most useful since there are no harbour buildings which can build ships. The only way to place all/deep water units is to place them via LUA in water or morph them from an amphibious unit once in the water.

Not actually true.  Building's will look for a place 'nearby' to place new units, as long as the building is close enough to water, it will work (if look a little odd). Phoenix was able to exploit this fact to create shipyards for his Naval scenarios.

Quote
Using the all/deep water tags on a unit which is also a land unit will crash Glest.

The <fields> tag is I believe a relic from an earlier era of Glest, where it was perhaps also used as attack field, it never allowed multiple fields, and was never meant to.  It has caused me much grief, and I think for 0.3 I'm just going to go ahead and break XML compatibility.

Glest Advanced Engine - Code Monkey

Timeline | Downloads

jda

  • Guest
Re: How do you allow water travel?
« Reply #5 on: 13 May 2010, 19:33:27 »
Wiki updates are coming... I promise, but I need to go over all the new additions with a fine toothed combed, and it is taking a while.
Ok, ok... we forgive you... :P ;D

Thanks for all the infos on the water units. 8) :thumbup:

Quote
Using the all/deep water tags on a unit which is also a land unit will crash Glest.

The <fields> tag is I believe a relic from an earlier era of Glest, where it was perhaps also used as attack field, it never allowed multiple fields, and was never meant to.  It has caused me much grief, and I think for 0.3 I'm just going to go ahead and break XML compatibility.
[/quote]@ wciow
Erm... isn't using any other tag with the all tag kinda redundant anyways? Also... a unit that is both a land unit and a deep_water unit (but not amphibious nor any_water) is kinda strange too... But I'll grant people with better imagination than myself the "right" to need it... ;D

@ silnarm
Erm... isn't a unit' field value in say vanilla Glest used to determine whether another unit's attack can be used against the former dependent on the later attack-fields values?...  :look:
By "break XML compatibility" do you mean units for GAE 0.3 may hold multiple fields in their XML's, NOT breaking GAE 0.3 but still breaking vanilla Glest (and I think MG)?
Well... is there that much need for engines not supporting water units to support multiple fields? Granted, a unit being both land and air might be useful but... I dunno... I guess it won't be such a major hassle also because other GAE features (e.g. some new particles' trajectories) will likely crash vanilla anyways... :P
So IMHO do go ahead and break the XML compatibility! :P ;D ;)

silnarm

  • GAE Team
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: How do you allow water travel?
« Reply #6 on: 14 May 2010, 13:21:05 »
@ silnarm
Erm... isn't a unit' field value in say vanilla Glest used to determine whether another unit's attack can be used against the former dependent on the later attack-fields values?...  :look:
Yes, but it also determines how the unit can move, aerial units can fly over tileset objects and submerged cells. In the new system water units (any_water or deep_water) can only travel on appropriate water cells, amphibious can travel on water or un-obstructed land.

I introduced Zones to handle the targeting problem, land and water units are all in the same 'zone' (surface) and anything that can target land units can target water units, <attack-fields> and <fields> are very different things in GAE, but it isn't at all obvious... the old names persist, and they don't really make sense, hope to rectify this situation soon.

Quote
By "break XML compatibility" do you mean units for GAE 0.3 may hold multiple fields in their XML's, NOT breaking GAE 0.3 but still breaking vanilla Glest (and I think MG)?
Well... is there that much need for engines not supporting water units to support multiple fields? Granted, a unit being both land and air might be useful but... I dunno... I guess it won't be such a major hassle also because other GAE features (e.g. some new particles' trajectories) will likely crash vanilla anyways... :P
So IMHO do go ahead and break the XML compatibility! :P ;D ;)

Morphs can get units between fields, so no, there is no need for multiple fields, 0.3 will prefer <field> over <fields> and <zones> over <attack-fields>
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Gabbe

  • Guest
Re: How do you allow water travel?
« Reply #7 on: 14 May 2010, 13:36:40 »
I know how you allow water travel, you ask jesus if he can help you out  :P :P

Okay, i don`t mean to hijack the thread but can i allow water travel by copying another faction unit that got water travel and then just change the models and anims but the name? then the XML should work fine right?

silnarm

  • GAE Team
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: How do you allow water travel?
« Reply #8 on: 14 May 2010, 14:09:48 »
If you can find a faction that uses them, then yes.

Changing 'land' to 'amphibious' will allow units to 'walk on water', using any_water or deep_water will restrict them to water, a few building/harvesting problems clearly exist, but they will be sorted shortly  :thumbup:
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Gabbe

  • Guest
Re: How do you allow water travel?
« Reply #9 on: 14 May 2010, 14:29:58 »
Okay thanks and will try

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: How do you allow water travel?
« Reply #10 on: 14 May 2010, 16:44:22 »
Would it be feasible to make units use a different move skill depending on their field?  For example, walking on land and swimming in water.

a few building/harvesting problems clearly exist, but they will be sorted shortly  :thumbup:
Resources in additional fields, perhaps?

Hectate

  • Guest
Re: How do you allow water travel?
« Reply #11 on: 14 May 2010, 17:19:17 »
Back to harbor unit ideas - could somebody add a "shallow water only" field? My idea is if you have units that are "any water" or "deep water" then you can create them in a harbor in shallow water and they start in the water. Modeling a floating shipyard isn't that difficult...

wyvern

  • Guest
Re: How do you allow water travel?
« Reply #12 on: 14 May 2010, 17:21:22 »
I wish you didn't need GAE for the water travel.

jda

  • Guest
Re: How do you allow water travel?
« Reply #13 on: 14 May 2010, 17:33:08 »
And I wish MG had based itself off GAE instead of vanilla Glest but... :P

Better yet... I wish the MG developpers had plunged into GAE development instead of creating MG... :O

Gabbe

  • Guest
Re: How do you allow water travel?
« Reply #14 on: 14 May 2010, 17:35:16 »
I wish the two would merge immediately but no possibilities.

 

anything