1.16 Campaign: A Rough Life - version 1.2.9

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

Post Reply
User avatar
Jamie
Posts: 48
Joined: October 30th, 2011, 5:08 pm

Re: 1.10 Campaign: A Rough Life - version 1.1.6

Post by Jamie »

I have been putting off posting, hoping I would have something more to upload soon, but it is taking a very long time (I have gotten into modifying the map for scenario 15 to simulate the dam breaking. It is a lot more involved than I first thought, but it is coming along.) In the meantime, although I won't post new files today, I want to tell you what I have managed to do.
Spoiler:
That's a good deal of my wish list completed. I will try to finish 15_ by the end of next week and then upload the whole shebang. I intend to roll 15a_ and 15b_ into 15_. They exist separately, as far as I can tell, only because they use different maps. Since I am reworking the map anyway, it will be trivial to roll them all into one scenario. After that, I think the next priority for me will be looking into adding background art. I have in mind finding some public domain images that can be quickly "artified" using a filter in Gimp. I have already found a few I think will work. Of course, they would have to be replaced at some point by real art... but in the meantime I think the stories can be more visually interesting "on the cheap" so to speak. :D
Elvish_Hunter wrote:Or we can just reduce their movement. It's pretty simple to do, it doesn't even require to create new unit types:
This is great! I will try it out after finishing up this round of changes and posting my update, but I'll need someone else to judge if it plays better.

I am having some trouble trying to figure out how to change the map border tiles. I have posted a question about this on wml workshop. Do you know any way to do this? I tried following http://wiki.wesnoth.org/TerrainMaskWML but I can't get it to work.
User avatar
Jamie
Posts: 48
Joined: October 30th, 2011, 5:08 pm

Re: 1.10 Campaign: A Rough Life - version 1.1.6

Post by Jamie »

Hey Jacques! Good of you to drop by! I love your campaign, uh, maybe that's obvious.
Jacques_Fol wrote:While I am happy and grateful to be kept in memory as the original author...
I will be very happy to have a line of credit beneath yours. Editing is very different (and for me very much easier) than creating from scratch. As far as I'm concerned, this will always be your campaign.
Jacques_Fol wrote:Reading your posts, I am actually quite interested in revisiting the ARL - I may just download it in a little while...
If you can wait about a week I should have a much improved version of the flood scenario.
Jacques_Fol wrote:...I do apologize for burdening you with a somewhat unfortunate name for the campaign.
I won't say a different name couldn't boost downloads, but I like it as it is. It fits the theme very well. Have you ever thought about a sequel? The current version doesn't have Jacques get married and have kids at the end so there is room for more adventure in his life!
User avatar
Elvish_Hunter
Posts: 1575
Joined: September 4th, 2009, 2:39 pm
Location: Lintanir Forest...

Re: 1.10 Campaign: A Rough Life - version 1.1.6

Post by Elvish_Hunter »

Jacques_Fol wrote:It has been ages since my last visit here, but I remembered and had to check on an old friend. And lo and behold, not only is BfW still going strong (as I suspected), someone has even kept A Rough Life alive, updated and doubtlessly much improved over my original version (as I could hardly have dreamed).
Wow, Jacques! We're honoured by your visit. :D
Jacques_Fol wrote:I am humbled by the interest and work gifted to it primarily by Elvish_Hunter, and now also by Jamie. While I am happy and grateful to be kept in memory as the original author, I hope the credits and description make it very clear that ARL would no longer exist and rejuvenate without you guys.
But without you, the campaign would not exist at all. :)
Jacques_Fol wrote:Reading your posts, I am actually quite interested in revisiting the ARL - I may just download it in a little while to test and enjoy all your improvements. Apart from that, I gladly reconfirm that it is in much better hands than mine and I wish you both the best of luck with your future plans.
In case that you want to do some improvements, we're listening. 8)
Jacques_Fol wrote:And I do apologize for burdening you with a somewhat unfortunate name for the campaign.
No need to apologize: I don't think that it's unfortunate at all.
Jamie wrote:I am having some trouble trying to figure out how to change the map border tiles. I have posted a question about this on wml workshop. Do you know any way to do this? I tried following http://wiki.wesnoth.org/TerrainMaskWML but I can't get it to work.
In that case, there are two possible alternatives: [terrain] and [replace_map]. Probably [replace_map] is a better option, as it allows you to create another map in the editor, and then substitute it on the fly. Or even [remove_shroud] and [lift_fog], depending on what do you want to do. Chances are that you won't need [terrain_mask] at all.
Jamie wrote:I won't say a different name couldn't boost downloads, but I like it as it is. It fits the theme very well. Have you ever thought about a sequel? The current version doesn't have Jacques get married and have kids at the end so there is room for more adventure in his life!
Well, Jacques and Kyoko form a perfect battle couple, so I won't be surprised if, sooner or later, they're called again by King Bombasan to defend the kingdom when the official army has failed.
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
User avatar
Jamie
Posts: 48
Joined: October 30th, 2011, 5:08 pm

Re: 1.10 Campaign: A Rough Life - version 1.1.6

Post by Jamie »

Here is the latest, and probably the last full campaign upload I will make. I consider this fairly well polished to the best of my ability, but will continue to suggest small changes to individual scenario files and will make fixes if I can if anyone points out any problems. It is not well tested as testing is very time consuming, but it is tested enough to assure everything basically works. Here's a list of changes and below is some discussion of some of them.

Newest changes all files:
  • off-loaded "story" elements to macro file "story.cfg"
    moved loose sprite images into folders
    removed unit definition files for Elvish Maiden, Princess and Queen
    removed scenario files 15a_ and 15b_ & their associated map files
    added sun affliction damage to K in 05_ through 09_
    fixed errors I introduced in last upload:
    • restored "linger_mode=no" to appropriate files (not actually an error, I was testing)
      01_ Goblin "last breath" now only spoken once as it should be
      08_ no early ending (before all enemies defeated)
Individual files:
  • 07_ made B run to K when narrator says B runs to K
    07_ added Sergeants to exclusion from speaking first line on minion's death
    07_ fixed R's restraint when attacking K
    09_ changed night schedule to hours format
    11_ flipped the right-hand alter and dragon statue
    11_ tweaked some dialog
    12_ added alter decorations and K placing book on one
    13_ dialog and story tweaks
    15_ tweaked AI so ogres will try to sound the alarm & added a couple so it is more likely one will attempt it
    15_ altered map to add orc style castle tiles to outpost, added a few water lilies & redrew dam with spillway
    15_ implemented flood terrain changes including new sounds and rolled 15_ 15a_ and 15b_ into one file
    16_ story tweaks & made Arbor walk up the path
15_ Flooding issues:
1. There is no terrain graphic for flooded orcish castle tiles. The original map uses human ruins which do flood, but only with clean water, not the muddy gray I would prefer. It doesn't look quite right, but I think it is better than what we had. Hopefully we can fix this in the future.
2. I placed some of the map changes into separate turns so that the player can scroll around and look at the map. Maybe that's a conceit and I should just allow changes to happen off screen? There are many problem showing a flood and breaking dam. I think the result is worth it, but I would love feedback on this. For one thing, the screen scrolls itself on each new turn (to view the side turn's leader and whenever a unit moves) and so has to be repositioned each turn for dramatic effect. It is potentially a lot of screen scrolling. Also the several "turns" have to be clicked through, and when nothing moves the player is asked to confirm each turn end, which is tedious. The alternative is to put multiple changes into one turn, with perhaps a message between each map redraw. That works timing wise, but once the messages start rolling, the player is not free to look around at the map. To show a lot of map changing would require a lot of scrolling (and a lot of delays so there is time to absorb each new image). This could also get tedious on multiple play throughs. I want opinions from people whether it is better for the player to manually end turns but get to look around at the map to see all the changes or whether it is better to enforce a single view of the event in one or two turns. Perhaps fewer stages of flood and draining would be better? If you have a chance to play through 15_ let me know what you think about it.
3. New sounds were hacked together and are not very well done (I'm no sound engineer). They are just a bunch of public domain sounds I mashed together. I couldn't find a PD sound of a dam breaking—go figure. :lol2:
Attachments
A_Rough_Life_with _flood.zip
Full campaign with sun damage and flooding.
(5.62 MiB) Downloaded 836 times
Jacques_Fol
Posts: 153
Joined: August 16th, 2008, 2:41 am

Re: 1.10 Campaign: A Rough Life - version 1.1.6

Post by Jacques_Fol »

Thank you for the warm welcome, and I did follow your suggestion, Jamie - I downloaded the version from your last post and blitzed through the campaign.

And I very much liked what I saw! I don't have a perfect recollection of the original details, but maps seem to have been improved, some helpful hints given or alterations made to move things along, and the dialogues also seem to have benefited from the revision. (There were a few cases of a typo or grammatical slip, but far be it for me to nitpick, I imagine any final polishing, if ever attempted, would better be done by a native speaker.)

I also took a sneak peek at the scenario files, and was impressed by the new code. It must have been quite a bit of work to port the campaign to the newer versions, so thanks again, Elvish_Hunter. And I love the little improvements to the "action sequences" (the way the characters move around the screen as required, the way the flooding works). A propos, I second the idea of limiting the movement of the "stationary" villains, Hatrox conveniently came out to play and was easily corralled.

There is only one thing I would change (or change back) as regards the story:
Spoiler:
Otherwise, I appreciate all the fine suggestions in trying to insert the campaign in the Wesnoth universe. By the way, love the name Kythonia, especially when one talks of Kythonian outposts. Most convincing. (I sometimes joked with names in the original version (such as the anadromely named brothers Krug and Gurk), and if one wanted to revisit them, I wouldn't mind.) As for the placement of Mosh and Kythonia, I would say Mosh is an insignificant place somewhere in/to the south of the general Wesnoth map, so (south)west of Aethenwood sounds fine, while Kythonia is far to the south.

And finally, this:
Jamie wrote:Have you ever thought about a sequel? The current version doesn't have Jacques get married and have kids at the end so there is room for more adventure in his life!
I have no time to even consider working on a sequel myself, but I did ponder briefly what it might entail. So, in case anyone ever wishes to pick up the mantle, I will lay down what ideas I had.

The general idea was
Spoiler:
To wit, the story arc could go as follows. The intro:
Spoiler:
Then, the second prong of the story:
Spoiler:
The long development is then
Spoiler:
Ultimately,
Spoiler:
As always, a large part of the fun in playing the campaign would rely on the architecture of individual scenarios. (For instance, how are the different Khalifate units introduced, the mix of the challenges in different scenarios, etc.) But, for what it's worth, here are the outlines of a possible sequel, if anyone ever feels like they might wish to try their hand at it but would appreciate an idea of how to set up the story.
User avatar
Elvish_Hunter
Posts: 1575
Joined: September 4th, 2009, 2:39 pm
Location: Lintanir Forest...

Re: 1.10 Campaign: A Rough Life - version 1.1.6

Post by Elvish_Hunter »

Jamie wrote:Here is the latest, and probably the last full campaign upload I will make.
Thank you. I'm downloading it and insert your last changes in my local copy. By the way, I did some other modifications on my own and moved the campaign to 1.11.2. It'll require me a while to merge and test everything.
Also, I managed to run wmllint's spellchecker, and (in case that you're interested) it crashed on every en-dash that it found. For now, I replaced them with minus signs, but later I'll investigate it in detail. Another thing: Using nested quotes to make quotes appear into a message:

Code: Select all

message= _ "A ""quoted"" word"
is a bad practice, because wmlxgettext cannot handle them. So, I replaced them with italic text. It's OK for you?
Jamie wrote:New sounds were hacked together and are not very well done (I'm no sound engineer). They are just a bunch of public domain sounds I mashed together.
Just to be sure - may I ask where did you get these sounds?
Jacques_Fol wrote:It must have been quite a bit of work to port the campaign to the newer versions, so thanks again, Elvish_Hunter.
Indeed, it was and it is, considering that I'm moving it to the 1.11 series, also upgrading the animation code. But it's better doing it now, instead of waiting for the 1.12 version and then rush the upgrade during the beta stage. :)
Jacques_Fol wrote:As always, a large part of the fun in playing the campaign would rely on the architecture of individual scenarios. (For instance, how are the different Khalifate units introduced, the mix of the challenges in different scenarios, etc.) But, for what it's worth, here are the outlines of a possible sequel, if anyone ever feels like they might wish to try their hand at it but would appreciate an idea of how to set up the story.
You know, the only part that I don't like much is that Jacques must die. But that's because I don't like main characters dying. Instead, if someone must really sacrifice himself, my opinion is that it should be King Bombasan or Arbor. By the way, it'll be easier for Arbor (and more interesting for the player) to summon some other Woses and hold off a reasonably sized army, instead of having Jacques alone, that at most may resist against three or four units.
I was also thinking to make Arbor a Wose Shaman - see the unit in Delfador's Memoirs. Is it fine?
Jacques_Fol wrote:take her to a nearby gorge to hunt rabbits, wolves or some other such creature (depending of what units are easily available)
You'll be happy to know that we have available sprites for rabbits, tuskers, wolves, even cockatrices. 8)
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
User avatar
8680
Moderator Emeritus
Posts: 742
Joined: March 20th, 2011, 11:45 pm
Location: The past

Re: 1.10 Campaign: A Rough Life - version 1.1.6

Post by 8680 »

Elvish_Hunter wrote:[…] every en-dash that it found. For now, I replaced them with minus signs, […] nested quotes […] I replaced them with italic text.
You could also use em-dashes (—) and typographic quotes (“”).

I highly recommend the former over [acronym=I assume you mean hyphens — minus signs are properly en-dashes]hyphens[/acronym], but I don’t know about the latter — depending on the context, italics may be better than quotes.
User avatar
Jamie
Posts: 48
Joined: October 30th, 2011, 5:08 pm

Re: 1.10 Campaign: A Rough Life - version 1.1.6

Post by Jamie »

Jacques_Fol wrote:A propos, I second the idea of limiting the movement of the "stationary" villains, Hatrox conveniently came out to play and was easily corralled.
I'm sorry, but I'm not clear whether you are saying you like that Hatrox came out, or would prefer that he stay in the mountains. I don't feel strongly about it and would be happy to make it whichever way you want.
Jacques_Fol wrote:...it takes years for Jacques to reach the Kythonian kingdom and years to go back to Mosh if he so chooses. That seems way too long...
I think you're right. I was trying to solve some other problem that comes up in scenario 12_Flip_of_Destiny. I have reverted "years" to "months" and changed the relevant dialog and story lines.
Timespan Fix.zip
List of fixes for campaign timespan
(1.86 KiB) Downloaded 677 times
Jacques_Fol wrote:I would say Mosh is an insignificant place somewhere in/to the south of the general Wesnoth map, so (south)west of Aethenwood sounds fine, while Kythonia is far to the south.
That was the first place I thought to put it, and I am certainly willing to put it there. I decided to put it at a higher latitude so that it could actually show up on the "regular" wesnoth map… but we don't show the map at any point in the campaign (I suppose we could, but I have no plan to do it) so it doesn't really matter. The question is, I think, does having it located on the map (even if we don't show it) help at all to get more notice for the campaign or improve its chances of someday becoming a mainline campaign? If we ever did decide to show a map, it would be easier to put a dot on the current map than to create a whole new map of currently uncharted territory (yes, the lazy man's answer). I am not against putting it southwest of Aethenwood if you find this reason unpersuasive.
 
I like your thoughts for a sequel. I have nothing to add at the moment, but I'll give it some more thought over the summer.
 
Elvish_Hunter and 8680: I thought all my dashes were em-dashes, but I  may have done a global search and replace in a moment of indecision that didn't get reversed. I had replaced a number of dashes with colons where I thought it was appropriate (I may not have always used the colons properly). For dashes and quotes I was following the wiki guides here: http://wiki.wesnoth.org/Typography_Styl ... _in_Speech and here: http://wiki.wesnoth.org/SyntaxWML#Speci ... ute_Values (search on "quoted"), which is not to say I didn't possibly make errors in applying these guides. I have no problem with changing most of the quotes to italics. I would change 03_, the line that begins "The ""plains"" expand unbroken before them..." to single quotes instead. Do you think the guide pages need to be updated?
 
Elvish_Hunter wrote:Just to be sure - may I ask where did you get these sounds?
Sure. Some of them I took from core. The others came from two sources: SoundBible and UltimaCodex. Here are the urls: The sounds I used from SoundBible are "Creaking Door Spooky " and "Slap" (one from each page above) and the ones I used from the UltimaCodex were various deep and medium water footsteps. They are all straight PD and not attribution licenses, so no citation needs to be made. If you want to give credit to these sites, I certainly don't object, but I don't think it is necessary. Of course, the sounds that ended up in the campaign are, as I said, a mashup of these files. They are just the bits and pieces I used along with "rumble" and "waterblast" from core. I make no claim to any rights in the derivative sounds and consider them all pure PD (in case it matters—I know we are very strict about copyright.).

I will be excited to see A Rough Life in version 1.11 and to try out some of the mini AIs and other new features of 1.11.
User avatar
Elvish_Hunter
Posts: 1575
Joined: September 4th, 2009, 2:39 pm
Location: Lintanir Forest...

Re: 1.10 Campaign: A Rough Life - version 1.1.6

Post by Elvish_Hunter »

8680 wrote:You could also use em-dashes (—) and typographic quotes (“”).

I highly recommend the former over hyphens, but I don’t know about the latter — depending on the context, italics may be better than quotes.
There problem is that I'm on a keyboard with Italian layout. This means that I miss several symbols, compared to the US International layout - dead keys, backtick, tilde, various quotes, just to name some - and if I really want to type then I must either use the Character Map, the Alt + numeric code (on Windows) or some AltGr combinations (on Linux). In all situations, it's quite a pain to type them :evil: . Instead for me it's much easier to use Pango markup.
Jamie wrote:Elvish_Hunter and 8680: I thought all my dashes were em-dashes, but I may have done a global search and replace in a moment of indecision that didn't get reversed.
That's not the problem. The problem is that wmllint's spellchecker crashed when it wasn't supposed to crash. Inside of it there is some string replacement code that removes all dashes before spellchecking - but there doesn't seem to be anything that handles non-UTF8 dashes. I have an idea about how to fix it, but right now I don't have the time.
Jamie wrote:The sounds I used...
Thank you. My idea was to credit them anyway, so if a player wonders where I got these sounds from, maybe because he/she needs them for another add-on, the answer will be already here. :)
Jamie wrote:I will be excited to see A Rough Life in version 1.11 and to try out some of the mini AIs and other new features of 1.11.
About micro AI: I didn't look much into it in detail, but I suppose that almost all scenarios won't need it. The only notable exception is Led Astray, where the Patrol Micro AI will be indeed a good (although unnecessary, because both are Lua-based) replacement for my Lua AI.
I also prepared a different version of your "Kyoko illness" code. There was a reason why fabi wanted to replace the UtBS dehydration code: its complexity. With this in mind, I replaced a lot of your code with [harm_unit] and [heal_unit]; also, since she cannot heal them anyway, I decided to block Kyoko's attacks with an [object]. I was even thinking to have her ill only for More Hard Labour and Confronting the Traitor (in this one she'll be a bit more strong), because I fear that scenarios 8 and 9 may be too hard without an efficient Kyoko (we're fighting undead). Also, story-wise, it makes only sense that King Bombasan's medic cure her before letting her go.
Anyway, here there is my version of the code, to be placed inside the utils directory. KYOKO_ILL_OBLECT must be called while creating Kyoko, or after recalling her; KYOKO_ILNESS_EFFECT must be placed in every scenario where we want her to be harmed/healed accordingly. What do you think about it?

Code: Select all

#define KYOKO_ILL_OBJECT ATTACK_PERCENT
	[object]
		duration=scenario
		silent=yes
		[effect]
			apply_to=attack
			range=melee
			increase_attacks=-2
			increase_damage=-{ATTACK_PERCENT}%
		[/effect]
		[effect]
			apply_to=attack
			range=ranged
			increase_attacks=-4
			increase_damage=-{ATTACK_PERCENT}%
		[/effect]
		[effect]
			apply_to=status
			add=unhealable
		[/effect]
	[/object]
#enddef

#define UNSAFE_LOCATIONS TIME_OF_DAY
	# a convenience macro to not retype the same filter over and over again
	[filter_location]
		time_of_day={TIME_OF_DAY}
		[not]
			terrain=*^V*,*^Do # villages and oasi
			[or]
				[filter_adjacent_location]
					[filter]
						race=wose # instead of type, otherwise if a Wose levels it doesn't work
						[or]
							ability=healing
						[/or]
					[/filter]
				[/filter_adjacent_location]
			[/or]
		[/not]
	[/filter_location]
#enddef

#define SAFE_LOCATIONS TIME_OF_DAY
	# reversal of the above macro
	[filter_location]
		time_of_day={TIME_OF_DAY}
		[and]
			terrain=*^V*,*^Do # villages and oasi
			[or]
				[filter_adjacent_location]
					[filter]
						ability=healing
					[/filter]
				[/filter_adjacent_location]
			[/or]
		[/and]
	[/filter_location]
#enddef

#define KYOKO_ILLNESS_EFFECT
	[event]
		name=side 1 turn refresh
		first_time_only=no
		
		[harm_unit]
			[filter]
				id=Kyoko
				{UNSAFE_LOCATIONS lawful}
			[/filter]
			amount=4
			kill=no
			unhealable=yes
			animate=yes
		[/harm_unit]
		[harm_unit]
			[filter]
				id=Kyoko
				{UNSAFE_LOCATIONS neutral}
			[/filter]
			amount=2
			kill=no
			unhealable=yes
			animate=yes
		[/harm_unit]
		
		[heal_unit]
			[filter]
				id=Kyoko
				{SAFE_LOCATIONS chaotic}
			[/filter]
			amount=3
			restore_statuses=no
			animate=yes # otherwise, unlike harm_unit, no green label
		[/heal_unit]
	[/event]
#enddef
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
User avatar
Jamie
Posts: 48
Joined: October 30th, 2011, 5:08 pm

Re: 1.10 Campaign: A Rough Life - version 1.1.6

Post by Jamie »

Elvish_Hunter wrote:...there doesn't seem to be anything that handles non-UTF8 dashes...
I thought since the entire page is coded in UTF8 that I all the dashes were as well. (I never heard of UTF8 before starting work on this, and had to do some reading up on it, so I'm no expert. But I thought my TextWrangler editor would not add non UTF8 symbols to a UTF8 encoded page.) Anyway, since I can't even figure out how to get wmllint to work on my machine, I am very glad you have this headache instead of me. I am also very happy to accept any solution that works for you.
Elvish_Hunter wrote:Anyway, here ... is my version of the code... What do you think about it?
I think it's great! Much more compact than what I wrote. I will have to play the scenarios with it to make a final determination, but, it looks like it will do the job. I may say more when I've had a chance to play the scenarios with it. Anyway, for me it is the principle of having her take a little hit in the sun that is important, not its specific implementation. I am personally a little leery of the "object" code since it didn't seem to be working for Ruphulus in Confronting the Traitor and I couldn't figure out why (I'm guessing you just can't "stack" multiple same objects, but I'm not really sure if that was in fact the problem). I assume it worked fine when you (or whoever) wrote it, but somehow it broke along the way. And it is a good and simple solution when it works. I'm pleased if my efforts stimulated you to work on it. Obviously you know much more about the coding than I do (I can barely follow the lua code you wrote for Jabb's patrol, and that only due to your excellent commenting).
User avatar
Elvish_Hunter
Posts: 1575
Joined: September 4th, 2009, 2:39 pm
Location: Lintanir Forest...

Re: 1.10 Campaign: A Rough Life - version 1.1.6

Post by Elvish_Hunter »

Jamie wrote:I thought since the entire page is coded in UTF8 that I all the dashes were as well.
That's not exactly true. The first 128 ASCII characters still use one byte The other characters may use two, three or four bytes. http://en.wikipedia.org/wiki/UTF-8
As you can see here: http://en.wikipedia.org/wiki/ASCII the en dash is not part of the 128, but a look here: http://msdn.microsoft.com/en-us/goglobal/cc305145 indeed confirms that, on Windows with codepage 1252, there are both an em dash (extended ASCII code 151) and an en dash (extended ASCII code 150). I suppose then that wmllint should handle them in a non UTF-8 way as well to avoid this issue. And yes, I too saved my files as UTF-8 without BOM.
Jamie wrote:I think it's great! Much more compact than what I wrote. I will have to play the scenarios with it to make a final determination, but, it looks like it will do the job.
Thanks. By the way, my code is missing a filter tag:

Code: Select all

duration=scenario
        silent=yes
        [filter]
            id=Kyoko
        [/filter]
        [effect]
            apply_to=attack
Jamie wrote:I am personally a little leery of the "object" code since it didn't seem to be working for Ruphulus in Confronting the Traitor and I couldn't figure out why (I'm guessing you just can't "stack" multiple same objects, but I'm not really sure if that was in fact the problem).
That's because the [object] had an id=key. Such key prevents the same object from being used more than once. But I reworked it as well:

Code: Select all

    # code simplification ahead
    [event] # K attacks R
        name=attack
        first_time_only=no
        [filter]
            id=Kyoko
        [/filter]
        [filter_second]
            id=Ruphulus
        [/filter_second]
        [switch]
            variable=Kyoko_safe
            [case]
                value=0
                [message]
                    speaker=narrator
                    image=wesnoth-icon.png
                    message= _ "As Kyoko makes a desperate lunge for Ruphulus and exchanges blows with him, she realizes he holds back. He would have his minions slay her, but is reluctant to use his own hand."
                [/message]
                [message]
                    speaker=Ruphulus
                    message= _ "Do not tempt your fate with me Princess. Approach me again at your peril!"
                [/message]
            [/case]
            [case]
                value=1
                [message]
                    speaker=narrator
                    image=wesnoth-icon.png
                    message= _ "Against her better judgment and the dragon's warning, Kyoko again engages Ruphulus. And again, while growling with pure malice, the dragon holds back."
                [/message]
                [message]
                    speaker=Ruphulus
                    message= _ "You have survived my wrath so far: I prefer not to stain my wings with your puny blood. But if you press me <big>you shall die!</big>"
                [/message]
            [/case]
        [/switch]
        [set_variable]
            name=Kyoko_safe
            add=1
        [/set_variable]
        [store_unit]
            [filter]
                id=Kyoko
            [/filter]
            variable=stored_Kyoko
            kill=yes
        [/store_unit]
    [/event]

    [event] # K's attack against R ends
        name=attack_end
        first_time_only=no
        [filter_condition]
            [variable] # Kyoko is stored
                name=stored_Kyoko.length
                greater_than=0
            [/variable]
        [/filter_condition]
        [unstore_unit]
            variable=stored_Kyoko
            find_vacant=no
        [/unstore_unit]
        {CLEAR_VARIABLE stored_Kyoko}
    [/event]

    [event] # R attacks K
        name=attack
        first_time_only=no
        [filter]
            id=Ruphulus
        [/filter]
        [filter_second]
            id=Kyoko
        [/filter_second]
        [switch]
            variable=Kyoko_safe
            [case]
                value=0
                [message]
                    speaker=narrator
                    image=wesnoth-icon.png
                    message= _ "In the heat of the battle, as Ruphulus slashes, burns and stings about him, he suddenly lunges at Kyoko. She braces and prepares for the worst - yet, astonishingly, the Dragon checks the strength of his attack."
                [/message]
                [message]
                    speaker=Ruphulus
                    message= _ "Your life is too weak for a dragon to take! Give it to one of my pets, and do not come near me again!"
                [/message]
            [/case]
            [case]
                value=1
                [message]
                    speaker=narrator
                    image=wesnoth-icon.png
                    message= _ "Ruphulus snarls in rage! He advances on Kyoko who is certain this time she is beyond hope, yet still, at the last instant the dragon pulls back."
                [/message]
                [message]
                    speaker=Ruphulus
                    message= _ "As I've said, I prefer not to stain my wings with your puny blood. <big>Stay Away!</big> I shan't warn you again."
                [/message]
            [/case]
        [/switch]
        [set_variable]
            name=Kyoko_safe
            add=1
        [/set_variable]
        [store_unit]
            [filter]
                id=Kyoko
            [/filter]
            variable=stored_Kyoko
            kill=yes
        [/store_unit]
    [/event]
This code kills Kyoko (!) as soon as she attacks or is attacked by Ruphulus, and stores her. Then, when the attack ends, if she is stored (check of the .length attribute), she is unstored. This way, the attack is effectively blocked. This may require a slight modification of the dialog, due to the fact that Ruphulus cannot even try to attack her, but it does the trick with much less code and complications. :)
I was also working on the flood code in scenario 15. Let's say that I had more than one headache, because I had serious problems understanding your code; this because the sheer amount of numbers crossed my eyes - literally. :shock:
At this point, it was clear that the maintenance cost for your version of the code was too high, so I developed a simpler alternative: every step of said flooding has a new map, and I use [replace_map]. This way, the code became much simpler (but is still untested), and the maps can be modified visually in the map editor. I'm attaching them, so you can take a look.

Code: Select all

#define FLOOD_STAGE_ONE
    [sound]
        name="rumble.ogg"
    [/sound]
    [replace_map]
        map="{~add-ons/A_Rough_Life/maps/flood_maps/flood_stage_1.map}"
        # all maps are the same size, so both can be no
        expand=no
        shrink=no
    [/replace_map]
    [redraw]
    [/redraw]
#enddef

#define FLOOD_STAGE_TWO
    # submerged bridges still walkable
    [scroll_to]
        x,y=20,30
    [/scroll_to]
    [sound]
        name="splashy1.ogg"
    [/sound]
    [replace_map]
        map="{~add-ons/A_Rough_Life/maps/flood_maps/flood_stage_2.map}"
        expand=no
        shrink=no
    [/replace_map]
    [redraw]
    [/redraw]
#enddef

#define FLOOD_STAGE_THREE
    # flood enters central camp; bridges are gone; outer ring dies
    [scroll_to]
        x,y=15,7
    [/scroll_to]
    [replace_map]
        map="{~add-ons/A_Rough_Life/maps/flood_maps/flood_stage_3.map}"
        expand=no
        shrink=no
    [/replace_map]
    [redraw]
    [/redraw]
    [delay]
        time=1000
    [/delay]
#enddef

#define FLOOD_STAGE_FOUR
    # flood fills central camp except castle
    [scroll_to]
        x,y=15,7
    [/scroll_to]
    [sound]
        name="splashy2.ogg"
    [/sound]
    [replace_map]
        map="{~add-ons/A_Rough_Life/maps/flood_maps/flood_stage_4.map}"
        expand=no
        shrink=no
    [/replace_map]
    [redraw]
    [/redraw]
    [delay]
        time=1000
    [/delay]
#enddef

#define FLOOD_STAGE_FIVE
    # flood enters main castle
    [scroll_to]
        x,y=15,7
    [/scroll_to]
    [sound]
        name="splashy3.ogg"
    [/sound]
    [replace_map]
        map="{~add-ons/A_Rough_Life/maps/flood_maps/flood_stage_5.map}"
        expand=no
        shrink=no
    [/replace_map]
    [redraw]
    [/redraw]
    [delay]
        time=1000
    [/delay]
    [scroll_to]
        x,y=15,30
    [/scroll_to]
    [sound]
        name="creak.ogg"
    [/sound]
#enddef

#define FLOOD_STAGE_SIX
    # obliterate castle; kill all present
    [scroll_to]
        x,y=15,7
    [/scroll_to]
    [replace_map]
        map="{~add-ons/A_Rough_Life/maps/flood_maps/flood_stage_6.map}"
        expand=no
        shrink=no
    [/replace_map]
    [redraw]
    [/redraw]
#enddef

#define DRAIN_STAGE_ONE
    # break the dam! dam: x,y=(14,15,16,17,18) (30,30,29,30,30); spill: x,y=(16) (30)
    [scroll_to]
        x,y=15,30
    [/scroll_to]
    [sound]
        name="break1.ogg"
    [/sound]
    [delay]
        time=400
    [/delay]
    [replace_map]
        map="{~add-ons/A_Rough_Life/maps/flood_maps/drain_stage_1.map}"
        expand=no
        shrink=no
    [/replace_map]
    [redraw]
    [/redraw]
#enddef

#define DRAIN_STAGE_TWO
    # break the dam! dam: x,y=(14,15,16,17,18) (30,30,29,30,30); spill: x,y=(16) (30)
    [scroll_to]
        x,y=15,30
    [/scroll_to]
    {MODIFY_TERRAIN Wo (15,16) (30,29)}
    [redraw]
    [/redraw]
    [sound]
        name="break2.ogg"
    [/sound]
    [delay]
        time=200
    [/delay]
    [replace_map]
        map="{~add-ons/A_Rough_Life/maps/flood_maps/drain_stage_2.map}"
        expand=no
        shrink=no
    [/replace_map]
    [item]
        image=items/bones.png
        x=15
        y=20
    [/item]
    [redraw]
    [/redraw]
#enddef

#define DRAIN_STAGE_THREE
    # break the dam! dam: x,y=(14,15,16,17,18) (30,30,29,30,30); spill: x,y=(16) (30)
    [scroll_to]
        x,y=15,30
    [/scroll_to]
    [sound]
        name="break3.ogg"
    [/sound]
    [delay]
        time=200
    [/delay]
    [replace_map]
        map="{~add-ons/A_Rough_Life/maps/flood_maps/drain_stage_3.map}"
        expand=no
        shrink=no
    [/replace_map]
    [item]
        image=items/bones.png
        x=13,14,15,15,18,16,17
        y=13,14,15,16,17,10,13
    [/item]
    [redraw]
    [/redraw]
#enddef

#define BREAK_DAM_ONE
    # break the dam! dam: x,y=(14,15,16,17,18) (30,30,29,30,30); spill: x,y=(16) (30)
    [scroll_to]
        x,y=15,30
    [/scroll_to]
    [sound]
        name="break2.ogg"
    [/sound]
    [delay]
        time=200
    [/delay]
    [replace_map]
        map="{~add-ons/A_Rough_Life/maps/flood_maps/break_dam_1.map}"
        expand=no
        shrink=no
    [/replace_map]
    [redraw]
    [/redraw]
#enddef

#define BREAK_DAM_TWO
    # break the dam! dam: x,y=(14,15,16,17,18) (30,30,29,30,30); spill: x,y=(16) (30)
    [scroll_to]
        x,y=15,30
    [/scroll_to]
    [sound]
        name="break3.ogg"
    [/sound]
    [delay]
        time=200
    [/delay]
    [replace_map]
        map="{~add-ons/A_Rough_Life/maps/flood_maps/break_dam_2.map}"
        expand=no
        shrink=no
    [/replace_map]
    [redraw]
    [/redraw]
#enddef

#define BREAK_DAM_THREE
    # break the dam! dam: x,y=(14,15,16,17,18) (30,30,29,30,30); spill: x,y=(16) (30)
    [scroll_to]
        x,y=15,30
    [/scroll_to]
    [sound]
        name="break4.ogg"
    [/sound]
    [delay]
        time=200
    [/delay]
    [replace_map]
        map="{~add-ons/A_Rough_Life/maps/flood_maps/break_dam_3.map}"
        expand=no
        shrink=no
    [/replace_map]
    [redraw]
    [/redraw]
#enddef
flood_maps.zip
(8.21 KiB) Downloaded 474 times
Let me know what do you think about this solution :) .
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
User avatar
Jamie
Posts: 48
Joined: October 30th, 2011, 5:08 pm

Re: 1.10 Campaign: A Rough Life - version 1.1.6

Post by Jamie »

Thanks for the info on UTF8 and the code fixes.
Elvish_Hunter wrote:I was also working on the flood code in scenario 15. Let's say that I had more than one headache, because I had serious problems understanding your code; this because the sheer amount of numbers crossed my eyes - literally.
At this point, it was clear that the maintenance cost for your version of the code was too high, so I developed a simpler alternative: every step of said flooding has a new map, and I use [replace_map]. This way, the code became much simpler (but is still untested), and the maps can be modified visually in the map editor...
Let me know what do you think about this solution :) .
I like this approach. Those numbers were driving me crazy too. I had wondered a few times if making whole maps (or map data files as I have seen used somewhere else) would not be a better approach. I may tweak the maps some more with the editor now that they are files. Oh, and feel free to change them yourself if you want to. I won't be offended. I didn't do as much with them as I really wanted to because doing it by the numbers was so difficult. Perhaps this will solve the edge problem in particular and I'd like to take a look at that. I will also try to help with testing, but on both matters I will probably be very slow as other things are claiming my attention now.
Elvish_Hunter wrote:This may require a slight modification of the dialog, due to the fact that Ruphulus cannot even try to attack her, but it does the trick with much less code and complications.
For dramatic reasons I prefer that Kyoko take slight damage, but I can accept the compromise for simpler, more easily maintained code. It is no big deal to tweak the dialog if need be, but off hand, I think we only say R "holds back" which can easily apply to no attack at all. I'll take a look at this as well, but again, I may be awhile getting to it. Feel free to make changes without waiting for me.
User avatar
Elvish_Hunter
Posts: 1575
Joined: September 4th, 2009, 2:39 pm
Location: Lintanir Forest...

Re: 1.11 Campaign: A Rough Life - version 1.2.0

Post by Elvish_Hunter »

Finally, it's here :D . I uploaded A Rough Life 1.2.0 on the 1.11 add-ons server. This means that the 1.10 series is now unsupported.
I added most of the changes proposed by Jamie, and I added a lot of my own. This is the list of my changes:

Code: Select all

* Renamed scenario ID and file names according to mainline conventions
* Added Jamie's dialogue updates
* Moved Dragon Lord and Human Commander sprites into dragons/ and humans/ directories
* Added KYOKO_DEATH and JACQUES_DEATH macros, that include their die events
* Removed fog=no from all scenarios
* Added back the mainline Wose portrait, as Arbor's portrait
* Added IF_HAVE_UNIT_RECALL macro
* Added Kyoko's illness code for scenarios 5, 6, 7 and 8
* Added ITM_ANIMATED_CAMPFIRE macro
* Moved credits to campaign end
* Added unrenamable=yes to all important named units
* Removed no longer supported ignore_bad_combat and ignore_bad_movement from [ai]
* Units:
	* Deleted compatibility.cfg and Elven Maiden line
	* Renamed Kyoko.cfg to Elvish_Princess.cfg
	* Updated Dragon Lord, Battle Commander and Elvish Princess to the new compact image syntax
	* Arbor is now a Wose Shaman
* Scenario 1:
	* Side 1: income=-2
	* Removed no longer useful AI fallback stage
	* Added [filter_condition] in goblin die event
	* Added [note] in [objectives] about special bonus
	* Added victory event to clean up variables
	* Removed lightning at the end
* Scenario 2:
	* side 1 income -2
	* {TURNS_RUN_OUT} in [objectives]
	* Used a variable and [switch] [case] instead of nested events
	* Added victory event to clean up variables
	* Created local macro {ROLE_BEAST} and used to filter the summoned critters even in case of their level-ups
* Scenario 3:
	* side 1 income -2
	* {TURNS_RUN_OUT} in [objectives]
	* Removed variable escape and replaced with a [not] [have_unit] id=Gronar
	* Removed unuseful leader from side 3
* Scenario 4:
	* side 1 income -2
	* Used {ALTERNATE_OBJECTIVE} macro in [objectives] TEST
	* Added random_traits=no to Lt. Popper
* Scenario 5:
	* moved [hide_unit] in prestart
	* {TURNS_RUN_OUT} in [objectives]
	* Added victory event to clean up variables
	* Used {QUANTITY} to assign gold to Hatrox
	* Removed shroud_data=, used [remove_shroud] instead
* Scenario 6:
	* Used IF_HAVE_UNIT_RECALL
* Scenario 7:
	* {TURNS_RUN_OUT} in [objectives]
	* Used [transform_unit] to convert Ruphulus as Dragon Lord
	* Simplified the code for terrain transformation, and joined the two events in one
	* Simplified Kyoko-Ruphulus attack code
	* Changed purpose of enemies variable: now it counts the dead critters
	* Used [switch] [case] to count the summoned creatures
	* Used an absolute path in [music] and then used silence.ogg to shut the wardrums
* Scenario 8:
	* removed village_gold=0 due to the fact that we will recruit
	* {TURNS_RUN_OUT} in [objectives]
	* Added [tunnel] tag to replace TELEPORT_TILE and temple_teleport=
	* Added variable luxor_met
	* Added [show_if] in final [message]
	* Enemy leaders are now a Wraith and a Lich
	* Increased Jacques' gold by 30 in every difficult level
* Scenario 9:
	* Replaced [side][village] with [capture_village] in prestart
	* Used 24-hour ToD scheme
	* Added [tunnel] tag to replace TELEPORT_TILE
	* Increased Jacques' gold by 50 in every difficult level
* Scenario 10:
	* added names to Dwarvish Sentinels
* Scenario 11:
	* Moved Fear and Loathing to side 1
	* Skeleton Guardian unit type unified, now it also has 0 moves
	* Removed stray "turns run out" from objectives
	* Removed [allow_recruit] for Dwarvish units, as there is no longer a [set_recruit]
	* Made FEAR_DEAD, LOATHING_DEAD and FEAR_AND_LOATHING_DEAD local macros for this scenario
	* Create Krug directly on side 1
	* Renamed variable Krug as Krug_met
	* Removed unuseful time over event
	* Added some more decorations near the explorer's body.
* Scenario 12:
	* removed fog=no
	* set player 1 starting position to 4,10, and removed player 2 starting position
* Scenario 13:
	* Used ITM_ANIMATED_CAMPFIRE and [sound_source]
	* Removed save=no and next_scenario=null from [endlevel]
	* removed player 2 starting position
	* some other minor cosmetic changes
* Scenario 14:
	* {TURNS_RUN_OUT} in [objectives]
	* Added [tunnel] tag to replace TELEPORT_TILE
	* Added variable brutes to keep track of defeated enemies
	* Replaced nested events with [switch] [case]
* Scenario 15:
	* added missing user_team_name
	* removed portrait from Yin, she used the default Naga portrait anyway
	* Create Yin and Yang directly on side 1
	* Merged the two [kill] tags for Yin and Yang
	* Removed shroud_data=, used [remove_shroud] instead
	* Used [replace_map] to simulate flooding
	* Added count=3 to the [have_unit] that starts the flooding and merged three [have_unit] tags
	* When killing the Troll leader, a boat appears and moves near the dam, with the appropriate sound
	* When moving the three units near the gravel area, the "go here" images are removed
	* replaced GURK_RECRUITS macro with [fire_event] and custom "gurk recruits" event
	* used [filter_condition] to avoid being possible to fire both "escaped ogre" and "discover camp" events
	* added macro KILL_ON_DEEP_WATER in flood stages
Jamie's modifications are not included in my list; if you want to read them, refer to the previous posts and attachments.
A note about The Day of Reckoning: due to a bug in 1.11.2, it may be possible for you to start with less than the starting gold declared in the scenario. This bug is already corrected in Git, so I didn't add an #ifver block to work around it. In case that it becomes a problem, just type:

Code: Select all

:debug
:gold 100
or 150 or 200, depending on your difficult level.
That said, have fun and remember to report any bug that you may find! 8)
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
User avatar
Jamie
Posts: 48
Joined: October 30th, 2011, 5:08 pm

Re: 1.11 Campaign: A Rough Life - version 1.2.0

Post by Jamie »

First of all, it's great to see that a new version has been posted! Yea! I haven't had a chance to download and play yet but will shortly.

Second, I have given a personally modified version of the campaign to a 10 year old friend as a birthday present (the modifications were to name the main character after him and to add some hints and tips with myself as narrator... I photoshopped some pics of him and me). My young friend is bilingual english/italian and he usually plays wesnoth in italian, so his dad has undertaken to translate the files I gave him into italian. He couldn't figure out the wesnoth translation system and is just translating the files he has directly, replacing the english and is not making po files (I also do not understand the translsation system, but I know that po files are somehow involved). He told me he has completed the translation for the first two scenarios and I have no reason to think he will not continue on and translate the entire campaign. So, my question is, would you be interested in having copies of these files when he is done? I would be willing to strip out my added hints and tips and otherwise restore the files to their original condition. If you could then strip out the translatables and put them where they are supposed to be we could have an italian version available within a month or less... Let me know if you are interested in this.
User avatar
Elvish_Hunter
Posts: 1575
Joined: September 4th, 2009, 2:39 pm
Location: Lintanir Forest...

Re: 1.11 Campaign: A Rough Life - version 1.2.0

Post by Elvish_Hunter »

Jamie wrote:He couldn't figure out the wesnoth translation system and is just translating the files he has directly, replacing the english and is not making po files (I also do not understand the translsation system, but I know that po files are somehow involved).
Jamie wrote:If you could then strip out the translatables and put them where they are supposed to be we could have an italian version available within a month or less... Let me know if you are interested in this.
You're lucky, because I'm also a magenta name 8) .
Your friend needs to download PoEdit and the it.po file from here: http://www.wesnoth.org/gettext/?package ... ion=master
Then, he opens the .po file in PoEdit and starts modifying it. Once your friend has finished translating it, you can attach the .po in this topic. Bear in mind, however, that mich already translated the campaign for 1.10, so I'll send him the .po for reviewing, as well as checking the translation by myself.
Once that this is done, I'll generate the compiled .mo file and place it into the campaign. In case your friend needs the old .po with the old translated strings, just ask. :)
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
Post Reply