Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
Initial commit
  • Loading branch information
msolefonte authored Jul 14, 2020
1 parent 57792df commit 7d54007
Show file tree
Hide file tree
Showing 5 changed files with 322 additions and 2 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0] Initial Commit - 07.14.2020

- Initial commit
137 changes: 135 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,136 @@
# Victory Conditions Overhaul 2 Framework for TW:W2
# VCO2 Framework

Victory Conditions Overhaul 2 Framework for TW:W2
[Steam Workshop Mod Link](https://steamcommunity.com/sharedfiles/filedetails/?id=2165815605)

Victory Conditions Overhaul 2 framework mod for Total War: Warhammer II.

## Introduction

Mod for Total War: Warhammer 2 that adds a framework to easily add custom victory conditions to the game. Modding
victory conditions is notably difficult and time consuming because it requires to create a `startpos.esf` file each
time. This is a problem for the developer, as it takes more than ten minutes to compile and it leaves no logs, but also
for the user, as compatibility with other mods is broken. This framework solves all these problems.

## Introduced features

* Victory Conditions are now loaded dynamically
* The compilation times have been reduced to zero
* Creating `startpos.esf` is no longer required
* Compatibility patches are neither
* Easier and faster debug
* Objectives are now loaded per faction, not in blocks
* Small bugs are not longer going to affect large sets of factions
* Easier debugging, as now only one faction is going to have bugs at a time
* Native support for add-ons and submods
* Creating custom victory conditions is now encouraged
* New submods for new victory conditions type are now available: Economic, Military and Cultural Victories are back
* Now users can choose which victory conditions they want to have active
* Enhanced compatibility with faction unlockers and major campaign modifications
* Complete support for scripted objectives
* Now the victory objectives are not limited to the default options

## How to use

### As a user

Subscribe and enjoy.

### As a developer

To create a submod you have to create a `.pack` file composed by two things: the framework loader and the victory
conditions. First of all, you have to decide a name for your mod. This name does not have the be the same that the
one you use in the `.pack` file or the Steam Workshop, but has to be consistent along the mod. In this guide, we are
going to call it `your-mod-name`.

#### The framework loader

Once decided, you have to create a script named `<your-mod-name>.lua` and place it in the `script/campaign/mod/` folder.
The content of that script has to be the following one:

```lua
local vco = require("script/vco/lib/vco")

cm:add_first_tick_callback(function() vco:trigger_custom_missions("<your-mod-name>") end);
```

#### The factions folders

Then, you have to create the folder `src/script/<your-mod-name>/factions` and place there a folder for each faction you
want to mod. Its name has to be the key of the faction, which can be checked in the table `factions`, available at Dave.
For example, the folder name for The Golden Order has to be `wh2_dlc13_emp_golden_order`.

Inside of these folders, you have to create a new one called `campagins` and, inside of it, other ones for each campaign
key. The available factions are the Vortex and the Mortal Empires and the keys are also available at Dave. Finally,
inside of it, you have to create a `missions.lua` file where all the victory conditions are going to be placed.

All in all, to add new victory conditions to The Golder Order Mortal Empires campaign, you have to create these files:

* `script/campaign/mod/<your-mod-name>.lua`
* `script/<your-mod-name>/factions/wh2_dlc13_emp_golden_order/campaigns/main_warhammer/missions.lua`

#### The objectives script

Now, inside of each `missions.lua`, you have to export a list of missions, which is an array of strings in the default
`victory_objectives.txt` format. Here goes one simple example:

```lua
local missions = {
[[
mission
{
victory_type vco_victory_type_long;
key wh_main_long_victory;
issuer CLAN_ELDERS;
primary_objectives_and_payload
{
objective
{
type OWN_N_UNITS;
total 100;
}
payload
{
game_victory;
}
}
}
]]
};

return missions;
```

As the missions interfaces are available in the official docs and in the Assembly Kit, under the path
`Steam\steamapps\common\Total War WARHAMMER II\assembly_kit\raw_data\EmpireDesignData\campaigns\main_warhammer\victory_objectives.txt`,
the most interesting thing to discuss here are the `victory_type` possibilities. The possible values are
`vco_victory_type_short`, `vco_victory_type_long`, `vco_victory_type_ultimate`, `vco_victory_type_economic`,
`vco_victory_type_military` and `vco_victory_type_cultural`. It is important to understand that only one type of each
can be available at the same time per faction, so, if you own multiple submods that add, for example, a Long Victory
condition, one is going to override the other.

## Frequently Asked Questions

The FAQ can be found [here](https://www.github.com/msolefonte/tww2-vco2-framework/docs/faq.md).

## Contributing

Feel free to add issues or to create pull requests. Help is always welcome.

## Versioning

[SemVer](http://semver.org/) is used for versioning. For the changelog, see [CHANGELOG.md](CHANGELOG.md).

## Authors

* **Marc Solé Fonte** - *Initial work* - [msolefonte](https://github.com/msolefonte)

## License

This project is licensed under the Apache License, Version 2.0 - see the [LICENSE](LICENSE) file for details.

## Acknowledgments

* Special thanks to [Vandy](https://github.com/chadvandy) for its support during the development.
* Special thanks to all the users that have supported the development economically.
* Thanks to all the modders of the **Da Modding Den** Discord for they knowledge and they experience.
Binary file added dist/zzz_vco2_framework.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
125 changes: 125 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Frequently Asked Questions

Use `Ctrl+F` to look for your question.

## General

### Do Achievements still work?

Yes, they do.

### Is this compatible with Steel Faith Overhaul?

It is mean to be and tested to work together. However, I am not a user of SFO so perhaps some objectives are not
achievable. Feel free to report any bug or suggestion to improve the compatibility.

### Is this compatible with _[insert-mod]_?

I am sorry, but I have not tested this together with all the other mods in the Workshop. The framework is mean to be
reliable and compatible with almost anything, but there can be some collisions anywhere. I do not know. In any case,
the first approach should be trying it before asking.

### Is this savegame compatible?

Yes and no. Victory Conditions are stored in the save file, so adding the mod will not modify a started campaign. This
is the desired approach, as new updates should not affect the current campaigns of the users. So, no, you cna not change
the objectives dynamically but it is savegame compatible in the mean that it is not going to break your current
campaign.

However, note that uninstalling the framework will break the game. This can not be parched as the new savegames try to
load database data that does not exist anymore. In that case, if you want to play two campaigns at the same time, what
you have to do is start one without the mod, saving, starting another one with the mod, saving, and playing both with
the mod enabled.

### Where can I report a bug?

You can open issue at GitHub, leave a comment in the mod or contact me directly.

### How can I contact you?

You can contact me here at GitHub or at Steam. My username there is [Wolfy](https://steamcommunity.com/id/WolfyLPDC/).
I, however, do not recommend using these method for reporting issues or sharing ideas or request, being the Total War
modders discord **"Da Modding Den"** the place where you should ask for me.

### How can I support this project?

Glad you asked. You can like the mods and share it with your friends. The bigger the community, the faster this mod is
going to grow and the more interest I am going to place into maintaining it. You can also, of course, create Pull
Request at GitHub or contact me directly to introduce new features.

I would also be very grateful if you could give me a star in the GitHub projects related to the mods. That gives me
visibility and helps me in my working life.

Finally, if you want to support economically my job, feel free to donate via
[Patreon](https://www.patreon.com/wolfylpdc) or [PayPal](https://www.paypal.me/echaravolar).

### I have an amazing idea for a mod

And I am sure that it is amazing and revolutionary. But I am, possibly, not the person that is going to follow that
dream. I have a limited agenda and mod as a hobby, so, by default, I am not going to accept any request comming from
anyone. This is not a job for me.

## Framework

### Can I create my own submod?

Yes, of course.

### How can I create a submod?

You have a guide available [here](https://github.com/msolefonte/tww2-vco2-framework/blob/master/README.md). You can also
have all my mods available at GitHub, so just check them. Open Source is amazing, isn't it?

## Main Mod

### Where can I check the changes introduced?

The changes introduced are available [here](https://github.com/msolefonte/tww2-vco2-main/blob/master/docs/README.md).

### Does this mod also modifies Co-Op / Head To Head Victory Conditions?

Nope. They are kept the same than in vanilla. I know a lot of people will be happy with that addition, but I am not a
player of them, so I am not going to spend weeks working in something I am not going to use.

## Cultural Victory Submod

### Where can I check the changes introduced?

The changes introduced are available
[here](https://github.com/msolefonte/tww2-vco2-submod-cultural/blob/master/docs/README.md).

### I am playing an horde faction but can not see the new victory conditions. Is that normal?

Yes. Horde factions do not have Cultural, Economic or Military victory conditions available. There are multiple reasons,
practical, technical and logical for it, so do not expect me to change it.

## Economic Victory Submod

### Where can I check the changes introduced?

The changes introduced are available
[here](https://github.com/msolefonte/tww2-vco2-submod-economic/blob/master/docs/README.md).

### I am playing an horde faction but can not see the new victory conditions. Is that normal?

Yes. Horde factions do not have Cultural, Economic or Military victory conditions available. There are multiple reasons,
practical, technical and logical for it, so do not expect me to change it.

## Instant Victory Submod

### Where can I check the changes introduced?

The changes introduced are available
[here](https://github.com/msolefonte/tww2-vco2-submod-cheat/blob/master/docs/README.md).

## Military Victory Submod

### Where can I check the changes introduced?

The changes introduced are available
[here](https://github.com/msolefonte/tww2-vco2-submod-military/blob/master/docs/README.md).

### I am playing an horde faction but can not see the new victory conditions. Is that normal?

Yes. Horde factions do not have Cultural, Economic or Military victory conditions available. There are multiple reasons,
practical, technical and logical for it, so do not expect me to change it.
53 changes: 53 additions & 0 deletions docs/steam_page.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[img]https://i.imgur.com/fVVaDCS.gif[/img]

[h2]Introduction[/h2]
This mod adds a framework to easily add custom victory conditions to the game. Modding victory conditions is notably difficult and time consuming because it requires to create a [i]startpos.esf[/i] file each time. This is a problem for the developer, as it takes more than ten minutes to compile and it leaves no logs, but also for the user, as compatibility with other mods is broken. This framework solves all these problems.

You have to use it together with another mod. The framework will not do anything by itself.

[h2]Introduced features[/h2]
[list]
[*]Victory Conditions are now loaded dynamically
[list]
[*]The compilation times have been reduced to zero
[*]Creating [i]startpos.esf[/i] is no longer required
[*]Compatibility patches are neither
[*]Easier and faster debug
[/list]
[*]Objectives are now loaded per faction, not in blocks
[list]
[*]Small bugs are not longer going to affect large sets of factions
[*]Easier debugging, as now only one faction is going to have bugs at a time
[/list]
[*]Native support for add-ons and submods
[list]
[*]Creating custom victory conditions is now encouraged
[*]New submods for new victory conditions type are now available: Economic, Military and Cultural Victories are back
[*]Now users can choose which victory conditions they want to have active
[/list]
[*]Enhanced compatibility with faction unlockers and major campaign modifications
[*]Complete support for scripted objectives
[list]
[*]Now the victory objectives are not limited to the default options
[/list]
[/list]

[h2]Frequently Asked Questions[/h2]
A list of frequently asked questions can be found [url=https://www.github.com/msolefonte/tww2-vco2-framework/docs/faq.md]here[/url].

[h2]Special Thanks[/h2]
[list]
[*]Special thanks to Vandy for its support during the development.
[*]Special thanks to all the users that have supported the development economically.
[*]Thanks to all the modders of the [b]Da Modding Den[/b] Discord for they knowledge and they experience.
[/list]

[quote]
[h2]Support My Work[/h2]
[img]https://i.imgur.com/fVVaDCS.gif[/img]
You can like the mod and share it with your friends. The bigger the community, the faster this mod is going to grow and the more interest I am going to place into maintaining it. You can also, of course, create Pull Request at GitHub or contact me directly to introduce new features.

Finally, if you want to support economically my job, feel free to donate via [url=https://www.patreon.com/wolfylpdc]Patreon[/url] or [url=https://paypal.me/echaravolar]PayPal[/url].

[url=https://www.patreon.com/wolfylpdc][img]https://images.sftcdn.net/images/t_app-logo-l,f_auto,dpr_auto/p/18db3d97-101b-4416-aca9-3e5eeafbebec/3698961115/patreon-icon.png[/img][/url][url=https://paypal.me/echaravolar][img]https://images.sftcdn.net/images/t_app-logo-l,f_auto/p/395cd2e2-9b31-11e6-b9af-00163ed833e7/678795089/paypal-icon.png[/img][/url]
[/quote]

0 comments on commit 7d54007

Please sign in to comment.