Jump to content
Game-Labs Forum
Titan Uranus

Interest in a realism mod? +simple modding guide

Recommended Posts

As far as I can tell, many of the weapons in Ultimate General: Civil War have stats wildly divergent from their real-life counterparts. In particular, the rate-of-fire differential between muzzle-loaders and breech-loaders/repeating rifles is muted when compared to real life. The differences between the various marks of rifled musket are also rather silly.

Fortunately, I believe that I have figured out how to change enough of the weapon code to make a start on a weapon mod. I have been able to successfully alter the rate of fire, melee, damage, and range of various weapons (as well as other stuff, like what image is used) and I believe that I can figure out how to alter accuracy with some effort.

Would anyone be interested in such a realism mod? I was considering two different versions, one which sticks staunchly to real life values and another which treats the preexisting weapons as ciphers and changes them wildly to open up new tactical options (for instance, a line infantry regiment armed solely with long-range breech-loading rifles, difficult and expensive though that may be) if the player desires it.

What follows is a short guide to what I have discovered for certain thus far.

Referring to the attached image, yellow denotes range (which is simply additive between the two first values in each pair [i.e. 96 and 96] for rifles/carbines, I have not attempted to alter the pistols yet, but they cannot be so simply additive, I do not understand the second value, but I do know that it is 43 for every rifle and 42 for the pistols, possibly alters behavior), light blue denotes damage (though it is not the only value which alters damage), It increases as either value is decreased, with the first making minor alterations and the second making large changes (something like half an order of magnitude per integer increase, I don't really understand the calculation yet), the third and fourth boxes/underlines denote rate of fire and melee ability respectively and are apparently calculated similarly. The various weapon types have minor variations, but all stats are written in fairly similar ways.

All of this is hex-based by the way, I've been using HxD at 32 width for the changes.

 

In addition, here is a Dropbox link for my own personal file: Titan's Mod

Be warned, repeating rifles/carbines, Sharps rifles/carbines, and Fayettevilles/M1863's have their rates of fire sharply increased. In addition, saber cavalry have far greater melee ability, to an unbalanced degree.

This short guide/mod does owe a good bit to maojoejoe's Tentative Guide.

Image 6.png

  • Like 2

Share this post


Link to post
Share on other sites

Is there anything for cannons? I think that's where there's more legitimate variation between types realistically.  I'd like to one day have Whitworths be worthwhile (i.e. long range and rapid fire).

Share this post


Link to post
Share on other sites
50 minutes ago, Fred Sanford said:

Is there anything for cannons? I think that's where there's more legitimate variation between types realistically.  I'd like to one day have Whitworths be worthwhile (i.e. long range and rapid fire).

Yes, though I haven't started modding them, they appear to use the same basic layout.

Share this post


Link to post
Share on other sites

Hey! Congrats on getting melee values, I never figured that out. It appears that melee and accuracy values are actually both embedded in 10 character string I originally thought was for accuracy only. (I overwrote the Whitworth's accuracy string with the Tredegar's and got a Whitworth cannon with 50 accuracy--instead of the vanilla 15--so I know accuracy is somewhere in there. Of course, all cannons have 10 melee so I never made the connection that melee was embedded in there too; nice job dude!)

596e87b2ad516_UGCWModdingNotes.PNG.6b97df29610b468482dbe2e26765d6c7.PNG596e87a9dca42_OtherUGCWnotes.thumb.png.bdce5f35a219b67e5c33ed130150b7fd.png

5 hours ago, Titan Uranus said:

Would anyone be interested in such a realism mod? I was considering two different versions, one which sticks staunchly to real life values 

Back before I got overwhelmed with work, I managed to mod most of the weapons to realistic/historical stats, but that didn't really fix my main historical itch with this game: the insane casualties.  To be honest, it just made the game play worse by skyrocketing the casualties even further. For a realism/historical authenticity mod to truly succeed morale/kill rates/AI changes are needed. Most casual or semi casual players aren't bothered by the 50-60% (sometimes 80%+ when you wipe it off the field completely) casualty rates the AI takes every battle, but for a history nerd it shatters immersion. Lee could've marched straight to Washington if he had killed 90 thousand Union men at Fredericksburg.

 

5 hours ago, Fred Sanford said:

Is there anything for cannons? I think that's where there's more legitimate variation between types realistically.  I'd like to one day have Whitworths be worthwhile (i.e. long range and rapid fire).

I tried this: made the Whitworth have 50 accuracy (it was exceptionally accurate), 40 fire rate (breechloading) and 4336 range (messed with the Hex values until I got lucky lol). It was fun for a bit, but then it turned ridiculous, racking up almost 9 thousand kills at Antietam. Combined with other modifications I had made the game had become rather unplayable; inflicting 80 thousand (and up to 100 once) casualties per battle (even more than the average 30-40k in vanilla) ruined any sense of immersion for me. 

 

@Nick Thomadis With the full game released, I hope you'll eventually release some modding tools so we don't have to dig through with hex editors :) 

  • Like 1

Share this post


Link to post
Share on other sites
On 7/18/2017 at 5:50 PM, maojoejoe said:

Hey! Congrats on getting melee values, I never figured that out. It appears that melee and accuracy values are actually both embedded in 10 character string I originally thought was for accuracy only. (I overwrote the Whitworth's accuracy string with the Tredegar's and got a Whitworth cannon with 50 accuracy--instead of the vanilla 15--so I know accuracy is somewhere in there. Of course, all cannons have 10 melee so I never made the connection that melee was embedded in there too; nice job dude!)


@Nick Thomadis With the full game released, I hope you'll eventually release some modding tools so we don't have to dig through with hex editors :) 

Thanks. Yeah, I agree that melee buts up against accuracy. I haven't fully tested it, but I think that accuracy might be determined by either the characters/data directly after the melee stat, or those at the very end of the string.

Quote

Back before I got overwhelmed with work, I managed to mod most of the weapons to realistic/historical stats, but that didn't really fix my main historical itch with this game: the insane casualties.  To be honest, it just made the game play worse by skyrocketing the casualties even further. For a realism/historical authenticity mod to truly succeed morale/kill rates/AI changes are needed. Most casual or semi casual players aren't bothered by the 50-60% (sometimes 80%+ when you wipe it off the field completely) casualty rates the AI takes every battle, but for a history nerd it shatters immersion. Lee could've marched straight to Washington if he had killed 90 thousand Union men at Fredericksburg.

Yeah, I agree. I think the main problem is how difficult it is to shatter a unit/blow it off the field. A great many of my battles end with a hemispherical (against a corner/terrain) or circular firing squad pouring lead into enemy units who can neither reform themselves nor retreat. For all of the Total War series's faults, this particular absurdity does not occur in CA's works.

I think that increasing the melee stats of saber cavalry partially fixed this problem (though it did create others) now I can actually run down and force the surrender of enemy units before they are utterly wiped out (40%-50% losses as opposed to 80%-90%) it's still pretty bad though. The game would be seriously improved by the addition of chain routs. I'm pretty sure that as of now routing units do not damage the morale of nearby allies. That plus allowing routing units to retreat off the map, as they do when the "withdraw" button is pressed would eliminate most of my major gripes with the game. Well, that and the bug/gameplay decision that makes grand batteries as harmless as a stiff breeze.

 

 

16 hours ago, Hannibalbarca said:

All things being equal, and it is a good idea,  but why did the devs not use different values is the question you should ask, One would think they started from that point and adjusted to find what worked in gameplay, just wondering if your changes will not produce better gameplay. 

I fully expect that some of the changes will harm gameplay, especially if I cannot figure out how to alter costs or availability of weapons. That is part of why I am considering a gameplay/balance mod alongside the pure realism mod. I honestly very much doubt that the developers began with realistic stats for the weapons, that would make them a rare breed indeed among war game developers. I especially doubt it on the basis of some of the engine decisions, such as simplifying the ranges of case/shrapnel/round shot to being 1/3rds, 2/3rds, and full range.

Share this post


Link to post
Share on other sites
On 2017/7/19 at 2:06 AM, Titan Uranus said:

Referring to the attached image, yellow denotes range (which is simply additive between the two first values in each pair [i.e. 96 and 96] for rifles/carbines, I have not attempted to alter the pistols yet, but they cannot be so simply additive, I do not understand the second value, but I do know that it is 43 for every rifle and 42 for the pistols, possibly alters behavior)

43 for Rifles, 42 for Pistol&Saber, 44 for most of Arties and JFBTS and WhitworthTS, and 45 for 12pdr Whitworth

Edited by Tokiedian

Share this post


Link to post
Share on other sites

@maojoejoe @Titan Uranus @JonnyH13

I need you to point me offsets or the cells/values I must find to make a table. I can see both Hex or Decimal.

Are they 1 byte Integers or 2 bytes?

Wiard Range:

- I see {32 32 200 68} (i think 32's are blank spaces)Ultimate_Modding_I.thumb.jpg.904269a9fa41ca70440e3a8b101046e0.jpgUltimate_Modding_II.thumb.jpg.cc6a2210d994aaca075ea2316dd64727.jpgUltimate_Modding_III.thumb.jpg.3ca1d7010bcb9041024ca42efe41e337.jpg

Edited by LAntorcha

Share this post


Link to post
Share on other sites

The hex numbers do not keep track of normal digits but it keeps track of a "float" value.  This value is different and requires a calculator to figure out.  Also you need a tool to interpret the different groups of hexs numbers that make up a value.  Usually it comes in groups of 4 but there are many exceptions.  

Share this post


Link to post
Share on other sites
8 minutes ago, JonnyH13 said:

The hex numbers do not keep track of normal digits but it keeps track of a "float" value.  This value is different and requires a calculator to figure out.  Also you need a tool to interpret the different groups of hexs numbers that make up a value.  Usually it comes in groups of 4 but there are many exceptions.  

Hex_edit.jpg.e44c393d0d29fbe4b612a29a3befd221.jpg

Note it changes auto from Hex to Decimals. A group of 4  usually is for a reversed 4 byte Integer. For large numbers.

Size of Boolean type is 1 byte(s) (1-0, YES-NO, TRUE-FALSE, ON-OFF, WHITE-BLACK...)

Number of bits in a character: 8
Size of character types is 1 byte
Signed char min: -128 max: 127
Unsigned char min: 0 max: 255
Default char is unsigned

Size of short int types is 2 bytes
Signed short min: -32768 max: 32767
Unsigned short min: 0 max: 65535

Size of int types is 4 bytes
Signed int min: -2147483648 max: 2147483647
Unsigned int min: 0 max: 4294967295

Size of long int types is 4 bytes
Signed long min: -2147483648 max: 2147483647
Unsigned long min: 0 max: 4294967295

Size of long long types is 8 bytes
Signed long long min: -9223372036854775808 max: 9223372036854775807
Unsigned long long min: 0 max: 18446744073709551615

Note that int and long are the same size and if you want a 64 bit integer then you need to use long long (or unsigned long long).

So if I change the value of My Spencers in my Inventory and use a 2 byte Integer I won't have a chance of putting a higher amount than 65535. Then use 4 byte Integer.

 

Usually Money (or a large amount on things greater than 65535) is stored as 4 byte Integer. Shorter things like a 0-99 Max Inventory is stored as 1 byte (cause 255 can pretty house 0-99 numbers). 200 Range, 39 Damage and stats like that are stored in 1 byte (max number 255).

So Damage, Accuracy, etc, is gonna be 1 byte (1 Hex cell) and Camp Cash probably 4 byte (4 Hex cells). Take Windows calculator, pick Programmer, tick Hexa option. Input C844. Tick Dec. Get 51268.

C8 44 -> value is not 51268. Hex values are REVERSED. So again in the calulator, input 44 C8, Convert selecting Dec. 17608 (The real value of the address)

Share this post


Link to post
Share on other sites

My own opinion: Quite complicated to understand ans use. The Calc trick is easier.

But appreciate anyway.

Share this post


Link to post
Share on other sites
On 7/20/2017 at 3:15 AM, Titan Uranus said:

I think the main problem is how difficult it is to shatter a unit/blow it off the field. A great many of my battles end with a hemispherical (against a corner/terrain) or circular firing squad pouring lead into enemy units who can neither reform themselves nor retreat.

I know your post is 2+ years old, but I think I may have something for you. Version 1 of my submod for the J&P mod is almost complete and one of its main goals was to address these issues. I've just now seen your post as I look for help with hex editing, and it's nice to see some people who were thinking exactly along the same lines. Hope you're still around, plus could use a little help with hex editing some of the weapons.

(FYI, the other main edit of my submod is unit sizes, with an emphasis on regiment-sized units rather than "brigade" sized. Also, I have completely altered skirmisher behavior to fire at will/continuously rather than volley-fire, opening a real use case for authentic repeater rifle behavior [perhaps as skirmisher-only weapons].) @Titan Uranus

Edited by adishee
  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...