Landscape clone ???

Post bug reports and ask for tech support here. Post any Community Site Requests here as well.

Moderator: Vic

Post Reply
User avatar
nicodede62
Posts: 194
Joined: Fri Jan 04, 2008 2:22 pm
Location: France

Landscape clone ???

Post by nicodede62 »

Hello,

I a problem with editor from landscapes.

When I make a clone of a type of land (for example, plain), the transparency disappears and the plain is cut into hexagon.

Normaly landscape plains:

Image

Copy of plains:

Image

Why transparency disappears when I place the new plain ????
And, I have a crash with the game if I want to change the prehex sprite.
************** Texte de l'exception **************
System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
à WindowsApplication1.LandscapeTypeWindowClass.HandleMouseClick(Int32 x, Int32 y, Int32 b)
à WindowsApplication1.MainEditScreenClass.HandleMouseClick(Int32 x, Int32 y, Int32 b)
à WindowsApplication1.Form1.Form1_Mousedown(Object sender, MouseEventArgs e)
à System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e)
à System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
à System.Windows.Forms.Control.WndProc(Message& m)
à System.Windows.Forms.ScrollableControl.WndProc(Message& m)
à System.Windows.Forms.ContainerControl.WndProc(Message& m)
à System.Windows.Forms.Form.WndProc(Message& m)
à WindowsApplication1.ImmoveableForm.WndProc(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Assemblys chargés **************
mscorlib
Version de l'assembly : 2.0.0.0
Version Win32 : 2.0.50727.3623 (GDR.050727-3600)
CodeBase : file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
WindowsApplication1
Version de l'assembly : 1.0.4208.18703
Version Win32 : 1.0.4208.18703
CodeBase : file:///C:/Matrix%20Games/Advanced%20Tactics%20Gold/AdvancedTacticsGold.exe
----------------------------------------
System.Windows.Forms
Version de l'assembly : 2.0.0.0
Version Win32 : 2.0.50727.3623 (GDR.050727-3600)
CodeBase : file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Version de l'assembly : 2.0.0.0
Version Win32 : 2.0.50727.3620 (GDR.050727-3600)
CodeBase : file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Version de l'assembly : 2.0.0.0
Version Win32 : 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase : file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.VisualBasic
Version de l'assembly : 8.0.0.0
Version Win32 : 8.0.50727.3053 (netfxsp.050727-3000)
CodeBase : file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System.Configuration
Version de l'assembly : 2.0.0.0
Version Win32 : 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase : file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Version de l'assembly : 2.0.0.0
Version Win32 : 2.0.50727.3082 (QFE.050727-3000)
CodeBase : file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
ICSharpCode.SharpZipLib
Version de l'assembly : 0.84.0.0
Version Win32 : 0.84.0.0
CodeBase : file:///C:/Matrix%20Games/Advanced%20Tactics%20Gold/ICSharpCode.SharpZipLib.DLL
----------------------------------------
mscorlib.resources
Version de l'assembly : 2.0.0.0
Version Win32 : 2.0.50727.3623 (GDR.050727-3600)
CodeBase : file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
irrKlang.NET
Version de l'assembly : 1.3.0.0
Version Win32 : 1, 1, 0, 0
CodeBase : file:///C:/Matrix%20Games/Advanced%20Tactics%20Gold/irrKlang.NET.DLL
----------------------------------------
System.Windows.Forms.resources
Version de l'assembly : 2.0.0.0
Version Win32 : 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase : file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_fr_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------

************** Débogage JIT **************
Pour activer le débogage juste-à-temps (JIT), le fichier de configuration pour cette
application ou cet ordinateur (machine.config) doit avoir la valeur
jitDebugging définie dans la section system.windows.forms.
L'application doit également être compilée avec le débogage
activé.

Par exemple :

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

Lorsque le débogage juste-à-temps est activé, les exceptions non gérées
seront envoyées au débogueur JIT inscrit sur l'ordinateur
plutôt que d'être gérées par cette boîte de dialogue.




- Pour l'Empereur -
Image
User avatar
Ormand
Posts: 835
Joined: Tue Feb 17, 2009 1:31 am

RE: Landscape clone ???

Post by Ormand »

The reason for the loss of "transparency" is that you have to go to the forest landscape and add your new plain to the graphic overrides list for the 64 graphic "edges". The "edges" are a mostly transparent image that is put on top of the adjacent hex. For greater control, it is set up so that you can chose which terrain types will go over others.

I am not sure about the other one. I haven't had that pop up for me yet. However, if you have a lot of terrain types it does seem that you can run out of memory and get errors that way. I recently replaced most of the graphics, including the urban hexes, and found that it was rather difficult to add a new terrain type. I would get an out of error memory when I tried to replace the sprite, and sometimes when I tried to use the landscape. Since my new urban hexes are not regime specific, I went through and deleted all the "extras", and things are working better.
One man alone can be pretty dumb sometimes, but for real bona fide stupidity, there ain't nothin' can beat teamwork -- Edward Abbey
User avatar
Vic
Posts: 9931
Joined: Mon May 17, 2004 2:17 pm
Contact:

RE: Landscape clone ???

Post by Vic »

@Nicode2,

Thanks for reporting that bug.
It will be fixed in v2.09. (v2.08 has already been sent to matrix)

In the meantime a work around for this is to create the landscape clone , save scenario, exit to main menu, load the scenario, change the prehex picture.

@Ormand,
Thanks for explaining the graphic issue.
And if you ever find a repeatable sequence of actions that causes your memory loss errors send me your scenariofile + actions to vic@xs4all.nl
i'll then take another look if i can find the cullprit.

best,
Vic


Best,
Vic
Visit www.vrdesigns.net for the latest news, polls, screenshots and blogs on Shadow Empire, Decisive Campaigns and Advanced Tactics
User avatar
nicodede62
Posts: 194
Joined: Fri Jan 04, 2008 2:22 pm
Location: France

RE: Landscape clone ???

Post by nicodede62 »

Hello,

@Vic,
No problem, even if the editor is very hard to understand for a french, it's a real pleasure for modders.

@Ormand,
Thank you for the help, it solved my problem.
- Pour l'Empereur -
Image
User avatar
Ormand
Posts: 835
Joined: Tue Feb 17, 2009 1:31 am

RE: Landscape clone ???

Post by Ormand »

@Nicodede62.
My pleasure to be able to impart something I learned about this.

@Vic,
Three things:
1) Not being able to read French, I am not sure if this reported problem is the same as I am seeing now (with 2.07) where I can't change the prehex image for some of the terrains (about half). I get an error "object reference not set to an instance of an object". The odd thing is that it happens for a subset of terrains. I think the full list is: mud borders, snow borders, desert borders, fields mud,swamp mud, urban mud, swamp borders, forest pine snow, swamp snow, low mountain snow (not high mountain snow), urban+suburban+capitol snow, desert low mountain, desert high mountain, desert urban+suburban+capitol, and paddies. It seems to happen to the generic.at2 file without changes as well. And saving doesn't help. This seems to be relatively new. It didn't seem to be an issue in the earlier versions because I was able to change most of these terrains before, and ran into this problem when I tried to start over to add all the terrains. So, now I can't finish the replacements, which I would like to finally do next week, and move on to playing.
2) The out of memory problem is probably due to me trying to be OVERLY ambitious on the edges. Trying to get as much variety in the edges, I made a set of files with seven different edges for each file. Thinking of this, I realized that this would consume 7 times the memory, which must be considerable since there are now 64x7+7 sprites for each terrain type instead of 64x1+7. So, I switched to fewer images far each terrain except sea, where repetition stands out much more. So far, this seems to have cured that problem. I confess that I wanted to use two images per edge, but I was very bad at the repetition in saving files in gimp, so I kept finding mistakes in 11 different terrain types (I don't know how I did it two months ago with 7 images per). Anyway, it was clearly just easier to move to the Fred sprite sheets, which makes it really easy!
3) I presume you saw the other post about adding road types, where there is an error using the 64 sprites on the 2nd (or more added road).
One man alone can be pretty dumb sometimes, but for real bona fide stupidity, there ain't nothin' can beat teamwork -- Edward Abbey
User avatar
Ormand
Posts: 835
Joined: Tue Feb 17, 2009 1:31 am

RE: Landscape clone ???

Post by Ormand »

Vic,
Maybe I should start this as a new thread. Ran into a problem with the Mountains terrain (now in 2.08). I was noticing that after I added the 64 edge sprites, I was having a hard time getting the edge sprites to show up, so I figured this might be due to the fact that it has the OverisTop box checked. So, I unchecked it, and I get an error, which occurs when I leave the landscape editor and go back to the map (error is posted below). But, I went further to try and track down where and how it happens. In my first application, I had already removed the OverisTop image by replacing it with the transparent png and replaced all the other images before I tried to uncheck the OverIsTop box. Anyway, I backed up, went to the generic.at2 file to start over, and first unchecked the OverIsTop box, and no crash. I then replaced the OverIsTop graphic with a transparent image, no problem. I then replaced the main images with my mountains, still ok. It was when I loaded the edge sprites from a Fred SpriteSheet that I received the error. I don't know if I am supposed to check, uncheck something else, but I get an error complaining that the image is null, with the details being:

System.ArgumentNullException: Value cannot be null.
Parameter name: image
at System.Drawing.Graphics.DrawImage(Image image, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit)
at WindowsApplication1.DrawMod.DrawSimplePart2(Graphics& objGraphics, Bitmap& objBitmap, Rectangle srcrect, Rectangle destrect)
at WindowsApplication1.CustomBitmapClass.DrawHex(Int32 cx, Int32 cy, Int32 cmap, Boolean InfoMode, Boolean NoShader, Boolean ispredrawing, Graphics tempg, Int32 tx, Int32 ty, Int32 counteralpha, Int32 Zoom, Boolean UseRegimeColoring, Boolean neverusehistory)
at WindowsApplication1.MapPartClass.Paint()
at WindowsApplication1.MapWindowClass..ctor(GameClass& tGame, Int32 tminheight, Int32 tminwidth, Int32 tZoomLevel)
at WindowsApplication1.MainEditScreenClass.HandleMouseClick(Int32 x, Int32 y, Int32 b)
at WindowsApplication1.Form1.Form1_Mousedown(Object sender, MouseEventArgs e)
at System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at WindowsApplication1.ImmoveableForm.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5446 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
WindowsApplication1
Assembly Version: 1.0.4237.20726
Win32 Version: 1.0.4237.20726
CodeBase: file:///C:/Matrix%20Games/Advanced%20Tactics%20Gold/AdvancedTacticsGold.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5446 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5447 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
ICSharpCode.SharpZipLib
Assembly Version: 0.84.0.0
Win32 Version: 0.84.0.0
CodeBase: file:///C:/Matrix%20Games/Advanced%20Tactics%20Gold/ICSharpCode.SharpZipLib.DLL
----------------------------------------
irrKlang.NET
Assembly Version: 1.3.0.0
Win32 Version: 1, 1, 0, 0
CodeBase: file:///C:/Matrix%20Games/Advanced%20Tactics%20Gold/irrKlang.NET.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


One man alone can be pretty dumb sometimes, but for real bona fide stupidity, there ain't nothin' can beat teamwork -- Edward Abbey
Post Reply

Return to “Advanced Tactics Support”