Jump to content
Game-Labs Forum
maojoejoe

Tentative Guide to Modding This Game

Recommended Posts

 

Hello guys,

I recently discovered how to mod weapon stats in UGCW in a limited fashion. I’ve been able to change the range, damage, fire rate, and accuracy of weapons.

 colt.PNG.19717dcc24766dcb688df3ea28d938cd.PNGwhitworth.PNG.0d9adcac705a40ade56ab172223cb44b.PNGwhitworthRF.PNG.574208adcc3f356cab0e1ab4a2f83ae8.PNG

The process is very complex, and I have yet to discover what most of the data means, but here are my tentative instructions. 

  1. You need a hex editor like HxD. Using HxD, open the resources.assets file in Program Files (x86)\Steam\steamapps\common\Ultimate General Civil War\Ultimate General Civil War_Data. (Make a backup of the resources.assets in case you irreversibly damage the original. It’ll save you the time of a reinstall.)

  2. It’ll be intimidating gibberish. change the width to 32 for better readability.  

    1. messy.thumb.PNG.721ce74034d978bb27fef102bb3a4c53.PNG

  3. Scroll about halfway down, control-F, and type in a keyword of the weapon you are looking. i.e. if you want to modify the 6-pounder Wiard gun, you would look for “Wiard”

    1. If you are successful, this format will pop up:

      1. notes.PNG.88362193b4a20a2ac5e7ed1637e58ecf.PNG

        1. Range is 7 characters, ROF and damage are 2, and accuracy is usually 10 but may vary.

    2. If not (you probably will not be successful in finding the correct format on the first try) scroll up and try again. If still not successful, scroll down. HxD has a wonky Control-F feature with “search direction.” Keep trying different points of the page till you find the correct format.

  4. Once you find the format, you can modify the values.

    1. I don’t know how to convert the data values in the file into the numerical stats of the games so usually I will just copy other weapon’s desired stats over. i.e. I copied the 7 character value of the CS_Richmond’s range onto the Enfield’s range to make the Enfield’s range 375. You can also try changing the data values manually and hope for a lucky break (like I got with my 872 range scoped Whitworth) but you’re likely to get crazy values like 2534654 in-game when you type random values for the data.

  5. Control-S your changes and restart the game. Enjoy! 

I have also used HxD to modify save files and change unit sizes past their limit - aka 1500 man cavalry brigades and 1000 man skirmisher brigades. I know these instructions are rather difficult to follow so I'll try to make videos explaining all of this when I get a block of free time and a working mic.

Good luck modders!

Share this post


Link to post
Share on other sites

Interesting, have you found out anything about the battles, or even a file where they might be stored?

Share this post


Link to post
Share on other sites

... so in theory now you can equip your troops with Star Wars  D-15A or E-11 blaster rifles by giving certain rifles 400 effective range, 100 fire rate, accuracy 95 and damage 50?

Edited by vren55

Share this post


Link to post
Share on other sites
On 5/25/2017 at 8:28 PM, Karri said:

Interesting, have you found out anything about the battles, or even a file where they might be stored?

There are level files in the same folder that resources.assets is stored in. I have been unable to decipher much so far. I have more time on the weekend so I'll take another shot at it.

Share this post


Link to post
Share on other sites
2 hours ago, vren55 said:

... so in theory now you can equip your troops with Star Wars  D-15A or E-11 blaster rifles by giving certain rifles 400 effective range, 100 fire rate, accuracy 95 and damage 50?

If you want to be ridiculous you can use the whitworth cannon's range, the Lemat's fire rate, and the 20pdr Parrot/24 pounder howitzer's damage

2400 range, 250 fire rate, 95 accuracy and 70+ damage.

:):):):):)

 

I had to tone down most of my tweaks. The whitworth cannon became an absolute beast, my 8 gun battery inflicted more than 2000 casualties at Antietam sitting in dunker church more than 1000 yards behind the front line. Although it was historically the predecessor to modern artillery...

Edited by maojoejoe

Share this post


Link to post
Share on other sites

I was looking through the save files, but found it quite difficult to find the the troops numbers. Any tips on this and save games in general?

Share this post


Link to post
Share on other sites

I used Unity Assets Bundle Extractor to explore the weapon parameters

https://7daystodie.com/forums/showthread.php?22675-Unity-Assets-Bundle-Extractor

I found data of weapons' parameters from path ID 217930 to path ID 217981, and I can view these data, but somehow I can see everything except where weapon parameter data should be written. Of course, exported these data is a meaningless lines like

0 MonoBehaviour Base
 0 PPtr<GameObject> m_GameObject
  0 int m_FileID = 0
  0 SInt64 m_PathID = 0
 1 UInt8 m_Enabled = 1
 0 PPtr<MonoScript> m_Script
  0 int m_FileID = 1
  0 SInt64 m_PathID = 1090
 1 string m_Name = "carbine_1855Sharps52"
I abandoned my exploration for a while, but I wish that somebody could find how to view these parameters on resources.assets...

 

Share this post


Link to post
Share on other sites

I was trying to check how the save files are written, but no luck either. Except that the values are encrypted and they use somekind of inverting with the numbers. I didn't understand anything about unit bundle extractor, but ILspy revealed a few things.

 

Modding would be nice...but a pipedream it seems. No news about anything regarding this game.

Edited by Karri

Share this post


Link to post
Share on other sites

Range

  • Infantry Rifle: 200(00 48 43/96 43)<220(00 5C 43/96 43)<250(00 7A 43/00 96 43)<280(00 8C 43)<300(00 96 43)<320(00 A0 43)<340(00 AA 43)<350(00 AF 43)<375(80 BB 43)<400(00 C8 43)
  • Target Rifle: 450(00 E1 43)<500(00 FA 43)<600(00 16 44) 
  • Carbine: 135(00 07 43)<185(00 39 43)<230(00 66 43)<240(00 70 43)<260(00 82 43)<270(00 89 43)<275(80 89 43)<280(00 8C 43)<300(00 96 43)
  • Arty: 1000(00 7A 44)<1100(80 89 44)<1300(80 A2 44)<1400(00 AF 44)<1500(80 BB 44)<1600(00 C8 44)<1700(80 D4 44)<2000(00 FA 44)<2400(00 16 45)

Share this post


Link to post
Share on other sites
  • Cost/Damage/E Range/F Rate/Accuracy/Melee
  • 8/18/200/38/10/95: Farmer
  • 10/18/220/38/12.5/89: Rebored Farmer
  • Equal: Damage, F Rate
  • Not Equal: Cost, E Range, Accuracy, Melee

Farmer

mUls49G.png

Rebored Farmer

4Zztgl8.png

  • Cost/Damage/E Range/F Rate/Accuracy/Melee
  • 44/12.5/400/55/70/59: Springfield M1861
  • 55/12.5/400/57/77/59: Springfield M1863
  • Equal: Damage, E Range and Melee
  • Not Equal: Cost, F Rate, Accuracy

SF1861

Zc7scJb.png

SF1863

Q4UkmiJ.png

Edited by Tokiedian

Share this post


Link to post
Share on other sites

test hack: replace parameters of Sharps 1855 carbine with ones of Enfield P1853

Sharps 1855 carbine: cost34/damage11.5/Range230/Rate86/Accuracy39/Melee54

TVXtXRW.png

P1853 Enfield: cost29/damage12.5/Range340/Rate48/Accuracy67/Melee65

TVXtXRW.png

 

 

Hack test 1

oXY7Khs.jpg

Result

4A273B43EF0AF983599007CCB4FFB5E48B921EB7

 

hack test 2

DTSjgC4.jpg

result

ECDED3A92948578BF562E724DB659EF710F15E39

 

hack test 3

KFotss7.jpg

result

22CA702C83B171BA356C76CF7C89D8DC6DCCF589

 

hack test 4

NiBT9w6.jpg

result

0DC0A1A643470B34705AA9C4DAC4D896FD20687F

 

hack test 5

JYO2J1l.jpg

result

8EB9EAC921BAC99B6171F0FAFF3E2BDB2342159E

 

hack test 6

Yz6Pwo0.jpg

result

12CE7C1FBB6D5E85D75A294107441B792814516C

Edited by Tokiedian

Share this post


Link to post
Share on other sites

@Tokiedian

Ohh, we can change the thumbnail too?  As well as names...huh, I might just be able to pull off giving Skirmishers rifles instead of those silly short-ranged carbines.

Share this post


Link to post
Share on other sites

Also I found where cost parameter of weapon is

Updated...

KX8OVXO.png

Thumbnail, Effective Range, Fire Rate, Damage, Melee, Accuracy and Cost

Share this post


Link to post
Share on other sites

List of Encryption

  • Cost: 18(12 00)<54(36 00)<57(39 00)<60(3C 00)<70(46 00)<870(66 03)<1000(E8 03)<1390(6E 05)<1650(72 06)<1710(AE 06)<2000(D0 07)<2400(60 09)<2700(8C 0A)<2760(C8 0A)<3100(1C 0C)<3200(80 0C)

Obviously Cost is no encrypted but in hexadecimal. (12 00) means 0012 in hexadecimal, which is 1*16^1+2=18. (80 0C) means 0C80, which is 12*16^2+8*16^1+0=3200.

For example 666 is 29A in hexadecimal. So replace cost of Sharps1855 carbine with (9A 02)...

6iMbY0g.jpg

Yahooo!

DBD7761F822A3016F00EA84F097FCC86EB0DE8BA

Edited by Tokiedian

Share this post


Link to post
Share on other sites

Melee:  2(00 40), 2.015625(01 40), 2.03125(02 40), 2.046875(03 40), 2.25(10 40), 2.265625(11 40),

2.5(20 40), 2.515625(21 40)

2.75(30 40),  (40 40),  (50 40), 3.75(70 40), 4(80 40), 4.03125(81 40) 4.5(90 40), 5(a0 40), 7(e0 40), 7.5(f0 40),

8(00 41), 8.0625(01 41)

  • (2+n/4+m/64)(4^l) (nm 40+l) (n∈[0, 7])
  • (2+n/4+(n-8)/4+m/32)(4^l) (nm 40+l) (n∈[8, 15])

[2, 8) -> l=0,  [8, 32) -> l=1,  [32, 128) -> l=2,  [128, 512) -> l=3, [512, 2048) -> l=4,  [2048, 8192) -> l=5

l=0, x∈[2,4) -> n∈[0, 7],  l=0, x∈[4, 8) -> n∈[8, 15],  l=1, x∈[4,16) -> n∈[0, 7],  l=0, x∈[16, 32) -> n∈[8, 15],  

 

Edited by Tokiedian

Share this post


Link to post
Share on other sites

Range: 32(00 42), 128(00 43), 512(00 44), 2048(00 45)

Same to Melee

And Later numbers indicate its Range in real terms. It is the reason why weapons of line infantry has the same numbers 300(96 43)

Additionally I assume 1250m ≒ 1367.017yd ≒ Range 1500, according to measurement at Gettysburg battlefield (CB Picket charge)

Edited by Tokiedian

Share this post


Link to post
Share on other sites

I found accurate place where cost parameter of weapon is

So Updated...

zoKVPrN.png

Thumbnail, Effective Range, Fire Rate, Damage, Melee, Accuracy and Cost

Accuracy: error(00 00 00), 10(CC CC 3D), 40(CC CC 3E), 160(CC CC 3F), 640(CC CC 40), 10.78125(CC DC 3D), 11.5625(CC EC 3D), 12.34375(CC FC 3D) 200.0049 (00 00 40)

0.78125=25/32, 1.5625=25/16

3.125076(00 00 3D), 12.5(00 00 3E), 50.00122(00 00 3F), 199.2212(00 FF 3F), 200.0049(00 00 40)

640.1953(DC CC 40)

25/128=0.1953125

Edited by Tokiedian

Share this post


Link to post
Share on other sites

Hey guys,

the data there like "9a 36" is hexadecimal representation of a number. Like "10" is 160 in base 10. And "0A" is 10 in base 10.

 

So if you just translate that into decimal and find the scaling factor (like does the number 300 mean 300 yards range? Or does it mean 3000 yards? Etc.), you can put whatever data you want without needing to copy-paste another weapon.

 

So if you want to increase the sharps' damage by 20 percent, just translate to decimal, mutliply by 1.2, translate back, and fill in with the hex value. For example if the damage was "10" in base 10, in hex it would say "0A", and you'd want to multiply it to make it 12 in base ten, which is "0C" in hex. 

Share this post


Link to post
Share on other sites

Time-related issue

1h54min in game is 12min: it means 9.5 times faster

Fire Rate of rifle musket: 40-57 (1shot/20s = 0.05shot/s with Fire Rate 40, 0.07125shot/s with Fire Rate 57) in game -> 2-3shot/min = 0.033-0.05shot/s: it means 2.1375-1 times faster

Moving speed: Range 350(= 291m) with 30s = 9.7m/s by walking in game -> Common Step (64.008m/min=1.0668m/s), Quick Step (78.232m/min=1.303867m/s), Double Quick (138.303m/min=2.30505m/s): 9.09-7.44 times faster

Probably Fire rate should be 4.96 times faster

Share this post


Link to post
Share on other sites
25 minutes ago, Tokiedian said:

Probably Fire rate should be 4.96 times faster

Don't forget damage would probably have to drop commensurately - otherwise casualties would ahistorically increase even higher than they are now. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×