"Temperature" in terrain blocks
Moderator: Forum Moderators
Forum rules
Before posting a new idea, you must read the following:
Before posting a new idea, you must read the following:
- Darker_Dreams
- Posts: 608
- Joined: February 1st, 2008, 5:26 pm
"Temperature" in terrain blocks
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.
- Simons Mith
- Posts: 821
- Joined: January 27th, 2005, 10:46 pm
- Location: Twickenham
- Contact:
Re: "Temperature" in terrain blocks
[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?
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?
-
- Posts: 172
- Joined: September 19th, 2008, 10:08 pm
Re: "Temperature" in terrain blocks
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.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?
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
- Simons Mith
- Posts: 821
- Joined: January 27th, 2005, 10:46 pm
- Location: Twickenham
- Contact:
Upwind/downind movement
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.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...
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?]
Re: "Temperature" in terrain blocks
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.
-
- Posts: 547
- Joined: August 11th, 2008, 3:19 pm
Re: "Temperature" in terrain blocks
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.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?
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...
-
- Posts: 7
- Joined: October 11th, 2008, 1:01 pm
Re: "Temperature" in terrain blocks
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
Re: "Temperature" in terrain blocks
Anyone?Simons Mith wrote:Can you use WML to alter a unit's resistances based on the hex it is standing on?
-
- Posts: 547
- Joined: August 11th, 2008, 3:19 pm
Re: "Temperature" in terrain blocks
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.IB wrote:Anyone?Simons Mith wrote:Can you use WML to alter a unit's resistances based on the hex it is standing on?
--OSJ
what if the Bible's claims about Christ depicted accurate, verifiable history? given some research, you might be surprised at the evidence...
Re: "Temperature" in terrain blocks
No.opensourcejunkie wrote: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.IB wrote: Anyone?
Ability.
-
- Posts: 547
- Joined: August 11th, 2008, 3:19 pm
Re: "Temperature" in terrain blocks
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...
Re: "Temperature" in terrain blocks
Well, with an ability you could filter terrain types, I think. You know... Ambush?