VRA - Vaelia Random Adventures [SP Campaign]

Discussion and development of scenarios and campaigns for the game.

Moderators: Forum Moderators, Developers

vghetto
Posts: 22
Joined: November 2nd, 2019, 5:12 pm

VRA - Vaelia Random Adventures [SP Campaign]

Post by vghetto » December 3rd, 2019, 3:16 pm

Hi,

This is a place holder post for VRA incase I decide to upload it to the addons server.

For now you can get it from github, just make sure to rename the extracted folder and remove the -master appendage.
https://github.com/virtualghetto/Vaelia ... master.zip

A bit about VRA:
It is a SP campaign that relies heavily on random map generation. (both regular and lua)
You start not being able to recruit much and units that yield to you will offer to train new recruits for you. Only units level 0 and level 1 may yield.
Once you level up units, lower level units will ask to stop recruiting for you.
There are many features and factions and things happening. I'll leave it up for you to discover.
I recommend starting with plain. Sigurd signpost is also a good start unless you're unlucky and get a waterworld or something like that.

You get the basic idea. Let me know if you think it would be worthwhile uploading this mod to the addons server.

A special thank you goes to SigurdFireDragon I lifted a lot of Sigurd's code, and the wesnoth dev team. Look at
Credit.txt to see where some code came from.

Note: I'm sad to see The Hammer of Thursagan's invaders scenario go (Why oh why?!). It was the catalyst that got me into modding wesnoth. A thank you to whoever wrote that scenario.

Enjoy.

You can see a couple of screenshots here:
https://github.com/virtualghetto/Vaelia ... Adventures

white_haired_uncle
Posts: 571
Joined: August 26th, 2018, 11:46 pm

Re: VRA - Vaelia Random Adventures [SP Campaign]

Post by white_haired_uncle » December 4th, 2019, 3:14 am

Just got started. Before I get too far in, why would I decline the ability to recruit certain units (for a challenge?)?

Is there a reason some units yield and some die, or is it just random?

I started with Sigurd and the scenario ended when I killed the enemy leader, who was not the last enemy unit, but the objectives say I have to kill all enemies.

It may not turn out to matter, but it might make sense to add a choice when you step on a trigger ("Do you want to go to Sigurd?").

I killed an orc with a peasant, causing him to level up. I saw a blue "+20" appear. 20 what?

vghetto
Posts: 22
Joined: November 2nd, 2019, 5:12 pm

Re: VRA - Vaelia Random Adventures [SP Campaign]

Post by vghetto » December 4th, 2019, 4:49 am

white_haired_uncle wrote:
December 4th, 2019, 3:14 am
Just got started. Before I get too far in, why would I decline the ability to recruit certain units (for a challenge?)?
In case you don't want to clutter your recruit list with units you'd rarely use. For myself I usually decline the Giant Rat, Mudcrawlers and all of Dunefolk. As another example, once I level the Poacher to Trapper, I usually dismiss the Poacher but keep the woodsman and bowman.
white_haired_uncle wrote:
December 4th, 2019, 3:14 am
Is there a reason some units yield and some die, or is it just random?
Currently there is a 40% chance that a level 0 or level 1 enemy unit would yield. Leaders never yield.
white_haired_uncle wrote:
December 4th, 2019, 3:14 am
I started with Sigurd and the scenario ended when I killed the enemy leader, who was not the last enemy unit, but the objectives say I have to kill all enemies.
Yes it's meant to be defeat enemy leaders. I'll change the text. Only the volcano level doesn't end when you kill all enemy leaders and it is the only timed level with an early finish bonus.
white_haired_uncle wrote:
December 4th, 2019, 3:14 am
It may not turn out to matter, but it might make sense to add a choice when you step on a trigger ("Do you want to go to Sigurd?").
Sounds like a good idea for the Sigurd signpost and maybe the Volcano, but I don't think I'll do it for the rest. Thanks!
white_haired_uncle wrote:
December 4th, 2019, 3:14 am
I killed an orc with a peasant, causing him to level up. I saw a blue "+20" appear. 20 what?
Soldiers loot the bodies of fallen enemies. +20 is the gold you looted of them. The amount depends on the unit killed. You don't get any gold from surrendered units.

white_haired_uncle
Posts: 571
Joined: August 26th, 2018, 11:46 pm

Re: VRA - Vaelia Random Adventures [SP Campaign]

Post by white_haired_uncle » December 4th, 2019, 6:51 am

I played five scenarios on easy.

I started in Sigurd. Leaders and L0s, fighting more powerful enemies. I like it. A little too easy with all the crates. Maybe limit the number of sgts to three or so. The units that yield (and get to attack in the same turn, all healed up and cured, and are loyal) probably tips the balance too much to the player. I didn't even use a green potion. Ended with 500 gold. From there, it just got progressively easier as my units became more powerful (and tons of villages that the AI doesn't seem interested in).

Next was plains, ending with 1000GP. Then desert, which was a bit more challenging with dwarves in hills and a constant stream of merfolk, but really if I had just recruited and recalled more units I think it would have been much easier. Ended with 2000. Finished winter with 3000GP. Finished marsh with 3200, but I wasn't really trying anymore and gryphon riders killed the SW leader before I could even get there so I finished early (I could have made a lot more gold by wasting a bunch of turns).

I like the concept, but I think even if you make things harder it (the ability to recruit/recall) still might progress a little too quickly. Maybe only allow recruiting level 0 units (suppose some races might need new units for this)? Leave units who yield with only a few HP (and poisoned if they were) so you have to protect them if you want to keep the ability to recruit their race (I'm assuming you'd only be able to recruit L0 drakes if you have a drake in your recall list and/or active units, for example)? Maybe they only yield if they have a few HP left (5 or less on easy, 3 or less on medium, 1 on hard -- though I just made those up as an example), but die it they hit zero or less (stealing Trainkill from Ravagers would be cool here)?

vghetto
Posts: 22
Joined: November 2nd, 2019, 5:12 pm

Re: VRA - Vaelia Random Adventures [SP Campaign]

Post by vghetto » December 4th, 2019, 5:19 pm

Hi,
First off thank you for that feedback, it was great. Other than having different values for fog and shroud there wasn't much difference between the difficulties to speak of.

I just changed all of that starting with the gold system. Now the minimum gold is 125 (as before), but that value does not get added after each round. Only when you get below the minimum you get bumped back up to 125, otherwise you start with what you finished minus the 2 percent.

Except for the Volcano which has a bonus. The carryover depending on the difficulty is 40 60 80.

I also reduced the amount that the chests give for each difficulty and reduced their number and that of potions.
The potion damage perk also depends on the difficulty. Hard has no increase in damage.

Yielding units have no moves and on the hard difficulty their hitpoints is reduced to 1.

Some of these values including number of turns, yield percent, ally percent, facing a third and fourth foe etc.
can be tweaked by changing the values in the config file:
https://github.com/virtualghetto/Vaelia ... config.cfg

While I'm at it as might explain that the factions are defined here:
https://github.com/virtualghetto/Vaelia ... ctions.cfg

Creating your own faction is easy just follow the example of say Necromancer, find where ever that is and add yo
ur corresponding faction name in the same format.

If you want to be able to recruit higher level units than 2, just add their types to:
https://github.com/virtualghetto/Vaelia ... ecruit.cfg

I am considering if after a certain number of rounds, those factions get automatically get leveled up to their next rescpective level. I haven't decided yet if I want to do that.

vghetto
Posts: 22
Joined: November 2nd, 2019, 5:12 pm

Re: VRA - Vaelia Random Adventures [SP Campaign]

Post by vghetto » December 4th, 2019, 5:24 pm

Oh, about the AI ignoring villages, well that's vanilla wesnoth AI for you. I didn't mess with that bit.

mattsc
Posts: 1127
Joined: October 13th, 2010, 6:14 pm
Location: Hidden on the hex behind Fred

Re: VRA - Vaelia Random Adventures [SP Campaign]

Post by mattsc » December 5th, 2019, 12:58 am

vghetto wrote:
December 4th, 2019, 5:24 pm
Oh, about the AI ignoring villages, well that's vanilla wesnoth AI for you. I didn't mess with that bit.
You could try using the Experimental_AI. It has two additional actions (called 'candidate actions', CAs, in the Wesnoth AI framework) that specifically provide more aggressive village grabbing and moving toward villages. In fact, if you have the time and energy to test how that works in your scenario/campaign, that would be very timely. We're in the process of merging most of the Experimental AI's CAs into the default AI for Wesnoth 1.16, and I know that there are some issues with both of these CAs (but I am not sure how significant those are). So any sort of feedback would be very valuable.

vghetto
Posts: 22
Joined: November 2nd, 2019, 5:12 pm

Re: VRA - Vaelia Random Adventures [SP Campaign]

Post by vghetto » December 5th, 2019, 4:58 am

mattsc wrote:
December 5th, 2019, 12:58 am
You could try using the Experimental_AI. It has two additional actions (called 'candidate actions', CAs, in the Wesnoth AI framework) that specifically provide more aggressive village grabbing and moving toward villages. In fact, if you have the time and energy to test how that works in your scenario/campaign, that would be very timely. We're in the process of merging most of the Experimental AI's CAs into the default AI for Wesnoth 1.16, and I know that there are some issues with both of these CAs (but I am not sure how significant those are). So any sort of feedback would be very valuable.
Hi,
Well I added the line but haven't enabled it yet, I have a question first.

https://github.com/virtualghetto/Vaelia ... s.cfg#L698

If you don't mind taking a look at that link you'll see that I use recruitment_diversity, avoid and limit for recruitment_instructions
Will the experimental_ai conflict with any of those?
Also, I'm on wesnoth 1.14.5. (debian pkg) Will that be an issue?
If not, then sure I wouldn't mind having it enabled by default.

vghetto
Posts: 22
Joined: November 2nd, 2019, 5:12 pm

Re: VRA - Vaelia Random Adventures [SP Campaign]

Post by vghetto » December 5th, 2019, 5:01 am

I updated the code. Now the leader of the faction is chosen by random from the given faction recruitment list and is leveled up if possible.

mattsc
Posts: 1127
Joined: October 13th, 2010, 6:14 pm
Location: Hidden on the hex behind Fred

Re: VRA - Vaelia Random Adventures [SP Campaign]

Post by mattsc » December 5th, 2019, 5:15 am

vghetto wrote:
December 5th, 2019, 4:58 am
If you don't mind taking a look at that link you'll see that I use recruitment_diversity, avoid and limit for recruitment_instructions
Will the experimental_ai conflict with any of those?
Also, I'm on wesnoth 1.14.5. (debian pkg) Will that be an issue?
If not, then sure I wouldn't mind having it enabled by default.
Ah, yes, that would be a problem (in 1.14; for 1.16 it will not any more). The recruitment aspects are easy to deal with, you could just use most of the Experimental AI, but with the old recruitment CA. [avoid] is slightly more complicated, as it was previously not taken into account by all CAs of the ExpAI. I have that fixed by now, but it is not merged yet. It's still possible, you'd just have to use the fixed 1.16 CAs locally in your add-on.

Let me know if you want to try that to see if it gives you better villages behavior, and I can send you the code for it.

vghetto
Posts: 22
Joined: November 2nd, 2019, 5:12 pm

Re: VRA - Vaelia Random Adventures [SP Campaign]

Post by vghetto » December 6th, 2019, 7:33 pm

I brought down the number of villages in the regular maps for the normal and hard difficulties.
mattsc wrote:
December 5th, 2019, 5:15 am
Let me know if you want to try that to see if it gives you better villages behavior, and I can send you the code for it.
Ofcourse, I don't mind.

mattsc
Posts: 1127
Joined: October 13th, 2010, 6:14 pm
Location: Hidden on the hex behind Fred

Re: VRA - Vaelia Random Adventures [SP Campaign]

Post by mattsc » December 6th, 2019, 10:08 pm

So (as always, it seems), it's not quite as simple as I thought to get this code working for you. First, there are quite a few differences between 1.14 and 1.15/1.16. That's okay though, I got those worked out. The bigger problem is that the village hunt CA still has some unresolved issues (I haven't gotten to that one yet), and it will take a little to sort those out. I'll let you know when I get there.

In the meantime I thought of something else though. I assume that the problem is not grabbing of villages in reach of units, but moving units toward villages farther away? If so, you could try to set the 'village_value' aspect to a high value (say, 10 to start with or something). Or if you wanted to be more selective, you could use [goal] tags.

Actually, if you had a replay that shows the missing or undesirable behavior that would help me a lot figuring out what might help.

vghetto
Posts: 22
Joined: November 2nd, 2019, 5:12 pm

Re: VRA - Vaelia Random Adventures [SP Campaign]

Post by vghetto » December 7th, 2019, 7:13 am

Yet again, I changed the gold system. The starting gold for the player is calculated the same way as the enemy; average cost of the recruit list times a number. That number for the player and enemy can be set in the config.cfg file.

Another change is allowing the enemy to recruit higher level units even though they are not explicitly listed in factions.cfg. The surrender level of enemy units was also bumped up to 2.
mattsc wrote:
December 6th, 2019, 10:08 pm
In the meantime I thought of something else though. I assume that the problem is not grabbing of villages in reach of units, but moving units toward villages farther away? If so, you could try to set the 'village_value' aspect to a high value (say, 10 to start with or something). Or if you wanted to be more selective, you could use [goal] tags.

Actually, if you had a replay that shows the missing or undesirable behavior that would help me a lot figuring out what might help.
Thank you for taking the time with this.
I'm not sure what the problem that white_haired_uncle experienced exactly with his game. For my games I see AI behave as they usually do with respect to the village grabbing, nothing out of the ordinary. I don't know if he still has the replay or not.

vghetto
Posts: 22
Joined: November 2nd, 2019, 5:12 pm

Re: VRA - Vaelia Random Adventures [SP Campaign]

Post by vghetto » Yesterday, 4:26 am

Hello again,

Latest changes since my last post include:
A new faction called Doppelganger. That faction will mimick whatever recruit list you have at that time.
For the first 2 rounds on any given map, you will fight 1 side with no ally. Volcano is the exception.
After you've fought against at least 7 sides on normal, they'll start to level up. (You can change after how many in utils/config.cfg)
There is a chance that you'll get an ally, but only if there isn't infighting between the enemy sides. You won't get an ally if you're facing just one enemy side.
You can specify your starting type in the config file or you can have it select one for you at random.
The current available random types are Elvish Lord, Royal Warrior, Elder Mage, Chocobone.
You will be able to recruit those types but unlike the default Sergeant, they won't factor into the starting gold calculation. That means on normal you'll start with 96 gold instead of 168.
I included all of World of Conquest II maps to the game, you can get to them with the brand new signpost.
I had to do a bit of surgery to get those to work. So, the maps might not look or feel quite the same as WCII. especially since I had to remove all of the [wc2_terrain] tags and replace them with the good old [random_placement]. It wasn't fun.
You can, for both signposts, choose if want to go to the given map or select a different one without having to back out first.
In all of the signpost maps you are guaranteed to face only 1 side.

The currently available random maps are:
Winter (3 variations)
Plain (2 variations)
Desert (2 variations)
Marsh (2 variations)
Cave (3 variations)
Sigurd's maps (20 maps)
WCII's maps (23 maps)
Volcano (2 variations) This is the same map as Scepter of Fire scenario in Heir To The Throne. One of them goes north to south instead of the original south to north. If you don't know how to get to it, just go up past the cave on the starting map. In this map the village rebels are always on your side.

white_haired_uncle
Posts: 571
Joined: August 26th, 2018, 11:46 pm

Re: VRA - Vaelia Random Adventures [SP Campaign]

Post by white_haired_uncle » Yesterday, 7:40 am

The AI seemed more intent on coming directly at me than picking up villages while doing so. But, it doesn't really matter. The "problem" I had was just that there was too much gold and/or too many ways to get more, and as it started building up it got easier to get more. I think...

1) The bounty you get for a kill was probably high. When I saw it (animation set so fast I normally wouldn't be able to see it) it was usually about enough to recruit a new unit. So, if the AI and I each have 10 units and I kill two of theirs, I now have enough to recruit two more, so now I have a 12-8 unit lead. That seems like it could really tip the balance quickly in my favor. Of course, I'm assuming the AI doesn't get a bounty for killing my units (like it doesn't get yields, and doesn't seem to pick up crates).

2) There were either too many crates, or they had too much gold. It might make things more interesting to have some of them booby-trapped, say a small amount of damage and poison. If they are always going to be positive, I'd recommend removing the prompt asking if you want to open them.

Post Reply