Skip to content

Commit

Permalink
Merge pull request #2 from Mappalachia/development
Browse files Browse the repository at this point in the history
1.0.1.0 - Next Gen Update and new cells
  • Loading branch information
AHeroicLlama committed Apr 25, 2024
2 parents 87a6b19 + 4bed430 commit b6eaaf3
Show file tree
Hide file tree
Showing 20 changed files with 67 additions and 59 deletions.
2 changes: 1 addition & 1 deletion BackgroundRenderer/BackgroundRenderer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Data.Sqlite" Version="7.0.9" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="8.0.4" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
3 changes: 2 additions & 1 deletion CommonwealthCartography/Class/Database.cs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,8 @@ public static List<MapDataPoint> GetNPCCoords(string npc, string spaceFormID, do
{
coordinates.Add(new MapDataPoint(reader.GetInt32(0), reader.GetInt32(1), reader.GetInt32(2))
{
weight = reader.GetFloat(3),
// Weight in DB and UI is presented as 1-100%, but weights on-map should be 0-1 to represent the expected count of the NPC
weight = reader.GetFloat(3) / 100f,
});
}

Expand Down
7 changes: 0 additions & 7 deletions CommonwealthCartography/Class/IOManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,6 @@ public static void Cleanup()
public static Image GetImageForSpace(Space space)
{
string editorID = space.editorID;

// Temp hack while fo76utils is unable to render worldspaces without terrain
if (editorID == "Goodneighbor" || editorID == "DLC03VRWorldspace" || editorID == "NukaWorldMarket")
{
return EmptyMapBackground();
}

string filePath = imgFolder + (space.IsWorldspace() ? string.Empty : "\\cell\\");
string fileName = editorID + MapFileExtension;

Expand Down
4 changes: 2 additions & 2 deletions CommonwealthCartography/CommonwealthCartography.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@

<ItemGroup>
<PackageReference Include="Microsoft.Data.Sqlite">
<Version>7.0.9</Version>
<Version>8.0.4</Version>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Svg" Version="3.4.4" />
<PackageReference Include="Svg" Version="3.4.7" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions CommonwealthCartography/Form/FormMaster.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion CommonwealthCartography/Form/FormMaster.resx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
Expand Down
6 changes: 3 additions & 3 deletions CommonwealthCartography/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
Expand Down Expand Up @@ -35,6 +35,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: NeutralResourcesLanguage("en-US")]
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.3.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion Database/gameVersion.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version
1.10.163.0
1.10.980.0.1
56 changes: 29 additions & 27 deletions Database/summary.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
==Database name==
commonwealth_cartography.db
==SQLite version==
3.42.0 2023-05-16 12:36:15 831d0fb2836b71c9bc51067c49fee4b8f18047814f2ff22d817d25195cf350b0
3.45.3 2024-04-15 13:34:05 8653b758870e6ef0c98d46b3ace27849054af85da891eb121e9aaa537f1e8355 (64-bit)
==Checksum==
6ca6d4065d21efe0d92c13c7f7cb8d85
db93a7de4ded1632ef635929e061d179
==File Size==
211533824
211542016
==Tables==
Entity_Info Map_Markers Region Standard_Search
Game_Version NPC_Search Scrap_Search
Expand All @@ -14,9 +14,9 @@ Lock_Levels Position_Data Space_Info
Index_PositionData_CoverAll Index_ScrapSearch_CompMagSpace
Index_PositionData_SpaceXYZ Index_StandardSearch_RefSpace
==Game Version==
1.10.163.0
1.10.980.0.1
==Mean Average X/Y/Z Coord==
-3.79508283211987|178.841153624905|1353.98640511663
-3.43547987240239|179.449286305496|1353.99028835402
==Min/Max X/Y/Z Coord==
-213381|316690|-235522|169181|-141089|27662
==100 most common xyz coordinates + count==
Expand Down Expand Up @@ -123,17 +123,17 @@ Index_PositionData_SpaceXYZ Index_StandardSearch_RefSpace
==Z outliers==
49
==Average X Bounds Width==
11.9332997489111
11.9336403950919
==Average Y Bounds Width==
9.21865047352901
9.2190217554712
==Average Z Bounds Width==
7.53328488553498
7.5335862744642
==Average Z Rotation==
2.02934779278865
2.02944241570882
==Average display name string length==
2.75597674658594
2.92347114260164
==Average editorID string length==
22.3343194248564
22.3350416179404
==Map Markers==
Commonwealth|AirfieldMarker|Boston Airport|48074|-3332
Commonwealth|AirfieldMarker|Skylanes Flight 1665|-64854|-125006
Expand Down Expand Up @@ -551,7 +551,7 @@ NukaWorld|TownRuinsMarker|Nuka-Town USA|596|-21444
NukaWorldAmphitheater|PackMarker|Bradberton Amphitheater|-2883|-18843
NukaWorldMarket|TownRuinsMarker|Nuka-Town Market|478|-18702
==Total Unique entities==
29065
29068
==Regions==
Space|Region|subRegions|maxVerts
Commonwealth||1|5
Expand Down Expand Up @@ -732,8 +732,8 @@ CombatZone01||2409
CombatZone01|Box|77
CombatZone01|Line|2
CombatZone01|Plane|7
Commonwealth||707759
Commonwealth|Box|6542
Commonwealth||707770
Commonwealth|Box|6543
Commonwealth|Line|21
Commonwealth|Plane|18
Commonwealth|Sphere|140
Expand Down Expand Up @@ -774,7 +774,7 @@ DBTechHighSchool02|Plane|23
DLC01FortHagenSatelliteArray01||7587
DLC01FortHagenSatelliteArray01|Box|234
DLC01FortHagenSatelliteArray01|Line|1
DLC01Lair01||28002
DLC01Lair01||27997
DLC01Lair01|Box|444
DLC01Lair01|Line|22
DLC01Lair01|Sphere|1
Expand Down Expand Up @@ -1652,7 +1652,7 @@ CombatZone01|Advanced|1
CombatZone01|Expert|1
CombatZone01|Inaccessible|1
CombatZone01|Novice 1|2
Commonwealth||714072
Commonwealth||714084
Commonwealth|Advanced|116
Commonwealth|Expert|80
Commonwealth|Inaccessible|14
Expand Down Expand Up @@ -1695,7 +1695,7 @@ DLC01FortHagenSatelliteArray01||7819
DLC01FortHagenSatelliteArray01|Advanced|4
DLC01FortHagenSatelliteArray01|Expert|3
DLC01FortHagenSatelliteArray01|Novice 1|1
DLC01Lair01||28430
DLC01Lair01||28425
DLC01Lair01|Advanced|19
DLC01Lair01|Expert|1
DLC01Lair01|Inaccessible|1
Expand Down Expand Up @@ -3182,7 +3182,7 @@ Commonwealth|ASPC|749
Commonwealth|BNDS|5013
Commonwealth|BOOK|106
Commonwealth|CONT|5352
Commonwealth|DOOR|1309
Commonwealth|DOOR|1312
Commonwealth|FLOR|3537
Commonwealth|FURN|6789
Commonwealth|HAZD|862
Expand All @@ -3194,9 +3194,9 @@ Commonwealth|MSTT|14914
Commonwealth|NOTE|31
Commonwealth|NPC_|3723
Commonwealth|PROJ|282
Commonwealth|SCOL|34155
Commonwealth|SCOL|34157
Commonwealth|SOUN|879
Commonwealth|STAT|590073
Commonwealth|STAT|590080
Commonwealth|TACT|11
Commonwealth|TERM|142
Commonwealth|TXST|13369
Expand Down Expand Up @@ -3409,7 +3409,7 @@ DLC01Lair01|FURN|114
DLC01Lair01|HAZD|10
DLC01Lair01|IDLM|107
DLC01Lair01|KEYM|2
DLC01Lair01|LIGH|1082
DLC01Lair01|LIGH|1077
DLC01Lair01|MISC|570
DLC01Lair01|MSTT|851
DLC01Lair01|NOTE|4
Expand Down Expand Up @@ -8493,7 +8493,7 @@ CombatZone01|TheCombatZone01ToExtMain001|1
CombatZone01|TommyCowerMarker|1
CombatZone01|TommyRef|1
CombatZone01|TommyRunMarker02|1
Commonwealth||711152
Commonwealth||711162
Commonwealth|35CourtMapMarker|1
Commonwealth|ADV017_DogTravelOutOfCommonwealthMarkerRef|1
Commonwealth|AO_Comment_AbandonedRecently_1024_003|1
Expand Down Expand Up @@ -11519,6 +11519,8 @@ Commonwealth|V111ExtCompanionFailsafeDoorDUPLICATE000|1
Commonwealth|V111FailsafeWarpMarker|1
Commonwealth|V81_01TychoRunAwayMarker|1
Commonwealth|VFTFarBeaconMarker|1
Commonwealth|VLTTOSEntranceBlocker|1
Commonwealth|VLTTOSNavCut|1
Commonwealth|VSBloodbug|1
Commonwealth|Vault111AlwaysEnableControlsTriggerREF|1
Commonwealth|Vault111ElevatorDescendAgainTrigger|1
Expand Down Expand Up @@ -12032,7 +12034,7 @@ DLC01FortHagenSatelliteArray01|LightDLC01AssaultronHeadTrap03|1
DLC01FortHagenSatelliteArray01|LightDLC01AssaultronHeadTrap04|1
DLC01FortHagenSatelliteArray01|LightDLC01AssaultronHeadTrap05|1
DLC01FortHagenSatelliteArray01|LightDLC01AssaultronHeadTrap06|1
DLC01Lair01||28218
DLC01Lair01||28213
DLC01Lair01|AO_Comment_Dusty_512_012|1
DLC01Lair01|AO_Comment_HighTech_512_008|1
DLC01Lair01|DLC01CC_LitConsolePanels|1
Expand Down Expand Up @@ -18951,7 +18953,7 @@ CharlestownHouse01|100|324
CharlestownLaundry|100|255
CollegeSquare01|100|2713
CombatZone01|100|2495
Commonwealth|100|714509
Commonwealth|100|714521
ConcordCivicAccess01|100|1995
ConcordFactory|100|598
ConcordMuseum01|100|3414
Expand All @@ -18963,7 +18965,7 @@ CustomHouseTower01|100|174
DBTechHighSchool01|100|7496
DBTechHighSchool02|100|2418
DLC01FortHagenSatelliteArray01|100|7827
DLC01Lair01|100|28469
DLC01Lair01|100|28464
DLC03Acadia|100|3531
DLC03AlderseaDaySpa01|100|1461
DLC03BeaverCreekLanes01|100|2976
Expand Down Expand Up @@ -24778,7 +24780,7 @@ TheCastle01|Mirelurk|100.0|1
0005226E|Vault81Secret|Secret Vault 81|0|5506|-7026|2097|8916|-12228|-1824|0|-700|1.3|0
000532B6|NationalGuardTrainingYard01|National Guard Recruitment Office|0|2177|2358|1375|2980|1116|3601|0|0|1.0|0
00053834|PoseidonReservoir01|Poseidon Reservoir|0|2525|2797|-1525|6576|827|4767|-2400|0|2.0|0
00054BD5|Goodneighbor|Goodneighbor|1|15161|-10355|2560|27763|-20320|-390|0|0|1.0|0
00054BD5|Goodneighbor|Goodneighbor|1|15161|-10355|2560|27763|-20320|-390|-2600|200|2.3|0
000560EE|CambridgePolymerLabs01|Cambridge Polymer Labs|0|2152|4077|1|4304|0|8154|0|600|1.5|0
00056BEE|MaldenDrainage01|Malden Drainage|0|296|2428|-3440|4032|1328|3529|0|0|1.0|0
00057127|CorvegaAssemblyPlant01|Corvega Assembly Plant|0|196|1088|-4343|4736|-3445|5622|200|-500|1.4|0
Expand Down Expand Up @@ -24997,4 +24999,4 @@ TheCastle01|Mirelurk|100.0|1
01053C58|NukaWorldMarket|Nuka-Town Market|1|981|-18351|-2549|4511|-21672|-15030|0|0|1.0|7
01054271|DLC03POIBasementArmory|Basement Armory|0|3038|2670|2396|3680|1968|3372|0|0|1.0|4
==Instance IDs Count Vs Distinct==
1762722|1762060
1762729|1762067
2 changes: 1 addition & 1 deletion Developer_Guides/ImageAssetValidation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The tool will connect to the database so it know which cells, worldspaces, and m
It will then cross reference to the contents of the `img` folder to verify that each space has an applicable background image file, that the image is of the correct dimensions, and that the file size looks correct. Then it will check for all map markers, also verifying that they exist and that they are of a normal file size.<br/>
Finally the tool will verify there are no extraneous image files present.<br/>

If it detects any errors, these will be logged and again summarized once the check has been completed. In addition, `errors.txt` will be placed in `\Mappalachia\img\` containing the reported errors.
If it detects any errors, these will be logged and again summarized once the check has been completed. In addition, `errors.txt` will be placed in `\CommonwealthCartography\img\` containing the reported errors.

### Next steps
With all image assets validated, you can now move on to development of the actual [end-user GUI program, Commonwealth Cartography](GUI.md).
2 changes: 2 additions & 0 deletions Developer_Guides/Ingest.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Using SQLite, a single batch file creates the empty database structure, then ins
## Game Version
The game version string is baked into the database. If you have Fallout 4 installed in the default Steam location, you may enable automatic game version detection by downloading [`sigcheck.exe`](https://docs.microsoft.com/en-gb/sysinternals/downloads/sigcheck) from Sysinternals and placing it in the database folder - if so, the game version string will be automatically gathered from `Fallout4.exe`.<br/>
Otherwise, before running `build_database.bat`, ensure the correct game version string is stored in `gameVersion.csv`.<br/>
<br/>
Sometimes the version of the exe will differ from the version given in-game. The recommended rule is that the version in-game (bottom-right of settings menu) trumps the version of the exe. Where this is the case, you must call the batch script with the `override` argument. This prevents sigcheck from modifying `gameVersion.csv` and instead trusts the value you should have entered into the file previously.

## Building the database
Before we can build the database, we need a copy of the sqlite tools windows binary, called sqlite3.exe. This is distributed at the [SQLite downloads page](https://www.sqlite.org/download.html). Under 'Precompiled Binaries for Windows' find the sqlite-tools zip.<br/>
Expand Down
1 change: 1 addition & 0 deletions FO4Edit/Output/Skipped_spaces_0.csv
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ spaceFormID,spaceEditorID,spaceDisplayName,isWorldspace,esmNumber
00199063,,,0,0
002105C3,,,0,0
0024A197,ccTOSFO4001,Noir Penthouse,0,0
0024A3EF,ccEEJFO4VLTInterior02,Quick Test Cell,0,0
0002F295,REHoldingCell,Quick Test Cell,0,0
00072E2D,PackInCeilingLight02StorageCell,,0,0
00089399,PackInFloorLampPackInStorageCell,,0,0
Expand Down
4 changes: 3 additions & 1 deletion ImageAssetChecker/ImageAssetChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace ImageAssetChecker
internal class ImageAssetChecker
{
const int minMapSizeKB = 100;
const int minMapSizeKBWaterMask = 20;
const int maxMapSizeKBCell = 10000;
const int maxMapSizeKBWorldspace = 50000;
const int maxMarkerSizeKB = 50;
Expand Down Expand Up @@ -171,8 +172,9 @@ static void ValidateImageFile(string expectedFile, bool isWorldSpace)
long sizeInBytes = new FileInfo(expectedFile).Length;
long sizeInKB = sizeInBytes / 1024;
int maxFileSizeKB = isWorldSpace ? maxMapSizeKBWorldspace : maxMapSizeKBCell;
int minFileSizeKb = expectedFile.EndsWith("_waterMask.png") ? minMapSizeKBWaterMask : minMapSizeKB;

if (sizeInKB > minMapSizeKB && sizeInKB < maxFileSizeKB)
if (sizeInKB > minFileSizeKb && sizeInKB < maxFileSizeKB)
{
Console.WriteLine($"File size OK ({sizeInKB}KB)");
}
Expand Down
2 changes: 1 addition & 1 deletion ImageAssetChecker/ImageAssetChecker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Data.Sqlite" Version="7.0.9" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="8.0.4" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
2 changes: 1 addition & 1 deletion MapIconProcessor/MapIconProcessor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Data.Sqlite" Version="7.0.9" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="8.0.4" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
2 changes: 1 addition & 1 deletion Preprocessor/MapMarkers.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;

namespace CommonwealthCartography
{
Expand Down
Loading

0 comments on commit b6eaaf3

Please sign in to comment.