View Full Version : [Religion and Revolution]: Winds and Storms


Robert Surcouf
Dec 10, 2011, 06:10 AM
Ray has given me a little feedback about my Wind and Storm feature included in my Storm and Light mod. Maybe it's a good idea to discuss this here:

Hi Robert,

I have taken a look at your feature "Wind and Storm".
(Just a short overview.)

Please excuse if I am critizising a few things. :)
(Also, please excuse if I get anything wrong.)

1. As far as I can see, "Winds" and "Storms" are only created once at first map-creation.

2. It is Python-based instead of DLL-based.


Thus the feature is a little boring, because "Winds and Storms" are very static.

It will not work for all types of game (Maps, Scenario and Mapskripts).

Also performance and possibilities of DLL are much larger.

Please let us create a feature that:

1. Will work for all types of games.

2. Will have dynamic placement of winds and storms every round.

Actually such a feature would be quite easy to do. :thumbsup:

Basic Concept:

We could just hook into this method:
void CvGame::doTurn()

At the beginning of every round, we first clear all "Winds" and "Storms" of the map.

Then we place them again randomly.

Would you like to create the feature like that ?
(It is your feature after all.)

I could also do it, if you want.

What do you think ?

Again, please excuse.
I really do not want to critizise your work.
I simply think we can create a much more interesting feature with DLL that will work for all kinds of games.

KJ Jansson
Dec 10, 2011, 09:37 AM
Ray has given me a little feedback about my Wind and Storm feature included in my Storm and Light mod. Maybe it's a good idea to discuss this here


As far as I can see, "Winds" and "Storms" are only created once at first map-creation.
It is Python-based instead of DLL-based.


As far as I remember we early discussed this question, please, look here (http://forums.civfanatics.com/showthread.php?t=353871):

There are at least 3 ways to include the weather/health (illness) effects in the game.

1. Python (as random events, I guess)
2. SDK as in "1492: Reefs and Weather (http://forums.civfanatics.com/showthread.php?t=353871)" (full analog of Civilization IV)
3. SDK as in "Model: Mortally Dangerous Colonization" where I exchanged one of sea animals on Tornado (analog of Jeckel's "JAnimals A Wild Wilderness 1.001" mod).

I tested variants 2 and 3. Both are working correctly. Probably I will test also variant 1 with Python.

Unfortunately up to now I found no time to test the first technique, where weather/health (illness) effects would be implemented through Python. However, both SDK (DLL) variants are working perfectly.

Do I understand correctly that "Wind and Storm" is Python-based version of "Weather feature"?

Robert Surcouf
Dec 10, 2011, 11:22 AM
@ Ray:
You're actually the first one to give me some feedback. :goodjob:So, no I don't mind. :lol:
Actually I figured out a few things weren't perfect.;)

By the way, you may have missed a few details, but basically what you say seems correct!

@ KJ:
Yes, it's a python and Xml based weather feature!
You can find some info here:
Storm and Light (http://forums.civfanatics.com/showthread.php?t=425319)

@ everyone:
Basically, when I started modding Colonization, I didn't know how to program in C++.
So I started with simple Xml editing. So I added new features on ocean plots. The problem is they didn't appear on new maps, unless I added them manually!

So I changed python map generators... I showed the result to Dazio and M07 (from Dawn of a New Era). They told me they loved the idea.
A few weeks later, Dazio told me about another mod: 1492 Reefs and Weather by KJ Jansson(;)). M07 (I think?) told me it seemed really great ! He told me it was nearly perfect... but there was a major transparency problem...

I checked the code very quickly, but didn't understand much of it (it was mostly C++, and I didn't know any C++ at the time). It seemed much better than what I was planning to do... But even though, M07 and Dazio encouraged me to continue. Maybe it's time I (or we) look into it again.

Was the transparency problem ever solved?

raystuttgart
Dec 10, 2011, 12:32 PM
Hi guys,

I really think a DLL-based feature (with XML for balancing) is the best solution.

1. It is no problem to have it work for all types of games.
(Maps, Szenarios, Mapscripts)

2. DLL is a lot faster / much more performant than Python.

3. We can easily trigger dynamic generation of the features "Storm" and "Weather" every round.
(Which would make the feature much more interesting than only having placement of these features at map-generation.)

4. We would have to go into DLL anyways, to teach AI at least generally how to handle these new features.
(Adapting of Pathfinding.)

----------------------

We can reuse a lot of the graphics (and also XML) that have been created for the features. :thumbsup:

----------------------

So ok, I would like to clarify a few things:
(Let us discuss these things again. :) )

1. Basic Concept

What kind of weather effects (terrain features) should be implemented ?

Will we have weather effects only on water or also on land ?
(In TAC we already have "Fire", "Tornados" and "Vulcanos" on land.)

Should we simply do a fresh regeneration of these weather effects every round ?
(Or should it work some other way ... :dunno:)

2. AI Concept

How do we ensure that this feature does not ruin AI ?
(Losing too many ships for example. Or having too many ships in repair to keep up transportation.)

What do we need to pay attention to considering AI ?
(Pathfinding. Anything else ?)

3. Balancing

How many of these new terrain features should we have on map at the same time.
(Only a few or is this a "mass"-feature ?)

Which XML-Settings do we need to ensure good balancing-possibilities later on.

Should a Storm (for example) be able to destroy a ship or only damage ?

----------------------

After we have clarified 1. to 3. we can discuss

4. Implementation concept (DLL)

Actually the concept I have in mind is very similar to my technical concept for "Wild Animals".
(But that is just an idea ...)

5. GUI (Messages, Warnings, ...)

Figuring out the exact texts, when "Ship damaged", "Mouse over Storm", ...

6. Work distribution

Who is going to create basic implementation, graphics, AI, texts, ...

----------------------

Let us put some effort into this, to create a really great feature. :)
(This is no minor feature, we should really take care here.)

KJ Jansson
Dec 10, 2011, 03:31 PM
1. Basic Concept

What kind of weather effects (terrain features) should be implemented ?

Will we have weather effects only on water or also on land ?
(In TAC we already have "Fire", "Tornados" and "Vulcanos" on land.)

Should we simply do a fresh regeneration of these weather effects every round ?
(Or should it work some other way ...


My proposal:

1. Reefs
2. Storms at Sea (Tornados)
3. Thunderstorm (both Sea and on Land),
4. Tailwind (Sea)
5. Sandstorm (Land if you have Deserts)

6. Fire (TAC)
7. Vulcanos (TAC)

As a starting point of Basic Concept we can use these data:

Negative effects:

1. Reefs:
- The ship, sitting on the reef gets 15% damage per turn.
- The speed of the ship is reduced by -5. The ship, sitting on the reefs, will not be able to move more during this turn.

2. Storms at Sea (Tornados):
- The ship caught in a storm gets 20% damage per turn.
- The speed of the ship is reduced to -4. The ship, caught in a storm, will not be able to move more during this turn.
- Storm at sea reduces the impact of food from the tile for 3 (-3 FOOD).

3. Thunderstorm and Rain on Sea and on Land:
- Unit, caught in a thunderstorm, gets only 5% of damage.
- The speed of the unit that has entered the thunderstorm , is reduced by -1. The naval unit can often continue to move and get out of the dangerous tile, the land unit will leave on this tile up to next turn.
- Thunderstorm slightly reduces the ouput from the tile:
for Sea tiles: -1 FOOD,
for Land tiles: -1 FOOD, -1 LUMBER, etc.
Weather phenomena do not affect the production of goods in urban buildings or mining in the mines.

Positive effects:

1. Tailwind (Fair wind) on Ocean and near Coast increases the speed of the naval units (+1 per turn).
2. Natural weather phenomena and coastal reefs make travel more dangerous, that adds a reality in the game.


2. AI Concept

How do we ensure that this feature does not ruin AI ?
(Losing too many ships for example. Or having too many ships in repair to keep up transportation.)

What do we need to pay attention to considering AI ?
(Pathfinding. Anything else ?)

I tested this moment in "1492: Reefs and Weather". I sent my caravel exploring the ocean in the automatic regime and checked how many turns my caravel could survive. Results are presented in the section "PATH_DAMAGE_WEIGHT parameter vs Caravel lifetime".

PATH_DAMAGE_WEIGHT tag is located in the GlobalDefines.xml file.

GlobalDefines.xml:

<Define>
<DefineName>PATH_DAMAGE_WEIGHT</DefineName>
<iDefineIntVal>2000000</iDefineIntVal>
</Define>

Table 1 show the PATH_DAMAGE_WEIGHT values and Lifetime (Turn) of a Caravel exploring the ocean in automatic regime before the death.

Value--------------Turn

0-------------------46
500000-------------97
2000000-----------118

As I remember it was a proposal to prevent a ship to enter on the tile with a danger feature at all. However, I don't like this idea. Why we add, for instance, a storm if a ship cannot enter in the storm? No, each unit can enter on the tile with danger feature! In a case of a ship it practically means something like "A strong storm began suddenly and my ship caught in this storm".

NB. Here I propose to add a new element.

Logic:
- if a unit lost more 50%HP,
- the unit must stop on the tile without danger feature (storm. tormado, reefs, etc) and
- restore HP up to 100%.
- The unit can continue the trip only if it has 100%HP.

Especially important to add:
a ship can leave a port to travel through ocean (Europe <-> New World) only with 100% HP!
Noone travel through the ocean on a ship with few HP.

This addition prevents the losing too many ships.


3. Balancing

How many of these new terrain features should we have on map at the same time.
(Only a few or is this a "mass"-feature ?)

Which XML-Settings do we need to ensure good balancing-possibilities later on.

Should a Storm (for example) be able to destroy a ship or only damage ?

I guess all balancing we could make through these parameters in CIV4FeatureInfos.xml

<iAppearance>1000</iAppearance>
<iDisappearance>10</iDisappearance>
<iGrowth>10</iGrowth>
<iTurnDamage>5</iTurnDamage>

Each danger feature could only damage (parameter <iTurnDamage>) a ship but not destroy it. Full destroy of a ship is very bad for both human and AI players. I believe a human player will replay this moment, but AI just lost a ship.

raystuttgart
Dec 11, 2011, 03:24 AM
So ok, if I take a look at Robert's work, he has done the following:

- Favorable wind (1MP, -15% defense, 0.5 MP with sea explorer promotion)
- Unfavorable wind (3MP, +15% defense)
- Storm (4MP, +15% defense, 20% damage per turn)

--------------------------

I would like to have the following new terrain features:

1. Favorable Winds / Tailwinds (only on Ocean Plots)

-> positive effect considering movement

2. Unfavoralbe Winds / Headwinds (only on Ocean Plots)

-> negative effect considering movement

3. Storm (on Ocean, on Coast and on Land)

-> higher negative effect considering movement
-> moderate damage every
-> negative effect on production of certain goods (basically as KJ suggests)

4. Heavy Storm (only on Ocean Plots)

-> very high negative effect considering movement
-> higher damage every round


That is pretty much all I would like to have as new terrain features for this concept. :)

--------------------------

1. Too many new terrain features like that will not make the game better to my opinion.

Reefs:
Reefs are very static and at most unnayoing to my opinion.
Would this really make the game more fun ?

Sandstorms:
There really is not much desert on most maps.
Is it really worth the additional effort ?

2. I would like to adjust Pathfinding (Automization, which will also be used for AI)

Since these "features" will be placed at the beginning of every round, it is possible that they will be placed on top of a unit.

Otherwise I would like to teach AI to use "Tailwind" and to avoid the other features.

Also AI ships will stop and repair if they have less than 50% health.
(Or enter one of its cities if that city can be reached in one turn.)

3. Too many "specialties" of the features will only make it complicated.

-> no special promotions
-> not to many effect (like defensive bonusses, ...)
-> no new special rules when a ship is allowed to travel to Europe or continue its journey

4. I really think it will be the best solution to simply clean map of these features every round and randomly regenerate. :dunno:

-> no "growing" effects for these features
-> no "moving" rules of these features
-> no "lifetime" of these features

After all a round is typically something like a year.

5. Please let us not overexaggerate with the amount of these features !

I would really like to have a moderate balancing for this. :)

I would want at least 1 XML-setting in GlobalDefines_Alt.xml to control the general amount of these new features.
(A global "modifier" of creation chances.)

--------------------------

Let us not make this feature too complicated. :)

Gomer_Pyle
Dec 11, 2011, 06:25 AM
Is it possible to have this effect on multiple tiles for a wider area of effect? That storms is "1" tile is kind of very local? On the open sea storms are huge with more tiles.

raystuttgart
Dec 11, 2011, 06:28 AM
Is it possible to have this effect on multiple tiles for a wider area of effect? That storms is "1" tile is kind of very local? On the open sea storms are huge with more tiles.

At generation we could have increased chances for one of these features if an adjacent feature already has the same feature. :think:

But I would only like to have that on "Ocean"-tiles, not on land.

Robert Surcouf
Dec 11, 2011, 07:45 AM
Wait a little ! I haven't even explained everything... :eek:
I agree my feature isn't dynamic enough... But I partially disagree with what you said.

Actually I said I didn't change anything in the cpp files... But some of the code is in C++ (so things have already been implemented in vanilla C4C)
There are three xml tags (related to CvGameCoredll of course): Feature Appearance probability, Feature disappearance probability, and feature growth.
So it isn't 100% static...

I agree C++ is a lot faster than python, but the "dynamic" part is coded in C++... I don't fully understand your idea Ray, are we going to add wind totally randomly each turn?
To me it seems easier to generate winds at the beginning of the game, and change state every turn...

However I agree with the pathfinding part...
I'll give some feedback ASAP

raystuttgart
Dec 11, 2011, 08:05 AM
There are three xml tags (related to CvGameCoredll of course): Feature Appearance probability, Feature disappearance probability, and feature growth.
So it isn't 100% static...

I don't fully understand your idea Ray, are we going to add wind totally randomly each turn?
To me it seems easier to generate winds at the beginning of the game, and change state every turn...


What "state" should be changed ?
(Either it is there or not :confused:)

See, with my idea we would only need:

Feature Appearance probability at every of these features (Civ4FeatureInfos.xml)
(And also a global modifier in GlobalDefinesAlt.xml for easier balancing of the complete feature.)


Actually I might be better to have 2 probabilities:

Appearance probability on Land (and Coast)
Appearance probability on Ocean


As I said, I would simply clear all of these new features of the map every turn and regenerate them.
(Random using "Feature Appearance probability".)

So every round we have a totally new situation considering "Winds and Storms".

But that is just a suggestion of course. :)
(However I cannot imagine any solution that is easier to implement.)

Gomer_Pyle
Dec 11, 2011, 08:20 AM
Change every round would make sence since one turn = one month in game. Storms would not last for months?

raystuttgart
Dec 11, 2011, 08:27 AM
Change every round would make sence since one turn = one month in game. Storms would not last for months?

Exactly. :)

(Actually sometimes a round is even something like a half a year or even a complete year.)

Robert Surcouf
Dec 11, 2011, 08:44 AM
If I read correctly, no one likes my defense modifier.:faint: Each ocean/coast plot has the same defense bonus (+10%). With those extra bonuses, we have extra fun, and naval wars will be a little less dull.

Change every round would make sence since one turn = one month in game. Storms would not last for months?
The point is, should we regenerate EVERYTHING each turn or not. The three of you seem disagree with me, but I really thing storms and winds should seem to MOVE and not disappear randomly and reappear, at least not TOTALLY.

You didn't answer me KJ Jansson. Was the transparency problem solved or not?
Actually there was three major problems in my implementation:
1) Scenarios weren't considered (only mapscripts, although winds and storms may appear even in scenarios, if I'm correct)
2) Pathfinding
3) Damage was only considered at the end of a turn. So the basic idea was to avoid storms...

raystuttgart
Dec 11, 2011, 09:14 AM
If I read correctly, no one likes my defense modifier.:faint: Each ocean/coast plot has the same defense bonus (+10%). With those extra bonuses, we have extra fun, and naval wars will be a little less dull.

For me, this is kind of hard to understand / explain. :dunno:

The point is, should we regenerate EVERYTHING each turn or not.

I say yes. :)

It is much more performant than considering any states.
It is more dynamic if you face a different situation every turn.
It is extremely easy to implement.
It is realistic considering the huge time span a round in the game stands for.

1) Scenarios weren't considered (only mapscripts, although winds and storms may appear even in scenarios, if I'm correct)
2) Pathfinding
3) Damage was only considered at the end of a turn. So the basic idea was to avoid storms...

These problems can be solved. :)

Gomer_Pyle
Dec 11, 2011, 09:19 AM
I dont disagree with you Robert. To be honest I dont know too much about this feature to even comment on it. But I do think effects should not last for several rounds nomatter what feature it comes from. This is the only thing I think on this matter. :P

Robert Surcouf
Dec 11, 2011, 12:45 PM
For me, this is kind of hard to understand / explain. :dunno:
Gosh ! I really thought you liked it... I'm quite upset. :(
Here's the basic idea. Tailwinds increases a ship maneuverability
So, they increase your movements, and if you attack a ship on a tailwind, your ship (the attacking ship) will maneuver quickly and so it will surprise defending ship. So it's quite difficult to defend on a tailwind plot in my Storm and Light mod.

On the contrary unfavorable winds decrease maneuverability, so they will slow you down. But an attacking ship would be slowed down, and so, the defending ship will spot it easier, and could prepare his defense. So I gave a +15% bonus on those features.

I must say I was even quite proud of my idea. If I read correctly unfavorable winds (and storms of course) only have negative effects, and tailwinds only positive effects.
I really think this is a bad idea. And I don't like it at all...
The point is, we will do everything to avoid unfavorable winds, and we will do everything to seek tailwinds. So we will have to ensure (that is if my ideas are rejected of course) that we can't always avoid unfavorable winds and/or storms. So we would probably create big stormy areas. Why not?

The point is, tailwinds don't have a 100% positive effect. If you end your turn on a tailwind plot (meaning you have gained many movement points), you are more vulnerable to attacks. And sometimes, ending your turn on a unfavorable wind could be a good idea, since you get a defense bonus even though it slows you down...

By the way, I added two or three events (not much) only triggered on such plots...(winds and storms)

About total randomness

I say yes. :)

Well, I say no !


It is much more performant than considering any states.
It is more dynamic if you face a different situation every turn.
It is extremely easy to implement.
It is realistic considering the huge time span a round in the game stands for.

1) I don't see why?
2) More dynamic... Well I'd say more chaotic.
3) Is there a problem with iAppearence tag?
4) This is the most interesting part. Is it more realistic. I really think this is the point!
And of course I disagree. (see below)


These problems can be solved. :)
Thank you Ray! :goodjob:


I could also do it, if you want.

:cry:
Actually I was kind of hoping you (you = team) would let me do that feature. :( But I may need your help. Thank you !

I dont disagree with you Robert. To be honest I dont know too much about this feature to even comment on it. But I do think effects should not last for several rounds nomatter what feature it comes from. This is the only thing I think on this matter. :P
Well, again, this is really about what is realistic and what is not. I really think some regions are quite windy (e.g. around Florida, Louisiana etc...) and some are not. Unless climate really changes in the next decades, I'll probably never see a hurricane, a flood or a tornado in my entire life (I'm not complaining :p).

So I really thing we shouldn't leave it static, but I actually like the idea of the feature growth/ feature disappearance/ feature appearance tags...
(Even though my version was probably way too unbalanced, I must admit it :blush:)

raystuttgart
Dec 11, 2011, 01:43 PM
Gosh ! I really thought you liked it... I'm quite upset. :(

So ok, if the defensive bonus / malus is important to you, why not. :)
(But it really is not that easy to understand and explain.)

Edit:
This of course will be something we should consider for AI ...
I simply wanted to teach AI which features to avoid and which to use.
With your idea, this is not that easy anymore. :dunno:


By the way, I added two or three events (not much) only triggered on such plots...(winds and storms)


Great. :)
Did you use the pyhton/xml-event-system from TAC ?


Actually I was kind of hoping you (you = team) would let me do that feature. :( But I may need your help. Thank you !


@Robert:

I was just offering to do it, in case you would not want to or not have the time. :)
(You can of course programm this feature and I will support if needed. :thumbsup:)

1. It needs to be DLL-based, so it will work with all kind of games (Maps, Scenarios and MapScripts).
(So there should not be any code in MapScripts for this feature.)

2. As long as these "Storm and Wind"-features are somehow dynamic and not static, I am also ok with other concepts. :)
Maybe there can be a combination of "deleting", "generating new", "moving", "growing", ... but that will definitely be more effort. :dunno:

But since you want to implement the feature, I leave that up to you, of course. :thumbsup:

3. I really do not want to overexaggerate with that feature in terms of amounts of "Storms and Winds".
(Especially on land, I would really only want to have a few of these.)

Thus having good possibilities of balancing are really necessary.
Otherwise it would be a little like "Too much Salt in the Soup". ;)

4. I would really like to have AI understand this feature.
(Thus I wanted to keep it simple ...)

-----------------------------

Could you try to summarize your concept, so we have an overview and also can continue discussing the details then ?
(I had just tried to suggest a possible solution.)

KJ Jansson
Dec 11, 2011, 11:49 PM
about mod: "1492 Reefs and Weather" by KJ Jansson
..... there was a major transparency problem...

Was the transparency problem ever solved?



You didn't answer me KJ Jansson. Was the transparency problem solved or not?


Hi Robert!

I will check the transparency of some weather features in "1492 Reefs and Weather" when I return home. At the moment I'm in trip and have no games installed on my laptop. AFAIR, I corrected some details in this mod (including graphics), however it was more that one year ago and now I don't remember all details. I'll check later...


Tailwinds increases a ship maneuverability
So, they increase your movements, and if you attack a ship on a tailwind, your ship (the attacking ship) will maneuver quickly and so it will surprise defending ship. So it's quite difficult to defend on a tailwind plot in my Storm and Light mod.

On the contrary unfavorable winds decrease maneuverability, so they will slow you down. But an attacking ship would be slowed down, and so, the defending ship will spot it easier, and could prepare his defense. So I gave a +15% bonus on those features.


Now I understand that means "bonus on weather features" with +X % defense, -Y% damage per turn.

I have nothing againt if this feature would be implemented, however let me make couple remarks.

1. Tailwinds increases a ship maneuverability.

Agree, but only if your ship is moving on, for instance, West (W) and Tailwind is also directed on West, too.

Question: how will change your ship maneuverability if your ship is moving on other 7 directions: North (N), South (S), NorthWest (NW), SouthWest (SW), NorthEast (NE), SouthEast (SE), East (E)?

For a ship moving on East everything is clear. Instead tailwind we have unfavorable wind.

However what about other directions? Here maneuverability of your ship probably must have plus or minus 45% depending on the Tailwind and ship moving directions.

How easy to program these percents in the game? This question is directed more to Ray. I personally don't know.

2. Second remark is related to the probability of this event.
Where and when "bonus on weather features" with +X % defense, -Y% damage per turn can be used?

Let's calculate. Three simultaneous events must occur on one tile:

- weather feature (Tailwind or Unfavorable wind),
- your ship must be on the same tile,
- your military opponent ship (for instance, privateer) must also be on the same tile.

For our calculations we take the simpliest case "YES/NO". Thus, the probability of each event will be 0.5. The probability of three simultaneous events is equal 0.5x0.5x0.5=0.125, that is 12.5% in the best case. Really, taking into account the number of tiles with weater effect and the number of ships in the game the probability of three simultaneous events on one tile is about few percents or even less.

raystuttgart
Dec 12, 2011, 04:32 AM
Guys, please let us not make this feature even more complicated. :)

So if you really want to have defensive bonus / malus on these "Wind and Storm"-features, that is ok for me.

But then these defensive bonus / malus are simply always there.
(No consideration of direction please.)

Tailwind and Headwind themselves do not have a direction. ;)

Maybe it is really better to call it "Favorable Winds" and "Unfavorable Winds" to avoid discussions about direction ? :think:

KJ Jansson
Dec 12, 2011, 05:04 AM
Guys, please let us not make this feature even more complicated.

100% agree!


Tailwind and Headwind themselves do not have a direction. ;)

This is correct only in a local case. Please, follow this link (http://upload.wikimedia.org/wikipedia/commons/1/18/Map_prevailing_winds_on_earth.png). Here "Map prevailing winds on Earth (http://upload.wikimedia.org/wikipedia/commons/1/18/Map_prevailing_winds_on_earth.png)"

raystuttgart
Dec 12, 2011, 05:19 AM
I have checked the following:

<iAppearance>0</iAppearance>
<iDisappearance>16</iDisappearance>
<iGrowth>20</iGrowth>

All are related to a random with 10.000 (Ten-Thousand) as a base, so values should be considerably high to see an effect.

However, they are not designed to be used for something as dynamic as "Storms and Winds". :(

iAppearance is only used once at very first map generation.

iDisappearance and iGrowth however could be used as they are.

-----------------

So ok, I suggest the following implementation:

1. We use a iAppearance for first creation of these features.

2. We also use iDisappearance and iGrowth.

We should stick to this formula:
* iAppearance + iGrowth = iDisappearance

3. Every round we randomly place again using iAppearance <--- Needs to be programmed
(hooking into void CvGame::doTurn() )

To have as little hardcoded as possible I would like to bring in a new XML-tag into Civ4Features.xml:

bGeneratedEveryRound

4. We adjust Pathfinding (Automization / AI) <--- Needs to be programmed
(Eventually not necessary, because Automization / AI might already handle this correct according to <iMovement>)

5. Damage of these features will be applied if passing through (not only at end of turn.) <--- Needs to be programmed

6. Defensive Bonus / Malus as Robert suggests ;)

-----------------

--> Thus we would get a solution that is:

A) Working for all kind of games

B) Somehow dynamic, but not totally chaotic.

C) Relatively easy to implement

-----------------

Feedback ? :)

raystuttgart
Dec 12, 2011, 05:29 AM
This is correct only in a local case. Please, follow this link (http://upload.wikimedia.org/wikipedia/commons/1/18/Map_prevailing_winds_on_earth.png). Here "Map prevailing winds on Earth (http://upload.wikimedia.org/wikipedia/commons/1/18/Map_prevailing_winds_on_earth.png)"

I was talking about the feature / the implementation, not reality. :)

raystuttgart
Dec 12, 2011, 05:52 AM
By the way:

This (http://forums.civfanatics.com/showpost.php?p=11114918&postcount=21) concept is not yet considering negative effects on production of goods as KJ suggests,
because we have not yet made a decision on having "Storms on Land". :dunno:

KJ Jansson
Dec 12, 2011, 06:30 AM
4. We adjust Pathfinding (Automization / AI)

Couple questions:

1. Could AI units enter on dangerous feature's tiles or you plan to exclude such possibility at all? How strick will be the rules for Pathfinding (Automization / AI)?

I very hope AI units could enter in storms, etc., maybe with 50:50 possibility.

2. Are you plan to repair partially destroyed units before they continue their travel?

raystuttgart
Dec 12, 2011, 06:45 AM
Could AI units enter on dangerous feature's tiles or you plan to exclude such possibility at all? How strick will be the rules for Pathfinding (Automization / AI)?

I very hope AI units could enter in storms, etc., maybe with 50:50 possibility.


I actually wanted to programm Automization (also used by AI) to always try to avoid dangerous "Storms" and use "Favorable Winds".
(Human player would do that just the same.)

AI would only pass through these dangerous tiles if the way around would be too long.

Also sometimes - through generation every round - one of these features would be placed above an AI ship anyways.

Why should we programm stupid AI. :confused:

Actually I believe that with <iMovement> accordingly, AI might totally handle that already without having to adjust Pathfinding.
(But that needs to be tested.)


Are you plan to repair partially destroyed units before they continue their travel?

Yes, I would like to teach AI ships to repair if less than 50% health.
(Or sail to Europe or closest city if possible in 1 turn, depending where it comes from.)

KJ Jansson
Dec 12, 2011, 07:00 AM
I actually wanted to programm Automization (also used by AI) to always try to avoid dangerous "Storms" and use "Favorable Winds".
(Human player would do that just the same.)

AI would only pass through these dangerous tiles if the way around would be too long.

Also sometimes - through generation every round - one of these features would be placed above an AI ship anyways.

Why should we programm stupid AI. :confused:

Actually I believe that with <iMovement> accordingly, AI might totally handle that already without having to adjust Pathfinding.
(But that needs to be tested.)

Yes, I would like to teach AI ships to repair if less than 50% health.
(Or sail to Europe or closest city if possible in 1 turn, depending where it comes from.)

Thank you, Ray, for your comments. I like such variants! Good luck in your programming.

raystuttgart
Dec 12, 2011, 07:14 AM
Good luck in your programming.

Oh boy, you're really fast. :)

First of all:

Robert wants to programm this feature. :thumbsup:
(I am just suggesting possible solutions for implementation, and will support where I am asked to.)

So if adjustment of Pathfinding is needed and the team wants me to do it, I will.
(Otherwise I will keep my fingers out of that. :) )

Second:

We still did not really decide what we are exactly going to implement. :dunno:

1. Is this (http://forums.civfanatics.com/showpost.php?p=11114918&postcount=21) concept ok ?
(Maybe Robert or somebody else will suggest something totally different.)

2. Will we have "Storm on Land" ?
(This would technically probably be a separate terrain feature.)

3. Which other new terrain features will we have ?

So are we going to do "Reefs" and "Sandstorms" or not ?
Do we already have all graphics we need ?

----------------------

By the way, I really think we had a very constructive discussion so far. :goodjob:

Gomer_Pyle
Dec 12, 2011, 07:25 AM
And performance of all this? Since you were so concerned with performance? Is this taken into account? Or nobody know yet?

raystuttgart
Dec 12, 2011, 07:31 AM
And performance of all this?

I think a year ago, KJ, koma, myself and others already had a discussion about performance of a feature like that.
("Wild Animals" and other features would basically have just the same effect on performance.)

Yes, it will definitely cost a tiny bit of performance.
(Of course MapSize will be the major factor here.)

But since it is mostly random based inside DLL without having to check too many states it should not be really noticeable to the player. :)
(Performance only gets critical if you have to check too many conditions involving a lot of logic and states for a single action.)

I think, this feature is worth it. :thumbsup:
(I do not know any solution, that is more performant than what I suggested considering the results we want to have.)

Robert Surcouf
Dec 12, 2011, 11:35 AM
I have checked the following:

<iAppearance>0</iAppearance>
<iDisappearance>16</iDisappearance>
<iGrowth>20</iGrowth>

All are related to a random with 10.000 (Ten-Thousand) as a base, so values should be considerably high to see an effect.
Yes! My values are waaaaaaaaaaaaay too low ! :rolleyes:
I'll correct that. Of course, everyone must agree first...


However, they are not designed to be used for something as dynamic as "Storms and Winds". :(

iAppearance is only used once at very first map generation.

iDisappearance and iGrowth however could be used as they are.

-----------------

So ok, I suggest the following implementation:

1. We use a iAppearance for first creation of these features.

2. We also use iDisappearance and iGrowth.

We should stick to this formula:
* iAppearance + iGrowth = iDisappearance

3. Every round we randomly place again using iAppearance <--- Needs to be programmed
(hooking into void CvGame::doTurn() )

To have as little hardcoded as possible I would like to bring in a new XML-tag into Civ4Features.xml:

bGeneratedEveryRound

4. We adjust Pathfinding (Automization / AI) <--- Needs to be programmed
(Eventually not necessary, because Automization / AI might already handle this correct according to <iMovement>)

5. Damage of these features will be applied if passing through (not only at end of turn.) <--- Needs to be programmed

6. Defensive Bonus / Malus as Robert suggests ;)

-----------------

--> Thus we would get a solution that is:

A) Working for all kind of games

B) Somehow dynamic, but not totally chaotic.

C) Relatively easy to implement

-----------------

Feedback ? :)
Great! I agree! I really love it ! :)That's exactly what I was looking for :goodjob:

raystuttgart
Dec 12, 2011, 11:56 AM
I'll correct that. Of course, everyone must agree first...

...

Great! I agree! I really love it ! :)That's exactly what I was looking for :goodjob:

Actually I believe that

A) The general idea "Winds and Storms" is accepted.

B) The last discussion about implementation details is more like a "programmer thing". ;)

So for me the open questions are:

1. Will we have "Storms on Land" ?

2. Which are the exact new terrain features we will do ?

After that has been agreed on, I suggest the following:

Robert will do the general implementation of the feature.
KJ will check the graphics of this features. (Eventually creating / fixing / improving.)
ray will help Robert with implementation, if needed.
colonialfan and Gomer could do testing once the feature is done.

Does that sound like a plan ? :)

Here is again my suggestion for our "Weather Features":

1. Favorable Winds (only on Ocean Plots)

-> positive effect considering movement
-> defense malus as Robert suggest

2. Unfavoralbe Winds (only on Ocean Plots)

-> negative effect considering movement
-> defense bonus as Robert suggest

3. Storm (only on Ocean Plots)

-> higher negative effect considering movement
-> moderate damage every round
-> defense bonus as Robert suggest

4. Heavy Storm (only on Ocean Plots)

-> very high negative effect considering movement
-> higher damage every round
-> defense bonus as Robert suggest

-------------------------------

This is an idea of KJ and we could do it if you guys want. :)
(for technical reasons I would do an extra terrain feature here)

5. Storm (on Coast and on Land)

-> negative effect considering movement
-> moderate damage every
-> negative effect on production of certain goods (basically as KJ suggests)

Robert Surcouf
Dec 12, 2011, 12:48 PM
So for me the open questions are:

1. Will we have "Storms on Land" ?

2. Which are the exact new terrain features we will do ?

1. Well for me the most important part was "features on ocean plots". So It doesn't matter. If you (that is KJ, Ray, Colonialfan and Gomer-Pyle) want Storms on land, then it's ok for me. Of course in that case, we should add production penalties as KJ suggested. And, the defense bonuses could probably be removed (...or not I don't know) on land...

2. I don't know...

But is that all the open questions?
3. Does everyone agree with the defense bonus idea? If I'm correct Colonialfan hasn't said anything yet...

@KJ:
You're right about wind directions. Dazio too told me I should add wind directions (North/East/South/West basically and then even more). Does that mean:
A) You like the idea of defense bonuses but the feature isn't realistic enough
(so you want bonuses and directions)
B) You don't like the idea since we would have to program complicated features
(so you want neither bonuses nor directions)
C) You don't like the idea of bonuses but you like wind directions?

I guess I can rule out option D though:
D) You like the idea of bonuses but don't like the idea of wind directions.

4. Actually this was not all.
I realized that you iMovementCost couldn't be fractional (of course that was obvious because of the "i" :))... So I considered adding promotions to double your movement cost on favorable winds. I also added a promotion to reduce movement penalties on unfavorable winds. And finally there was one reducing defense penalty (fav. wind) and increasing defense bonus (unfav. wind) [see here http://forums.civfanatics.com/showthread.php?t=425319 ]

So my next question is:
4. Does everyone like the idea of wind-related promotions?

The third promotion was unlocked by inventions. And none of them was given freely (this part didn't work as well as I expected, since some trade ships were never promoted...). But I added python events (@Ray: I didn't use TAC random events... at least I don't think so. I used standard events. But we can improve my system of course ;)) as a reward. So ending your turn on a storm tile could give you some extra experience in exchange for one turn of immobility :p
(@KJ: Yes! None of these feature should block a ship. I agree with you ! :goodjob:)
And moreover, the Portuguese leaders had the sea explorer trait. They had a free "sea explorer" promotion for every ship.

5. Does everyone like the idea of promotions related to inventions/random events/traits?

6. About other features (Reefs).
KJ will probably want to add other features. What about your reefs?
Seems a good idea.
Your 1492 Reefs and Weather seemed rally cool. I'm sorry if I said something wrong. :( Maybe I was misinformed...

7. Bonus question !
@everyone: As I told you Ray, I'd like to change back the trait mechanism. At least I'd like to edit Portugal's trait. I'd rather have two traits than three. I'll try to ask TAC team-members again...

raystuttgart
Dec 12, 2011, 01:01 PM
Pllleeeeeaaaassseeee, no directions to these weather features ! ;)
(This will make things an awful lot more complicated.)

I am really 100% against directions for these features.

If you (that is KJ, Ray, Colonialfan and Gomer-Pyle) want Storms on land, then it's ok for me.

I think it would be a nice addition. :)

1. If we do it, it should really technically be a separate terrain feature.

Easier to control generation and balancing.
Storms on land should really be very rare.

2. The "production malus" as KJ suggest could really easily be done by XML.

So it is no big effort.


Does everyone agree with the defense bonus idea?


You have convinced me. :)


I realized that you iMovementCost couldn't be fractional (of course that was obvious because of the "i" :))... So I considered adding promotions to double your movement cost on favorable winds.

No, but <iMovement> could be 0 for "Favorable Wind".
Thus we would get around something like "Promotions" for the aspect of movement, which I would like to avoid.
I really want to keep the feature itself as simple as possible. :)

Otherwise I am fine with promotions (or inventions) that improve usage of these new terrain features. :thumbsup:
(Things like "defense bonus" or "damage taken".)

What about your reefs?

Actually I am not a big fan of "Reefs", simply because they are only static obstacles.
I think they will only be annoying for most players.

But on the other hand, they would be easy to add.

So ok, if the team wants "Reefs", why not. :dunno:

@everyone: As I told you Ray, I'd like to change back the trait mechanism. At least I'd like to edit Portugal's trait. I'd rather have two traits than three. I'll try to ask TAC team-members again...

I cannot remember that discussion. :confused:
(But I think, I would rather leave that as it is in TAC.)

Robert Surcouf
Dec 12, 2011, 11:35 PM
Pllleeeeeaaaassseeee, no directions to these weather features ! ;)
(This will make things an awful lot more complicated.)

I am really 100% against directions for these features.
I was just asking KJ, if he wanted to add directions, or if he was rejecting the defense bonus idea ;)



I think it would be a nice addition. :)

1. If we do it, it should really technically be a separate terrain feature.

Easier to control generation and balancing.
Storms on land should really be very rare.
I agree



2. The "production malus" as KJ suggest could really easily be done by XML.

So it is no big effort.
You have convinced me. :)
Great:goodjob:



No, but <iMovement> could be 0 for "Favorable Wind".
Thus we would get around something like "Promotions" for the aspect of movement, which I would like to avoid.
I really want to keep the feature itself as simple as possible. :)
I've already tried. This gives reaaaaaaaaaalys strange results. No movement cost=infinite power ! :crazyeye:


Otherwise I am fine with promotions (or inventions) that improve usage of these new terrain features. :thumbsup:
(Things like "defense bonus" or "damage taken".)
Ok!



Actually I am not a big fan of "Reefs", simply because they are only static obstacles.
I think they will only be annoying for most players.

But on the other hand, they would be easy to add.

So ok, if the team wants "Reefs", why not. :dunno:
Let's wait and see what the others say...



I cannot remember that discussion. :confused:
(But I think, I would rather leave that as it is in TAC.)
I know! It was in a private message and I didn't say much. I only asked why TAC added an additional trait. You told me you didn't know. So I'll ask again TAC team-members

KJ Jansson
Dec 13, 2011, 12:39 AM
the defense bonus idea
I accept it.


.... no directions to these weather features !
(This will make things an awful lot more complicated.)
I am really 100% against directions for these features.

I agree with Ray. To be enough if we add Favorable/Unfavoralbe Winds on Ocean plots without directions.


So for me the open questions are:
1. Will we have "Storms on Land" ?
2. Which are the exact new terrain features we will do ?

Really looks very strange: we have many weather effects on Ocean tiles and nothing on Land ones. Therefore, I guess, some weather effects should be added for Land tiles, too. Let's call them as Storm on Land or Thunderstorm, doesn't matter. We can use the practically same animation as for Storm, but different icons, of course.

Thus, I propose to add "Storm on Land" (or "Thunderstorm") terrain feature. Usual standard map generators are working perfectly on this new terrain. I tested it on "1492: Reefs and Weather" mod.

5. Storm (on Coast and on Land)
-> negative effect considering movement
-> moderate damage every
-> negative effect on production of certain goods (basically as KJ suggests)

Exactly!


So ok, if the team wants "Reefs", why not.

Why Reefs (and/or Sandbanks) are interesting?
First of all, they are real and they are one of reasons of shipwrecks. Read here (http://www.heritage-history.com/www/heritage-books.php?Dir=books&MenuItem=display&author=baldwin&book=crusoe&story=shipwrecked), for instance.

Thus, if Reefs (and/or Sandbanks) will be added we could in future to add Shipwrecks on them (or as Events, or as real accidents with player's or AI ships). Somebody told that in "Age of Discovery" mod was possible to collects lost Goods. "Shipwrecks" is exactly such case.

Thus, my proposal to add Reefs. All animation and icons are ready, tested and working perfectly on standard map generators. Again it was tested on "1492: Reefs and Weather" mod.

2. Which are the exact new terrain features we will do ?

Sorry, but I return to this question again. Theoretically we could add also Sandstorms for Desert tiles and Heavy Snowstroms for polar or Tundra tiles. No problems with animations and icons, however these additions are subject of discussion. They are actial for a global mod as "1492: GC" where we play on real Earth map and I have nothing against if you exclude these features from "R&R" mod.

raystuttgart
Dec 13, 2011, 04:01 AM
So ok, let me pick up some points again.

1. Storms on Lands (or Thunderstorms):

I think we should add them. :thumbsup:
(Using same animation as Storms on Ocean.)

It really would not feel realisitc if we had storms on ocean but not on land.

However they should be rare.
(No problem to balance, if it is a separate Terrain Feature.)

They should have the "production malus" as KJ suggest.

2. Reefs and Sandbanks:
(normal Map-Generator function used)

Convinced me. :thumbsup:

They would be static like normal Terrain Features are.

Any yes it would be realisitc.

However I would also like to keep them rare.

I like the idea of having "Goody Huts" on them.
(It would fit quite well into this (http://forums.civfanatics.com/showpost.php?p=10880109&postcount=104) concept.)

3. Sandstorms and Snowstorms:

Ok, why not. A little more atmosphere. :thumbsup:
We should exclude normal Storms from Desert and Tundra then.

Damage should be a little higher than with "Thunderstorms".
Otherwise I would like to have them work just the same.

They should also be rare.

----------------------------

Are we all ok with that ? :)

KJ Jansson
Dec 13, 2011, 04:13 AM
Discussing Tailwind and Headwinds we forgot about the Dead Calm when no wind at all. A ship on Dead Calm feature tile has no damages, but cannot move.

raystuttgart
Dec 13, 2011, 04:28 AM
Discussing Tailwind and Headwinds we forgot about the Dead Calm when no wind at all. A ship on Dead Calm feature tile has no damages, but cannot move.

Generally, why not. :)
But how should the graphics look for that. :dunno:

KJ Jansson
Dec 13, 2011, 04:55 AM
Generally, why not. :)
But how should the graphics look for that. :dunno:

The graphics is the second question. If this feature would be interesting to team, when I will search some graphics.

To my opinion "Dead Calm" feature should look as a normal ocean tile but without waves.

Robert Surcouf
Dec 13, 2011, 12:38 PM
You've convinced me too KJ! :goodjob:
I love the idea of shipwrecks (graphics already exist if I'm correct!)

Oh yes "Dead Calm" winds. :cool: Dazio had the same idea.
"great minds think alike" ! :goodjob:

raystuttgart
Dec 13, 2011, 01:02 PM
@Robert and KJ:

Would you guys take lead of this project together ? :)

Robert, you could do the general implementation.
KJ, you could do the graphical part.

But it will probably be best if you clarify the details between the two of you. :)

As I said, I will support wherever needed.
(Otherwise I would focus on finishing other things.)

I suggest:

We wait with implementation of DLL-part of this feature until we have TAC 2.02c. (a few more days)
Then I will set up our "work"-version and you can directly integrate your work there.

You could already continue preparing this features, of course. :thumbsup:
(Especially graphics and XML could already be prepared.)

KJ Jansson
Dec 14, 2011, 01:17 AM
Yesterday I tested the transparency error in the Storm animation in "1492: Reefs and Weather".

Here original screen from "1492: Reefs and Weather".

http://img85.imageshack.us/img85/7637/stormoriginalversion.jpg

The tile with Storm feature are marked (red lines). As you see there are many problems. Main of them is transparency, of course. The ship on the Storm tile is practically invisible. The second problem is the size of effect. A part of the second ship is also covered by Storm effect.

I started from the transparency problem. Here a new version of Storm. As you see here I fixed both transparency and size of effect. Now we can see the ship through rain. However, this is a rather draft version of Storm and I guess it could be better. I need only some free time to improve it.

http://img684.imageshack.us/img684/9127/stormfixedversion.jpg

raystuttgart
Dec 14, 2011, 02:30 AM
I need only some free time to improve it.

Take your time. :thumbsup:
(No need to hurry. This project is supposed to be fun and not stress. :) )

colonialfan
Dec 14, 2011, 05:17 PM
KJ, great job so far with the storm effect. Also I like you idea about shipwrecks.

Gomer_Pyle
Dec 14, 2011, 10:32 PM
Love the shipwrecks too. But maybe not only goods? Gold too?

Robert Surcouf
Dec 16, 2011, 12:59 PM
Yesterday I tested the transparency error in the Storm animation in "1492: Reefs and Weather".

Here original screen from "1492: Reefs and Weather".
Interesting...


The tile with Storm feature are marked (red lines). As you see there are many problems. Main of them is transparency, of course. The ship on the Storm tile is practically invisible. The second problem is the size of effect. A part of the second ship is also covered by Storm effect.

I started from the transparency problem. Here a new version of Storm. As you see here I fixed both transparency and size of effect. Now we can see the ship through rain. However, this is a rather draft version of Storm and I guess it could be better. I need only some free time to improve it.
Good job! I'm impressed. I don't know if I can help... The graphics I used came from FFH2... I modified the blizzard image. Do you like them? (It's actually the only graphical modification I ever did! And I'm not really good at that!)

http://img860.imageshack.us/img860/9683/civ4screenshot0238.jpg

Robert Surcouf
Dec 16, 2011, 01:06 PM
@Robert and KJ:

Would you guys take lead of this project together ? :)

Robert, you could do the general implementation.
KJ, you could do the graphical part.

But it will probably be best if you clarify the details between the two of you. :)

As I said, I will support wherever needed.
(Otherwise I would focus on finishing other things.)

I suggest:

We wait with implementation of DLL-part of this feature until we have TAC 2.02c. (a few more days)
Then I will set up our "work"-version and you can directly integrate your work there.

You could already continue preparing this features, of course. :thumbsup:
(Especially graphics and XML could already be prepared.)
Great! I agree....

By the way KJ, I've checked your code in 1492: Reefs and Weather.
It seems really good and amazingly ... short. :king:
The problem is ... I can't find the generation mechanism :eek:... Am I dumb ? :(

KJ Jansson
Dec 16, 2011, 01:22 PM
Great! I agree....

By the way KJ, I've checked your code in 1492: Reefs and Weather.
It seems really good and amazingly ... short. :king:
The problem is ... I can't find the generation mechanism :eek:... Am I dumb ? :(

As I told many times, I'm not programmer. You can ask: How was made "1492: Reefs and Weather" mod? My answer is: Very easy. I just very carefully analyzed the source codes of Civilization IV BTS, where all weather effects are present and found all places, where Firaxis programmers (I don't know why :confused:) cut them from CivIVColonization. Then I restored all cut parts and compile a CvGameCoreDLL.dll. Nothing more!

Thus, I returned in CivIVColonization all weather effects that, to my opinion, must be there.

Robert Surcouf
Dec 16, 2011, 01:31 PM
As I told many times, I'm not programmer. You can ask: How was made "1492: Reefs and Weather" mod? My answer is: Very easy. I just very carefully analyzed the source codes of Civilization IV BTS, where all weather effects are present and found all places, where Firaxis programmers (I don't know why :confused:) cut them from CivIVColonization. Then I restored all cut parts and compile a CvGameCoreDLL.dll. Nothing more!

Thus, I returned in CivIVColonization all weather effects that, to my opinion, must be there.
Oh my gosh... I know, I added a few lines from Civ4 Bts too. But that's the point! I don't know which part I didn't add... Oh yes. I didn't add the extra movement cost part. But that seems quite irrelevant to me. Strange :crazyeye:
I don't understand, is there an xml tag telling the computer to add some features in python and some other in c++? :confused:

KJ Jansson
Dec 16, 2011, 01:36 PM
Concerning "the generation mechanism".

I guess the generation mechanism is present in the game (CivIVColonization).
Please, open CIV4TerrainSchema.xml

<ElementType name="iAppearance" content="textOnly" dt:type="int"/>
<ElementType name="iDisappearance" content="textOnly" dt:type="int"/>
<ElementType name="iGrowth" content="textOnly" dt:type="int"/>
<!-- KJ: Reefs and weather START -->
<ElementType name="iTurnDamage" content="textOnly" dt:type="int"/>
<!-- KJ: Reefs and weather END -->

You see, I added only "iTurnDamage" on some tiles, but "iAppearance", "iDisappearance" and "iGrowth" are already were in the game. I suppose exactly here is "located" the generation mechanism.

This is a dilettante point of view, of course. I recommend you to ask our professionals. I hope or Ray, or Andre could you explain much-much more professionally.

raystuttgart
Dec 16, 2011, 02:29 PM
You see, I added only "iTurnDamage" on some tiles, but "iAppearance", "iDisappearance" and "iGrowth" are already were in the game. I suppose exactly here is "located" the generation mechanism.

This is a dilettante point of view, of course. I recommend you to ask our professionals. I hope or Ray, or Andre could you explain much-much more professionally.

It is in there.

But it is not working as we want it to. :(
(It is not meant for something as dynamic as "Weather Effects". Eventually it is different in Civ4BtS. :dunno:)

iAppearance only triggers exactly 1 single generation at very first map generation. (We could use that too.)

But also, we want to have "Storms and Winds" regenerated every round. (This has to be programmed.)

iDisappearance and iGrowth do what they should do.

KJ Jansson
Jan 01, 2012, 09:53 AM
I fixed some weather effects.

Storm (animated):

http://img441.imageshack.us/img441/3016/galeoninstorm.jpg

Snowstorm (animated):

http://img546.imageshack.us/img546/6179/galeoninsnowstorm.jpg

Tailwind (light white clouds and green message text):

http://img641.imageshack.us/img641/2990/shipontailwindtile.jpg

Headwind (dark clouds and red color text):

http://img805.imageshack.us/img805/2135/shiponheadwindtile.jpg

All images made in a little modified version of "1492: Reefs and Weather" mod.

All these effects are included in the attached archive. Everybody are absolutely free to use/modify them as you want.

Robert Surcouf
Jan 01, 2012, 10:09 AM
Great job! :goodjob:
Thank you !

You really are good with graphics!

raystuttgart
Jan 01, 2012, 11:14 AM
Great job indeed. :goodjob:

colonialfan
Jan 01, 2012, 03:34 PM
Wow! These weather effects are going to be sooooooooooooooo much fun. Great job!

Karl-Heinz
Jan 02, 2012, 09:37 AM
Which effects will rain and snow have to the ship? Are whether effects only on the sea or on land too?

raystuttgart
Jan 02, 2012, 09:52 AM
Which effects will rain and snow have to the ship?

Effects are described here in this thread.

Most important:
* Moving Speed
* Damage
* Defense Bonus/Malus
* Production (Yields from Plots)

Are whether effects only on the sea or on land too?

We will have both.
(But weather effects on land will be less common than on sea.)

Ronnar
Jan 02, 2012, 10:15 AM
I fixed some weather effects.

All images made in a little modified version of "1492: Reefs and Weather" mod.

All these effects are included in the attached archive. Everybody are absolutely free to use/modify them as you want.

I have tested these ingame and they look great. :goodjob: I will play around a bit with them and include them in my games for various events, as you kindly offered me to use them for my purposes.

KJ Jansson
Jan 02, 2012, 10:59 AM
I have tested these ingame and they look great. :goodjob: I will play around a bit with them and include them in my games for various events, as you kindly offered me to use them for my purposes.

Sorry, Ronnar, for some delay. I promised to finish earlier. My main problem is to reach my game PC and to test my modifications.

I strictly follow one simple rule. All my modifications as mods, graphics, etc. are absolutely free for use/change for everybody even if I accidentally forgot to mention it my my post.

orlanth
Mar 12, 2012, 08:59 PM
That sounds good to me.

As Ray said its not possible to have 2 Features on a tile, so maybe you could limit Winds and Storm only to non-Feature tiles.

I think it would be cool to eventually have some Storms possible on clear land tiles, since I think one of Robert's most interesting planned features is the ability to have a local temporary bonus or malus to tile yields.

That would also be good because there may sometimes be Features in Oceans (Ice, Reef, etc), and realistic since after colonists have cleared the forests, cultivated open lands are more vulnerable to severe weather.

BTW, I have been thinking about eventually trying to make a Hurricane from a retextured Black Hole nif :shifty: .. that won't be ready for this release though may make an interesting possible addon for later! :king:

raystuttgart
Mar 13, 2012, 02:23 AM
As Ray said its not possible to have 2 Features on a tile, so maybe you could limit Winds and Storm only to non-Feature tiles.


It would be possible if we would change massive amounts of sources.
But I explicitly don't want to do that. :nope:
Risks and efforts are much too high considering benefits.


I think it would be cool to eventually have some Storms possible on clear land tiles, since I think one of Robert's most interesting planned features is the ability to have a local temporary bonus or malus to tile yields.


Please, let us do "Winds and Storms" on water only.
Anything else will only bring us problems and efforts for very little benefits.

raystuttgart
Mar 13, 2012, 03:16 AM
Hi guys,

please let us go back to a relatively simple concept like that.


I have checked the following:

<iAppearance>0</iAppearance>
<iDisappearance>16</iDisappearance>
<iGrowth>20</iGrowth>


All are related to a random with 10.000 (Ten-Thousand) as a base, so values should be considerably high to see an effect.

However, they are not designed to be used for something as dynamic as "Storms and Winds". :(

iAppearance is only used once at very first map generation.

iDisappearance and iGrowth however could be used as they are.


-----------------

So ok, I suggest the following implementation:

1. We use a iAppearance for first creation of these features.

2. We also use iDisappearance and iGrowth.

We should stick to this formula:
* iAppearance + iGrowth = iDisappearance

3. Every round we randomly place again using iAppearance <--- Needs to be programmed
(hooking into void CvGame::doTurn() )

To have as little hardcoded as possible I would like to bring in a new XML-tag into Civ4Features.xml:

bGeneratedEveryRound

4. We check Pathfinding (Automization / AI) and adjust if necessary <--- Would need to be programmed
(Eventually not necessary, because Automization / AI might already handle this correct according to <iMovement>)

5. Damage of these features will be applied if passing through (not at end of turn.) <--- Needs to be programmed

6. Defensive Bonus / Malus as Robert suggests ;)

7. AI should be taught to properly repair its ships if damaged if it doesn't do already. <--- Would need to be programmed

8. "Storm and Wind" features only on Water. (Also no effects on production.)

9. Some promotions related to this feature.

Effected would be:

* Movement
* Damage
* Defense



So we would leave out:
Weather effects on land including Bonus / Malus on production.

Reasons are of technical nature.

@Robert:

Simply implement all parts you want to do. :thumsup:
(XML, Graphics, DLL)

Let me know which parts of DLL I should take care of (if you need my help at all).

orlanth
Mar 13, 2012, 03:42 PM
Here, I've made a preliminary nif for a Hurricane if you'd like to use it :D

I'm still not totally pleased with the look of the eye part, maybe you could try merging it with some of your other storm graphics to see what you get?

raystuttgart
Mar 26, 2012, 11:12 AM
@Robert:

I have checked the weather effects you included.

Are these taken from the graphics KJ had created here (http://forums.civfanatics.com/showpost.php?p=11160825&postcount=52) ? :confused:

Another small thing:

Could the graphics for these, please be added here
...\Religion_and_Revolution\Assets\Art\terrain\fea tures

instead of directly in
...\Religion_and_Revolution\Assets\Art


Otherwise I think it is fine to go with these 3. :thumbsup:
(Actually I really think these effects are enough.)


Favourable Wind
Unfavourable Wind
Storm

Robert Surcouf
Mar 26, 2012, 12:46 PM
Hi...

I was going to post a message... I'm a little late as you can see. ;)
I was going to say this:

I've updated the SVN server. I've started the xml part.
I still need to add KJ graphics and yes I will change the folders. You're right...
I promise I'm doing as fast as I can... I'm still a little busy !

raystuttgart
Mar 26, 2012, 12:49 PM
I promise I'm doing as fast as I can... I'm still a little busy !


No need to hurry. :)

Robert Surcouf
May 23, 2012, 12:32 PM
Hi everyone,

I've updated the SVN server... No wind and storm are generated dynamically. I've also added three promotions.
So all "six" parts seem to be done ! :D


So ok, I suggest the following implementation:

1. We use a iAppearance for first creation of these features.

2. We also use iDisappearance and iGrowth.

We should stick to this formula:
* iAppearance + iGrowth = iDisappearance

3. Every round we randomly place again using iAppearance <--- Needs to be programmed
(hooking into void CvGame::doTurn() )

To have as little hardcoded as possible I would like to bring in a new XML-tag into Civ4Features.xml:

bGeneratedEveryRound

4. We adjust Pathfinding (Automization / AI) <--- Needs to be programmed
(Eventually not necessary, because Automization / AI might already handle this correct according to <iMovement>)

5. Damage of these features will be applied if passing through (not only at end of turn.) <--- Needs to be programmed

6. Defensive Bonus / Malus as Robert suggests ;)

What's left to be done:
1. Xml balancing. For now storms may cause many damage and some might find there are too many or too few storm/wind plots...
2. Check AI behaviour. I've prevented AI to heal on storm plots, of course. But who knows, I could have forgot something...
3. What about promotions? For now we only get bonuses on favorable winds with the Sea Explorer promotion. But how do we get such a promotion. At first I thought that unlocking them with inventions was the best idea... But for now we don't have such inventions.
Should I grant every ship this promotion, or only trade ships (who aren't supposed to get easily experience points...) or none at all?

raystuttgart
May 23, 2012, 01:31 PM
3. What about promotions? For now we only get bonuses on favorable winds with the Sea Explorer promotion. But how do we get such a promotion. At first I thought that unlocking them with inventions was the best idea... But for now we don't have such inventions.
Should I grant every ship this promotion, or only trade ships (who aren't supposed to get easily experience points...) or none at all?


Let us give that promotion with a Founding Father. :thumbsup:
(I don't think it is essential for balancing that all Players can get it during a single game.)

We will add Founding Fathers anyways in Release 1.
(That is necessary to have proper balancing for the new Productionlines.
Otherwise the old productionlines would be stronger.)

orlanth
Jun 04, 2012, 04:34 PM
To go with the Wind and Storm features developed by Robert, I've uploaded some stormy sound effects recorded by ERH and RHumphries from freesound.org that I remixed in Audacity, along with soundscapes XML files so they can play when a Wind / Storm is nearby in game. Batten down the hatches mateys! :p

Robert Surcouf
Jun 04, 2012, 11:15 PM
To go with the Wind and Storm features developed by Robert, I've uploaded some stormy sound effects recorded by ERH and RHumphries from freesound.org that I remixed in Audacity, along with soundscapes XML files so they can play when a Wind / Storm is nearby in game. Batten down the hatches mateys! :p
I'll have a look !:goodjob:

raystuttgart
Jun 30, 2012, 08:32 AM
@team:

I just found a big problem in balancing of Wind and Storms.

It is simply the way these tags are interpeted.
(I will focus on iAppearance and iDisappearance and ignore iGrowth for simpler explanation.)

iAppearance

This tag is related to all Plots, where the feature is valid.
In this case all Ocean plots.

iDisappearance

This tag is related to all Features of that Type already placed.
In this case all our Wind and Storm features already on map.

----------------
----------------

So let us imagine the following Numbers:
(And take a look at only one of our 3 Wind and Storm Features.)

Ocean Plots: 1000
iAppearance: 10 %
iDisappearance: 10 %

Round 1:

0 Storms from previous round
0 Storms deleted
100 Storms placed

------
Total: 100 Storms

Round 2:

100 Storms from previous round
10 Storms deleted
90 new Storms placed (because less free plots available)

------
Total: 180 Storms

Round 3:

180 Storms from previous round
18 Storms deleted
82 Storms placed (because less free plots available)

------
Total: 254 Storms

....

----------------
----------------

So if we generate new Storms every round and only delete a few of them, we will slowly but surely reach a max amount of Storms of:

Max_Storms = Ocean_Plots * (100 - iDisappearance)
(This is an approximation.)

In this example, we would have 90% of all ocean plots full of Storm in the end.

And we additionally also have iGrowth !

And I was talkint only about 1 Wind and Storm feature.
But we have 3 of them !!

So I guess you get the problem here. :)

Also see Screenshots.
(By the way, the amount of Storms is generated is much smaller than in the version currently in SVN.
Still the result was first shocking until I checked the source code.)

----------------
----------------

But this Problem can be solved:

We really delete all Storms every round (before generating new ones).
(Just as I wanted to do in the beginning.)

Thus we will really have a constant amount of these features throughout the game.

----------------
----------------

Edit:

New balancing uploaded to SVN.
Problem solved.

Shoobs
Sep 15, 2012, 11:05 PM
Please make an option to disable or remove entirely the Wind and Storms addition. As it is, there is far too much lag inbetween turns ( vanilla is barely 2 seconds, this nearly 10. )

raystuttgart
Sep 16, 2012, 01:15 AM
Please make an option to disable or remove entirely the Wind and Storms addition. As it is, there is far too much lag inbetween turns ( vanilla is barely 2 seconds, this nearly 10. )

It is not only Winds and Storms that is causing longer turns.
(We have several pretty complex features.)

But we are working on performance. :thumbsup:

Isabelxxx
Sep 16, 2012, 05:24 AM
I just found a big problem in balancing of Wind and Storms.

It is simply the way these tags are interpeted.
(I will focus on iAppearance and iDisappearance and ignore iGrowth for simpler explanation.)
Ups, I thought that was intentional in your mod... and supposed you already had some mechanism in the DLL to avoid excessive number of the feature. So I didn't say anything.

It is not only Winds and Storms that is causing longer turns.
(We have several pretty complex features.)
I think you can easily create an alternative system in DLL to place storms which should be more efficient.

Also revise the Achieve part, is not only that the XML infos is not optimized (but you can left it as it is if you don't want to create your own system but the code in doAchieves() can be improved much more.

The achieve Advisor code should be revised too. There is unnecessary duplicate initialization of variables, calculation of many things that should be done only once, and a big number of variables that are being initialized only when drawing the screen instead of _init_ (that means it's done every time the window is updated!).

raystuttgart
Sep 16, 2012, 06:04 AM
Ups, I thought that was intentional in your mod... and supposed you already had some mechanism in the DLL to avoid excessive number of the feature. So I didn't say anything.


This is already handled. :)
(It was corrected long before our release. See "Edit" of the post you are quoting.)

No excessive number of that feature appear anymore. :thumbsup:
(The feature works as it should.)


I think you can easily create an alternative system in DLL to place storms which should be more efficient.


Maybe, but until now we used the given XML system.
Of course there are several modifications in DLL.

The feature itself is not really problematic.
But we simply have a lot of complex features, that need computations.
(That sums up a bit.)

Shoobs
Sep 16, 2012, 08:14 PM
Alright, fair enough. My computer just seems to not like the feature is all.

orlanth
Nov 18, 2012, 05:11 PM
In playing with Audacity recently, I've added a few custom sounds that can be heard when you sail onto Robert's Wind and Storm features.. let me know what u think! ;)

Robert Surcouf
Nov 19, 2012, 12:47 AM
In playing with Audacity recently, I've added a few custom sounds that can be heard when you sail onto Robert's Wind and Storm features.. let me know what u think! ;)
Great ! :goodjob:

raystuttgart
Nov 19, 2012, 01:56 AM
In playing with Audacity recently, I've added a few custom sounds that can be heard when you sail onto Robert's Wind and Storm features.. let me know what u think! ;)

Great. :thumbsup:

@Robert:
Could you check this evening ?
(Or did you already do ?)

Robert Surcouf
Nov 19, 2012, 01:47 PM
Great. :thumbsup:

@Robert:
Could you check this evening ?
(Or did you already do ?)
Yes indeed I have. There great ! :)

Sanotra
Nov 24, 2012, 09:48 PM
The Winds and Storms feature is a great implement in this mod, and grants a lot of atmosphere. None of my ships have been sunk by storms in any of the games I have played. That is not realistic at all, as storms and ship sinkings were common place during the era we are emulating with the game. Is anyone interested in brainstorming new ideas on improving upon the hard work which has already gone into this feature, or just leave it be?

raystuttgart
Nov 24, 2012, 11:48 PM
...or just leave it be?


It was purposely implemented that Winds and Storms only damage but not destroy ships.
It is maybe not realistic but it is much better for gameplay and AI.

So definitely "Leave it be". :thumbsup: