Skip to content

Commit

Permalink
Merge pull request #1 from cvaughn55/master
Browse files Browse the repository at this point in the history
Added new map.csv, new temp icon, and removed PHP program
  • Loading branch information
TomArrow authored Sep 9, 2018
2 parents c063d52 + 8a69e94 commit 5a3838f
Show file tree
Hide file tree
Showing 17 changed files with 67 additions and 129,461 deletions.
42 changes: 12 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This is a new fork trying to make that old code actually work.
The current state is: Some maps work, some don't. Some crash on load, others crash on starting a new round. Some are missing items. Others work pretty ok.

Here's a rundown of changes to the original code made so far (details follow after):
- Used tag_list.csv from 0.5.1.1 and 0.6 to generate a map.csv that maps old tag IDs to new ones by correlating the second column (which in the case of 0.6 is the name). This was done with PHP code, which is included under php/mapforgeitems
- ~~Used tag_list.csv from 0.5.1.1 and 0.6 to generate a map.csv that maps old tag IDs to new ones by correlating the second column (which in the case of 0.6 is the name). This was done with PHP code, which is included under php/mapforgeitems~~ Used a list of tags generated by adding a large number of maps to this program. Manually compared to 0.6 to create map.csv
- Loaded this csv with some code from https://github.com/ElDewrito/ForgeMapFixer into a Dictionary and made the code update old tags where necessary
- Added a scrollable TextBlock element for debugging output, helpful for development
- Updated the Canvas folder with new maps from 0.6 that had everything (including emergency spawns) stripped from them, leaving only a map options with disabled barriers and a single spawn
Expand All @@ -15,14 +15,14 @@ Here's a rundown of changes to the original code made so far (details follow aft
Here's some more details:

## map.csv
Okay so, 0.6 includes a tag_list.csv, which correlates tag ids (4-digit hex codes) with some kind of object names. This looks like this:
` 0x00002E90,objects\multi\spawning\respawn_point `
~~Okay so, 0.6 includes a tag_list.csv, which correlates tag ids (4-digit hex codes) with some kind of object names. This looks like this:
0x00002E90,objects\multi\spawning\respawn_point~~

This file is included here under php/mapforgeitems/0.6.csv
~~This file is included here under php/mapforgeitems/0.6.csv~~

I was given a similar csv file for 0.5.1.1, included here in the same folder as the other one as 0.5.1.1.csv.
~~I was given a similar csv file for 0.5.1.1, included here in the same folder as the other one as 0.5.1.1.csv.~~

What I did in PHP was to correlate the second column to create a map from old tag ids to new ones. You can read the exact code yourself, it's not too complicated.
~~What I did in PHP was to correlate the second column to create a map from old tag ids to new ones. You can read the exact code yourself, it's not too complicated.~~

I generated a resulting map.csv, which looks like this:
``` 0001,
Expand Down Expand Up @@ -58,30 +58,10 @@ The converter does inform you about whenever an object is ditched or when a tag
### The problem with the map.csv
The problem is, the automatic generation of that list is not perfect. E.g. I've been told some objects have kept the same tag ID from 0.5.1.1 to 0.6, but they were named (while they weren't named before).

Also, the 0.6 list does not seem to contain unnamed objects at all, which led the auto-generator to conclude the object doesn't exist in 0.6, while it very well may.

**For example**:
`` 0x0000444C,0x444C``

This line is from the 0.5.1.1 csv, but the 4444C hex code does not appear in the 0.6 csv. Yet I've been told that this object still exists. (have not personally verified)

**Second example**:

`` 0x00004DF8,objects\levels\dlc\bunkerworld\drum_55gal_bunker\drum_55gal_bunker ``
This is the line from the 0.6 csv.

`` 0x00004DF8,0x4DF8 ``
And this is the line from the 0.5.1.1 csv.

Again I've been told the tag index stayed the same, yet now it is named. But my auto-generator cannot automatedly recognize that.

**Third example**:
```0x00004E20,objects\levels\dlc\warehouse\bridge\bridge 0x00004E21,objects\levels\dlc\warehouse\bridge\bridge 0x00004E22,objects\levels\dlc\warehouse\bridge\bridge```

As you can surely tell, all the names are identical, yet there may be differences between the objects. It's not a problemwhen the tag hasn't changed (I just use the same one then), but when it *has* changed, how to tell which one is the new one?
**Update** A hand made list has been made that is estimated 75-90% correct, but not exact. The PHP script was not used, hence the examples from it are removed

### The challenge regarding the map.csv
Obviously, some amount of handiwork will have to be invested to find and fix errors in the map.csv. Until then, some objects just won't transfer properly. And I suspect that problems with this map.csv may also be responsible for some converted maps crashing.
Obviously, some amount of handiwork will have to be invested to find and fix errors in the map.csv. Until then, some objects just won't transfer properly. And I suspect that problems with this map.csv may also be responsible for some converted maps crashing. If you want to help report any map that crashes when trying to load after convert to the Issues page on github or through a DM to Cvaughn55#3841 on Discord.

## Updated canvas maps

Expand Down Expand Up @@ -180,10 +160,12 @@ To give some hope, here's screenshots taken in ElDewrito 0.6 of 0.5.1.1 maps tha
### What doesn't work
- Some maps crash upon loading, reason is unknown
- Some maps crash upon starting a new round in Forge, reason is unknown
- Some object types (tag ids) don't transfer. Maps that use a lot of such objects will come out pretty useless. **This should be fixable with a moderated map.csv.**
- Some object types (tag ids) don't transfer. Maps that use a lot of such objects will come out pretty useless. **This should be fixable with a moderated map.csv.(very few items dont tranfer as of new update)**
- Some objects have been removed from the game and are impossible to convert, so they get deleted
- Crate, Multi and the breakable variant do not retain phased properties when converted

### What may or may not work (not really tested)
- Timers on maps seem to somewhat work, but further tests are needed to see how reliably
- Timers on maps seem to somewhat work. One map has been tested with no timer issues.

## Possible further complications / challenges
From what I hear, 0.5.1.1 had a few mods available for Forge that extended its capabilities, and also mods for the general game that seemed to have included tag changes and been relatively popular.
Expand Down
Binary file added UsermapConverter/Converter.ico
Binary file not shown.
15 changes: 6 additions & 9 deletions UsermapConverter/UsermapConverter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,16 @@
<PropertyGroup>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Converter.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Expression.Interactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\Microsoft.Expression.Interactions.dll</HintPath>
</Reference>
<Reference Include="PresentationFramework.Aero" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Presentation" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
Expand Down Expand Up @@ -452,7 +447,9 @@
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Resource Include="Converter.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Expression\Blend\.NETFramework\v4.0\Microsoft.Expression.Blend.WPF.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
Loading

0 comments on commit 5a3838f

Please sign in to comment.