TreeGrowth

A really beautiful idea. Doesn't change the game dramatically, but adds a really nice feature!

A question:
I guess it's well possible, but would it be complicated to give a unit the ability to "grow a forest"? I don't know anything about LUA, but with pure xml it doesn't seem possible (or I just missed a clue).
Workers can remove features like forests/jungles, so it should be possible to let them add features as well?

Asking this here because it seems this is basically the thing you are doing with your mod, just not with units..
 
Sidenote: this is not my mod, considering that Bhruic coded "the heart of the mod", gmJamez, and others (from Custom Notications threads) helped move things forward (compatibility wise), and add to this all the people posting a line of code here, and there to help. I'm just a caretaker of this wonderful mod (kudos to the makers!).

Back to subject: the idea sounds good. So basically, a Forest would be an improvement, right?
If this is possible to code, I am wondering if treating a Forest as an improvement (like a farm for example) would allow a code which would show the Forest litterally growing (ie: Forest Improvement starts small, kinda like seeing the stage of construction on tiles that are being improved).
If this this can be accomplished, then I would release 2 versions of the mod, a light one which basically doesn't change the gameplay in a direct manner, and another one with the Improvement feature. It reminds me of The Settlers games were you get a Forester who can replant trees in some areas.

Maquabra on Steam Workshop suggested:

"Worker's job: plant forest. It creates in X turns a forest plantation in the same way a mine or a farm is created. Plot with palntation is useless. Then it takes Y turns for the forest to grow on its own."
 
An improvement without growth is easy to implement.
You just make a new improvement and use the ArtTag ART_DEF_FEATURE_FOREST.

No growth on that one, though, I suppose.
For growth you would have to find the contents of this ART_DEF, but I don't know where it is.
Searched all folders... unit art defines are easy to find, but terrain and features are nowhere in the usual game folders :/
 
Now that I'm done chasing a bug in the Nubians Civ (it was a typo...), it's time to take a look at the coding for TreeGrowth.
Thanks scotchandcake for pointing me in the right direction.
 
Yes, I have not taken the time to look at it yet, as I was and still am busy updated some cool Civs for G&K :)
As soon as I'm done, I will look at the Custom Notifications module more carefully, and try to rename the files again. Whenever a positive result shows up, it will be posted here, so things can move forward for both mods compatibility wise (and for whichever new mod that would use the module too).
 
A question:
I guess it's well possible, but would it be complicated to give a unit the ability to "grow a forest"? I don't know anything about LUA, but with pure xml it doesn't seem possible.

This should be easy.

It already selects a tile (randomly)
It tests whether the spot is valid
if so
It generates a forest there.

All you'd have to do is run the same code, but on a user defined spot instead of a random spot, ne?

I considered coding it, but don't know the lua well enough. The hangup is how to get a user action to call the lua script. If someone can tell me this, I can post the code.

thx : )

/* btw, this is an excellent mod */

++ Angel
 
An improvement without growth is easy to implement.
You just make a new improvement and use the ArtTag ART_DEF_FEATURE_FOREST.

No growth on that one, though, I suppose.
For growth you would have to find the contents of this ART_DEF, but I don't know where it is.
Searched all folders... unit art defines are easy to find, but terrain and features are nowhere in the usual game folders :/

I think these are in an fpk. You'd have to unpack it.

Also

<ArtDefineTag>ART_DEF_FEATURE_FOREST</ArtDefineTag>

is an art def feature. when you build something, it uses

<ArtDefineTag>ART_DEF_IMPROVEMENT_FARM</ArtDefineTag>

I've tried swapping the two and it simply draws nothing. Only when I use an ART_DEF_IMPROVEMENT_... has it worked. It might be more complicated?

++ Angel
 
Yes, I have not taken the time to look at it yet, as I was and still am busy updated some cool Civs for G&K :)
As soon as I'm done, I will look at the Custom Notifications module more carefully, and try to rename the files again. Whenever a positive result shows up, it will be posted here, so things can move forward for both mods compatibility wise (and for whichever new mod that would use the module too).

So the incompatibility issue is with the Custom Notification module? Why not create a separate custom notifications mod that adds the module and is required by TreeGrowth (and then I guess all the other mods that use it...civUP, emigration). Alternatively, you made a stripped down version of TreeGrowth for use with CivUp/Emigration.

Also, I think it would be great if you made a Custom Notification with a custom image. Making the image is probably the hard part, right?
 
Take a look at CCTP, both Treegrowth and Emigration work together, FiresForever made some adjustments and I am sure he wont mind you using his code to fix your issue.

Edit: There are also images for Tree and Jungle growth in CCTP feel free to use them :) , killmeplease already has the Emigration Icons.
 
Top Bottom