[ New messages · Members · Forum rules · Search · RSS ]
Page 3 of 3«123
Forum moderator: Daddio, Cichor 
Forum » Cossacks I » Modding » Climate change
Climate change
EbelAngelDate: Sunday, 25/August/2013, 5:52 PM | Message # 21
Site Administrator
Group: Administrators
Messages: 980
Awards: 7
Reputation: 12
Status: Offline
Quote (ab_99)
1. create 10 samples with trees, (Ctrl + G. .. CTRL + W Enter name "newForest") get newForest00001 ... newForest00010
2. copy the contents of newForest.lst in FOR1_.LST, FOR2_.LST, FOR3_.LST
3. create a random map
4. look at a map and find the samples by


Ok  i'v been looking at this again and though I did find out a few things, I'm still nowhere. Its much more complex than I had anticipated.

First off all the Terrain\Pieces\ folder as I mentionned earlier is a double from GSC 's end ( its coming from the ALL.GSC) and it can be deleted without any further consequence.
All samples for random maps are coming from the \Pieces\ folder

Secondly, I tried what you asked, to create samples and add them to the FOR1_.LST, etc , but it had no effect. On further inspection it seems that FOR1_, FOR2_, FOR3_.lst isnt used in any of the .TERR files.
Its either NEW_FOREST_0.lst or trees that are beeing referred to in MixedTerrain and PlainTerrain.lst
These however do use the contents of FOR1_, FOR2 , FOR3_ lst.
I can only speculate that FOR1, FOR2, FOR3 are left overs from old terrain generation samples ( maybe European Wars or any earlier version before Back to war). You never know with GSC.
So i suspect there's litttle use into adding samples to these .lst files.

Right now i'm trying to determine which .lst are actually used on which terrain type.

From what i'v learned from the engine, there must be 2 types of generation.

One is called " National Resources" and it would seem to be used for a "fair" division between the different players and the other is just filling up the map. Its the latter that seems to be the issue for me now.

From 3dRandMap.cpp:
at line 3017
Code
GenerateNationalResources("Pieces\\MINA0.LST","Pieces\\TRSS.LST","Pieces\\STNN0.LST",Ng,NI,Nc,NPlay,Units,GenIndex);


Would indicate that these 3.lst are hardcoded to be used for national player resources around the starting positions of the players of the map regardless of the contents of these .lst's.
This is mostlikely why I managed to get 'new' mines and stones and trees on my maps (on the pictures on previous page). I must have changed these without actually knowing that these were national resources.

It then occured to me that there are no samples for desert maps ( Palm trees). And its clear why:
from 3DRandMap.cpp
at line 5834:
Code
void MakeDesert(){
        int N=(MaxTH+1)*MaxTH;
        for(int i=0;i<N;i++){
            TexMap[i]=ExchangeTex(TexMap[i]);
        };
        int TRDES[8]={79,80,81,82,84,79,80,82};
        for(i=0;i<MaxSprt;i++){
            OneSprite* OS=Sprites+i;
            if(OS->Enabled&&OS->SG==&TREES){
                OS->SGIndex=TRDES[mrand()&7];
                OS->OC=OS->SG->ObjChar+OS->SGIndex;


The numbers 79, 80, 81, 82, 84 in "int TRESDES[8]" refer to the trees.gp/trees.lst/trees.rsr numbers. If you look in the editor or the files you will see that these are the palm trees in those files. So when a desert map is being made, it knows which frames to use for palm trees.

So i'm down to figuring out how and when and where from normal trees are coming from on the rest of the map. They may either be coming from the engine ( referred to as tree numbers) or from the .lst/.terr/.sty files. So far I haven't been able to change them succesfully.
I did manage to get them to load in the editor trough the "Generate BMP terrain function where you can draw water, hills and trees on a small canvas and then generate a map acccording to a .bmp files loaded from \UserTerrain\ folder.
The trees generated here is certainly also loading from the Pieces folder because it was using new samples i had created. ( I know because there were animals (deer) on them). You can try this if you like ab99 on the version i gave you ( 1_35_2_36)

I first want to figure out how this works on Cossacks I, because its the simplest version , before attempting to look at American Conquest ( which is even more complex with its climate zones).

I hope the above made sense.


 
ab_99Date: Sunday, 25/August/2013, 8:14 PM | Message # 22
Count
Group: Modders
Messages: 126
Awards: 1
Reputation: 1
Status: Offline
Quote (EbelAngel)
One is called " National Resources" and it would seem to be used

IInteresting idea. I know that the players are given the coordinates of the files \ TERRAIN \ *. MSP

Perhaps when creating samples must change the parameters of the game, the color of the player ...

Quote (EbelAngel)
Codevoid MakeDesert(){...

I tried to replace the samples with mines, and modified samples appeared on the screen.

Quote (EbelAngel)
They may either be coming from the engine ( referred to as tree numbers) or from the .lst/.terr/.sty files.

I downloaded the editor samples with existing trees and save them, after that they no longer appear in the game.

Quote (EbelAngel)
I did manage to get them to load in the editor trough the "Generate BMP terrain function


That's right, it works in the editor. In the editor, the conquest of America also works.

Quote (EbelAngel)
I hope the above made sense.

Of course it makes sense, it brings us closer to the goal.  :angel:

Added (25/August/2013, 8:14 PM)
---------------------------------------------
PS!
need to find the function to read samples in editor and function when we create random map
editor can reads this samples and add these on the map
but on random map something makes problems
maybe reads additional condition

when we choose working sample and save him we see that settings after overwrite changed and file recorded with default settings
perhaps that it associated with numbers in PLATEAUS.TERR

 
EbelAngelDate: Sunday, 25/August/2013, 8:16 PM | Message # 23
Site Administrator
Group: Administrators
Messages: 980
Awards: 7
Reputation: 12
Status: Offline
Quote (ab_99)
Perhaps when creating samples must change the parameters of the game, the color of the player ...


Neutral colour perhaps ( brown)?

Quote
maybe reads additional condition


My guess its the .terr files , there are numbers in there I dont fully understand.

Like
Code
Pieces\MixedTerrain.lst 4000  
18   6 10 3 10  4 10  4 10  11 10  14 1  15 1  14 1  15 1  14 1  15 1 14 1  15 1  14 1  15 1  14 1  15 1 13 1


etc.

No idea what these numbers refer to.

Or it could be something else,...


 
ab_99Date: Sunday, 25/August/2013, 8:27 PM | Message # 24
Count
Group: Modders
Messages: 126
Awards: 1
Reputation: 1
Status: Offline
I tried brown, did not work. (

need to find a function that uses the numbers

Added (25/August/2013, 8:27 PM)
---------------------------------------------
FOREST.TERR

 
EbelAngelDate: Sunday, 25/August/2013, 8:50 PM | Message # 25
Site Administrator
Group: Administrators
Messages: 980
Awards: 7
Reputation: 12
Status: Offline
Quote (ab_99)
FOREST.TERR


Which file(s) tell to use FOREST.TERR? Its not in terrlist.dat...


 
ab_99Date: Sunday, 25/August/2013, 9:36 PM | Message # 26
Count
Group: Modders
Messages: 126
Awards: 1
Reputation: 1
Status: Offline
any *. TERR contain numbers if they change what samples are not drawn.
(this is a guess FOREST.TERR)

Added (25/August/2013, 9:36 PM)
---------------------------------------------

Quote (EbelAngel)
Its not in terrlist.dat...

no
 
Forum » Cossacks I » Modding » Climate change
Page 3 of 3«123
Search: