PDA

View Full Version : Tutorial: Placing Palms on the Battlemap



Teleklos Archelaou
06-22-2006, 19:52
Placing Palms on the Battlemap

This minimod was created to add palm trees to the battlemap as vanilla RTW currently has none. The trees are placed in the semi-arid climate type. This minimod is made to work with vanilla RTW and any other mod.

Text editting/testing: Teleklos Archelaou
Models/textures: Shifty157

If anyone is looking for more information on how to alter these files, make sure to look at Duke John's tutorial on creating new vegetation (https://forums.totalwar.org/vb/showthread.php?t=60901), which is the point from which I started messing around with these files. I surely wouldn't have been able to get this far without it, and it has been a big aid in understanding what needs altering. I began a thread here (https://forums.totalwar.org/vb/showthread.php?t=64410) trying to find help to remedy this situation (the lack of palms on the battlemap), and got a very mixed response, but little direct aid. I asked for help and expressed my frustration on the public EB board and shifty started helping figure out things from the modelling point-of-view, thank goodness. Here is the result. If anyone has further tips to make the palms or ground surfaces look more realistic, please feel free to submit them below. Otherwise enjoy the palms! Getting them in is pretty easy!

Download the .zip file with .cas files and textures now on the .org website:
http://www.totalwar.org/Downloads/Rtw_Uploads/RTWupload/palms_v3.zip

----------------------------------
Step 0. Backup the files we are altering here as we go!!!!

-------------------------------------------
Step 1. Before we do editing of text files, we need to get the new .cas and .dds files in place. There is one texture file and a number of .cas files that we are providing here. All were vanilla versions at first - we did not create them from scratch - , but they are models which shifty has caused to reference a single texture file and which he has altered a little for better results on the battle map.

Step 1a: In the zip file you will find 8 .cas files. All of these need to be placed into the data/models_vegetation/ folder.
Step 1b: You will also find a tga.dds file named ##palms_all.tga.dds. This file needs to be placed in the data/vegetation/textures/ folder.
Step 1c: You need to copy the palm_layout.tga file into the data/battlefield/vegetation/ folder . All this does is make palm forests more dense - since they are taller and thinner and aren't spaced out as much as regular trees are.
-------------------------------------------
Step 2. Now we will alter the file that will pull these palms up in the game on the battlemap.

Step 2a: Open up descr_vegetation.txt - in your data folder. Search down to the end of the Models section (right before "Vegetation Types" begins), and insert (these did not exist before here) this new code that will reference these models:


model sa_tree_01
{
level models_vegetation/palm_1.CAS
}

model sa_tree_02
{
level models_vegetation/palm_2.CAS
}

model sa_tree_03
{
level models_vegetation/palm_3.CAS
}

model sa_tree_04
{
level models_vegetation/palm_4.CAS
}

model sa_tree_05
{
level models_vegetation/palm_5.CAS
}

model sa_tree_06
{
level models_vegetation/palm_6.CAS
}

model sa_tree_07
{
level models_vegetation/palm_swamp_shrub.CAS
}

model sa_tree_08
{
level models_vegetation/palm_shrub.CAS
}

For your reference, here are screenshots of those 8 palms so you can decide easily which ones you want:
https://img62.imageshack.us/img62/4447/palmtypes8uy.th.jpg (https://img62.imageshack.us/my.php?image=palmtypes8uy.jpg)

Step 2b: Now we need to tell the semi-arid climate to use those models. Search further down this same file (descr_vegetation.txt) till you find this entry:

; Semi Arid
vegetation semi_arid_dense_forest modifies default_forest
{
}

We will expand that. Here is the new "base" entry for this semiarid climate type. Paste this one over the old entry:

; Semi Arid
vegetation semi_arid_dense_forest
;vegetation semi_arid_dense_forest modifies default_forest
{
layout 320 palm_layout.tga
radius 1
height_range 1.1 1.5
aspect_range 0.7 1.3
lod trees
; model sa_tree_01
model sa_tree_02
model sa_tree_03
model sa_tree_04
model sa_tree_05
; model sa_tree_06
; model sa_tree_07
; model sa_tree_08
}

You will see the 8 types - but I have four commented out. You can only have four of these at a time, but we have it set up here where you can easily change which four you will choose to have. Just make sure only four are in use at any one time.
-------------------------------------------
Step 3. You now need to delete a file - descr_vegetation.db - this is in your data folder. Once you delete this file, the next time you start up the game, a new one will regenerate. You will need to do this any time you change which 4 of the 8 palms you are going to use also. When you start up, it will definitely slow down the initial loading of the game. But don't worry, this just happens one time, and once it recreates the descr_vegetation.db file, you won't have this problem any longer.

-------------------------------------------
Step 4. Fixing sprites to work even faster in game.

Step 4a: Open up the data\vegetation\sprites\ folder and find the new sprites the game has created for you automatically (when you started a game up and the descr_vegetation.db file regenerated itself). They would be called variants of semi_arid_dense_forest_0.tga (0-3). In the data\vegetation\textures\ file you also will find two files (one is semi_arid_dense_forest_canopy.tga, and the other is semi_arid_dense_forest_edging.tga) that can be altered to speed things up.

The process is just saving these files (example: semi_arid_dense_forest_edging.tga) as .dds files. This is familiar for anyone who has skinned - but if you haven't it won't hurt if you don't take this step, it's just that your performance won't be quite as good. So I would save semi_arid_dense_forest_edging.tga (as an example) as semi_arid_dense_forest_edging.tga.dds (using the NVIDIA plug in for your paint program). Do this for all of these files and save the new versions in the same files as the old .tga versions. That's all.

-------------------------------------------
This should work now, and make these palms appear in the battle map like these screenshots (but note that you may have to alter the extent of your semi-arid climate now - as you may not want palms to appear in all of the places the tga map files reference):

https://img72.imageshack.us/img72/8470/palms18gt.th.jpg (https://img72.imageshack.us/my.php?image=palms18gt.jpg) https://img151.imageshack.us/img151/2398/palms23tz.th.jpg (https://img151.imageshack.us/my.php?image=palms23tz.jpg) https://img72.imageshack.us/img72/3804/palms35uy.th.jpg (https://img72.imageshack.us/my.php?image=palms35uy.jpg) https://img139.imageshack.us/img139/8375/palms44fp.th.jpg (https://img139.imageshack.us/my.php?image=palms44fp.jpg)

==========================

Terms of use: Not much here really - anyone is free to use these files in their builds or mods. A thanks would be appreciated though. And I would personally add that since this effort was exerted to get palms into EB primarily, that it would be nice if the thanks was extended to EB as well (Stormy and others have been continually helpful with example photos and motivation that palms *were* needed), but if anyone has a problem with that and doesn't think it appropriate, then no one is going to come around twisting arms or anything.

==========================

Finally, please let me know if there are problems with these instructions - I have gotten them in my build, but there's a chance a modded file or problem might exist in other builds in these files (or was present in mine). I've not written a tutorial yet, but am submitting things in a similar method I submit new changes to EB. Posting photos of different palm combinations might also be helpful if folks get them into their games and want to play around with it. We are still trying to fine tune ours, so advice, clarification, other examples, etc. will all be helpful to us and others. Getting some undergrowth to go along with it would also be nice - especially if it was not using one of our 4 tree slots, so if anyone can do that we would love to see examples and hear how.

I also am now (in my build) opening the palm layout.tga file and adding more white pixels, so that the palms are denser and more realistic as forests, but I've done this since I zipped the files and uploaded them.

Lusted
06-22-2006, 20:28
Woot! Thank you TA this is a great tutorial that will help improve the variety of battle fields in a lot of mods. Off now to see if its worked will post back here if it has. And expect a very big thank you to EB and shifty in the readme of the next version of my mod if this does work.

EDIT: yes! it works! Now can anyone provide me with information about what colour in map_climates.tga dictates where palms are on the camapign map, and where they should be on the map, im using the mundus magna if that helps.

Teleklos Archelaou
06-22-2006, 20:50
Ok, well, folks should hang on a bit here. Foot has told me this happened to him too. It will just take some more testing, but I'll get it figured out. Gotta run teach soon though, so it will be tonight before I can do some serious tests. Don't know how it could be affecting the ground or how units appear - that is certainly not what I'm seeing in my build or what would be expected by me from these changes.

Lusted
06-22-2006, 21:16
Dont worry i fixed it, see my edit, was just putting textures in the wrong place. But this is what i get on the battle map:

https://img520.imageshack.us/img520/4002/palms3rs.th.jpg (https://img520.imageshack.us/my.php?image=palms3rs.jpg)

A distinct lack of palms. Now i selected the co-ords for that map based on where palm tress are on the campaign map, surely this is the type of climate they are meant to show up in. I map this custom battle map just to test this, and whilst my previous problem is fixed this is a bit stranger.

Teleklos Archelaou
06-22-2006, 21:38
May be another file I made an edit in then to 'trigger' them. I can find the problem - it may take using a merge program to check where I made changes, but I'll get it on here.

I'm just giddy though seeing what prometheus has done with the grass and flowers for Res Gestae right now by the way. :grin:

Lusted
06-22-2006, 22:50
Oh same here, he's already given me advanced perission to use thme in his mod, and im sure he will let EB use them as well, the screenshots with the new grass/lowers in are truly amazing.

Teleklos Archelaou
06-22-2006, 22:55
Now can anyone provide me with information about what colour in map_climates.tga dictates where palms are on the camapign map, and where they should be on the map, im using the mundus magna if that helps.I can go ahead and answer this question: This should be anywhere the blue color in your map_climates.tga file overlaps with forest vegetation - like the medium green and sometimes some other ground cover types on your map_ground_types.tga file overlap. The blue climate is semi-arid, and so where it overlaps with trees (forests) it will now have palms. So most folks might wind up restricting their semi-arid climates a little more than they currently have to restrict palm occurrences.

Lusted
06-22-2006, 23:05
Thats no problem for me, the mundus magna already restricts quite heavily where palms appear so that shouldn't be a problem, i may even expand where palms appear to add that bit more variety. Could you perhaps post a mpa showing where EB has palsm, im sure i saw one in the EB subforum but can no longer find it.

Teleklos Archelaou
06-22-2006, 23:17
We're in the process of figuring this out (placement of palms - where on the map), and it sort of depends on whether or not we get a desert oasis like we want. If that works, then our stands of palms in semi-arid climates can be more like palm forests instead of desert stands. So it might vary some still.

I can still try to put together a map showing where they would currently show up in EB given what we have now.

Dol Guldur
06-22-2006, 23:20
Thanks for your tutorial (and honoring your word) Teleklos.

Thanks from the Fourth Age! - it is working in BI:
https://i39.photobucket.com/albums/e166/dubhdara/palmtrees.jpg

You'll be in the credits!

Teleklos Archelaou
06-23-2006, 00:50
Lusted, are you putting it in on a -mod mod? That was what Foot was doing when he got those same results. But it's strange that Dol Guldur got it working for FATW.

-----
edit: it seems as though it's hard to get a -mod mod to generate its own descr_vegetation.db. You have to mod the original files.

shifty157
06-23-2006, 04:29
Good to see people enjoying the mod.

New releases should be on their way once we figure more stuff out.

Teleklos Archelaou
06-23-2006, 04:48
I have put it on another RTW build - there doesn't seem to be any problems with it. People should feel good about trying it out now, unless they are trying to put it on a -mod mod. I have been trying, but have not figured out how to make it work on a -mod mod. Does anyone have advice on how to do that?

Dol Guldur
06-23-2006, 08:51
I've never used -mod mymod due to its apparent (though hopefully not real) limitations, but would not the same principle apply to BI (in which the palms do work)? It can only draw off from the main data folder. It is strange it does not work.

You do need to delete all the map.rwms, which is something you might want to put in the tutorial.

Duke John
06-23-2006, 09:20
We are using -mod for NTW2 as it completely puts our mod in a seperate directory, unaffecting original R:TW, except for the sky textures.

I use a R:TW install to generate the vegetation files and then just copy them to the NTW2 folder. A bit unconvenient for the modder but convenient for the customer :wink:

Dol Guldur
06-23-2006, 09:48
NTW2 is using -mod mymod, eh? Well, that must say something good for it. Does it work (or is it intended to work) with the BI. exe though?

Back to the thread...

BI draws off the DB file from the main RTW folder. But I have a question: does the db file generate when you first play BI (assuming you have installed the expansion to a never-played RTW) or is it there in the RTW data folder from the beginning?

If it is there from the beginning then it must be deleted (or included in the mod files). And what of the sprite files?

This really is an area I do not know much about (climates/vegetation).

Duke John
06-23-2006, 09:52
We use the rometw.exe so I have ignored/forgotten anything related to BI.

Teleklos Archelaou
06-23-2006, 14:56
We are using -mod for NTW2 as it completely puts our mod in a seperate directory, unaffecting original R:TW, except for the sky textures.

I use a R:TW install to generate the vegetation files and then just copy them to the NTW2 folder. A bit unconvenient for the modder but convenient for the customer :wink:
Ah. That was exactly what I was going to try this evening. Good to hear it works for NTW2 at least.

Teleklos Archelaou
06-23-2006, 18:45
Do only the edited files need to be placed in the -mod files? And the copied over descr_vegetation.db file? Or do many other ones have to be brought over also? I'm having no luck just putting the edited ones in the -mod files, it still looks like vanilla.

Lusted
06-23-2006, 18:55
Finally got it working, but can someone post their sprites for the palms as mine are all black.

Teleklos Archelaou
06-23-2006, 18:59
Are you using the same 4 palms that it is defaulting to? If that is the case I can upload the sprites I have for semi-arid.

Also, were you using -mod? If so, what files did you change to get it to work with -mod?

Dol Guldur
06-23-2006, 21:55
My sprites are black too, well they are various white horizontal or vertical bars (in preview) of varying widths but black when opened.

I did not change the original commenting for the trees selected.

Duke John
06-23-2006, 21:56
Then you've got the wrong settings. Try 16-bit and anti-aliasing off.

*checking*
Yes, you really should read my tutorial :wink:

Dol Guldur
06-23-2006, 23:18
Thank you.

I *will* read that tutorial properly at some point soon. Promise.

Is it possible to limit where palm trees occur in the semi-arid climate by the use of ground types?

Lusted
06-24-2006, 11:00
Yeah im using the default 4 palms, and could you also send me the canopy and edging textures, now that i've got it owrking, and given the problems ive had i don't really want to do things again with the right preferences to make the sprites generate properly.

Teleklos Archelaou
06-24-2006, 15:08
Yeah, can't get to it immediately, but I'll get them in a rar file and posted by some time tomorrow. (for the four on default).

I still can't get the blasted things to work in a -mod mod though, even with the .db file created in another build placed into it.

Dol Guldur
06-24-2006, 15:21
Teleklos,

Is there a descr_climates_lookup.txt and descr_climates.txt in your mymod folder? Probably, but it's the only thing I can think of that links a submod folder or BI to the main data folder.

Teleklos Archelaou
06-25-2006, 04:48
This is the silliest thing... I can get palms to show up in a vanilla version of a game, then (with no terrain changes or vegetation db or txt files or anything like that) in a -mod mod, they aren't showing up. I can't imagine where it's getting its trees from, as the vanilla txt and db vegetation files are changed. Is this something really simple?

As I said earlier, I would appreciate (as would others it seems) anyone who has succeeded in getting them into the game in a -mod mod to explain if they did anything different. That would be the optimal way of fixing things for mods in -mod switch mode.

Lusted
06-28-2006, 14:36
Hey Ta, you got those sprites ready?

Teleklos Archelaou
06-28-2006, 16:26
Yeah, I do. I have had them done a few days (rar file dated to the 24th) - crap, looks like I just forgot to upload them one night. Thanks for reminding me.

http://www.totalwar.org/Downloads/Rtw_Uploads/Replay/default_palm_sprites_and_edging.rar

I mimicked the directory tree structure, so it should be easy to drop them in place.

Lusted
06-29-2006, 02:26
Thanks TA!

EDIT;hmm, the canopy file isn't working properly or something, because on the battle map far far away trees, on the large amounts of inaccessible terrain off the battle map there is a large area of white at the top of the blocks of trees, but i can see the rest of the trees.

Lusted
06-29-2006, 15:57
http://www.megaupload.com/?d=10V57LRW

Heres a fixed version of the canopy file that fixes the white topped long distance forest problem.

Dol Guldur
06-30-2006, 19:20
I have copied over the files (inc. the db file & the map.rwm generated after the change) to a new copy of rtw and the bi CB attached to the semi-arid terrain co-ords now hangs the game on CB load.

Is there an error in my thinking? The two directories should be identical. I cannot see why it does not work.

Teleklos Archelaou
07-01-2006, 20:26
I will be totally unable to help out with any BI related questions or attempts to incorporate the palms in the game unfortunately. BUt if there is anyone who can help, or any success here, I hope it is posted.

Dol Guldur
07-02-2006, 00:31
I understand, Teleklos. You've done a lot for the Modding Community - I am only asking these questions because my own research and testing time has been swamped by present coding pressures. I feel like such a noobie asking so many questions of late.

Seasoned Alcoholic
07-02-2006, 12:35
Excellent tutorial and download Teleklos & Shifty, it was well put together, but most importantly it was compact :medievalcheers:

It didn't take long to sort out, basically about an hour or two (the early hours of this morning), and a couple today tweaking the map_climates.tga. Here's a few screens (click thumbs for larger images):

Off Battlemap Vegetation
https://img77.imageshack.us/img77/1122/palms15xp.th.jpg (https://img77.imageshack.us/my.php?image=palms15xp.jpg)

https://img51.imageshack.us/img51/6322/palms24wj.th.jpg (https://img51.imageshack.us/my.php?image=palms24wj.jpg)

Battlemap Vegetation
https://img77.imageshack.us/img77/7020/palms36bl.th.jpg (https://img77.imageshack.us/my.php?image=palms36bl.jpg)

https://img77.imageshack.us/img77/4716/palms43cg.th.jpg (https://img77.imageshack.us/my.php?image=palms43cg.jpg)

As you can see, I've gone for those shrub-type vegetation, didn't realise they were that big ~D

Some new sprite TGA files were generated, so I've converted these to DDS extensions, and as you can see from the above screens (IE off battlemap), they appear to work correctly.

Also updated the vegetation edgings txtures, but for some reason, the canopy textures generates an error message before conversion. Something about the TGA not being a power of 2 or somethins similar, so the canopy textures have been left as default.

I need to restructure my credit section for the RTG mod, and I'll ensure that both of you (Teleklos & Shifty) are given full creditation for this super find :2thumbsup: Thanks.

repman
07-02-2006, 14:10
@Teleklos & Shifty
excellent tutorial and it works out of the box in my mod BBW. Will be included in my next patch
thank you very much for the excellent work
credits will be give to you both and EB

repman

shifty157
07-02-2006, 14:26
Im glad you like it guys. We're still working to improve it and we'll release a newer version when we're done.

Teleklos Archelaou
07-18-2006, 02:46
I'm trying to get the palms into a -mod build version of RTW again. If anyone has had success in doing this, please please offer your advice about what special steps need to be taken. I couldn't get it to work before and put it off for a while hoping someone else might be able to figure out how to do it. Any luck?

Duke John
07-18-2006, 06:56
Yes. Where are you failing? I generated the vegetationfiles with regular R:TW and then moved the files towards the mod folder.

Teleklos Archelaou
07-21-2006, 23:51
If you only alter a few files, do you just need to bring those over into your mod folder, or do you need to bring pretty much everything referenced in the vegetationfiles over into the mod folder too? I've just been bringing only the new stuff over into them.

Dol Guldur
07-22-2006, 00:39
I've still not had the time - but adding just the "new stuff" did not work for me (in BI). I hope to give this more serious thought and try again with the BI modswitch folder version - perhaps next week if I can get the time. Oh, and Duke - I will try and get time to read your tutorial too ;)

Teleklos Archelaou
07-22-2006, 00:53
The thing is, I can get the palms to appear in the vanilla version of the game, and then in the -mod folder (which has *none* of these files: dv.txt, dv.db, etc.) the palms won't appear. And I'm certain the climate/groundtype is correct. But I get the old trees in the -mod version. What other file could be "trumping" them? Very bizarre.

Very frustrating. I move all of the files in there (to the -mod files; more than I wanted to move) and anyway it still doesn't work. I just can't possibly imagine how the dv.db file is there and working in the main build itself, but in the -mod it is like something is keeping it - but where the new information is coming from I have no idea. Gah!

Teleklos Archelaou
07-26-2006, 02:25
I keep trying variations on this and getting nothing. :wall:

If there are certain files that must be brought over into the -mod files, in order to make changes in vegetation show up there too, I'd very much appreciate knowing which files must be "ported" over to the -mod directories. Thanks for any help if anyone has figured this out.

Duke John
07-28-2006, 14:47
Working method:
Everything is done in the original R:TW data folder.
Add new textures and models in models_vegetation\
Delete folder content (not the folders themselves) of vegetation\
Copied the content of models_vegetation\textures into vegetation\textures
Edit descr_vegetation.txt (file location is relative so don't worry about the -mod folder).
Delete descr_vegetation.db
Generate vegetation files.

Then put the following files/folders into the -mod folder:
descr_climates.txt *
descr_vegetation.txt
descr_vegetation.db
\models_vegetation\... **
\vegetation\... ***

* only because we added a new climate
** only the new tree files, original R:TW trees aren't used anyway in NTW2
*** as generated by the engine

Teleklos Archelaou
07-28-2006, 23:04
Thanks! I'm in the process of moving, but will try this out as soon as I get my new setup stable.

Dol Guldur
07-29-2006, 14:11
OK..just spent the last 5 hours working on palms. I started all over again, even read the relevant part if Duke's tutorial :) ...

These are my findings and struggles on the matter (remember, my -mod folder is a BI one):

1. descr_vegetation.txt does nothing I can see. The game must only use it to generate descr_vegetation.db

2. Using the original DB file causes the palm trees to disappear and get replaced with palm shrubs when close up to them. I removed the 8 cas files from the game and restored the new DB file. All worked fine. Cas files must be in DB file too.

3. palm_layout.tga also seemed unnecessary and assume in DB file

4. New sprite folder files also seemed redundant and assume in new DB file

5. vegetation/textures files caused an error when removed and so are needed.

I therefore conluded that the DB and texture files on vegetation/textures were needed - and them only.

I placed them in the -mod folder sitting under the BI (this was in the installation used, by mennas of the rtw.exe, to generate the new db file). I restored all vanilla files to normal (inc. the DB and descr_vegetation.txt file and all new textures/sprites etc.)

The palms worked in the -mod folder. Perfect.

However, taking the db file and the vegetation/texture files and placing them into an identical version of the -mod folder sitting under another installation of RTW-BI causes the old problem of the game freezing at battle-map-entry loading bars.

This just does not make any sense. There MUST be something else generated by the game when the DB is created. That is the only thing I can think of (there are some new texture TGAs generated in the vegetation/textures folder but I added those in and it made no difference - still hung).

So, thus far, the -mod folder palm forests are a possibility but they cannot be passed on to any would-be players of the mod :(

Maybe this will give a few clues to some in their efforts to get this working as they wish.

EDIT 1: the "hanging" problem was resolved by searching for other generated files. I found 41 ".vege" files in the vegetation folder and copied these across tot he -mod vegetation folder (why has no one mentioned this?)

EDIT 2: On accessing the battlefield I discovered that the palms worked fine close up but from a distance looked like white skyscrapers. I added in the new vegetation/sprites folder files and then discovered that though the white skyscrapers had gone they had been replaced with mainly normal trees (distant view) but a few palms too. Again, palms were fine up close. We're getting there! Slowly! I will update exactly what is needed to use in a -mod folder AND be able to port to other installations as soon as I am done.

Dol Guldur
07-29-2006, 21:36
OK,

It works in a -mod folder simply by copying over the descr_vegetation.db file and the vegetation folder (with all generated files plus ones from this tutorial that go in that folder or a subfolder thereof). None of the others are needed.

The only problem still remaining here is that *some* (the thin very tall ones seem immune) of my palms are turning into normal trees at a distance. Can't work out why.

Teleklos Archelaou
07-31-2006, 01:41
Thanks for posting your findings on this DG. I can't mod any of this yet, but when I get to where I can try it with EB I'll certainly post what I've got too.

Duke John
07-31-2006, 07:02
:wall: Why o why did I even bother writing a tutorial and tips if you just ignore them anyway. I posted all my findings and you just had to follow them... DG, do you like pain or something? :wink:

sorry :shame:




The only problem still remaining here is that *some* (the thin very tall ones seem immune) of my palms are turning into normal trees at a distance. Can't work out why.


Remove the files in:
data\vegetation\
data\vegetation\sprites
data\vegetation\textures
Remove:
data\descr_vegetation.db
[...]
The engine generates the sprites and textures as TGA files. When you are done with tweaking your vegetation I advise you to open the textures and sprites in data\vegetation\ and save them as TGA.DDS for better performance. The R:TW engine automatically reads the TGA.DDS files instead of the TGA ones.

You still have original DDS files around in the sprites folder.

Dol Guldur
07-31-2006, 08:18
Well, Duke, I did follow your instructions but I made 2 errors which made me think it did not work; I then started and worked through it all myself and discovered my errors and came to the eventual conclusion that you were right :)

However, yes, I am afraid I am one of those modders who - though I am grateful for the excellent work of others - just do not like anything in my builds which I have not personally comprehended and worked through. Now, if I ever need to change it or have a problem I am in a much better position to correct it.

No pain, no gain ;)


EDIT: The only sprites I have in the sprites folder are the new ones and the generated ones.

Rstoner
08-02-2006, 17:17
@Teleklos and Shifty

Thanks for the great tutorial and models guys.

I just played a custom battle at Zama and this is how cool it now looks:
https://img80.imageshack.us/img80/5600/palmsjp5.jpg



:2thumbsup: Cheers :2thumbsup:

Dol Guldur
08-02-2006, 22:31
I have been through all the files and am still having problems with the distance view of the trees appearing normal and then only changing to palms when close up (but some suffer not with this problem).

I have two bi -mod folders in two separate installations; the one the db was generated in does not have this problem. The second (to which the files were copied) does.

Currently I have added all the folder and files (except climates) posted by Duke John. I cannot understand what is wrong and have spent some considerable time today trying to track it down.

Teleklos, can you confirm that you can get it to work in a -mod folder *and* copy it to another installation?

Teleklos Archelaou
08-02-2006, 23:03
Still will be a few days before I can test anything out. Possibly a week. I don't have internet and my RTW files on same computer yet - in a lab now.

Lord Adherbal
08-12-2006, 20:56
I haven't followed this thread or read DJ's tutorial, but since I had to do a couple of things before DJ's new trees worked in the NTW2 -mod folder, I'll quote my post about that here (in case help is still needed):

Note that I did this quite a long time ago and can't even remember what problems I had - so this information might not be relevant at all. But in the end it seemed creating new entries (instead of editing existing ones) did the trick.


I managed to move the new trees and sprites to the mod folder (much cleaner then overwriting RTW files).

to do this edit descr_vegetation.txt:

change the NTW tree entries (former "super_trees") to this:


; ***************************************************
; *** TREES USED FOR BORODINO
model ntw_tree
{
level ../napoleonic/data/models_vegetation/ntw_tree_03.cas
}
model ntw_tree_01
{
level ../napoleonic/data/models_vegetation/ntw_tree_01.cas
}
model ntw_tree_02
{
level ../napoleonic/data/models_vegetation/ntw_tree_04.cas
}
; ***************************************************
; *** Tree with no leaves
model ntw_tree_winter
{
level ../napoleonic/data/models_vegetation/ntw_tree_02.cas
}

add a copy of default_forest and edit it to this:


vegetation ntw_forest
{
layout 128 forest_layout.tga
radius 1
height_range 0.9 1.4
aspect_range 0.9 1.1
lod trees
model ntw_tree_01
model ntw_tree_02
model ntw_tree
}

and a new entry like this:


; Ntw
vegetation ntw_dense_forest modifies ntw_forest
{
}


then in descr_climates.txt, edit the test_climate entry to this:


climate test_climate
{
colour 236 0 140
heat 1

strategy summer sparse_tree cypress_a.cas 11
strategy summer sparse_tree olive_a.cas 10
strategy summer dense_tree olive_a_impassable.cas 10
strategy summer canopy olive_a_canopy.cas 12

battle_vegetation
dense_forest ntw_dense_forest
dense_scrub medi_dense_scrub

battle_winter_vegetation
dense_forest ntw_dense_forest
dense_scrub medi_dense_scrub
env_map data/battlefield/envmaps/grass.dds
}

in short, I created a new tree type, new vegetation type, and liked the test_climate to this new vegetation type. If descr_climates.txt, descr_vegetation.txt and descr_vegetation.db are present in the mod folder they will read the models, textures and sprites in the mod folder.

Dol Guldur
08-17-2006, 10:46
Adherbal,

Thx for your input. My experience (with palms) is that *that* works simply by placing the DB file in the -mod folder along with the generated texture/sprite/.vege files.

The problem occurs when taking these same files and placing them in a -mod folder attached to a new installation (i.e. not the one in which the DB was originally generated). In this case everything seems to work except some sprites so that the forest appear as a normal deciduous with a few of the tall thin palms until you get up close.

I have restored back to vanilla the rome data folder files and DB in the original installation (in which the db was generated) and the palm trees still work correctly in the -mod folder thereof.

This set up should be identical, then, to my second installation and I am totally confused as to why it wil not work properly in the latter.

It seems only logical to suggest that the mod is pulling something from the rome date folder in the original installation that is not present in the second. Yet I have checked, by date, all generated files and do not believe I have missed any when restoring to vanilla. I have also tried transferring them all over to the rome data folder of the second install but still I have my mixed forest.

I am hoping Teleklos or someone can get the palm trees working in a separate installation to the one it was generated in. Then at least I shall know I must be doing something wrong.

Maybe it is BI-related as it is a BI -mod folder I am using.

Duke John
08-18-2006, 13:50
Are you 100% positive that you deleted all the old vegetation files in the new mod folder?

Dol Guldur
08-18-2006, 14:55
The -mod folder only contains vege files in the vegetation folder which were generated new - they all bearing the same date and time stamp. Yes, 100%.

Duke John
08-18-2006, 15:12
First you had this problem:

The only problem still remaining here is that *some* (the thin very tall ones seem immune) of my palms are turning into normal trees at a distance.
And now this:

In this case everything seems to work except some sprites so that the forest appear as a normal deciduous with a few of the tall thin palms until you get up close.
Which is it? Or is still the same problem with one description being wrong? Or did you fix the first problem?

Lord Adherbal
08-18-2006, 15:46
seems like twice the same problem to me ? thin palms work, others use the RTW tree sprites.

Duke John
08-18-2006, 15:54
The first problem is that the engine uses the wrong trees at long distance, while the second problem is about the wrong trees at short distance.

In this case everything seems to work [...] until you get up close.
...
Hmm, he probably:
In this case everything seems to work except some sprites so that the forest appear as a normal deciduous with a few of the tall thin palms (until you get up close where it works again).

Ah! In that case, did you try my earlier suggestion:

You still have original DDS files around in the sprites folder.
That is why I asked wether you deleted everything. If you still have old sprites in DDS format then the game will use those instead of your generated TGA sprites.

I guess that you removed only the VEGE files, and not also the content of the data\vegetation\sprites.

Dol Guldur
08-18-2006, 16:34
Thank you for your input guys - this problem is a monumental pain.

Yes, I meant the same thing as Adherbal pointed out ;)

The only semi-arid sprites I have in the sprites folder are palm ones, all of them new.

Dol Guldur
08-26-2006, 21:52
I now have the palm mod fully working in a bi -mod folder.

So that others do not suffer the same fate of many wasted hours I include below the reason for my month-old problem:

In the vanilla rome folder there is a file in vegetation/sprites called "semi_arid_dense_forest_0.tga.dds"

One of the palm generated files bears also the same name (but is generated as a tga unless you convert it to tga.dds).

It seems that the game will default to the one in the rome directory, which is why those sprites show in-game rather than the palms.

As the vanilla game needs this sprite (?), I assume it cannot be deleted or have its name changed (which is not really practical anyway for installation).

So, reason for problem identified...now to work out how to get it to work without whilst keeping the original vanilla sprite intact...tips anyone?

Has no one else encountered this problem, or is it a BI thing?

Duke John
08-27-2006, 19:06
Are your new sprites in TGA or DDS format? Try converting them to DDS if the former.

Dol Guldur
08-27-2006, 21:06
Makes no difference, Duke. I have tried converting it myself as well as using the one Teleklos made. The game still looks to the file in the rome data folder.

Teleklos, do you have it working now from in a rome -mod folder?


EDIT: Well the aforementioned sprite file has no reference in text so cannot be renamed or repathed; the only option is for the install to overwrite vanilla and I do not wish to further complicate install instructions by telling downloaders to backup the vanilla sprite file and remember to swap it over when playing vanilla :(

Dol Guldur
09-01-2006, 12:52
I can confirm that Adherbal's method avoids the use of same-name sprites and thus I now have the palm forests displaying correctly.

Thx. Adherbal - and Duke, Teleklos and Shifty.

Teleklos Archelaou
10-12-2006, 23:01
Teleklos, do you have it working now from in a rome -mod folder?
I have been away from this issue for a while, working constantly on other things, but unfortunately we still don't have the palms in EB. It's not just the sprites that aren't working, but it's the palms entirely. We can get them to work on the base build, but not in the -mod folder version.

Can I ask you what the vegetations files that you have brought into your mod folders are exactly? Maybe we have something else that is conflicting with it. I wanted to tear my hair out before dealing with this, and I don't know that this time around will be any different, but we desperately need these in our mod.

Duke John
10-12-2006, 23:08
If you use R:TW 1.5 then you could send me the files (send the link through PM) and I'll have a look. I'll need the contents of the models_vegetation folder, descr_climates.txt and descr_vegetation.txt.

Dol Guldur
10-13-2006, 12:34
Welcome back, Teleklos.

I've PM'd you my files. They are for a BI mod folder but maybe they will help you see something you've missed.

Dol Guldur

Ticu
10-29-2006, 21:23
How do you put in the shadow?

caius britannicus
11-06-2006, 23:28
Great tutorial, worked great sprites everything worked (i used Duke Johns tutorial sorta did a combination of the both). ANyways. IT was working great as this screenshot shows.

https://i22.photobucket.com/albums/b316/caius_britannicus/palm_forests.jpg

So I then added the following folders (including all thats in them) and files to my mod install folder (which just overwrites the necessary files not a -mod folder:

models_vegetation
vegetation

descr_vegetation.db
descr_vegetation.txt

Anyways I tested then installing my mod folder (overwriting again) and played my mod. Problem was now the palms were using different sprites. A combination of pines and my palm trees.

https://i22.photobucket.com/albums/b316/caius_britannicus/palm_bug.jpg

Anyone have any idea what could be wrong?

Dol Guldur
11-06-2006, 23:49
This is the same problem I had I believe. The solution is above.

caius britannicus
11-07-2006, 00:03
I thought that it was the same. But you were using a mod folder. I have directly overwriten the files in the rome folder. the only semi_arid_dense_forest_0.tga is the one that contains my palm sprites.


EDIT: SHOOT missed the tgd.dds. Thats why they blend. Okay issue resolved

Dol Guldur
11-07-2006, 00:21
Ah, I see. And there is not two files of the same name but one with tga and one with the tga.dds extension? I'm sure you checked that.

I've sort of lost touch with RTW modding, being in bi and a modfolder thereof for so long now. :inquisitive:

EDIT: Glad you found it :) At least it did not take you the many weeks it took me to locate my problem ;)

caius britannicus
11-07-2006, 00:27
The reason I didn't spot it earlier was I was looking at my back up folder instead of the actually rtw folder. I feel like an idiot.

Dol Guldur
11-07-2006, 00:40
Don't worry, I spent ages trying to work out why my edu changes weren't having any effect..it was quite some time before I realised I had not deleted the name of an old backup edu file and had been editing "export_descr_unit_.txt" :(

You seem to be progressing very well!

Teleklos Archelaou
11-10-2006, 04:38
Having some problems. I'd like to ask a question or two though:

-is it necessary to install all of your palm files onto a regular 1.5 build, then copy that vegetation.db file, start over on your -mod format build, and insert that vegetation.db file there? If it is... gah

I'm getting ctd's when trying this new vegetation method, but my old way was getting a mix of those palm and conifer sprites (as CB mentioned) still which was bad.
I assume the ctd is because (1) there is no vegetation.db file inside my -mod files, and (2) the new vegetation type isn't present in the "base" files which is where the vegetation.db is based off of.

This was so simple with a non - mod build. Grrrrr. (but changing UI images and such was such a pain back then)

Dol Guldur
11-10-2006, 13:28
Not quite sure what you mean but I generated the db file in vanilla 1.5 and then copied it over to my bi modfolder (bi itself drawing on the rome data folder db file in the normal course of events). Then all in 1.5 can be restored to vanilla once copied over to the modfolder. Did you look at the files I sent you? Did you copy over the .vege files? Leaving those out causes a CTD when you go into the battlemap for the climate modded.

Teleklos Archelaou
11-10-2006, 17:43
So, putting all your new vege files, palm textures, and sprites into the main 1.5 build, then generating the db file there, copying it, and putting it into your mod folder, and reverting the 1.5 base to vanilla is the way you have to go? I keep trying but getting ctd's even in vanilla now. Pretty sad that I seem to be totally incapable of getting them into the mod after submitting this tutorial in the first place. DAMN THIS -MOD FORMAT DB MESS. Gah. Going back to having conifer sprites but real palms up close is at least better than ctds though. This is the single most frustrating thing I've dealt with in all my work on this game.

Dol Guldur
11-10-2006, 18:31
It's been a while since I did it, but as best as I can rememeber you follow your (great) tutorial but edit in Adherbal's bit:

In CI's case the 2 text file excerpts look like this:

descr_vegetation.txt (part 1)


;4a palm forest trees - thx to Shifty and Teleklos of EB

model sa_tree_01
{
level ../bi/ci/data/models_vegetation/palm_1.CAS
}

model sa_tree_02
{
level ../bi/ci/data/models_vegetation/palm_2.CAS
}

model sa_tree_03
{
level ../bi/ci/data/models_vegetation/palm_3.CAS
}

model sa_tree_04
{
level ../bi/ci/data/models_vegetation/palm_4.CAS
}

model sa_tree_05
{
level ../bi/ci/data/models_vegetation/palm_5.CAS
}

model sa_tree_06
{
level ../bi/ci/data/models_vegetation/palm_6.CAS
}

model sa_tree_07
{
level ../bi/ci/data/models_vegetation/palm_swamp_shrub.CAS
}

model sa_tree_08
{
level ../bi/ci/data/models_vegetation/palm_shrub.CAS
}


descr_vegetation.txt (part 2)


vegetation 4a_near_harad_forest
{
layout 120 palm_layout.tga
radius 2
height_range 0.4 0.8
aspect_range 0.7 1.3
lod trees
model sa_tree_02
model sa_tree_03
model sa_tree_04
model sa_tree_05
}

;4a
vegetation 4a_near_harad_dense_forest modifies 4a_near_harad_forest
{
}

and descr_climates.txt as:


climate semi_arid
{
colour 0 114 188
heat 2

strategy summer sparse_tree olive_a.cas 10
strategy summer dense_tree olive_a_impassable.cas 10
strategy summer canopy olive_a_canopy.cas 12

battle_vegetation
dense_forest 4a_near_harad_dense_forest
dense_scrub semi_arid_dense_scrub

battle_winter_vegetation
dense_forest 4a_near_harad_dense_forest
dense_scrub semi_arid_dense_scrub
env_map data/battlefield/envmaps/grass.dds
}

Then, when all is generated (.vege files, tgas and db), simply copy the veg db file, desc_vegetation.txt, descr_climates.txt into your mod folder's data folder; and then make a vegetation folder in your data folder and copy the *new* sprites into the sprites subfolder, and the *new* textures into a new textures folder, and the *new* generated .vege files (I had 41 of them) direct into the new vegetation folder.

Restore all rtw data files (which should have all been backed up) to vanilla (not least to test your modfolder is working and not drawing from above!)

Does this help?

Teleklos Archelaou
11-11-2006, 03:58
Third try on your instructions seemed to have gotten it for me Dol. I'll see if this is just on my machine or if others can now replicate it. :grin: Thanks for being patient and helping out.

Glad to see CB got his sprites problem fixed too. I must say that his palm trees are simply gorgeous too, btw. :2thumbsup:

Dol Guldur
11-11-2006, 11:25
That's great Teleklos! Glad to repay what your persistence first brought about.

And yes, caius britannicus's palms are superb - as one of those modders who cannot model I'm especially jealous :laugh4: