Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Sat Nov 09, 2024 12:50 am
All times are UTC + 0
Improvements for the map editor
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [24 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
^Rampastein
Rampastring


Joined: 11 Oct 2008
Location: Gensokyo

PostPosted: Sat Sep 12, 2020 10:09 am    Post subject:  Improvements for the map editor Reply with quote  Mark this post and the followings unread

I have created a branch for improving the map editor. The branch will focus on improving the UI and usability of the map editor. I have no definite plan on how long I'm going to work on this project or what I'm exactly going to do; I'll just be improving stuff whenever I realize there's something that could be done better and I happen to get a spike of motivation for improving it.

Current features:

  • Downsized menu graphics by an user-configurable factor so you can see more placeable object types at once on sub-4K monitors
  • Improved zoom levels
  • Fixed a couple of crashes
  • Made tool windows remember their previous position, size and other settings upon closing and re-opening them
  • Replaced drop-downs with list boxes in object type selection dialogs to allow switching between objects with fewer clicks

I'll also accept pull requests that fit in the scope of the project.

DOWNLOAD v1.3: https://github.com/Rampastring/CnCTDRAMapEditor/releases/download/v1.3/CnCTDRAMapEditor.zip. To use, simply extract the file into a new folder and run CnCTDRAMapEditor.exe.

Downloads for all historical versions: https://github.com/Rampastring/CnCTDRAMapEditor/releases

Images:



_________________
CnCNet Client | CnCNet TS patches | More Quality-of-Life Improvements for RA Remastered


Last edited by ^Rampastein on Fri Oct 09, 2020 2:55 pm; edited 3 times in total

Back to top
View user's profile Send private message ModDB Profile ID Facebook Profile URL
^Rampastein
Rampastring


Joined: 11 Oct 2008
Location: Gensokyo

PostPosted: Wed Sep 16, 2020 8:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

Updated the description.

_________________
CnCNet Client | CnCNet TS patches | More Quality-of-Life Improvements for RA Remastered


Back to top
View user's profile Send private message ModDB Profile ID Facebook Profile URL
OmegaBolt
President


Joined: 21 Mar 2005
Location: York, England

PostPosted: Fri Sep 18, 2020 11:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

Got a crash when I clicked on the Overlay tab.



overlay.png
 Description:
 Filesize:  84.12 KB
 Viewed:  50572 Time(s)

overlay.png



Back to top
View user's profile Send private message Send e-mail
^Rampastein
Rampastring


Joined: 11 Oct 2008
Location: Gensokyo

PostPosted: Fri Oct 09, 2020 2:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

I pushed a likely fix for the crash with version 1.3. For some reason the crash doesn't happen to me so I haven't been able to test it.

_________________
CnCNet Client | CnCNet TS patches | More Quality-of-Life Improvements for RA Remastered


Back to top
View user's profile Send private message ModDB Profile ID Facebook Profile URL
Nyerguds
General


Joined: 24 May 2004
Location: Flanders (Be) Posts:300000001

PostPosted: Sun Dec 13, 2020 7:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

Here's another bug you could fix...

https://github.com/electronicarts/CnC_Remastered_Collection/blob/master/CnCTDRAMapEditor/TiberianDawn/GamePlugin.cs#L56
Or in your repo:
https://github.com/Rampastring/CnCTDRAMapEditor/blob/master/CnCTDRAMapEditor/TiberianDawn/GamePlugin.cs#L56

On the last game patch, they expanded multiplayer to 6 players. Someone must have misinterpreted that as "expanding the amount of possible players by 2", rather than "unlocking the real internal maximum of 6", and decided the map editor's amount of multiplayer starting points should also be increased... while that actually already went to the real internal amount of 6. So it's been increased to 8 now.

This in itself is wrong, but would be fairly harmless, had it been done correctly. The issue is that the game has a set of special singleplayer scripting waypoints at 25, 26 and 27 (respectively: flare pos, mission start pos, default dropoff pos), and whoever did the "+2" thing on the multiplayer starting point range forgot to decrease the amount of waypoints between those multiplayer starting point and the special ones at the end, causing the special waypoints to shift to 27, 28 and 29.

This causes real issues for making singleplayer missions, since the game still requires these special waypoints to be 25, 26 and 27, of course. Not only are they now indicated wrongly in the editor, but the editor actually checks if the "mission start location" waypoint (normally 26) is placed before it allows saving the mission, and now that's checked on the completely useless waypoint 28.

[edit]

It seems they actually "fixed" the issue in the github code, but the wrong way around; they changed the range on the in-between waypoints to Range(8, 17) instead. It's still messed up in the editor included in the game, though; it must have been built with that second line still set to Range(8, 19).

So, yea, the special waypoints are already correct in your current builds, but, for the sake of correctness, please fix that back to Range(0, 6), and the next line to Range(6, 19). The game can't handle more than 6 multiplayer players anyway.

_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
Nyerguds
General


Joined: 24 May 2004
Location: Flanders (Be) Posts:300000001

PostPosted: Sat Jan 02, 2021 5:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

Here's another one for you...

I believe the map editor for TD saves empty tiles as their actual tileset ID, meaning they end up as byte blocks "00 00" to "00 10". The original game's maps, however, all use an internal default of (-1, 0) as empty tiles, which translates to "FF 00" in the .bin file. (XCC Editor also makes this mistake, and the older CCMap uses "FF FF" for some reason.)

If you look at Red Alert, however, you'll see it correctly uses (-1, 0) for saving clear terrain (which translates to "FFFF 00" in the binary map format there)

It would be nice if this map editor actually saved the TD clear terrain as it is saved in the original game files.

_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
jonwil
Rocket Infantry


Joined: 24 Jul 2005

PostPosted: Wed Jan 06, 2021 3:47 am    Post subject: Reply with quote  Mark this post and the followings unread

How does the internal WW map editor save these empty tiles?

Back to top
View user's profile Send private message
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Wed Jan 06, 2021 1:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

@Rampastring:

Vanilla Conquer has just merged my pull request with the mega maps code for Tiberian Dawn. I did try and implement support for this in the Remastered Map Editor when the source code released, but I was unable to get it loading the maps correctly.

On load, I checked for the new INI key to decide what map type to load, and on new map I just had a checkbox option.

I have attached a map I created in this format using Vanilla Conquer. Perhaps you might be more sucessfull at implementing support if you find the time.

https://github.com/TheAssemblyArmada/Vanilla-Conquer/commit/05eb91f5e78502b5be244c22200ce58c63e6b9f2



BreakingGrounds_MegaMap_Temperate.zip
 Description:

Download
 Filename:  BreakingGrounds_MegaMap_Temperate.zip
 Filesize:  2.1 MB
 Downloaded:  30 Time(s)


Last edited by CCHyper on Thu Jan 07, 2021 6:03 pm; edited 1 time in total

Back to top
View user's profile Send private message
Blade
Cyborg Commando


Joined: 23 Dec 2003

PostPosted: Thu Jan 07, 2021 1:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

jonwil wrote:
How does the internal WW map editor save these empty tiles?


It saves all tiles belonging to the clear set to -1 with the tile index of 0 as nyerguds states because this is how blank tiles are initialised and stored within the in game data structures for the map.

Back to top
View user's profile Send private message
EGG
Civilian


Joined: 06 Sep 2020

PostPosted: Tue Jan 19, 2021 10:00 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi CCHyper

I'm curious on your Mega Maps support, I'd been thinking about trying to build support for larger maps into the remastered code, but it seems you've already done so. Does the revamped code support sizes up to 128 provided the MegaMap config is in the ini file? Are there any ramifications from the increased size? E.g. minimap, Nod transport aircraft, Gunboats.

Would you mind if I ported the code to my AI mod and gave credit for it?

Back to top
View user's profile Send private message
Nyerguds
General


Joined: 24 May 2004
Location: Flanders (Be) Posts:300000001

PostPosted: Fri Jan 22, 2021 10:05 am    Post subject: Reply with quote  Mark this post and the followings unread

EGG wrote:
Hi CCHyper

I'm curious on your Mega Maps support, I'd been thinking about trying to build support for larger maps into the remastered code, but it seems you've already done so. Does the revamped code support sizes up to 128 provided the MegaMap config is in the ini file? Are there any ramifications from the increased size? E.g. minimap, Nod transport aircraft, Gunboats.

Would you mind if I ported the code to my AI mod and gave credit for it?

His upgrade was done not on the remaster itself, but on a reimplementation of the original game using the released code. I'm not sure if the GlyphX engine won't have any hardcoded issues with regards to the maximum expected size of TD maps.

_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
Blade
Cyborg Commando


Joined: 23 Dec 2003

PostPosted: Fri Jan 22, 2021 11:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

There are undocumented XML flags that need to be set for it to work correctly in the remaster which CCHyper provided. I need to add proper documentation for using it to the Vanilla Conquer wiki once we get one up.

<?xml version="1.0"?>
<GameConstants>
   <GameConstantsClass>
       <CNCTDSupportMegamaps network="client" overwrite="true"> true </CNCTDSupportMegamaps>
   </GameConstantsClass>
</GameConstants>

As an aside, we are mostly focused on developing the standalone aspect of Vanilla Conquer at the moment, but it would be great if more people were trying our code with the remasters and reporting bugs.

Back to top
View user's profile Send private message
EGG
Civilian


Joined: 06 Sep 2020

PostPosted: Mon Feb 01, 2021 10:27 am    Post subject: Reply with quote  Mark this post and the followings unread

I went through and added support for 128x128 TD maps to Rampastrings code. I can't get it to load the example mission CCHyper uploaded. It will parse the ini successfully, but doesn't like something it finds when it moves onto the bin file.

However it seems ok with creating/saving/opening 128x128 or 64x64 files where the binary has come from the TDRA editor.

E.g. this 128 test map that was thrown together: https://imgur.com/puVF3Lo

Code is here: https://github.com/screamingchicken/CnCTDRAMapEditor

A compiled release is here (I think I've included all the DLL's needed, Rampastrings has a lot more): https://github.com/screamingchicken/CnCTDRAMapEditor/releases/

I haven't put a pull request across to Rampastring's repo yet as frankly this is the first C#/.Net project I've worked on. I'll put one through if no-one seems to think the code is terrible.

On compiling Rampastrings code;

a) VS2017 needs JSON, Pfim and System.ValueTuple packages
b) It possibly needs the NETStandard package
c) It needs the .csproj file modified to add the following line alongside the References:
<Reference Include="netstandard" />
d) The EA/Petro code has no comments, unless they're hidden in some way.
e) I swear in an earlier version of the TDRA map editor, RA had the possibility to set map size on creation, but I couldn't find any legacy handling for that which could be re-used.

Back to top
View user's profile Send private message
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Tue Feb 02, 2021 12:41 am    Post subject: Reply with quote  Mark this post and the followings unread


Back to top
View user's profile Send private message
EGG
Civilian


Joined: 06 Sep 2020

PostPosted: Thu Feb 04, 2021 9:42 am    Post subject: Reply with quote  Mark this post and the followings unread

So I found a cncnet forum post with unsurprisingly, most of the same names from this thread, discussing the sole survivor binary format in 2014 and went from there.

It now uses that format when saving/opening 128x128 maps and can open BreakingGrounds and save it again after map alterations. I tried several of the sole survivor maps with the MegaMap=1 flag added and they were fine also.

64x64 maps still use the old binary format, and there is a flag in TiberianDawn.Constants.cs if ever someone wants to revert to saving 128 maps in the 64 binary format.

I've re-uploaded the compiled version to here: https://github.com/screamingchicken/CnCTDRAMapEditor/releases/

If anyone's able to have a quick look at it (I don't know what we have that can load 128x128 maps at the moment?), that would be helpful.

Back to top
View user's profile Send private message
Blade
Cyborg Commando


Joined: 23 Dec 2003

PostPosted: Thu Feb 04, 2021 3:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

The code as implemented in Vanilla Conquer checks for Version=1 rather than MegaMap=1 which is what sole survivor checked to decide which format to load. CCHypers original mod was going to use MegaMap=1 but that was never released and I decided to stick with what sole survivor used for future compatibility with that games data.

Great to hear support has been added for the format, when I get chance I'll build the editor and check it out. Builds of https://github.com/TheAssemblyArmada/Vanilla-Conquer will load megamaps so long as the ini has the correct key set as discussed above.

Back to top
View user's profile Send private message
EGG
Civilian


Joined: 06 Sep 2020

PostPosted: Fri Feb 05, 2021 3:41 am    Post subject: Reply with quote  Mark this post and the followings unread

I've updated the code and compiled release to use that ini key rather than MegaMap=1.

I'm curious, have you guys given any thought to map sizes larger than 128x128, or would TD be even less likely to be happy with those?

Back to top
View user's profile Send private message
Blade
Cyborg Commando


Joined: 23 Dec 2003

PostPosted: Mon Feb 08, 2021 3:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

The code makes assumptions that certain datatypes underlie cell numbers and coords so I'm not 100% sure how much work it would be to increase it further, especially since those data types are also assumed to be different from a function overloading POV. IMO 128x128 maps feel pretty large as is though.

Back to top
View user's profile Send private message
Nyerguds
General


Joined: 24 May 2004
Location: Flanders (Be) Posts:300000001

PostPosted: Wed Mar 10, 2021 1:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

Some very simple requests:

-Add Drag & Drop for opening maps.
-Add classic shortcuts ([Ctrl]+N, [Ctrl]+O, [Ctrl]+S) to the File menu.
-If a map is opened from a custom folder, open the Open menu in that folder again, rather than defaulting to the folder under Documents of the opened map type.
-When holding [Shift] in Waypoints and Celltrigger mode, actually give a half-transparent preview of what to place down, like it is done with the other types.
-Just like how units or structures get detail info when double-clicked, it would be nice if in Celltrigger mode, double-clicking a celltrigger opens the Triggers list with that trigger selected for editing.
-Make it so placing down the Clear cell actually clears the terrain (identical to shift+leftclick), rather than placing down that one specific cell. Clear is actually a full 4x4 block anyway, and it's not possible to specifically place any of its other cells.

Bugs I noticed:
-There's a strange smaller "ghost frame" visible when you click on the terrain tile to select a single cell from it
-Units can't be placed on the impassable cells of structures, even if the structure is only on the Rebuild list and is unbuilt from the start.
-If you open a scenario where the above situation exists, the structure seems to be terminally bugged. You can't double-click the structure to open its settings, but you also can't remove it.
-Overlap of structures is actively blocked for no good reason, and they are removed on scenario load. Open the Covert Ops "Infiltrated" (scg36ea) to have an example of this messing up an official scenario. This scenario also has the above "unit on unbuilt structure" issue, on the west power plant in the enemy base.

_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
chimas
Civilian


Joined: 21 Mar 2021

PostPosted: Sat Mar 27, 2021 12:27 am    Post subject: Re: Improvements for the map editor Reply with quote  Mark this post and the followings unread


Back to top
View user's profile Send private message
Crash
Cyborg Commando


Joined: 30 Jan 2007
Location: Norway

PostPosted: Tue Mar 30, 2021 7:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

Great quality improvements there! Makes mapping a little less time-consuming and even more fun. Smile

Back to top
View user's profile Send private message
Nyerguds
General


Joined: 24 May 2004
Location: Flanders (Be) Posts:300000001

PostPosted: Thu May 27, 2021 9:35 am    Post subject: Re: Improvements for the map editor Reply with quote  Mark this post and the followings unread

chimas wrote:
Hi,
https://drive.google.com/file/d/1kUHuGeRqBdHi3o33qAd-VwzVCgkz35XG/view

The developers wants us to add a waypoint 28 (home) to a map.
In the stock game editor, this warning doesn't show up, but in your editor it does.
I might not be entirely right.

The stock editor is wrong. Home is 26, not 28. The editor somehow expanded the amount of multiplayer waypoints for C&C1 from 6 to 8, which the game can't handle at all, and it messed up the special waypoints that come at the end.

_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
yuri624
Civilian


Joined: 24 Aug 2021

PostPosted: Fri Sep 03, 2021 3:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

^Rampastein wrote:
I pushed a likely fix for the crash with version 1.3. For some reason the crash doesn't happen to me so I haven't been able to test it.


I get the same crash as OmegaBolt.
Crashes on TD maps with Temperate + Winter themes and on RA maps with Temperate theme.

Back to top
View user's profile Send private message
Nyerguds
General


Joined: 24 May 2004
Location: Flanders (Be) Posts:300000001

PostPosted: Mon Jul 11, 2022 5:45 pm    Post subject: Reply with quote  Mark this post and the followings unread


_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [24 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
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


Powered by phpBB © phpBB Group

[ Time: 0.2592s ][ Queries: 14 (0.0135s) ][ Debug on ]