Mystery Campaign Status?

Discussion and development of scenarios and campaigns for the game.

Moderators: Forum Moderators, Developers

SmokemJags
Posts: 580
Joined: February 14th, 2006, 3:24 am
Location: New Avalon
Contact:

Post by SmokemJags » April 6th, 2006, 11:51 pm

Huh, maybe the crashing after every scenario has something to do with my computer or XP then. Or maybe it doesn't happen in 1.1.2a like it does in 1.1.1, I haven't ever tried getting it working past 1.1.1.

I'm sure someone will be able to help you with the save file problem if you make a thread in the WML section.
I used know all about arrays back when I was in college. But not anymore, heh.

Can you attach your hot fixed version of that campaign for version 1.1.2a on these forums? I'd like to try it out and see if the problem with crashing still occurs.
"A wise man speaks when he has something to say. A fool speaks when he has to say something."

zaimoni
Posts: 281
Joined: January 27th, 2005, 7:00 am
Location: Linn Valley, KS U.S.A.
Contact:

Post by zaimoni » April 7th, 2006, 2:13 pm

Ok...the ZIP is intended to be opened in the userdata/data/campaigns subdirectory. I've gone ahead and mirrored the units, and done some testing with the Initiate (Dark Hordes) and the Princess. HTTT units were mirrored from 1.1.2's HTTT.

I've gone ahead and doctored the WML for the Merdwarf and the Dark Hordes Initiate line towards 1.1.2, but have not verified completion yet. [I'm pretty sure the Merdwarf is done.] I have also de-plotted the descriptions for the Dark Hordes Initiate line mirror.

Everything casually works on my system except for savegames. Running the scenario isn't causing obvious difficulties on my system with stderr.txt when Wesnoth is run from the default Windows shortcut.
[EDIT: V2 reworked it to not attempt to use array variables, so savegame works.]
[EDIT: V3 recruit fix.]
[EDIT V4 arrays work; message cleanup.]
[EDIT V5 enemy faction reinits each time, some patching for advanced units.]
[EDIT V6 reverted a bug: gold cost for the privilege of recruiting more powerful units works again. (well, not)]
[EDIT V7 more gold tuning]

Of the mainline scenarios, HTTT and UTBS both use array variables. HTTT always clears the array variables very quickly. There are several scenarios in UTBS that look promising for testing...should get a good idea by looking at a save file for Struggle, and confirmation that clear works by looking at a savefile for Harsh Sands.

I'm not seeing any array variables that are initialized by a means other than a filter in HTTT or UTBS. As currently written, Mystery Scenario wants to initialize array variables element-wise [the backend is actually designed to support up to nine sides]. I've chopped the number of sides supported down to two, but commented which line to modify to get the extra sides back.

Aside: I'm tempted to check Dark Hordes to see how similar the Initiate line is to the Dark Adept line...1.1.x has an advancefrom property for splicing in advances campaign-specific units from standard units. If that checked out, that would be more elegant than the current implementation.
Attachments
Mystery_Campaign_1.1.2_V7.zip
Candidate for complete porting to Wesnoth 1.1.2, other than translations.
(144.29 KiB) Downloaded 79 times
Last edited by zaimoni on April 10th, 2006, 5:54 am, edited 11 times in total.

zaimoni
Posts: 281
Joined: January 27th, 2005, 7:00 am
Location: Linn Valley, KS U.S.A.
Contact:

Post by zaimoni » April 7th, 2006, 2:27 pm

"No problems in stderr.txt" is for Wesnoth 1.1.2a with the image hotfix ZIP from http://www.wesnoth.org/forum/viewtopic.php?t=10765 applied...which does not include the UTBS portraits :(

zaimoni
Posts: 281
Joined: January 27th, 2005, 7:00 am
Location: Linn Valley, KS U.S.A.
Contact:

Post by zaimoni » April 7th, 2006, 8:49 pm

Those "array variables" aren't array variables. And they're uncleanable by the obvious WML.

We'll see what answers come up at http://www.wesnoth.org/forum/viewtopic.php?p=147851 .

zaimoni
Posts: 281
Joined: January 27th, 2005, 7:00 am
Location: Linn Valley, KS U.S.A.
Contact:

Post by zaimoni » April 8th, 2006, 12:44 pm

Oops...Rebels couldn't recruit because "Merman" was undefined. I've fixed that in the V3 ZIP archive, and cleaned up the WML a bit.

SmokemJags
Posts: 580
Joined: February 14th, 2006, 3:24 am
Location: New Avalon
Contact:

Post by SmokemJags » April 8th, 2006, 9:50 pm

I tried V3 on Wesnoth 1.1.2a. Seems flawless. No crashing or problems with saving and loading.
I think we found ourselves a new campaign maintainer. :D

I always liked this campaign because of the random possibilites of it. I suggest you upload it to the campaign server so that it gets the publicity that it surely deserves.

If you're interested in hearing them, I have several ideas for improving the Mystery Campaign...

Edit: Played a bit, noticed some bugs. At least the crashing has stopped.
Bug 1: Enemy's starting gold is not increasing. Seems to be around 100 no matter what level.
Bug 2: Enemy's listed recall list seems to contain remnants from previous scenarios. The AI doesn't ever seem to recruit these units though, for example the necromancer doesn't ever actually recruit elves.
Bug 3: The AI doesn't get improved units.

Thinking about solutions:
The game is storing the information for what scenario you're on just fine. Why not tie that into how the game determines gold and such?

For example:
At scenario start, check for scenario #
Enemy Start Gold = 100 + 50 x scenario number.

Scenario 1 will be 150, scenario 2 will be 200, and so on.

It might also work for the getting improved units.
Check for Scenario #
If Scenario # > 5 allow AI to recruit level 2 units.
If Scenario # > 10 allow AI to recruit level 3 units.
If Scenario # > 15 disallow AI to recruit level 1 units.

This would probably require each faction to be seperated configured, but it seems like a simply applied solution.
Last edited by SmokemJags on April 10th, 2006, 3:30 am, edited 1 time in total.
"A wise man speaks when he has something to say. A fool speaks when he has to say something."

zaimoni
Posts: 281
Joined: January 27th, 2005, 7:00 am
Location: Linn Valley, KS U.S.A.
Contact:

Post by zaimoni » April 9th, 2006, 1:14 pm

Bug #2 is fixed in V4.

#1 and #3 are probably the same bug, currently: gold controls all of the extras. I need to review what had been intended. (Wesnoth 1.0.2 worked by carrying the difficulty variable across levels, and iterated a multiplicative factor to obtain an exponential difficulty rating.)

The recruitment restriction proposal is...interesting. It wouldn't be unusually difficult to code.

zaimoni
Posts: 281
Joined: January 27th, 2005, 7:00 am
Location: Linn Valley, KS U.S.A.
Contact:

Post by zaimoni » April 9th, 2006, 3:27 pm

Sure, go ahead and mention the improvements you're considering.

Hmm...debug mode indicates that extra units are being assigned correctly (now; V4 includes some code stabilization here). That is what is responsible for the varying starting gold for the player on the first scenario (there's a failsafe check, so this may not be entirely wanted behavior). Fixing it to always start with 150 gold for the player would be relatively easy.

Here's how it works currently:
* for a bonus unit to be considered for a side, that side must have at least twice as much gold as the "cost" for being able to recruit that unit.
* if the side is rich enough, a probability check is made. If the probability check is passed, the side is allowed to recruit the extra unit and the cost is immediately deducted from the starting gold (initially difficulty).

Leaders are handled similarly. The opposition's starting gold won't start going up significantly until all of the cheap extras are exhausted.

zaimoni
Posts: 281
Joined: January 27th, 2005, 7:00 am
Location: Linn Valley, KS U.S.A.
Contact:

Post by zaimoni » April 9th, 2006, 5:51 pm

Regarding bugs #1/#3:
It would, of course, help if the enemy factions were reinitialized for each scenario. V5 fixes this.

The main thing left (before declaring it ported) is to proofread the faction config files to see if there are any other units to mirror (there were some from The Rise of Wesnoth and Eastern Invasion, included in this release).

zaimoni
Posts: 281
Joined: January 27th, 2005, 7:00 am
Location: Linn Valley, KS U.S.A.
Contact:

Post by zaimoni » April 9th, 2006, 9:44 pm

I bungled the gold cost deduction for the privilege of recruiting high-level units in V5. V6 fixes.

SmokemJags
Posts: 580
Joined: February 14th, 2006, 3:24 am
Location: New Avalon
Contact:

Post by SmokemJags » April 10th, 2006, 3:27 am

Bug with V6
Enemy had a boatload of gold and was recruiting level 3archmagi and level 2 thieves in scenario 1. Couldn't beat the scenario to playtest further. Nightmare (hardest) difficulty.

Improvement suggestions:
Player always has 300 gold on easy, 250 gold on normal, 200 gold on hard.
150 gold isn't really enough for 7 recalls and that's a pretty insignificant army.
Personally though I always change it to 300 gold no matter what the difficulty. Sooner or later the enemy got so strong it doesn't matter how much gold you have, and I find 300 gold let's the player put together a decent sized but not too large army to meet this inevitable end with in a glorious fashion.

Change factions to match the default era names and recruit tables:
Loyalists, Rebels, Northerns, Undead, Knalgan, Drakes.

Leader selections for all factions and standardize them to level 2.
Rebels already have 3, but elder mage should be removed.
Loyalists already have 2, sergeant should be changed to level 2 lieutenant.
Northerns can choose orc warrior or orc ruler.
Undead can choose Dark Sorc or the Revenant.
Knalgan Choose dwarven steelclad or dwarven stalward.
Drakes get drake warrior or drake flare.

Leave custom units for the AI only.
For example, in older versions the AI undead could recruit Bone Dragons from the EI campaign and would occasionally get the Vampire Lady as it's leader. These custom units suffer the restrictions previously mentioned. Bone Dragon level 3 or 4 not available for AI to recruit until 5 or 10 scenarios, depending what level it is.

Any leader above level 2 becomes available to the AI after level 5.
This includes the Dwarven Runemaster, the Vampire Lady, Orcish Sovereign et cetera.
Elder Mage can be a Rebel leader after scenario 10 because he's what... level 5?

Far-fetched improvements:
Adding more factions to the list, such as those from the Imperial Era, azawraith and barbarian or what have you.
Attachments
I forget which difficulty setting
I forget which difficulty setting
reallybugged.jpg (14.1 KiB) Viewed 1799 times
This is easy difficulty setting.  Nothing easy about it.
This is easy difficulty setting. Nothing easy about it.
reallybuggedeasy.jpg (13.72 KiB) Viewed 1799 times
Last edited by SmokemJags on April 10th, 2006, 3:43 am, edited 2 times in total.
"A wise man speaks when he has something to say. A fool speaks when he has to say something."

SmokemJags
Posts: 580
Joined: February 14th, 2006, 3:24 am
Location: New Avalon
Contact:

Post by SmokemJags » April 10th, 2006, 3:38 am

If you would appreciate help setting up concrete recruit rosters, custom unit availability, and things of that nature let me know and I'll help.
"A wise man speaks when he has something to say. A fool speaks when he has to say something."

zaimoni
Posts: 281
Joined: January 27th, 2005, 7:00 am
Location: Linn Valley, KS U.S.A.
Contact:

Post by zaimoni » April 10th, 2006, 5:51 am

Sigh (bug also affected V4). V7 will go back to V5 behavior, and also quench the gold variability for the player by blocking freebie recruit checks.

I never had a problem with 150 gold baseline; choosing between seven recalls and six recalls and two cheap units is interesting. My general strategy is to send the leader running back for a second recruitment wave once enough villages have been captured.

What I prefered to alter was changing bonus=no to bonus=yes. The surrender code is actually pretty efficient, and it's difficult to actually qualify for more than baseline gold.

However, it's more appropriate for "bureaucratic funded" than mercenary units.

Incidentally: I'm thinking of forking a new campaign rather than outright taking over Mystery Campaign.

SmokemJags
Posts: 580
Joined: February 14th, 2006, 3:24 am
Location: New Avalon
Contact:

Post by SmokemJags » April 10th, 2006, 6:40 am

I never had a problem with 150 gold baseline; choosing between seven recalls and six recalls and two cheap units is interesting. My general strategy is to send the leader running back for a second recruitment wave once enough villages have been captured.
That's fine, it's personal preference. I prefer to recall a ton of units and watch my hold hit -500 because my upkeep is -45. When you have that many high quality units and still lose to overwhelming force, it's incredibly fun. It becomes 'how many can you kill before you get wtfpwned in the face'
Incidentally: I'm thinking of forking a new campaign rather than outright taking over Mystery Campaign.
A new campaign as in a normal campaign of 'mercenaries' with a clear start, a story, and a finish? Explain more.
Mystery Campaign is pretty much dead in the water so taking over it really isn't an issue.

Side note: I like these threads of just me talking back and forth between one person. They're fun.
"A wise man speaks when he has something to say. A fool speaks when he has to say something."

zaimoni
Posts: 281
Joined: January 27th, 2005, 7:00 am
Location: Linn Valley, KS U.S.A.
Contact:

Post by zaimoni » April 10th, 2006, 8:06 am

Clear story...depends.

First thing I would do, in the fork, is rename the difficulty levels
* Border Patrol (Easy)
* Skirmish (Medium)
* War (Hard)

Then some configuration options before leader selection.

It seems to me that we could have "flavored" campaigns. These would be controlled by faction, and would be a configuration choice after leader choice. E.g., say we have a Loyalist assigned to the Eastern Front. Proceed to overweight undead and orcs in faction selection.

Also note (from Naga/Loyalist rather than Merman/Loyalist, and faction Rebels rather than Elves) that the implied era choice for Mystery Campaign is the reign of Ashievre. That might also be worth varying.

In a flavored campaign, a clear end could be provided by defining a certain leader type as "ultimate villain"; winning the first scenario with that leader type would win.

Post Reply