map creating problems

Talk about everything related to CoCoNet or Colonial Conquest!

Moderator: Kroah

Re: map creating problems

Postby Christine » 15 Jul 2012, 13:23

Kroah wrote:There's a mistake in the message.
The path should have been:
"Map/Settings/PatternConfig/Default/@ImageIndex is mandatory."
With this information, you could have checked the corresponding tag int the xml file (no line number is required).

okay, you're right. I've read the msg but i diddnt understand what the pathname means. Maybe you should add a link in this message like "open documentation/error msgs".

Kroah wrote:The exact same checks are done by "loading the map from scratch" or by clicking on "Reload".
If you don't have the same behavior (like you described it). This is a bug. I may fix it if you send me the map giving this incorrect behavior.


Its just my actual "nieuw standaard" map. Just load the mapeditor with the nieuw standaard map. Then change the last fill-entry from
ResetColor="White"
to
RandomPattern="True"
click reload in the mapeditor and the editor just reloads the map.

Click "open" -> "nieuw standaard" and before you can do anything, the programm will tell you that something is incorrect.


To verify that the editor really loads the new map by clicking "reload" just edit some country names and click reaload again: the new country names will apear. But the way menu->open->nieuw standaard will stioll produce the error msg.
Christine
 
Posts: 68
Joined: 31 May 2012, 11:04

Re: map creating problems

Postby Kroah » 15 Jul 2012, 19:18

Christine wrote:It would be helpful the do the checks - witch are done by loading the map "from scratch" - in the save map and reload map function, so an editor would notice the problem much earlier (maybe directly then it appears).

This bug is now fixed. Thanks.
Kroah
Site Admin
 
Posts: 417
Joined: 07 Feb 2006, 01:01
Location: France

Re: map creating problems

Postby cr1x » 21 Jul 2012, 19:15

I have started looking at creating a map from scratch but am having some difficulties. Kroah, can you help?

1. I have created a map and copied it into a folder in custom maps and I have also added the other files (excluding the map) from 'Struggle for Elora'. I can load the map in the editor but of course all the settings in the map.xml file are for the Struggle for Elora map. If I try to remove some of the existing content (such as areas) it eventually ends up crashing. Do you have a cut down version of the XML.map file that would allow me to populate the map from scratch?

2. The map that I have created is saved as an 8-bit png file; however, for some reason when I load it into Colonial Conquest it appears slightly blurry. What is the best way to save the map before importing it into Colonial Conquest?

3. I want my map to scroll vertically and not horizontally, what would be the optimum size for a map that is one screen wide and two screens high (taking in to account that different people use different screen resolution).

Any help or advise would be much appreciated.

Many thanks
cr1x
 
Posts: 33
Joined: 14 Jul 2010, 00:12

Re: map creating problems

Postby Kroah » 21 Jul 2012, 20:40

cr1x wrote:I have started looking at creating a map from scratch but am having some difficulties. Kroah, can you help?
Hello cr1x, glad you are trying to do some map editing !

cr1x wrote:1. I have created a map and copied it into a folder in custom maps and I have also added the other files (excluding the map) from 'Struggle for Elora'. I can load the map in the editor but of course all the settings in the map.xml file are for the Struggle for Elora map. If I try to remove some of the existing content (such as areas) it eventually ends up crashing. Do you have a cut down version of the XML.map file that would allow me to populate the map from scratch?
Yes, here's a very small map called "Minimalist". It contains the minimum tags needed to be loaded in the map editor.
Minimalist.zip
(7.89 KiB) Downloaded 52 times

I will add it to the next release too.

cr1x wrote:2. The map that I have created is saved as an 8-bit png file; however, for some reason when I load it into Colonial Conquest it appears slightly blurry. What is the best way to save the map before importing it into Colonial Conquest?
The map should be a 24 bits png for better compatibility.

cr1x wrote:3. I want my map to scroll vertically and not horizontally, what would be the optimum size for a map that is one screen wide and two screens high (taking in to account that different people use different screen resolution).
Using the same area than the original Colonial Conquest map, there are 1280x472=604160 pixels.
With S=x * y, you want a ratio of 2 screen high for 1 screen wide: y = 2x => S =x * (2x) = 2x² = 604160 => x = sqrt(604160/2) = 549.618 pixels and y = 2x = 1099.236 pixels.
The map must be a multiple of 16x8, let's compute the cells: cellsX = 549.618/16 ~= 34.35 cells, cellY = 1099.236/8 ~= 137.40 cells.
We can take for example 34x139 cells = (34*139) * (16*8) = 604928 pixels.

Now, you must decide the area of your map: smaller, bigger or equal to the original map ?
cr1x wrote:Any help or advise would be much appreciated.
No problem and have fun creating a custom map !
Kroah
Site Admin
 
Posts: 417
Joined: 07 Feb 2006, 01:01
Location: France

Re: map creating problems

Postby Kroah » 21 Jul 2012, 22:43

Christine wrote:But ... I don't see a real logical reason for that, but some others may want to create scenarios there country a can go to b, but b cant go to a. I've seen a lot of fantasy-scenarios in many games... someone always gets strange ideas (strange, but maybe good ones).

I've fixed some parts of the AI and the engine to allow one way links.

Let me now if you see incorrect behavior, when next release will be available (1.0.3).
Kroah
Site Admin
 
Posts: 417
Joined: 07 Feb 2006, 01:01
Location: France

Re: map creating problems

Postby cr1x » 22 Jul 2012, 11:21

Kroah, thank you for providing the cut-down xml.map file...perfect...that will make things much easier.

Unfortunately with regards to the fill tool, I seem to be hitting a wall at the moment. :cry: Your minimimalist map file works fine for me (fill works perfect), However, if I load my own maps the fill always leaks out and covers the whole map, as if it is ignoring the border of the area!!!!! I am using paint.net to edit the map file, not sure if that is part of the problem. If I copy the minimalist map over the top of my map and save, the borders for your map also become ignored. I am stumped, what am I missing.

Any ideas?
cr1x
 
Posts: 33
Joined: 14 Jul 2010, 00:12

Re: map creating problems

Postby Kroah » 22 Jul 2012, 15:27

cr1x wrote:Kroah, thank you for providing the cut-down xml.map file...perfect...that will make things much easier.

Unfortunately with regards to the fill tool, I seem to be hitting a wall at the moment. :cry: Your minimimalist map file works fine for me (fill works perfect), However, if I load my own maps the fill always leaks out and covers the whole map, as if it is ignoring the border of the area!!!!! I am using paint.net to edit the map file, not sure if that is part of the problem. If I copy the minimalist map over the top of my map and save, the borders for your map also become ignored. I am stumped, what am I missing.

Any ideas?

The filling algorithm fills pixels up to a specific color defined in the "BorderColor" tag.
So you must use the exact same color to draw your borders.

For example, if the border color value is #010101 (almost black), and you draw your borders with #000000, then the flood will overflow.

Post your map here if this don't fix your problem.
Kroah
Site Admin
 
Posts: 417
Joined: 07 Feb 2006, 01:01
Location: France

Re: map creating problems

Postby cr1x » 23 Jul 2012, 21:43

The filling algorithm fills pixels up to a specific color defined in the "BorderColor" tag.
So you must use the exact same color to draw your borders.

For example, if the border color value is #010101 (almost black), and you draw your borders with #000000, then the flood will overflow.


Kroah, thanks for steering me in the right direction. After lots of fiddling around, the map is finally being recognised correctly. Now for the fun bit. :lol:

Thanks again.
cr1x
 
Posts: 33
Joined: 14 Jul 2010, 00:12

Re: map creating problems

Postby cr1x » 26 Jul 2012, 08:56

Kroah,

My new map is progressing well: Areas placed and named, Links placed, In/out set etc.

I am now ready to start placing regions. The problem I am having is with how to adjust the map.xml so that I can have more then one region available in the editor. (I am using the minimalist file you supplied which has obviously expanded as I have added areas etc).

At the moment I have 'Region Id="1">
and then the distances

My questions are:
1. What do I need to do to add a second region? (I have tried copying the region 1 information and renaming to region 2)
2. What are the distances under region id for and how do they work?

Many thanks for any info you can supply.
cr1x
 
Posts: 33
Joined: 14 Jul 2010, 00:12

Re: map creating problems

Postby Kroah » 26 Jul 2012, 11:50

cr1x wrote:1. What do I need to do to add a second region? (I have tried copying the region 1 information and renaming to region 2)

You need to add another <Region> tag: Copy/Paste the region 1 and set the new Id to 2.
Then you need to add the distances to the new region.
In each <Region> tag, add a <Distance RegionId="X">DistanceValue</Distance> tag, where X is the Id of your new region, and DistanceValue the distance to the new region (see below).

You can see the distances as a 2D matrix where each cell is the distance between 2 regions.
Code: Select all
        region1 region2 region3
region1    0       2       4
region2    2       0       3
region3    4       3       0

Here, region2 is at a distance of 3 to region3 and vice versa.
In the Xml, this gives for region2:
Code: Select all
<region Id="2">
  [...]
  <Distances>
    <Distance RegionId="1">2</Distance>
    <Distance RegionId="2">0</Distance>
    <Distance RegionId="3">3</Distance>
  </Distances>
</Region>


cr1x wrote:2. What are the distances under region id for and how do they work?

Distance is used to determin the battle round a navy move is resolved.
A navy move from region2 to region3 will be executed at the battle round 4 (1+3).
For a distance of 0, then the move is executed at the first battle round.
FYI, there is a total of 9 battle rounds (1 to 9).
Kroah
Site Admin
 
Posts: 417
Joined: 07 Feb 2006, 01:01
Location: France

Re: map creating problems

Postby dizt3mp3r » 12 Aug 2012, 14:49

Kroah,

Cannot get the map editor to open any map at all. The drop down shows no maps.

The only thing different about my install is that the program files folder is not on C:

E:\Program Files\CoCoNet
dizt3mp3r
 
Posts: 78
Joined: 15 Nov 2011, 12:02

Re: map creating problems

Postby Kroah » 13 Aug 2012, 00:33

dizt3mp3r wrote:Kroah,

Cannot get the map editor to open any map at all. The drop down shows no maps.

The only thing different about my install is that the program files folder is not on C:

E:\Program Files\CoCoNet
Maps should be uncompressed to be loaded in the map editor.
For example, if you want to load the "Standard" map, you must unzip "Standard.zip" in the "Standard" folder. So you should have in your case :
E:\Program Files\CoCoNet\Custom Maps\Standard\map.xml (and the other files).
Kroah
Site Admin
 
Posts: 417
Joined: 07 Feb 2006, 01:01
Location: France

Re: map creating problems

Postby dizt3mp3r » 14 Aug 2012, 03:24

Unfortunately not doing very well with creating my first map.

I tried to create a scenario where there were more than 10 majors, (all the European majors plus abyssinia) and it failed on me as I believe there is a limitation of 10 majors?

I also tried to create my own version of Africa with more countries using photoshop and although my skills are good with PS I failed to make a map worthy of the game. Photoshop tool handling is poor at 1 pixel resolution, automatic stroked outlines around countries turned out blurry and I didn't fancy redrawing the outlines of all African countries by hand... I tried using a few visual effects to make the map look better and although they looked good initially, as soon as a country is taken by a major power then all my nice visual effects spoil the fill entirely so they have had to be removed. What I was left with was a map poorer than the original so I gave up.

Finally, tried to improve the visuals in flags.png but the original graphics are so poor, the size of the sprites being so small that it is hard to improve on anything. I may try again in a week or two when I feel more enthused.
dizt3mp3r
 
Posts: 78
Joined: 15 Nov 2011, 12:02

Re: map creating problems

Postby Christine » 14 Aug 2012, 11:04

I dont know if the game has an limit for the major powers, I have only created a scenario with 10 majors. But I will create another scenario and its planned to do it with more then 10 majors. So a limitation would be bad.


I have had the some problems with the pixel-tools in gimp too, but after 5 minutes of work I realised that I had to turn off the "smoth border" option from the painting tool. Its a kind of "funny" to use such professional gfx tools for pixeling some stupid 16 colour gfx. But after disabling all the options for "nice looking graphics" its possible to do some 16 colours work. Thats not the reason gimp was made for... ;-)

to improve the map is a really hard problem: the original game have had a maximum from 16 (?) colours, so any nice effects are impossible. Maybe its possible to do some fade-in/out effects with more then 1 refill tag per country, but if someone really wants to do this hard kind of work, its just senseless: while playing, a good looking map is just coloured in yours majors colour. So any conquerings in an nice looking map will make the map look choppy and inproperly.
Christine
 
Posts: 68
Joined: 31 May 2012, 11:04

editor crashes when saving

Postby dizt3mp3r » 14 Aug 2012, 16:25

Thanks for that Christine, appreciated. I will have to find out if the same non-blurring functionality exists within photoshop. I assume it does, I just need to find it. It is frustrating working with a tool that can do so much but forcing it to do so little... I would like to pretty the maps up a bit but I guess that isn't really possible with the way that coconet has to fill an occupied area with a solid colour. I could always start with the sea.

The map editor takes a little getting used to, it has it's own quirks in the way that it operates but it is definitely usable. I have had problems after saving where the map editor always crashes on the second save. During saving it creates a copy of the old xml file giving it a .bak suffix. When this file exists the editor crashes every time. If I delete the .bak file the editor is then able to save correctly.
dizt3mp3r
 
Posts: 78
Joined: 15 Nov 2011, 12:02

PreviousNext

Return to CoCoNet Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron