Resource and storm question

nokmirt

Emperor
Joined
Feb 14, 2009
Messages
5,088
Location
Iowa USA
My partner came up with an excellent idea.

Hi, I have a question:

Is it possible to have a Building to produce a resource only if another resource is available in the City in which the building is?

Or for example two other resources, or one or the other resource, or one resource and either one of two other resources?

Now another more practical example:

You have iron and coal and the building produces steal only if iron and either coal or oil are available in the city.

Another example:

You have cotton, the building produces cloth only if cotton is available in the city.


Is there anything like that already done in one of the mods?

Is there a python script for it?

Let me know.

Also, I have one other question, there is a storm system in rise of mankind, what would I need to add this to our mod? Is there Python involved? Or can I just copy it from that mod and add it to ours?
 
Is it possible to have a Building to produce a resource only if another resource is available in the City in which the building is?

No, it's not possible with buildings, just with corporations.


Also, I have one other question, there is a storm system in rise of mankind, what would I need to add this to our mod? Is there Python involved? Or can I just copy it from that mod and add it to ours?

If you could describe the storm system a bit...
 
No, it's not possible with buildings, just with corporations.




If you could describe the storm system a bit...

It's ok I can add it, just had to locate the files. Basically it is a sunami, in game it is a storm cloud that rains and lightning stikes every other second or so. If your ship passes into this area it costs 4 movement points to go through it. The ships loses 20%damage per turn. It causes +0.50 pollution in nearby cities, and tiles lose -1 food and -1 commerce. It says defending units get -25% defense. Anyway I am going to try to add it. I am not sure if it disappears or reappears, my guess is that it does, but since it is a feature, it does not move. Imagine if we could make this move on a whim, like a barbarian. In any case I will put them in places where storms are likely to occur. It is an ocean coastal storm. It will make this giant earth map more interesting.
 
I am not sure if it disappears or reappears, my guess is that it does, but since it is a feature, it does not move. Imagine if we could make this move on a whim, like a barbarian. In any case I will put them in places where storms are likely to occur. It is an ocean coastal storm. It will make this giant earth map more interesting.

You could make an event that spawns the storm feature and make the feature to spread around like forests. Though they slow down the game some. RoM had problems with it...
 
You could make an event that spawns the storm feature and make the feature to spread around like forests. Though they slow down the game some. RoM had problems with it...

Yes, I was thinking it might slow the game. We are using the Giant Earth map so it probably would not be a good idea, but it looks cool. I think I will add it and test it. Have two copies of the mod, one with the storm, one without, and see what the turn time differences are. I started playing RoM, and it looks more dreadful when you are still exploring the map. I took my first galley through it, and that was not a good idea, but it did not sink me, just tore it up a bit. Anyway if you do not use an event the storm is stationary for that tile? Does it randomly appear and disappear?
 
Yes, I was thinking it might slow the game. We are using the Giant Earth map so it probably would not be a good idea, but it looks cool. I think I will add it and test it. Have two copies of the mod, one with the storm, one without, and see what the turn time differences are. I started playing RoM, and it looks more dreadful when you are still exploring the map. I took my first galley through it, and that was not a good idea, but it did not sink me, just tore it up a bit. Anyway if you do not use an event the storm is stationary for that tile? Does it randomly appear and disappear?

These are the lines you would want to change in feature infos
Code:
			<iAppearance>0</iAppearance>
			<iDisappearance>0</iDisappearance>
			<iGrowth>8</iGrowth>
Lets break in pieces. iAppearance defines how oftenly your feature appears. iDisappearance is just the opposite. And iGrowth defines how better chances you have that feature appearing if there is one already in the nearby plot.

That was from forest feature, so basicly forest won't just appear or disappear on it's own, it needs another forest beside it to appear. With these you might be able to do what you want.
Remember that those numbers aren't percents. This means
Code:
<iGrowth>8</iGrowth>
8/100=0,08%
I might be wrong though.
 
These are the lines you would want to change in feature infos
Code:
			<iAppearance>0</iAppearance>
			<iDisappearance>0</iDisappearance>
			<iGrowth>8</iGrowth>
Lets break in pieces. iAppearance defines how oftenly your feature appears. iDisappearance is just the opposite. And iGrowth defines how better chances you have that feature appearing if there is one already in the nearby plot.

That was from forest feature, so basicly forest won't just appear or disappear on it's own, it needs another forest beside it to appear. With these you might be able to do what you want.
Remember that those numbers aren't percents. This means
Code:
<iGrowth>8</iGrowth>
8/100=0,08%
I might be wrong though.

Thanks for the info, and I will look to see how RoM mod has it set up. I am going to add the storm today and test it. I will let you know what I come up with.
 
Is it possible to have a Building to produce a resource only if another resource is available in the City in which the building is?

Since it is possible to have a building produce a resource, couldn't you make it require the other resource to build? The problem with that is that it's not exactly what you wanted, since it would still produce that resource if you lose the other resource. Also, I don't recall if you can make a building require a resource in the first place.
 
Anyway if you do not use an event the storm is stationary for that tile? Does it randomly appear and disappear?
If you set high iDisappearance and iGrowth values for Storm feature, you'll get "moving" storms but you need to carefully choose the values as too high iGrowth would cause the oceans to be filled with Storms and too high iDisappearance will make all storms disappear before you reach modern era - iAppearance values is only used when the map is generated. RoM also has at least 5 random events (Sea Storms) that cause storms randomly on the oceans/coasts. All this makes storms dynamic game feature instead of being just static terrain feature.
 
If you set high iDisappearance and iGrowth values for Storm feature, you'll get "moving" storms but you need to carefully choose the values as too high iGrowth would cause the oceans to be filled with Storms and too high iDisappearance will make all storms disappear before you reach modern era - iAppearance values is only used when the map is generated. RoM also has at least 5 random events (Sea Storms) that cause storms randomly on the oceans/coasts. All this makes storms dynamic game feature instead of being just static terrain feature.

What I want to find out is where the Python code is, and if I can use it. I should talk to Zappara, is it?

Ok I wrote, Ha ha I realize it's you I was talking too, I was not paying attention to who I was quoting. Anyway Zappara, I wrote you a private message, asking if I can use this storm in our 1861 AD mod, and if possible, help implement the Python code for the Sea Storm events. I do not know Python, and my friend Ben, seems to be a rather good graphics artist, but I do not think he knows Python. I think it would really make the mod stand out much better. I was wondering is the storm your invention?
 
I was wondering is the storm your invention?
Yes it is - though I think Charlemagne scenario in BtS used the same graphics for some event but I found bit better use for those graphics. I don't know if any other mod has adopted storm freature or/and those random events I made for this terrain feature.
 
Yes it is - though I think Charlemagne scenario in BtS used the same graphics for some event but I found bit better use for those graphics. I don't know if any other mod has adopted storm freature or/and those random events I made for this terrain feature.

The random events, you have four. 3+4 have python code but 1+2 do not. So what turns on event triggers sea_storm_1 and sea_storm_2? In any case it is an awesome idea, and it really makes the game so much more realistic. The one problem I have is that I have not tested it the way you said, so I will do that first, and see if everything works well. I will let you know.
 
The normal game engine would make these work, just like any other event.

Good, thanks, just making sure. Alot goes into this damn game. :lol:

Yes you can. That would be the only way to simulate what the OP is looking for, aside from creating a Corporation.

In this case we will have a cotton mill, which of course requires cotton, and produces cloth. We could also call it textile mill, and have it require sheep, or cotton, and in turn the building would produce cloth, is this not correct? Or we can create both a cotton and textile mill at different points in the techtree.
 
It is possible, when you`re able to update the files to bts3.19.You will find these files in the Database(ModComp):Building Resource Converter Mod v0.2, [BTS SDK MODCOMP] Vicinity Bonus.
When you`re able to merge them you will get what you need.
 
Top Bottom