"Temperature" in terrain blocks

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderators: Forum Moderators, Developers

Forum rules
Before posting a new idea, you must read the following:
Post Reply
User avatar
Darker_Dreams
Posts: 608
Joined: February 1st, 2008, 5:26 pm

"Temperature" in terrain blocks

Post by Darker_Dreams » October 3rd, 2008, 10:35 pm

The idea is to add a command, like light, that modifies the resistance of units on the terrain. I'm aware that it is possible to do this in WML for scenarios, manually making snow/ice tiles reduce cold resist or increase fire resist or making lava tiles decrease fire resist or increase cold resist- but a way to include that in the terrain generation itself would allow campaign creators to add these features to terrain before putting the terrain on the map, automating the process of adding such features to the scenario itself. Other possibilities would be magically attuned areas that increase or decrease Arcane damage.

User avatar
Simons Mith
Posts: 784
Joined: January 27th, 2005, 10:46 pm
Location: Twickenham
Contact:

Re: "Temperature" in terrain blocks

Post by Simons Mith » October 7th, 2008, 2:12 pm

[Author's note: I wrote the following response to D_D's idea, but I found it digressing while I was writing it. Having written it I didn't want to just discard it, so here it is anyway:]

I do like this idea but I see it could easily be made very complicated. I think (hope) it is probably mostly doable using clever WML code, rather than requiring changes in the Wesnoth engine.

For example, seeing the Wesnoth models of ships, I thought of using the game for a piracy/man'o'war campaign of some kind. This idea foundered when I realised that water hexes would need a wind speed, which could vary from hex to hex and from turn to turn, (or even in the lee of another ship) and that would mean a unit could move faster in some directions than in others. I wasn't sure whether that could be done in WML. Can it?

Perhaps 'weather', 'season' and/or 'environment' is a better general term for this idea.

Brainstorming effects that could vary:

We already have day/night and many terrain variations. And some weather effects are already fudged as new terrain types.

Hot, cold
Magical/hallowed/unholy ground
Visibility
Windy (Wind speed & direction)
Water currents (Speed & direction)
Rain
Drought
Snow, duststorms, sandstorms, other weather/precipitation
Tornados
Seasonal changes (e.g. spring, summer, autumn)

I suspect that for Wesnoth's purposes the general view will be that, just as unit defences on terrain don't vary (or, if they do, it's by less than the games 10% 'granularity' and so the effect is ignored), unit resistances are also assumed to stay within their defined 10% bands.

Can you use WML to alter a unit's resistances based on the hex it is standing on? Can you use WML to model wind and currents in the same way?
 

KingdomAmericaCMG
Posts: 172
Joined: September 19th, 2008, 10:08 pm

Re: "Temperature" in terrain blocks

Post by KingdomAmericaCMG » October 7th, 2008, 6:21 pm

Simons Mith wrote: For example, seeing the Wesnoth models of ships, I thought of using the game for a piracy/man'o'war campaign of some kind. This idea foundered when I realised that water hexes would need a wind speed, which could vary from hex to hex and from turn to turn, (or even in the lee of another ship) and that would mean a unit could move faster in some directions than in others. I wasn't sure whether that could be done in WML. Can it?
can be done. if the base movement of the ship is 8 squares you must increase the units normal speed to at least double. Then normal movement over terrain tiles are doubled.

8 squares becomes 16 speed, and 1 speed over water becomes 2 speed over water. then in your campaign you make specific squares 1 speed over water. a player moving the ships could click on the ship and simulate movment during that turn and find the shortest rout for that turn, if you have the winds change each turn possible random generator, then the player will only see the best routs turn by turn. possiblities are you can have picture of a storm that moves across the water that would decrease the defense on that tile

User avatar
Simons Mith
Posts: 784
Joined: January 27th, 2005, 10:46 pm
Location: Twickenham
Contact:

Upwind/downind movement

Post by Simons Mith » October 8th, 2008, 1:23 pm

KingdomAmerica wrote:can be done. if the base movement of the ship is 8 squares you must increase the units normal speed to at least double. Then normal movement over terrain tiles are doubled.

8 squares becomes 16 speed, and 1 speed over water becomes 2 speed over water. then in your campaign you could make specific squares 1 speed over water...
Yeah, but I don't think that's quite right. Say ship A could move downwind into a hex at a movement cost of 1. Identical ship B could move upwind into the same hex, but it would cost 2 or 3 movement points. I know you can customise the terrain movement costs, but can you customise it per-unit in this way? Wouldn't that take rather a lot of WML at best? And even if you could, you'd surely need to overhaul the AI to cope.

Also, Wesnoth is facing-insensitive, and for a naval game that's something else I'd likely want to address.

[Mods: If this discussion gets much longer, perhaps it should be split to the WML workshop?]
 

AI
Developer
Posts: 2394
Joined: January 31st, 2008, 8:38 pm

Re: "Temperature" in terrain blocks

Post by AI » October 8th, 2008, 2:11 pm

I think it's probably preferable in this case to have units move as normal, then in either new turn or side turn, add wind-drift.

opensourcejunkie
Posts: 547
Joined: August 11th, 2008, 3:19 pm

Re: "Temperature" in terrain blocks

Post by opensourcejunkie » October 10th, 2008, 8:59 am

Yeah, but I don't think that's quite right. Say ship A could move downwind into a hex at a movement cost of 1. Identical ship B could move upwind into the same hex, but it would cost 2 or 3 movement points. I know you can customise the terrain movement costs, but can you customise it per-unit in this way?
Assuming this were not used in a networked multiplayer context, you could use a select event to accomplish this. when a ship is selected, the water terrain is altered such that all of the downwind terrain is on one side of the ship, and all the upwind terrain is on the other side (perhaps normal water terrain acting as a buffer in between the two to provide a gradient) As a result, whenever a player selects a ship to move it, the terrain will always be relative to that ship.

By the way, if anyone ever coded a scenario like this, I would so play it. (hint, hint :-)
--OSJ
what if the Bible's claims about Christ depicted accurate, verifiable history? given some research, you might be surprised at the evidence...

Setsuna F. Seiei
Posts: 7
Joined: October 11th, 2008, 1:01 pm

Re: "Temperature" in terrain blocks

Post by Setsuna F. Seiei » October 12th, 2008, 10:38 am

An idea is that maybe in some scenarios, there is a typhoon/hurricane and units moving against the wind will have less movement and units moving with the wind have more movement. Same goes for water currents

IB
Posts: 330
Joined: September 28th, 2006, 11:38 am

Re: "Temperature" in terrain blocks

Post by IB » November 20th, 2008, 7:40 pm

Simons Mith wrote:Can you use WML to alter a unit's resistances based on the hex it is standing on?
Anyone?

User avatar
JW
Posts: 5046
Joined: November 10th, 2005, 7:06 am
Location: Chicago-ish, Illinois

Re: "Temperature" in terrain blocks

Post by JW » November 20th, 2008, 7:47 pm


opensourcejunkie
Posts: 547
Joined: August 11th, 2008, 3:19 pm

Re: "Temperature" in terrain blocks

Post by opensourcejunkie » November 21st, 2008, 8:26 am

IB wrote:
Simons Mith wrote:Can you use WML to alter a unit's resistances based on the hex it is standing on?
Anyone?
Yeah, you should be able to. All you do is code in a moveto event that detects the type or location of the hex, and alters the unit's resistances accordingly.

--OSJ
what if the Bible's claims about Christ depicted accurate, verifiable history? given some research, you might be surprised at the evidence...

User avatar
zookeeper
WML Wizard
Posts: 9740
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: "Temperature" in terrain blocks

Post by zookeeper » November 21st, 2008, 8:58 am

opensourcejunkie wrote:
IB wrote: Anyone?
Yeah, you should be able to. All you do is code in a moveto event that detects the type or location of the hex, and alters the unit's resistances accordingly.
No.

Ability.

opensourcejunkie
Posts: 547
Joined: August 11th, 2008, 3:19 pm

Re: "Temperature" in terrain blocks

Post by opensourcejunkie » November 21st, 2008, 10:31 am

you could use an ability to activate upon the x,y coordinates of a unit? or was that not what he was talking about?
what if the Bible's claims about Christ depicted accurate, verifiable history? given some research, you might be surprised at the evidence...

Lord_Aether

Re: "Temperature" in terrain blocks

Post by Lord_Aether » November 21st, 2008, 4:11 pm

Well, with an ability you could filter terrain types, I think. You know... Ambush?

Post Reply