Jump to content

[LE] Civil War Modding.


flatline115

Recommended Posts

So some of you may wish to torture yourself as I have and mod the Civil War Questline. I hope to outline some useful functions/information in this post.

 

Faction Enums:

1: Imperial

2: Stormcloak

 

Hold Capital Locations:

 

 

Solitude: SolitudeLocation

Markarth: MarkarthLocation

Morthal: MorthalLocation

Whiterun: WhiterunHoldLocation

Falkreath: FalkreathLocation

Dawnster: DawnstarLocation

Winterhold: WinterholdLocation

Windhelm: WindhelmLocation

Riften: RiftenLocation

 

 

 

Hold Enums:

 

 

0: Unset

1: Haafinger

2: Reach

3: Hjaalmarch

4: Whiterun

5: Falkreath

6: Dawnstar

7: Winterhold

8: Eastmarch

9: Riften

 

 

 

(Hold names were changed to city names where applicable)

Functions:

 

 

Vocab:
Function; This is the the name of the function and its arguments.
Description; This tells you what it does.
Notes; Just some things I think could be noted.
Line: Says where the function starts (so you can add custom functionality)
Function: AddCivilWarAchievment(int whichCivilWarAchivement, Location AssociatedLocation)
Description: (Obviously) Adds civil war achievements via steam.
Notes: 1: For Joining a side 2: For taking a fort in riften/reach 3: Wining the war (Hero of Skyrim)
Line: 1,175
Function: modObjectiveByEnemySoldierDeath(Actor DeadSoldier, int AmountToMod, Location Hold)
Description: This is an old function (likely used by CWO) that changes the objective by the amount of soldiers that died.
Notes: This could be used to mod in skirmishes.
Line: 1,195
Function: modObjectiveBySabotage(ResourceObjectScript ResourceObject, int AmountToMod)
Description: Another old function (again likely used by CWO) apparently there was the ability to Sabotage and your objective changed via this.
Line: 1,226
Function: modObjectiveByMissionSuccess(Location HoldLocation, int AmountToMod)
Description: Changes the objective with mission success.
Notes: AmountToMod seems to do nothing from looking at the source.
Line: 1,251
Function: modCWObjGlobal(GlobalVariable GlobalToModify, float amountToAdd)
Description: Modifies Global Values that are defined in the CWScript.
Line: 1,273
Function: completeCWObj(Location Hold)
Description: Essentially this completes a holds objective
Notes: Useful for finishing a questline up in a hold.
Line: 1,289
Function: failCWObj(Location HoldWhoseObjectiveToFail)
Description: The exact opposite of completeCWOBJ; used by CWO.
Notes: Useful for finishing a questline up in a hold where the player failed.
Line: 1,312
Function: updateObjective(location HoldLocationWhoseObjectiveWeShouldUpdate, bool MarkObjectiveComplete, bool FailObjective, GlobalVariable GlobalToResetDueToFailure)
Description: Marks an objective for the hold (i.e. conquer falkreath) either failed, completed or the initial display of it; does nothing if it is Completed already.
Line: 1,331
Function: displayFactionLeaderObjective()
Description: Literally just used to start up Liberation of Skyrim, bro.
Notes: This is and has been useful for myself when setting up a custom introduction to this quest. Of course this would be useful for you if trying to set up a quest as well.
Line: 1,383
Function: DisplayHoldObjective()
Description: Basically just sets the objective for a specific hold; is used for the linear system.
Line: 1,403
Function: FactionName(int CWFaction)
Description: Gets the factions name
Line: 1,474
Function: HoldName(int HoldNumber)
Description: Gets the holds name via the Hold Enum.
Line: 1,490
Function: getFaction(int FactionToReturn, bool ReturnNPCFaction)
Description: Gets the NPC/Player faction depending on the perimeters.
Line: 1,526
Function: getPlayerAllegianceFaction(bool ReturnNPCFaction)
Line: 1,550
Function: getPlayerAllegianceEnemyFaction(bool ReturnNPCFaction)
Line: 1,554
Function: getOppositeFactionInt(int FactionWhoseOppositeYouWant)
Line: 1,558
Function: GetRikkeOrGalmar(int iFaction)
Description: Returns Rikke or Galmer depending on the parameteres; 1 = Rikke, 2 = Galmer and -1 = Returns which one is in the players faction.
Line: 1,576
Function: CheckRikkeGalmarNotAtCampPackageLocationAndMoveIfNeeded(Actor ActorToCheck, Package PackageToCheck, Location LocationToCheck, ObjectReference MarkerToMoveTo)
Line: 1,603
Function: MoveRikkeGalmarToCampIfNeeded(bool CheckIfUnloaded)
Description: Moves Galmar/Rikke to the correct camp; depending on the parameter they may not move if they're loaded in 3D.
Line: 1,623
Function: GetCWObjGlobal(int HoldNumber)
Description: Returns a string based on the parameter.
Line: 1,696
Function: GetActorAllgeiance(Actor ActorToCheck)
Line: 1,730
Function: isImperial(Actor ActorToCheck)
Description: Returns if the actor is in the imperial faction.
Line: 1,747
Function: isSons(Actor ActorToCheck)
Description: Returns if the NPC is in the Stormcloak faction.
Line: 1,752
Function: IsPlayerInMyFaction(Actor ActorToCheck)
Description: Returns if the Player is in the NPC's faction.
Line: 1,757
Function: SetPlayerAllegiance(int FactionToJoin, int MakePlayerInvolved)
Description: Sets the players alleginece.
Notes: From the source code this is used during the Jagged Crown as it swaps the Faction Leader alias for either ulfric or tulius.
Line: 1,770
Function: SetPlayerAllegiance(int FactionToJoin, int MakePlayerInvolved)
Description:
Function: SetHoldOwner(Location Hold, int FactionEnum)
Description: Sets the owner of a hold to the faction you specified.
Notes: This just calls the ironically named obsolete function SetHoldOwnerByInt. For most cases this is more accessible for the sub-story you want to tell within each hold however so unless you've custom needs you're better off going with this than SetHoldOwnerByInt.
Function SetHoldOwnerByInt(int Hold, int Faction, bool DiplomaticVict = false)
Description: Another way of setting the hold owner.
Notes: This is useful if you need custom needs given SetHoldOwner just calls this function and thus if you want something specific done for a hold you'll need to edit/add here.
Function: WinHoldAndSetOwner(Location HoldLocationToSet, bool AttackersWon, bool DefendersWon)
Notes: Used to change a Holds Owner after a siege. The downside to using this modding-wise is that it removes
bounty gold which you may not want to be removed depending on what you've modded in.
Function: WinHoldAndSetOwnerKeywordDataOnly
Notes: This is better to be used for dialogue changes. So storywise you could set the keyword data and after the dialogue use SetHoldOwner().
Function: WinHoldOffScreenIfNotDoingCapitalBattles(Location HoldToWin, bool AttackersHaveWon = true, bool DefendersHaveWon = False)
Notes: Just used for fort captures and all that Jazz. Useless modding wise imo.
Function: RemoveGarrisonFromWar(Location LocationToTurnOff)
Notes: This makes a garrison neutral in the conflict between the Imperials and Stormcloaks. This COULD be useful if you want to make a storyline where a hold bounces off from both factions and becomes independent. I assume this is used for diplomatic immunity by bethesda.
Function: AddEnemyFortsToBackToWar(bool ShowDebugMessage = False)
Notes: Used when restarting the war; could be used for a rebreking out of hostilities if doing a second peace treaty.
Function: AddGarrisonBackToWar(Location LocationToTurnOn, int FactionToOwn = 0, bool SkipSetOwnerCall = False)
Notes: See above.
Function: RegisterLocationAttacked(Location HoldLocation, location AttackedLocation, int iFaction = 0)
Notes: Diplomatic Immunity stuff. Doesn't really have any other purpose.
Function: GetWinner(Location LocationOfFinaleBattle, bool AttackerWon = false, bool DefenderWon = False)
Notes: Gets the winner of the last battle(?). Could be used for stories and w/e.
Function: IsActorDefender/Attacker(actor actorToCheck, Location locationOfBattle)
Notes: Checks if an Actor (most likely the player character) was a defender/attacker.
Function: SonsAreAttacking(Location LocationToCheck)
Notes: Self explanatory.

 

 

 

Dialogue:
I swear to god this has to be the most annoying thing about the civil war quests in General (finding all the correct scenes/dialogue). Before I get into all that you should take a note that dialogue views is useless here and you're better off editing from Player Dialogue as this is clearly what Bethesda did and thus it made dialogue views a mess.

 

Ulfric/Tulius:

Quest: CW

Notes: May not contain all dialogue but it does contain a vast majority of it that you will want to look at. CW also contains stages that you'll need when starting CWObj.

 

Editing CWScript:

Open it up in SublimeText/Notepad++/Whatever and then go away at it. From my experience you can not edit the script in CK itself but you can rebuild the script after making changes to it thus negating the lock bethesda put on it.

 

(I will continue later my hands are sore from typing)

Edited by flatline115
Link to comment
Share on other sites

What are you going to do?

 

I'm working on an additional resolution to civil war, where

- soldiers stop being so aggresive towards the other faction

- this should includeverbal agression as well

- maybe make them enemies of Thalmor faction at that point

- Ulfric and Tullius duel to death at Weynon Stones.

- Korvanjund, if still blocked, gets unblocked

 

I'm not sure if I will force stop running civil war quests at that point, or just leave it as an option to fiddle with.

Link to comment
Share on other sites

As far as what you're working on; you could use Set/ModReaction for both of the factions to slowly neutralize the aggressiveness. Verbal' aggression is somewhat harder as you've to find the dialogue and edit its conditions to occur individually and with all the greetings and such this could be annoying. Other things like the duel would've to end the quest as immersion is destroyed if you continue fighting the war and then have to siege windhelm/solitude and kill him... Again.

Link to comment
Share on other sites

  • 5 years later...

So theoretically if I created an activator and tied this script to it could i potentially change the hold ownership in Whiterun from Imperial to Stormcloak pre Civil War?

 

Event OnActivate(ObjectReference akActionRef)
SetHoldOwner(WhiterunHoldLocation, int 2)
EndEvent

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...