The renderer incorrectly assumes a building is on fire at the wrong health (of 256), and shows weakened buildings with a damage frame. The cutoff for when a building is weak vs damaged is map value 64, the Strength= value doesn't matter.
This tool is not sophisticated enough to differentiate between player and civ buildings and show damage frames based on condition yellow flag for players and 25% health for civ buildings like it does in RA2. It uses flat 50% to put damage frames for any building which is how it works in TS. RA2 only plays the fire anims for a short duration after which the fire anim ends and this tool always places all the fire anims when the health is less than 50%. Don't expect every detail that the game does to be replicated here, can't spend that much time. Will check if something can be done based on the number of frames that the buildings has, but that won't be the right approach so I am not inclined to proceed with it. QUICK_EDIT
The difference in health threshold isn't even between 'civilian & everything else', it is 'garrisonable & everything else'. Player-built garrisons like Battle Bunkers are bit of a special case, the damage frame comes in at ConditionYellow but the fires only pop up at ConditionRed. _________________ QUICK_EDIT
Yes, depending on CanBeOccupied and TechLevel being less than 1 or not, it is hardcoded for a health of 25% and 50%. For the remaining, it uses condition yellow for damaged frames in RA2. Will have to look into fire anims for confirmation on various cases when time permits.
Edit: Correction - When CanBeOccupied it set and TechLevel is less than 1, RA2 uses damaged frames at condition red otherwise it is at condition yellow. On fire is mostly at condition red but have seen construction yard burn at condition yellow itself. QUICK_EDIT
Uhm, Underwater is used purely for targeting purposes, it does not have a visual effect in-game. The 'dimming' effect, if you may call it that, is actually a result of the underwater units generally also being cloaked, which means they are drawn partially transparent, not darkened.
I went ahead and replaced your Underwater check with a more complete implementation of drawing of Cloakable objects, which extends to voxels as well. _________________ QUICK_EDIT
The problem with current translucency implementation is that the first object from the top (as map renderer draws from the top) is drawn perfect with transparency but the subsequent instances of the object become more opaque. For example, place a few squids on water and check its rendered image.
I was not satisfied with the dimming of the image but I couldn't spare more time, that is why I didn't do the same for voxels as well, to be left for another day. QUICK_EDIT
The problem with current translucency implementation is that the first object from the top (as map renderer draws from the top) is drawn perfect with transparency but the subsequent instances of the object become more opaque. For example, place a few squids on water and check its rendered image.
Not a fault with translucency itself, has ramifications beyond it and it only affected aircraft & vehicles.
Here's the problem: Every time UnitDrawable.Draw was called, it would re-add the subdrawables to the list - so for every nth instance of the unit on the map they would get drawn n times instead of just once. I just fixed this by moving the initialization code away from the Draw method in UnitDrawable, matching how it is done on other types such as BuildingDrawable. _________________ QUICK_EDIT
That fixes the translucency problem, but it was moved out because it was already re-computing local variables which breaks the SHP unit's facings specially 32 facing and its turret facings.
Similar problem is with TileLayer TileCollection (method InitAnimations) where the tile animation like the tunnel top offsets are read from the file and it gets added to itself by about 9 times when it is supposed to be used (Had put the commented code as ToDo in Map.cs).
Edit: Correction TileLayer to TileCollection (method InitAnimations). QUICK_EDIT
That fixes the translucency problem, but it was moved out because it was already re-computing local variables which breaks the SHP unit's facings specially 32 facing and its turret facings.
I don't really understand what you are trying to say. There's literally nothing there that warrants 're-computing' on every redraw. All the rules/art/shp/voxel stuff should only really need to be read once, and FrameDecider is what will determine the actual SHP frame to use using all that info.
Only difference regarding frames / facings after the change I could discern would be that the FrameDecider overrides from mod config actually get used rather than being reset due to everything being re-initialized before drawing, which means it is now working as intended. Of course if someone is using faulty calculations in their overrides, that isn't exactly a problem in the program code. _________________ QUICK_EDIT
When that segment of code which has framedecider for SHP unit and its SHP turret, is in UnitDrawable.LoadFromRules, it advances or gives higher frame number as if it has recomputed it multiple times which is not correct. But when the same code segment is in Draw method it gets correct frame number from the framedeciders.
If you want, I can share the test map of DTA mod which has typical cases of 32-facing units with and without turrets. QUICK_EDIT
When that segment of code which has framedecider for SHP unit and its SHP turret, is in UnitDrawable.LoadFromRules, it advances or gives higher frame number as if it has recomputed it multiple times which is not correct. But when the same code segment is in Draw method it gets correct frame number from the framedeciders.
If you want, I can share the test map of DTA mod which has typical cases of 32-facing units with and without turrets.
Gonna call BS on this. FrameDecider is not even called at this point, it just sets the reference here and only calls the referenced method in ShpRenderer.Draw. If you are getting different values due to that change, the problem exists elsewhere and moving the code to UnitDrawable.Draw is just a (rather dubious) bandaid fix.
Newest public version of DTA has FrameDecider override for vehicles in their mod config, which previously would (incorrectly) not get used at all but restoring the proper behaviour by moving the initialization code to UnitDrawable.LoadFromRules will make it apply, and it does not quite work out correctly. This is the exact problem I outlined in my previous post. _________________ QUICK_EDIT
That clears it out. I was not aware of the framedecider override of DTA, ended up spending several hours on that 32-facing feature. By removing the override from DTA's mod config, it works with your updated code. QUICK_EDIT
Sooo this is probably in the realm of request rather than bugfix...
The rendered map area has the "local" and "full" options, but the latter renders right past the normal game margins. I think it would be worth cropping the "full" limits by your average new map margins, it won't be 100% accurate 100% of the time, but it would be good enough? _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
Request:
add the option to have the Tube ID visible for the individual tubes at the entrances
so that I can later delete/modify them with more confidence than when I have to switch back and forth from FA2 to Notepad++ and back again. _________________ One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done.
Is it possible to have the base nodes visible in the preview or end image? _________________ One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done.
Changes (2019-11-08 ):
- Cloakable objects are semi-transparent and other fixes. (Credits: Starkku)
- Batch render and UI adjustments. (Credits: Metadorius)
- Updated Batch processing.
- FrameDecider override is disabled as it exposes code to mod config file.
- Improved IsoMapPack5 compression.
Attachment contains the updated map renderer and TSClient addon files to be copied into the tool folder. Updated source code.
Tiled start marker uses cell based computation, so odd/even numbers like 4x4 or 3x3 would appear differently centered. Other marker types use central pixel of the selected cell to compute. Try different marker type/size. QUICK_EDIT
Tiled start marker uses cell based computation, so odd/even numbers like 4x4 or 3x3 would appear differently centered. Other marker types use central pixel of the selected cell to compute. Try different marker type/size.
But it's a standard 4x4 starting position, and since this is the standard size, I would think a special case could be made to correct it -- if you insist on using a notional center for all sizes, 6x6 would be wrong similarly, so perhaps shift the even numbered sizes down? _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
One can place a waypoint at the center of a 3x3 area but there are 4 cells at the center of even numbered area like 4x4 or 6x6. Depending on which of the center cells get the waypoint, the center would look shifted in any of the 4 directions and 8 start locations in the same map could have the waypoints centered differently.
Much flexibility is already provided in the start location markers with 5 shape options and any size can be entered in the input field. Dropdown size values of 2 to 6 is for ease of use and setting restores those values when the application is restarted. Except the tiled type, others can use decimal values also. A single input field is used for all shapes, some shapes look larger than others so 0.6 value is deducted in the logic for shapes other that the tiled one. Just add 0.6 to get accurate decimal size value. Previewpack logic clears about 5 cell radius, so one should be careful if using higher size values when using Thumbnail injection.
If you want the 4x4 LAT pavement to be covered and don't want to use size 6, use like the Diamond shape and size value like 5.3 or 5.4. QUICK_EDIT
Logger should get messed up, probably NLog.config could be used to curtail logging. But checking thread safety for an application not designed by me is out of my comfort zone. I feel more than fine if it takes 5 minutes to process 200 maps without doing 100% CPU usage. QUICK_EDIT
A single input field is used for all shapes, some shapes look larger than others so 0.6 value is deducted in the logic for shapes other that the tiled one. Just add 0.6 to get accurate decimal size value. Previewpack logic clears about 5 cell radius, so one should be careful if using higher size values when using Thumbnail injection.
If you want the 4x4 LAT pavement to be covered and don't want to use size 6, use like the Diamond shape and size value like 5.3 or 5.4.
Changes (2019-11-24):
- Start location marker: Removed deduction of 0.6 from size of shapes other than Tiled.
- Start location marker: Reduced comparative size of square and circle shapes.
- Start location marker: Added star shape option.
Attachment contains the updated map renderer and TSClient addon files to be copied into the tool folder. Updated source code.
What's the difference between CNCMaps.Renderer.GUI.exe.config and gui_settings.xml files? The latter seems to be necessary for the GUI program to appear correctly. _________________ QUICK_EDIT
Application name followed by .config file is used for application specific settings to be taken from a file instead of compiling the application again just for setting changes. For this tool it contains the defaults already used during development and is generated by Visual Studio. It is not relevant, delete it if you don't want.
This tool uses a custom settings provider which allows gui_settings.xml file to be used for UI settings, so that when the application is restarted it will pickup the last used settings. On first run of this tool, if this file is not present in the tool folder or in user specific folder, then a user specific settings is generated with default values and stored in C:\Users\<username>\AppData\Local\CNCMaps folder. If this file is already present in the tool folder then it takes precedence and will be used instead of the user specific file. If an existing file which is not compatible with the latest version of the tool, can cause problems. You can make mod specific changes to the UI, place this file in the tool folder and distribute it along with the tool like the one in TSClientAddons folder. It is just an XML file, can be edited in any text editor. Remember to set the windowlocation setting to be small/default or remove that setting so that default values will be picked up, as all users may not have big displays. QUICK_EDIT
In recent versions if the gui_settings file is not present, the program won't start correctly (it appears in the task bar but no window is visible). _________________ QUICK_EDIT
Delete CNCMaps folder or its contents under C:\Users\<username>\AppData\Local\. Give admin permission to EXE so that it can create file. Then try. Then if you want, can copy the user specific file created to the tool folder for any distribution. It works fine for me with or without that file. QUICK_EDIT
Then if you want, can copy the user specific file created to the tool folder for any distribution. It works fine for me with or without that file.
I would, but won't that cause the TS client to whine about modified files every time someone uses the renderer?
Also, I see BIGBLUE3 still gets offset a few cells upwards of its actual location, any chance that could get fixed? Another, though much less important issue is Firestorm walls, which stay disconnected and inactive despite having power. _________________ QUICK_EDIT
Gui_settings.xml file is like sun.ini which stores the user preferences, it should be excluded from CRC check in TSClient/mods (version file).
BigBlue placement looks fine like the game, may be 1 pixel down which is barely noticable. FinalSun shows it more down.
Many features remain to be implemented adequately similar to the game like building foundation, ownerships/power calculation etc. on which other features depend. I couldn't get into those for lack of time. QUICK_EDIT
Somewhat related, is there any way for the renderer to modify the map itself by applying LAT to the crystal, mold and swamp tiles? I need to disable the engine's LAT function for those tiles, but that means they will look blocky in all maps that have them since that's how every FS mapper had to place them. _________________ QUICK_EDIT
Coding is done with rendering in mind and saving the LAT would bring unnecessary complication. May be the map snapshot from within the game could help you there. QUICK_EDIT
Is there a way to show grid lines and/or tubeIDs in the render? Or render preview? _________________ One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done.
Can get PNG and view it in image editors which can show grid lines. Getting TubeID is unlikely, a cell is too small for numbers like 127 and fonts may differ based on systems. QUICK_EDIT
Diagonal lines drawn on top of an image won't fit properly with deformations, cliffs, height differences etc.
Marble madness tiles can be extracted, renamed to original terrain files like clear01.tem and then packed into an extra mix file. If you make a modconfig.xml file, it can be kept with Map Renderer itself without affecting the game. QUICK_EDIT
Just because FA2 is a bitch in some ways, I just realized something that could be handy, optionally show "hidden" units, you could use the standard behind anim...
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum