The South Guard

This is the place for discussing development of mainline campaigns, reporting bugs in them and providing overall feedback.

Moderators: Forum Moderators, Developers

Post Reply
ott
Inactive Developer
Posts: 838
Joined: September 28th, 2004, 10:20 am

Post by ott »

The flip.pl script will not work since reverse is a list operation. Moreover, the newlines will end up funny (the first line will be blank, the last line will not have a newline). This version works fine:

Code: Select all

perl -ne 'chomp; print reverse split ""; print "\n" ' file_to_reverse

aelius
Posts: 497
Joined: August 30th, 2004, 8:07 pm
Location: Virginia, USA

Post by aelius »

Can I just type that into my terminal and have it work in OS X?

- b.

ott
Inactive Developer
Posts: 838
Joined: September 28th, 2004, 10:20 am

Post by ott »

aelius wrote:Can I just type that into my terminal and have it work in OS X?
Should work fine in OS X. Copy/paste is probably best: the outer quotes are single quotes, and there are four double quotes in there, one pair indicating an empty string, the next pair forming a container for a newline.

Edit: here are two perl scripts revmaph (as above) and revmapv which reverse a map file horizontally or vertically, ie. flipped along a vertical or horizontal axis, respectively.
Attachments
revmap.zip
(396 Bytes) Downloaded 366 times

Quensul
Art Contributor
Posts: 303
Joined: January 2nd, 2005, 1:06 am
Location: Pittsburgh, PA

Post by Quensul »

ott wrote:The flip.pl script will not work since reverse is a list operation. Moreover, the newlines will end up funny (the first line will be blank, the last line will not have a newline). This version works fine:

Code: Select all

perl -ne 'chomp; print reverse split ""; print "\n" ' file_to_reverse
Actually, in a scalar context reverse swaps the order of the characters (see the second line of the reverse entry in man perlfunc). Right you are about the newlines tho; I didn't notice when testing - I just assumed the mapfile was missing the last newline. Writing it filter-style was probably a poor choice too.

Aelius, to use ott's scripts or flip.pl, just make sure the file is executable (in the terminal: 'chmod u+x scriptname'), then run it from the terminal as appropriate - for ott's scripts, just "revmaph mapfile" should do the trick; flip.pl as I wrote above.

ott
Inactive Developer
Posts: 838
Joined: September 28th, 2004, 10:20 am

Post by ott »

Quensul wrote:Actually, in a scalar context reverse swaps the order of the characters
You are right, I think I confused myself when testing variants of your script which simply didn't work: reverse without an argument

I now also noticed that the man page examples are already fairly good solutions to the problem! So perhaps a simpler one-liner for reversing horizontally is

Code: Select all

perl -ne 'chomp; print reverse . "\n" ' file_to_reverse > reversed_file
and for vertical reversal

Code: Select all

perl -e 'print reverse <>' file_to_reverse > reversed_file
Hey, we need a Wesnoth Perl SIG, so we can discuss Perl one-liners for manipulating the Wesnoth data files! Perhaps also the scattered bits of perl on the forums like st, dr, tagfind or Darth Fool's scenario_follower could be pulled together into a set of perl tools... Posting a topic (4434) about this.

aelius
Posts: 497
Joined: August 30th, 2004, 8:07 pm
Location: Virginia, USA

Post by aelius »

Wow did all of those mangle the map to the point of unrecognizability... Good think I made a backup! I think the problem may be with Wesnoth down-shifting even numbered columns to line up the hexes. If your map has an even number of columns, these trash it. If they have an odd number, it works beautifully. Luckily it's easy to add columns to a file.

Thanks for the help! It's nice having such good coders around.
- b.

aelius
Posts: 497
Joined: August 30th, 2004, 8:07 pm
Location: Virginia, USA

Post by aelius »

Sorry 'bout the double post, but I've put a new version up on the campaign server. Changes in 0.5.3:

* Many scenarios renamed. "Born to the Banner", "Seeking the Sage", "The Tides of War" most notably.

* The Tides of War (Bandit Branch) now plays more correctly. I still need to do more difficulty balancing depending on the results of Rearguard (Which is now called "Pebbles in the Flood")

* Into the Depths (Elven Branch) has a new map and plays better. It's still very much in progress.

* Complete dialogue rewrite, making it, I think, much more motivated and fluent.

* Geography and chronology now reconciled with the official Wesnoth history and georgraphy. Some maps re-oriented. The campaign takes place during the reign of Haldric VII, a couple of years before the events of Eastern Invasion.

I'll be out of town next week, but before I go, I hope to have the whole bandit branch completed. I need to finish up The Tides of War and do a ton of scripting for The Long March. That'll move the campaign to what I'd consider a 0.6 release.

Where it's really lacking right now is the art department, 'cause I'm terrible at it. Shadow's graciously offered to do artwork for Deoran, but I need a couple of other things too. If anybody wants to help, let me know.

As always, thanks for playing, and the more comments and criticism the better. Do people think the dialogue flows better now?

- b.

ott
Inactive Developer
Posts: 838
Joined: September 28th, 2004, 10:20 am

Post by ott »

aelius wrote:I think the problem may be with Wesnoth down-shifting even numbered columns to line up the hexes. If your map has an even number of columns, these trash it. If they have an odd number, it works beautifully.
Oops. Thanks for trying it out. By the way, flipping maps is available from within the map editor; it handles the addition of columns or rows as appropriate.

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

Post by zaimoni »

Sourcediving before retrying SG later tonight. [I'd like to win the first scenario on internal HARD honestly. The next three were noticeably easier on Wesnoth 0.8.8...possibly there's something I'm missing ;)]

Anyway... was it your intention for the SG_STRONG macro to be even more effective than the ingame code for the strong trait? The savefiles appear to use +1 for the damage modifier, but SG_STRONG/V0.53 is +2 on damage.

aelius
Posts: 497
Joined: August 30th, 2004, 8:07 pm
Location: Virginia, USA

Post by aelius »

zaimoni wrote:Anyway... was it your intention for the SG_STRONG macro to be even more effective than the ingame code for the strong trait? The savefiles appear to use +1 for the damage modifier, but SG_STRONG/V0.53 is +2 on damage.
This is intentional. I only use it for some special units, and I wanted them to be extra special.

I've really rebalanced the whole thing, so if you haven't played in a while, it should be much easier on every level.

- b.

ott
Inactive Developer
Posts: 838
Joined: September 28th, 2004, 10:20 am

Post by ott »

Some glitches and bugs:

1. Born to the Banner

(squandered his time) in -> with
have (overrun) -> had
valourous -> valorous
Halrad -> Haldric

2. Retaking Westin

He (is buried) -> Sir Loris

3. Finding the Elves

it's (paths) -> its
in the last speech, the speaker should be Deoran not Ethiliel

4.

Mebrin's village: the label is not shown?
the some -> some
vengance -> vengeance

5.

forsets -> forests
Vengance -> Vengeance
catacombs and . -> ?
fores -> forest
storing lv 1,2 fighters lv 1 shaman: what about lv 3 fighters and lv 2,3 shaman

7a.

trapdoor event doesn't trigger
8/6 moves for Deoran once he becomes a Foot Commander
Minister Hylas dies -- no loss?
only one way to get to objective -- too easy to get stuck single file
Mal Feras (does not exist) or Mal M'Brin, victory condition not triggered

silvermane
Posts: 44
Joined: November 5th, 2004, 8:40 am
Location: EU

Post by silvermane »

After installing 0.5.3 I can't see the Deoran's icon (maybe also others). Something seems to be wrong with the path to units, but I'm not too keen on all this WML stuff, you understand. I like playing better.

silvermane

Kristo

Post by Kristo »

First of all, I'd like to say excellent job so far on The South Guard. I've been playing on the hardest difficulty and it has been a lot of fun. :D

Secondly, I think the scenario "Into the Depths" needs some fixing, as it's pretty much unwinnable on the hardest difficulty. The only way into the enemy's area is through the eastern path, which is extrememly slow going. Deoran can reach Mal Feras' keep in 16 turns, but all other recruitable units would take 23 turns. With only 32 turns total, if you get stopped to fight at any point along the way (which is inevitable), you're going to run out of time. This also means that the player has no chance to find Uliana the Mage.

I know others have mentioned it, but I'll report it anyway. The trapdoor event still isn't working. I look forward to your next version. Keep up the good work!

Kristo

aelius
Posts: 497
Joined: August 30th, 2004, 8:07 pm
Location: Virginia, USA

Post by aelius »

Thanks for playing Kristo,
Yeah - Into the Depths is pretty icky right now. I'm swamped with grading and lesson planning, but I think in a couple of days I might have a new version up. If you're stuck on Into the Depths and have a savegame during Choice in the Fog, the branch you get if you side with the Bandits is pretty much complete.

Good suggestion about the time limit too - I'll see what I can to to make that better on Soldier difficulty.

- b.

Kristo

Post by Kristo »

aelius wrote:If you're stuck on Into the Depths and have a savegame during Choice in the Fog, the branch you get if you side with the Bandits is pretty much complete.
Ok thanks. I'll go back and give that a shot.
aelius wrote:Good suggestion about the time limit too - I'll see what I can to to make that better on Soldier difficulty.
I don't the time limit itself is the problem, it's the terrain. The only way in is through a bunch of cave terrain. I split my forces to keep the Deathblades busy at the central river. That allowed me to sneak in through the east path largely untouched. However, trudging through cave terrain does nothing but waste time IMHO. If there were more dirt tiles over there, the player can make the trip much faster.

Kristo

Post Reply