TES : The Stormcloak Rebellion V1

Hi @Dadais , I haven't had the chance to play your scenario, but from what I see it's really innovative with the quests and exploration, I'll try it out as soon as I have the time.

I was wondering why you have all your code in a single events file? I advise you to "split and win", creating different .lua modules for related code, you can encapsulate your exploration related code in one module, another for quests, another for reports, etc. and then have your main events file import all these modules. It will be easier for you to manage, believe me!
 
I'd also recommend using @Prof. Garfield 's Lua Scenario Template as it provides very solid and consistent pre-built functionality that you can easily implement. If you don't need any module in particular, you can just disregard it.

I say because we all tend to reinvent the wheel and code stuff that somebody has already done previously:)
 
I was wondering why you have all your code in a single events file? I advise you to "split and win", creating different .lua modules for related code, you can encapsulate your exploration related code in one module, another for quests, another for reports, etc. and then have your main events file import all these modules. It will be easier for you to manage, believe me!
That's certainly true.

I guess I'm making up there for beeing sometimes light-headed, thus making variables easier to manipulate (restricting local&global ones uses).
On the other side, notepad++ allows for an excellent structuration of the code, making such a file not a probleme to sail in. It's somehow like having modules integrated in a single file, with drawers to open and close.

In the end, while I love having such cathedrals-like codes, I know this a wrong habit to keep.
 
Currently working both on encounter issued from exploration and on special exploration occurences.

M'aiq now knows many more.
On the other side, one may meet giant only near their camps, and exploring near orc stronghold or winterhold college per exemple may now give special situations.
 
So, all the previous content is now implemented, but the quest journal and the previous fight bonuses.
Lots of content got added too (specific scenario picture files weights already more than 168Mo !), yet there is still some to come.

I'll take a pause on lore content to design the new fight system.

The Idea is there to have different range kind of battle and fighting behaviour based on units weapons' ranges and healths.
There shall be a hard limit to the number of battle rounds, yet in theory only reached in siege-like battles.
With that as a base shall with have influences like shields, elements strengths and their resistances, battlegears, spells, etc.

Once this is done, there will be last content addition and the quest log menu to do before checks and release !
 
So, the fight system shall be coded, compiled without error.
I'll test it tomorrow to be alert about strange behaviors, answer correctly issues, and calibrate some static values (defined at the beginning of the file with the others).

You may see there its structure and hints of some of its features, hoping that will be working well.
exemple.png
 
Two or three variable correction (the range one in the opportunities to heal is indeed the round one per exemple), and a small test :

Spoiler First Battle :
A Breton Knight attacked a nord hunter, both with full health !

With luck, it began the fight at close range !
The defending hunter didn't manage to get far from him until the fifth round nor did it manage to fight properly, when he got at short range.
Then, with less or equal 5 hp, the hunter took a last hit before fleeing at long range then successfully fleeing out of range, thus ending the fight and teleporting one tile away at a valid location to move to !

Spoiler Second Battle :
A Stormcloak marksman attacked an imperial legate !

No luck, it began at short range !
The fight lasted 29 rounds, with few changes of range :
9 occurences at short range
5 occurences at long range
15 occurences at close range

The marksman fled* and survived with 17 damages. *atttacking, he stayed on the same tile
The legate took 12 damages and survived too.

Third test, brought a correction. Fight goes on while both units have at least ONE hp, not 0 !

While going whith little tests, corrected a bad bug (with a picture crashing the game) in explorations
and took a tour on the map to alter placement of about ten overlapping bookmarks.
 
Last edited:
you should chuck up a video of your new battle system.. would be cool to see in action!
Sadly, there's not much to show as this system is fully integrated in the civ2 one, and range shall stay hidden if no fight-report is built (was thinking about that only for the ww2 scenario though).

The only noticeable changes would come from the occurrence where a defender can flee and then manage to go to another tile,
or when an attacker flee the fight (and stay in position with no winner)
 
Last edited:
So, pouring more content in the scenario, I'm currently building exploration site of winterhold college :

Trying to recruit mage, enchanting items, exploring the library, selfstudying (to evolve its main magic) or studying in class (randomly chosen, to evolve said main magic field or change its main magic field)

exemple.png


After this part, I'd like to developp first the Reachmen and Thalmor lines and victory conditions before going back to content with few quests and a similar explporation site with the ratway.
 
So, the fight system shall be coded, compiled without error.
I'll test it tomorrow to be alert about strange behaviors, answer correctly issues, and calibrate some static values (defined at the beginning of the file with the others).

You may see there its structure and hints of some of its features, hoping that will be working well.
View attachment 640247
Hi! Quick suggestion: instead of having hardcoded values in the middle of the code, I suggest you declare variables, or even better (if used elsewhere) parameters/static constants so if you want to alter them, you go straight to just one place instead of having them scattered across the code
 
Sadly, there's not much to show as this system is fully integrated in the civ2 one, and range shall stay hidden if no fight-report is built (was thinking about that only for the ww2 scenario though).

The only noticeable changes would come from the occurrence where a defender can flee and then manage to go to another tile,
or when an attacker flee the fight (and stay in position with no winner)
You could have a global flag that the human player can set "onkeypress" to switch on/switch off special combat reports. If that flag is enabled, then prepare a nice dialog showing what happened during combat. And if it's disabled, just leave combat as is :)

That's how I have implemented it in my scenario. I also have units fleeing combat and moving to adjacent tiles :D
 
Hi! Quick suggestion: instead of having hardcoded values in the middle of the code, I suggest you declare variables, or even better (if used elsewhere) parameters/static constants so if you want to alter them, you go straight to just one place instead of having them scattered across the code
Much thanks ! Looking at the code you quoted
Those are indeed few constants to declare there ! Guess my mind was more on the architecture and how to use this function at the moment.
So, thanks again, I'll spend some more time here. :)
 
You could have a global flag that the human player can set "onkeypress" to switch on/switch off special combat reports. If that flag is enabled, then prepare a nice dialog showing what happened during combat. And if it's disabled, just leave combat as is
Truth is, I can't think of a nice way to write these reports here : my test showed tens of rounds with easily a dozen change of range.
I can't figure which choices to make to have the report relevant yet readable.

Had a though about having such thing for the ww2 scenarii on the other side (using an improvement on the strategic map to go read them).

Before going for Reachmen and Thalmor victory paths, I'm going back on the fighting system to upgrade it.
Much thanks again @Pablostuka ! :)
 
Last edited:
While upgrading the combat system (better siege fight structure & better variables and statics use, and upgrading rangeEvolution too), I'm building a fight report system following @Pablostuka 's exemple.

The idea is there only to store the last fight's report so human players may access it in the scenario tips menu in order to be able to understand better the results of a fight.
 
Last edited:
Truth is, I can't think of a nice way to write these reports here : my test showed tens of rounds with easily a dozen change of range.
I can't figure which choices to make to have the report relevant yet readable.

Had a though about having such thing for the ww2 scenarii on the other side (using an improvement on the strategic map to go read them).

Before going for Reachmen and Thalmor victory paths, I'm going back on the fighting system to upgrade it.
Much thanks again @Pablostuka ! :)
So if what you typed inside spoiler tags are actual prints in the console of what is happening on each combat round, what you can do is have a table variable, and store each line of text as a new item (string) in that table. Once the combat is completed, you only need to get the content of the table as a single string which you can print in a dialog.

I am not in the computer now but tomorrow morning I can put here some sample code for you ☺️
 
It works ... I guess.

I shall put some thoughs in it.
View attachment 640743
Guess better like that already
View attachment 640744

And with another little change :

View attachment 640745
Yay! You got it, you don't need any assistance hehehe.

Yeah, something like that, but maybe you want to shorten the texts, or maybe not log each combat round but only when a relevant thing happen, or a critical hit...just to shorten it and make it more user friendly. But it's a very good idea :)
 
Back
Top Bottom