maojoejoe Posted May 25, 2017 Posted May 25, 2017 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. The process is very complex, and I have yet to discover what most of the data means, but here are my tentative instructions. 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.) It’ll be intimidating gibberish. change the width to 32 for better readability. 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” If you are successful, this format will pop up: Range is 7 characters, ROF and damage are 2, and accuracy is usually 10 but may vary. 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. Once you find the format, you can modify the values. 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. 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! 7
Karri Posted May 26, 2017 Posted May 26, 2017 Interesting, have you found out anything about the battles, or even a file where they might be stored?
vren55 Posted May 27, 2017 Posted May 27, 2017 (edited) ... 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 May 27, 2017 by vren55 2
maojoejoe Posted May 27, 2017 Author Posted May 27, 2017 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.
maojoejoe Posted May 27, 2017 Author Posted May 27, 2017 (edited) 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 May 27, 2017 by maojoejoe
Karri Posted May 27, 2017 Posted May 27, 2017 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?
Tokiedian Posted June 3, 2017 Posted June 3, 2017 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...
Karri Posted June 3, 2017 Posted June 3, 2017 (edited) 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 June 3, 2017 by Karri
Tokiedian Posted July 24, 2017 Posted July 24, 2017 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)
Tokiedian Posted July 24, 2017 Posted July 24, 2017 (edited) 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 Rebored Farmer 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 SF1863 Edited July 24, 2017 by Tokiedian
Tokiedian Posted July 24, 2017 Posted July 24, 2017 Currently data of weapons' parameters exist from path ID 217247 to path ID 217298
Tokiedian Posted July 24, 2017 Posted July 24, 2017 (edited) test hack: replace parameters of Sharps 1855 carbine with ones of Enfield P1853 Sharps 1855 carbine: cost34/damage11.5/Range230/Rate86/Accuracy39/Melee54 P1853 Enfield: cost29/damage12.5/Range340/Rate48/Accuracy67/Melee65 Hack test 1 Result hack test 2 result hack test 3 result hack test 4 result hack test 5 result hack test 6 result Edited July 24, 2017 by Tokiedian
Tokiedian Posted July 24, 2017 Posted July 24, 2017 Therefore... Thumbnail, Effective Range, Fire Rate, Damage, Melee and Accuracy 1
The Soldier Posted July 24, 2017 Posted July 24, 2017 @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.
Tokiedian Posted July 25, 2017 Posted July 25, 2017 Also I found where cost parameter of weapon is Updated... Thumbnail, Effective Range, Fire Rate, Damage, Melee, Accuracy and Cost
Tokiedian Posted July 25, 2017 Posted July 25, 2017 (edited) 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)... Yahooo! Edited July 25, 2017 by Tokiedian 1
Tokiedian Posted July 25, 2017 Posted July 25, 2017 (edited) 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 July 25, 2017 by Tokiedian
Tokiedian Posted July 25, 2017 Posted July 25, 2017 (edited) 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 July 26, 2017 by Tokiedian
Tokiedian Posted July 28, 2017 Posted July 28, 2017 (edited) I found accurate place where cost parameter of weapon is So Updated... 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 July 28, 2017 by Tokiedian
emcdunna Posted July 29, 2017 Posted July 29, 2017 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. 1
Tokiedian Posted July 29, 2017 Posted July 29, 2017 Fire Rate: 1500(00 40), 375(00 41), 1488(01 40), 1333(10 40), 1200(20 40), 1091(30 40), 1000(40 40), 885 (50 40)
Tokiedian Posted July 29, 2017 Posted July 29, 2017 I found a funny truth (In fact it is serious problem that could break the game balance, so we should do some fixes when making MOD) http://steamcommunity.com/app/502520/discussions/0/1470840994966509738/ 1
Tokiedian Posted July 29, 2017 Posted July 29, 2017 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
quicksabre Posted July 29, 2017 Posted July 29, 2017 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now