BentonGrey
Private
Posts: 28
Joined: Mon Nov 28, 2016 7:53 pm

Looking to Get Started

Wed Nov 30, 2016 5:49 am

Howdy gents, I just posted in the larger forum with some questions about the basic game, as I'm having some trouble finding my sea-legs with it. As part of that, though, I'd like to do some customization as well. I really have fallen in love with this game, but I am looking to get started with modding it a bit. There's a few things I'd like to tweak in order to get it feeling a bit more "right" to me.

Can anyone tell me where I should start? I found a link to an introduction for customizing units, but it seems to be dead. Is there a good tutorial somewhere about how to do the basics?

I've read enough to know that the easiest way to make changes to the game itself, other than tweaking stats and the like, is through scripted events, so I'm thinking I should learn how to:

Change stats for generals
Add units and resources
Add new generals
Tweak and change scripted events (for example, I'd like to free Lee earlier and remove some of the historical restrictions)

Is there a way to change the success rate of some of the abilities? Like other folks, I've had zero success with the subvert Indians cards, and the other Indian card, the one that is supposed to spawn a friendly troop, has never worked for me either.

In terms of existing mods, I've looked around and seen some neat things, but I'm wondering if there is a mod extant that just adds in missing or overlooked generals (especially Southern ones).

Thanks guys!

User avatar
tribeticus
Captain
Posts: 191
Joined: Tue Jan 19, 2016 9:05 pm
Location: Ocean, NJ

Re: Looking to Get Started

Wed Nov 30, 2016 8:42 pm

Start by reading through the Portrait Mod thread a couple of threads below this one.

Also have a look at the thread I started for modifying and adding units

User avatar
tribeticus
Captain
Posts: 191
Joined: Tue Jan 19, 2016 9:05 pm
Location: Ocean, NJ

Re: Looking to Get Started

Thu Dec 01, 2016 2:13 pm

Also on page two of this forum is a thread call modifying and editing generals, check that out I logged in there how I learned to do it.

BentonGrey
Private
Posts: 28
Joined: Mon Nov 28, 2016 7:53 pm

Re: Looking to Get Started

Mon Dec 05, 2016 5:23 pm

Thanks Tribeticus! I'll review those threads and see if I can figure things out. :)

BentonGrey
Private
Posts: 28
Joined: Mon Nov 28, 2016 7:53 pm

Re: Looking to Get Started

Mon Dec 05, 2016 10:32 pm

Okay, I've been reading through the various threads you suggested and through the materials in the general modding forum, and I'm starting to figure things out, but I have a few specific questions.

First, when you download the database files, there are two versions of a lot of the databases. For example, there is both a models_v9t and a models_v9q. Which should I use if I want to modify some of the general's stats?

Second, I'd like to make it very likely for Kentucky to secede. I've seen several threads talking about this event and one talking about changing the likelihood, but I haven't seen anyone explain how to do it. Would someone be so kind? I imagine it is handled in the Kentucky events database, but I can't figure out which lines handle it or how.

Third, and I'm just beginning to mess with this, but how might I create an event that would have the Indian faction become an ally of the CSA?

Thanks!

User avatar
tribeticus
Captain
Posts: 191
Joined: Tue Jan 19, 2016 9:05 pm
Location: Ocean, NJ

Re: Looking to Get Started

Tue Dec 06, 2016 2:20 pm

I go directly into the mdl files themselves and stay away from the database files, so i am sorry I cannot help you there. I like editing each file directly, I feel like it gives me a better feel for what I am doing.

As far as events, I will be watching what others respond as the only events I make are to spawn generals and units.

If no one responds try asking guys like Grimjaw who respond alot to the forum and have a lot of knowledge.

BentonGrey
Private
Posts: 28
Joined: Mon Nov 28, 2016 7:53 pm

Re: Looking to Get Started

Thu Dec 08, 2016 2:24 am

Thanks Tribectus! Following your advice, I edited the files directly, and I've had a lot of success with some minor edits. I've freed Lee, I've tweaked some generals and, thanks to the work y'all did in the portraits thread, I replaced a lot of the CSA clone generals. I've also set Kentucky to secede most of the time. It's way easier to figure out in the files rather than through the database. Here's what I did. I changed the files in the full campaign events, 1861 April Campaign file:

Code: Select all

SelectFaction = CSA
SelectRegion = $Fayette_KY

SelectFaction = CSA
SelectRegion = $Fayette_KY
StartEvent = evt_nam_CSA_KentuckySecedes1861|1|2|evt_txt_CSA_KentuckySecedes1861|Event-img_CSA_KentuckySecedes1861|$Fayette_KY|121

Conditions
  MinDate = 1861/07/01
  MaxDate = 1861/08/05
  Probability = 80
  EvalMorale = >;$USA


I shifted the probability to be 80, and that seems to be working (unless my luck has just been surprisingly good).


I'm going to do some more tweaking as well. Basically, I want to set up the early game to give the CSA a bit more of a fighting chance on higher difficulties.

To that end, I want to figure out some of the scripting for the early events. What language determines whether a unit is locked? What determines whether a unit shows up fully formed or forming?

For example, the Shannendoah Force spawns with this event below, and I've included Jackson and his unit's spawn as well:

Code: Select all

SelectFaction = CSA
SelectRegion = $Warren_VA
  CreateGroup
  Posture = $Defensive
  SetKind = $Land
  Entranch = 0
  InCS = 0
  FixType = 3
  SetName = Shenandoah Force
  Apply
  CreateUnit
  SetType = $uni_CSA_JJohnston3
  SetName = Joseph E. Johnston
  Apply
  CreateUnit
  GMEParam = 2
  SetType = $uni_CSA_BdeN2
  FlavorName = Brig. Gen. T. Jackson
  SUFlavorName = 2nd Virginia|4th Virginia|5th Virginia|27th Virginia|33rd Virginia
  SetLevel = 1
  SetName = Stonewall Bde
  Apply
  CreateUnit
  SetCommit = 3
  SetType = $uni_CSA_Jackson
  SetName = Thomas J. Jackson
  Apply


I'm guessing that what I'm looking for is probably the GMEParam, the SetLevel, and/or the SetCommit. Am I warm?

:EDIT: I overlooked the obvious answer for determining fix status, "FixType." Now I just want to know what handles the other part, whether they show up fully formed or not.

:EDIT 2: Well, after some experimentation, it seems that formed vs forming is not governed by GMEParam or SetLevel. I don't think SetCommit is it either, though I haven't messed with that yet. SetLevel is just the experience level, and I have no idea what GMEParam does, but changing it causes an error and breaks the spawning of the unit. So....any ideas?

Tribectus, you can answer this one if you've been creating units through events. Can I create something out of whole cloth by just copying an existing event and changing the name? I mean, can I spawn an existing type of unit, not create a new type of unit.

Does the Flavor Name have any impact on the game, as in, could I name it whatever? Say, I want to create a new unit and name it "3rd Mississippi." Would that prevent the game from naming anything else that? Might it cause a conflict? Basically, what do I need to watch out for?


Generals Modifications

Here's what I've tweaked with the generals after doing some research on some of these guys I hadn't heard of. Essentially, I looked for something interesting or unique to try to give them some personality in the game. Now, I've only done very basic internet research, and I am sure there are many, many folks who know vastly more about these matters than I do. I hope y'all won't be too hard on me! I've likely been far to generous with these, but I suppose I'm an old rebel at heart. I'd welcome feedback and suggestions:
  • Bushrod Johnson: He was a teacher at a military institute, so I gave him Master Driller, which is probably quite generous. An argument could also be made to give him one of the engineering abilities, seeing as he was an engineering officer to begin with, but given his role in poor construction location of Fort Henry, I think that about breaks even.
  • John C. Breckenridge: He was considered something of a successor to Stonewall Jackson, so Charismatic seemed somewhat apropos.
  • D. Ruggles: His high water mark in the war was an impressive use of artillery, so I gave him Artilleriest, and he was also often in charge of building defensive fortifications, so I gave him Entrencher.
  • Leonidas Polk: Possessor of an awesome name, and not really much of a military man, was quite a patriot, and, as a preacher, a powerful public figure, so I gave him the Patriot ability.
  • H.C. Whiting: Whiting seems to have been at his best when he was just an engineer, and with that background, he seems a natural for the two engineering abilities, Defensive and Offensive Engineer.
  • William Hardee: As someone else said on the forums, Hardee literally wrote the book on tactics and was a military instructor for quite a while, so he seems a natural for Training Officer, and he was quite good at solving logistical problems, so he seemed a natural for Master Logistican.
  • H. Sibley: This one I'm rather torn on. From what I've read, Sibley seems to have begun his downward spiral after his campaign failed. That makes him starting with Drunkard a bit unfair. In place, considering his familiarity with the area and the like, I gave him Ranger, which is probably too generous.
  • J. Mouton: He was famous for drilling his men to perfection, so Master Driller seemed fitting.

BentonGrey
Private
Posts: 28
Joined: Mon Nov 28, 2016 7:53 pm

Re: Looking to Get Started

Fri Dec 09, 2016 6:33 am

Well, I hadn't heard back from anyone, so I did some more experimentation, and I've figured a lot of stuff out. It turns out that what I was looking for wasn't even in that piece of code. It was in an innocuous looking piece ABOVE it. I don't know if this is available anywhere (I certainly haven't been able to find it either on the forums or on the wiki), but I have put together an explanation of some of the functions of the scripts in relation to spawning units. I'll probably make another post about this eventually collecting everything I've figured out. In the interim, here's an example with annotations. This is the first Confederate levy event, the one that spawns the Shenanndoah Force:

SelectFaction = CSA
SelectRegion = $Warren_VA
StartEvent = evt_nam_CSA_FirstLevy1861B|1|1|NULL|NULL|$Warren_VA|NULL

Conditions
FixedDate = 1861/05/01 (Date triggered, obviously)

Actions
SelectRegion = $Warren_VA (Region Name, obviously)

CreateStruc
SetType = $Depot
SetLevel = 1
SetName = Strasburg Depot
Apply
SetHealth = 100
SetCohesion = 100
So, this piece of code right here, seemingly attached to the depot, is actually what controls how the unit is formed. It was set to 30 in the vanilla script, and you can see that I've changed it to 100. Now the Shenanndoah Force will show up fully formed, thus not draining resources from the CSA player on the first few turns.

ChangeMoneyPool = 100
I also found this lovely piece of code elsewhere. This is a way to add a direct cash infusion during an event. I am experimenting with giving the South a bit of an extra little boost in the third turn to help get their economy started.


SelectFaction = CSA
SelectRegion = $Warren_VA
CreateGroup
Posture = $Defensive (The stance the units spawn in)
SetKind = $Land
Entranch = 0 (The level of entrenchment a unit spawns with)
InCS = 0 (Whether or not a unit spawns inside a city. 0 means no, 1 means yes.)
FixType = 3 (How many turns the unit remains fixed in place. 999 means permanent, 0 means they start free)
SetName = Shenandoah Force
Apply
CreateUnit
SetType = $uni_CSA_JJohnston3
SetName = Joseph E. Johnston
Apply
CreateUnit
GMEParam = 2 (I still have no idea what this does, but every time I messed with it, I got error messages.)
SetType = $uni_CSA_BdeN2
FlavorName = Brig. Gen. T. Jackson
SUFlavorName = 2nd Virginia|4th Virginia|5th Virginia|27th Virginia|33rd Virginia
SetLevel = 1 (Experience level the troops start with)
SetName = Stonewall Bde
Apply
CreateUnit
SetCommit = 3
SetType = $uni_CSA_Jackson
SetName = Thomas J. Jackson
Apply

User avatar
tribeticus
Captain
Posts: 191
Joined: Tue Jan 19, 2016 9:05 pm
Location: Ocean, NJ

Re: Looking to Get Started

Sun Dec 11, 2016 4:41 pm

You can copy an event and spawn any kind of unit you want, and the Flavor Name really means nothing, you can name the units and the Flavor Name whatever you want. I have not found any conflicts in doing this.

grimjaw
General
Posts: 506
Joined: Wed Feb 09, 2011 5:38 am
Location: Arkansas

Re: Looking to Get Started

Thu Dec 15, 2016 12:39 am

You can copy an event and spawn any kind of unit you want, and the Flavor Name really means nothing, you can name the units and the Flavor Name whatever you want. I have not found any conflicts in doing this.

No conflict, but will affect the force pool on the board. For example, say the game defines the force pool as allowing five units of type X, and you already have four units of type X on the board. If you spawn another through an event, it will probably subtract the last one from your force pool and thus you won't be able to build it through the recruit panel. Not a big deal, but something to keep in mind. You can spawn any number of units via event and exceed the force pool specification, but the recruit panel is limited to the force pool amount. (I think)

I will test this to make sure, but I'm fairly certain. I know the Union force pool of sailors is affected this way if you use the "land sailors" RGD, and there's nothing in that event that specifically references the force pool.

User avatar
tribeticus
Captain
Posts: 191
Joined: Tue Jan 19, 2016 9:05 pm
Location: Ocean, NJ

Re: Looking to Get Started

Fri Dec 16, 2016 3:58 pm

Yeah if you are worried about that just changed the forcepool. I usually just stick to making a whole new unit with its own pool so nothing in the game gets skewed.

Return to “CW2 Mods”

Who is online

Users browsing this forum: No registered users and 6 guests