ChaosRider’s WML questions

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
ChaosRider
Posts: 846
Joined: April 15th, 2012, 1:15 pm

Unpoison/Unslow unit dont work...

Post by ChaosRider »

Hello, i wish to modify one earlier created code, add to him effect to unpoison and unslow unit which is killing other one.

First way for that:
Spoiler:
Second way for that code:
Spoiler:
Both of them dont work, and if enemie had poison or slow as weapon special, then our unit is after killing him is still poisoned or slowed.
Last edited by ChaosRider on May 30th, 2013, 3:40 pm, edited 1 time in total.
Creator of WOTG (+2880 units), MWC (+615 units), SurvivorsArea, RandomColosseum, RC WOTG, RC MWC, ColosseumRandomClonesBattle, BetweenDarknessAndLight, StealingWeapons, MoreUnitsForms, MoreDamageTypes, CanBeOnlyOne, ColosseumOneWinner, BonusSpam, CriticalStrike - available at 1.12 Wesnoth server.
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Unpoison/Unslow unit dont work...

Post by Dugi »

You have written it in the wrong order. Objects don't apply to stored units, so you in fact store the units, apply these objects on them and then you overwrite these changes by unstoring the units (you should have unstored them before applying the object).

In fact, it would be much more effective (regarding the size of save files) to write it like this:

Code: Select all

   [event]
      name=die
      first_time_only=no
      [filter_second]
         side=$side_number
      [/filter_second]

      #[sound]
      #   name=axe.ogg
      #[/sound]
      [store_unit]
         [filter]
            side=$side_number
            x,y=$x2,$y2
         [/filter]
         variable=vdie
      [/store_unit]
      {VARIABLE vdie.moves 4}
      {VARIABLE vdie.attacks_left 1}
      {CLEAR_VARIABLE vdie.status.poisoned}  #This is much faster and does not pile junk codes in units' modifications.
      {CLEAR_VARIABLE vdie.status.slowed}
      [unstore_unit]
         variable=vdie
      [/unstore_unit]
      {CLEAR_VARIABLE vdie}
   [/event]
User avatar
ChaosRider
Posts: 846
Joined: April 15th, 2012, 1:15 pm

Re: ChaosRider’s WML questions

Post by ChaosRider »

Hmm i have wierd thing from last WOTG updating. I am not sure is it working same with more than 1 player in game, but when i am controling 5 sides (all units are picked and diffrent) then first is as it was picked, but next 4 are as it is picked for second side.


Era code for max lvls
Spoiler:
I dont have this problem if all are random.

Solved, list was too long, i changed it from one era with many units to 7 factions (0,1,2,3,4,5,6 lvls) for each with diffrent lvls.
Attachments
Bez tytułu.png
Last edited by ChaosRider on May 30th, 2013, 3:41 pm, edited 1 time in total.
Creator of WOTG (+2880 units), MWC (+615 units), SurvivorsArea, RandomColosseum, RC WOTG, RC MWC, ColosseumRandomClonesBattle, BetweenDarknessAndLight, StealingWeapons, MoreUnitsForms, MoreDamageTypes, CanBeOnlyOne, ColosseumOneWinner, BonusSpam, CriticalStrike - available at 1.12 Wesnoth server.
User avatar
8680
Moderator Emeritus
Posts: 742
Joined: March 20th, 2011, 11:45 pm
Location: The past

Re: ChaosRider’s WML questions

Post by 8680 »

So the problem arises from having very many choices of leader? That sounds like a bug to me; I recommend that you report it as such.

Also, I don’t recognize the Ancient Gold Dragon’s image; where did you get it?
User avatar
Captain_Wrathbow
Posts: 1664
Joined: June 30th, 2009, 2:03 pm
Location: Guardia

Re: ChaosRider’s WML questions

Post by Captain_Wrathbow »

8680 wrote:Also, I don’t recognize the Ancient Gold Dragon’s image; where did you get it?
I believe it is from the Library of Kratemaqht UMC campaign by cephalo.
User avatar
ChaosRider
Posts: 846
Joined: April 15th, 2012, 1:15 pm

Re: ChaosRider’s WML questions

Post by ChaosRider »

Images for that dragon were taken from campaign (some 60 mb size, The Library Of Krate), also i have other problem, code below written is working for all units on map... I am sure i made some mistake with using filter...
Spoiler:
Last edited by ChaosRider on May 30th, 2013, 3:41 pm, edited 1 time in total.
Creator of WOTG (+2880 units), MWC (+615 units), SurvivorsArea, RandomColosseum, RC WOTG, RC MWC, ColosseumRandomClonesBattle, BetweenDarknessAndLight, StealingWeapons, MoreUnitsForms, MoreDamageTypes, CanBeOnlyOne, ColosseumOneWinner, BonusSpam, CriticalStrike - available at 1.12 Wesnoth server.
User avatar
8680
Moderator Emeritus
Posts: 742
Joined: March 20th, 2011, 11:45 pm
Location: The past

Re: ChaosRider’s WML questions

Post by 8680 »

Try this.

Code: Select all

#define Able_Wolf
    [event]
        name=advance
        first_time_only=no
        [filter]
            type="Wolf"
        [/filter]
        [modify_unit]
            [filter]
                id=$unit.id
            [/filter]
            type="Great Wolf"
        [/modify_unit]
    [/event]
#enddef
User avatar
ChaosRider
Posts: 846
Joined: April 15th, 2012, 1:15 pm

Re: ChaosRider’s WML questions

Post by ChaosRider »

Its not working, unit have to be changed in event with "post advance" not "advance", cause its blocked by amla code if you use "advance". Unit is changed to other type unit, but after that its going back to first, wolf. This is why with unit advance it have to have added some variable thx which in next event (post advace) we can find that unit and transform, ofcourse this method is for units with only 1 way lvlup.
Creator of WOTG (+2880 units), MWC (+615 units), SurvivorsArea, RandomColosseum, RC WOTG, RC MWC, ColosseumRandomClonesBattle, BetweenDarknessAndLight, StealingWeapons, MoreUnitsForms, MoreDamageTypes, CanBeOnlyOne, ColosseumOneWinner, BonusSpam, CriticalStrike - available at 1.12 Wesnoth server.
User avatar
8680
Moderator Emeritus
Posts: 742
Joined: March 20th, 2011, 11:45 pm
Location: The past

Re: ChaosRider’s WML questions

Post by 8680 »

Try this.

Code: Select all

#define Able_Wolf
    [event]
        name=advance
        first_time_only=no
        [filter]
            type="Wolf"
        [/filter]
        {VARIABLE able_wolf $unit.id}
    [/event]
    [event]
        name=post_advance
        first_time_only=no
        [filter]
            id=$able_wolf
        [/filter]
        [modify_unit]
            [filter]
                id=$able_wolf
            [/filter]
            type="Great Wolf"
        [/modify_unit]
        {CLEAR_VARIABLE able_wolf}
    [/event]
#enddef
User avatar
ChaosRider
Posts: 846
Joined: April 15th, 2012, 1:15 pm

Re: ChaosRider’s WML questions

Post by ChaosRider »

Good, now its works :P, thx.
____________________________________________________________________________________________________________________
Your help was really helpfull, soon i am gonna post here my code when i done him.
____________________________________________________________________________________________________________________
Now i am gonna write what below posted code is doing (with advances of some units):
Spoiler:
Code for this changes

Code: Select all


#define Able_Elder_Mage
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Great Mage"
		[/filter]
		{VARIABLE able_elder_mage $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_elder_mage
		[/filter]
		[modify_unit]
			[filter]
				id=$able_elder_mage
			[/filter]
			type="Elder Mage"
		[/modify_unit]
		{CLEAR_VARIABLE able_elder_mage}
	[/event]
#enddef


#define Able_Wolf
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Wolf"
		[/filter]
		{VARIABLE able_wolf $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_wolf
		[/filter]
		[modify_unit]
			[filter]
				id=$able_wolf
			[/filter]
			type="Great Wolf"
		[/modify_unit]
		{CLEAR_VARIABLE able_wolf}
	[/event]
#enddef
	

#define Able_Great_Wolf
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Great Wolf"
		[/filter]
		{VARIABLE able_great_wolf $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_great_wolf
		[/filter]
		[modify_unit]
			[filter]
				id=$able_great_wolf
			[/filter]
			type="Direwolf"
		[/modify_unit]
		{CLEAR_VARIABLE able_great_wolf}
	[/event]
#enddef

#define Able_Ancient_Lich
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Lich"
		[/filter]
		{VARIABLE able_lich $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_lich
		[/filter]
		[modify_unit]
			[filter]
				id=$able_lich
			[/filter]
			type="Ancient Lich"
		[/modify_unit]
		{CLEAR_VARIABLE able_lich}
	[/event]
#enddef

#define Able_Death_Knight
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Revenant"
		[/filter]
		{VARIABLE able_death_knight $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_death_knight
		[/filter]
		[command]
			{VARIABLE buy 1}
			[while]
				[variable]
					name=buy
					equals=1
				[/variable]
				[do]
					[message]
						speaker=narrator
						caption= _ "Advance way picking:"
						[option]
							message= _ {MENU_IMG_TXT "units/undead-skeletal/deathknight.png" "Death Knight"}
							[command]
								[modify_unit]
									[filter]
										id=$able_death_knight
									[/filter]
									type="Death Knight"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]	
						[option]
							message= _ {MENU_IMG_TXT "units/undead-skeletal/draug.png" "Draug"}
							[command]
								[modify_unit]
									[filter]
										id=$able_death_knight
									[/filter]
									type="Draug"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]
					[/message]
				[/do]
			[/while]
		[/command]
		{CLEAR_VARIABLE able_death_knight}
	[/event]
#enddef


#define Able_Trolls
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Troll Whelp"
		[/filter]
		{VARIABLE able_trolls $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_trolls
		[/filter]
		[command]
			{VARIABLE buy 1}
			[while]
				[variable]
					name=buy
					equals=1
				[/variable]
				[do]
					[message]
						speaker=narrator
						caption= _ "Advance way picking:"
						[option]
							message= _ {MENU_IMG_TXT "units/trolls/shaman.png" "Troll Shaman"}
							[command]
								[modify_unit]
									[filter]
										id=$able_trolls
									[/filter]
									type="Troll Shaman"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]	
						[option]
							message= _ {MENU_IMG_TXT "units/trolls/troll-hero.png" "Troll Hero"}
							[command]
								[modify_unit]
									[filter]
										id=$able_trolls
									[/filter]
									type="Troll Hero"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]
						[option]
							message= _ {MENU_IMG_TXT "units/trolls/grunt.png" "Troll"}
							[command]
								[modify_unit]
									[filter]
										id=$able_trolls
									[/filter]
									type="Troll"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]
						[option]
							message= _ {MENU_IMG_TXT "units/trolls/lobber.png" "Troll Rocklobber"}
							[command]
								[modify_unit]
									[filter]
										id=$able_trolls
									[/filter]
									type="Troll Rocklobber"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]
					[/message]
				[/do]
			[/while]
		[/command]
		{CLEAR_VARIABLE able_trolls}
	[/event]
#enddef

#define Able_Great_Troll
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Troll Hero"
		[/filter]
		{VARIABLE able_troll_hero $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_troll_hero
		[/filter]
		[modify_unit]
			[filter]
				id=$able_troll_hero
			[/filter]
			type="Great Troll"
		[/modify_unit]
		{CLEAR_VARIABLE able_troll_hero}
	[/event]
#enddef

#define Able_Chocobone
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Skeleton"
		[/filter]
		{VARIABLE able_skeleton $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_skeleton
		[/filter]
		[command]
			{VARIABLE buy 1}
			[while]
				[variable]
					name=buy
					equals=1
				[/variable]
				[do]
					[message]
						speaker=narrator
						caption= _ "Advance way picking:"
						[option]
							message= _ {MENU_IMG_TXT "units/undead-skeletal/chocobone.png" "Chocobone"}
							[command]
								[modify_unit]
									[filter]
										id=$able_skeleton
									[/filter]
									type="Chocobone"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]	
						[option]
							message= _ {MENU_IMG_TXT "units/undead-skeletal/deathblade.png" "Deathblade"}
							[command]
								[modify_unit]
									[filter]
										id=$able_skeleton
									[/filter]
									type="Deathblade"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]
						[option]
							message= _ {MENU_IMG_TXT "units/undead-skeletal/revenant.png" "Revenant"}
							[command]
								[modify_unit]
									[filter]
										id=$able_skeleton
									[/filter]
									type="Revenant"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]
					[/message]
				[/do]
			[/while]
		[/command]
		{CLEAR_VARIABLE able_skeleton}
	[/event]
#enddef

#define Able_Skeletal_Dragon
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Draug"
		[/filter]
		{VARIABLE able_draug $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_draug
		[/filter]
		[modify_unit]
			[filter]
				id=$able_draug
			[/filter]
			type="Skeletal Dragon"
		[/modify_unit]
		{CLEAR_VARIABLE able_draug}
	[/event]
#enddef

#define Able_Armageddon_Drake
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Inferno Drake"
		[/filter]
		{VARIABLE able_inferno_drake $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_inferno_drake
		[/filter]
		[modify_unit]
			[filter]
				id=$able_inferno_drake
			[/filter]
			type="Armageddon Drake"
		[/modify_unit]
		{CLEAR_VARIABLE able_inferno_drake}
	[/event]
#enddef

#define Able_Dwarvish_Runesmith
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Dwarvish Fighter"
		[/filter]
		{VARIABLE able_dwarvish_fighter $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_dwarvish_fighter
		[/filter]
		[command]
			{VARIABLE buy 1}
			[while]
				[variable]
					name=buy
					equals=1
				[/variable]
				[do]
					[message]
						speaker=narrator
						caption= _ "Advance way picking:"
						[option]
							message= _ {MENU_IMG_TXT "units/dwarves/runesmith.png" "Dwarvish Runesmith"}
							[command]
								[modify_unit]
									[filter]
										id=$able_dwarvish_fighter
									[/filter]
									type="Dwarvish Runesmith"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]	
						[option]
							message= _ {MENU_IMG_TXT "units/dwarves/steelclad.png" "Dwarvish Steelclad"}
							[command]
								[modify_unit]
									[filter]
										id=$able_dwarvish_fighter
									[/filter]
									type="Dwarvish Steelclad"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]
					[/message]
				[/do]
			[/while]
		[/command]
		{CLEAR_VARIABLE able_dwarvish_fighter}
	[/event]
#enddef

#define Able_Dwarvish_Runemaster
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Dwarvish Runesmith"
		[/filter]
		{VARIABLE able_runesmith $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_runesmith
		[/filter]
		[modify_unit]
			[filter]
				id=$able_runesmith
			[/filter]
			type="Dwarvish Runemaster"
		[/modify_unit]
		{CLEAR_VARIABLE able_runesmith}
	[/event]
#enddef

#define Able_Dwarvish_Arcanister
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Dwarvish Runemaster"
		[/filter]
		{VARIABLE able_runemaster $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_runemaster
		[/filter]
		[modify_unit]
			[filter]
				id=$able_runemaster
			[/filter]
			type="Dwarvish Arcanister"
		[/modify_unit]
		{CLEAR_VARIABLE able_runemaster}
	[/event]
#enddef

#define Able_Gryphon
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Gryphon Rider"
		[/filter]
		{VARIABLE able_gryphon $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_gryphon
		[/filter]
		[command]
			{VARIABLE buy 1}
			[while]
				[variable]
					name=buy
					equals=1
				[/variable]
				[do]
					[message]
						speaker=narrator
						caption= _ "Advance way picking:"
						[option]
							message= _ {MENU_IMG_TXT "units/dwarves/gryphon-master.png" "Gryphon Master"}
							[command]
								[modify_unit]
									[filter]
										id=$able_gryphon
									[/filter]
									type="Gryphon Master"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]	
						[option]
							message= _ {MENU_IMG_TXT "units/monsters/gryphon.png" "Gryphon"}
							[command]
								[modify_unit]
									[filter]
										id=$able_gryphon
									[/filter]
									type="Gryphon"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]
					[/message]
				[/do]
			[/while]
		[/command]
		{CLEAR_VARIABLE able_gryphon}
	[/event]
#enddef

#define Able_Elvish_Lord_1
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Elvish Fighter"
		[/filter]
		{VARIABLE able_elvish_lord_1 $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_elvish_lord_1
		[/filter]
		[command]
			{VARIABLE buy 1}
			[while]
				[variable]
					name=buy
					equals=1
				[/variable]
				[do]
					[message]
						speaker=narrator
						caption= _ "Advance way picking:"
						[option]
							message= _ {MENU_IMG_TXT "units/elves-wood/captain.png" "Elvish Captain"}
							[command]
								[modify_unit]
									[filter]
										id=$able_elvish_lord_1
									[/filter]
									type="Elvish Captain"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]	
						[option]
							message= _ {MENU_IMG_TXT "units/elves-wood/hero.png" "Elvish Hero"}
							[command]
								[modify_unit]
									[filter]
										id=$able_elvish_lord_1
									[/filter]
									type="Elvish Hero"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]	
						[option]
							message= _ {MENU_IMG_TXT "units/elves-wood/lord.png" "Elvish Lord"}
							[command]
								[modify_unit]
									[filter]
										id=$able_elvish_lord_1
									[/filter]
									type="Elvish Lord"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]	
					[/message]
				[/do]
			[/while]
		[/command]
		{CLEAR_VARIABLE able_elvish_lord_1}
	[/event]
#enddef

#define Able_Elvish_Lord_2
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Elvish Archer"
		[/filter]
		{VARIABLE able_elvish_lord_2 $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_elvish_lord_2
		[/filter]
		[command]
			{VARIABLE buy 1}
			[while]
				[variable]
					name=buy
					equals=1
				[/variable]
				[do]
					[message]
						speaker=narrator
						caption= _ "Advance way picking:"
						[option]
							message= _ {MENU_IMG_TXT "units/elves-wood/ranger.png" "Elvish Ranger"}
							[command]
								[modify_unit]
									[filter]
										id=$able_elvish_lord_2
									[/filter]
									type="Elvish Ranger"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]	
						[option]
							message= _ {MENU_IMG_TXT "units/elves-wood/marksman.png" "Elvish Marksman"}
							[command]
								[modify_unit]
									[filter]
										id=$able_elvish_lord_2
									[/filter]
									type="Elvish Marksman"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]	
						[option]
							message= _ {MENU_IMG_TXT "units/elves-wood/lord.png" "Elvish Lord"}
							[command]
								[modify_unit]
									[filter]
										id=$able_elvish_lord_2
									[/filter]
									type="Elvish Lord"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]	
					[/message]
				[/do]
			[/while]
		[/command]
		{CLEAR_VARIABLE able_elvish_lord_2}
	[/event]
#enddef

#define Able_Royal_Warrior_1
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Swordsman"
		[/filter]
		{VARIABLE able_royal_warrior_1 $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_royal_warrior_1
		[/filter]
		[command]
			{VARIABLE buy 1}
			[while]
				[variable]
					name=buy
					equals=1
				[/variable]
				[do]
					[message]
						speaker=narrator
						caption= _ "Advance way picking:"
						[option]
							message= _ {MENU_IMG_TXT "units/human-loyalists/royal-warrior.png" "Royal Warrior"}
							[command]
								[modify_unit]
									[filter]
										id=$able_royal_warrior_1
									[/filter]
									type="Royal Warrior"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]	
						[option]
							message= _ {MENU_IMG_TXT "units/human-loyalists/royalguard.png" "Royal Guard"}
							[command]
								[modify_unit]
									[filter]
										id=$able_royal_warrior_1
									[/filter]
									type="Royal Guard"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]
					[/message]
				[/do]
			[/while]
		[/command]
		{CLEAR_VARIABLE able_royal_warrior_1}
	[/event]
#enddef

#define Able_Royal_Warrior_2
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Pikeman"
		[/filter]
		{VARIABLE able_royal_warrior_2 $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_royal_warrior_2
		[/filter]
		[command]
			{VARIABLE buy 1}
			[while]
				[variable]
					name=buy
					equals=1
				[/variable]
				[do]
					[message]
						speaker=narrator
						caption= _ "Advance way picking:"
						[option]
							message= _ {MENU_IMG_TXT "units/human-loyalists/royal-warrior.png" "Royal Warrior"}
							[command]
								[modify_unit]
									[filter]
										id=$able_royal_warrior_2
									[/filter]
									type="Royal Warrior"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]	
						[option]
							message= _ {MENU_IMG_TXT "units/human-loyalists/halberdier.png" "Halberdier"}
							[command]
								[modify_unit]
									[filter]
										id=$able_royal_warrior_2
									[/filter]
									type="Halberdier"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]
					[/message]
				[/do]
			[/while]
		[/command]
		{CLEAR_VARIABLE able_royal_warrior_2}
	[/event]
#enddef

#define Able_Sea_Serpent
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Water Serpent"
		[/filter]
		{VARIABLE able_water_serpent $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_water_serpent
		[/filter]
		[modify_unit]
			[filter]
				id=$able_water_serpent
			[/filter]
			type="Sea Serpent"
		[/modify_unit]
		{CLEAR_VARIABLE able_water_serpent}
	[/event]
#enddef

#define Able_Water_Serpent_And_Cuttle_Fish
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Tentacle of the Deep"
		[/filter]
		{VARIABLE able_water_serpent_and_cuttle_fish $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_water_serpent_and_cuttle_fish
		[/filter]
		[command]
			{VARIABLE buy 1}
			[while]
				[variable]
					name=buy
					equals=1
				[/variable]
				[do]
					[message]
						speaker=narrator
						caption= _ "Advance way picking:"
						[option]
							message= _ {MENU_IMG_TXT "units/monsters/water-serpent.png" "Water Serpent"}
							[command]
								[modify_unit]
									[filter]
										id=$able_water_serpent_and_cuttle_fish
									[/filter]
									type="Water Serpent"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]	
						[option]
							message= _ {MENU_IMG_TXT "units/monsters/cuttlefish.png" "Cuttle Fish"}
							[command]
								[modify_unit]
									[filter]
										id=$able_water_serpent_and_cuttle_fish
									[/filter]
									type="Cuttle Fish"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]
					[/message]
				[/do]
			[/while]
		[/command]
		{CLEAR_VARIABLE able_water_serpent_and_cuttle_fish}
	[/event]
#enddef


#define Able_Ghoul
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Walking Corpse"
		[/filter]
		{VARIABLE able_ghoul $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_ghoul
		[/filter]
		[command]
			{VARIABLE buy 1}
			[while]
				[variable]
					name=buy
					equals=1
				[/variable]
				[do]
					[message]
						speaker=narrator
						caption= _ "Advance way picking:"
						[option]
							message= _ {MENU_IMG_TXT "units/undead/ghoul" "Ghoul"}
							[command]
								[modify_unit]
									[filter]
										id=$able_ghoul
									[/filter]
									type="Ghoul"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]	
						[option]
							message= _ {MENU_IMG_TXT "units/undead/soulless.png" "Soulless"}
							[command]
								[modify_unit]
									[filter]
										id=$able_ghoul
									[/filter]
									type="Soulless"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]
					[/message]
				[/do]
			[/while]
		[/command]
		{CLEAR_VARIABLE able_ghoul}
	[/event]
#enddef


#define Able_Wolf_Rider
	[event]
		name=advance
		first_time_only=no
		[filter]
			type="Goblin Spearman"
		[/filter]
		{VARIABLE able_wolf_rider $unit.id}
	[/event]
	[event]
		name=post_advance
		first_time_only=no
		[filter]
			id=$able_wolf_rider
		[/filter]
		[command]
			{VARIABLE buy 1}
			[while]
				[variable]
					name=buy
					equals=1
				[/variable]
				[do]
					[message]
						speaker=narrator
						caption= _ "Advance way picking:"
						[option]
							message= _ {MENU_IMG_TXT "units/goblins/impaler" "Goblin Impaler"}
							[command]
								[modify_unit]
									[filter]
										id=$able_wolf_rider
									[/filter]
									type="Goblin Impaler"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]	
						[option]
							message= _ {MENU_IMG_TXT "units/goblins/rouser.png" "Goblin Rouser"}
							[command]
								[modify_unit]
									[filter]
										id=$able_wolf_rider
									[/filter]
									type="Goblin Rouser"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]
						[option]
							message= _ {MENU_IMG_TXT "units/goblins/wolf-rider.png" "Wolf Rider"}
							[command]
								[modify_unit]
									[filter]
										id=$able_wolf_rider
									[/filter]
									type="Wolf Rider"
								[/modify_unit]
								{VARIABLE buy 0}
							[/command]
						[/option]
					[/message]
				[/do]
			[/while]
		[/command]
		{CLEAR_VARIABLE able_wolf_rider}
	[/event]
#enddef


#define MODIFICATION_ELDER_MAGE
	[event]
		name=side turn
		first_time_only=no
		[store_unit]
            [filter]
              type=Elder Mage
              [not]
                [filter_wml]
                    [variables]
                        updated=yes
                    [/variables]
                [/filter_wml]
              [/not]
            [/filter]
            kill=no
            variable=side1units
        [/store_unit]
		{FOREACH side1units i}
		[object]
			silent=yes
			[filter]
				id=$side1units[$i].id
			[/filter]
			[effect]
				apply_to=attack
				range=melee
				name=staff
				increase_damage=4
				duration=forever
			[/effect]
			[effect]
				apply_to=attack
				range=ranged
				name=lightning
				increase_damage=6
			[/effect]
			[effect]
				apply_to=resistance
				replace=no
				fire=-20
				duration=forever
			[/effect]
			[effect]
				apply_to=hitpoints
				increase=6
				increase_total=6
			[/effect]
		[/object]
		{MODIFY_UNIT id=$side1units[$i].id variables.updated yes}
		{NEXT i}
		{CLEAR_VARIABLE side1units}
   [/event]
#enddef	

#define MODIFICATION_TROLL_HERO
	[event]
		name=side turn
		first_time_only=no
		[store_unit]
            [filter]
              type=Troll Hero
              [not]
                [filter_wml]
                    [variables]
                        updated=yes
                    [/variables]
                [/filter_wml]
              [/not]
            [/filter]
            kill=no
            variable=side1units
        [/store_unit]
		{FOREACH side1units i}
		[object]
			silent=yes
			[filter]
				id=$side1units[$i].id
			[/filter]
			[effect]
				apply_to=attack
				range=melee
				name=hammer
				increase_damage=-2
			[/effect]
			[effect]
				apply_to=hitpoints
				increase=-10
				increase_total=-10
			[/effect]
			[effect]
				apply_to=new_ability
				[abilities]
					{ABILITY_LEADERSHIP_LEVEL_2}
				[/abilities]
			[/effect]
		[/object]
		{MODIFY_UNIT id=$side1units[$i].id variables.updated yes}
		{NEXT i}
		{CLEAR_VARIABLE side1units}
   [/event]
#enddef	

#define MODIFICATION_WOLF
	[event]
		name=side turn
		first_time_only=no
		[store_unit]
            [filter]
              type=Wolf
              [not]
                [filter_wml]
                    [variables]
                        updated=yes
                    [/variables]
                [/filter_wml]
              [/not]
            [/filter]
            kill=no
            variable=side1units
        [/store_unit]
		{FOREACH side1units i}
		[object]
			silent=yes
			random_traits=yes
			[filter]
				id=$side1units[$i].id
			[/filter]
			[effect]
				apply_to=new_ability
				[abilities]
					{ABILITY_SKIRMISHER}
				[/abilities]
			[/effect]
		[/object]
		{MODIFY_UNIT id=$side1units[$i].id variables.updated yes}
		{NEXT i}
		{CLEAR_VARIABLE side1units}
   [/event]
#enddef	

#define MODIFICATION_GREAT_WOLF
	[event]
		name=side turn
		first_time_only=no
		[store_unit]
            [filter]
              type=Great Wolf
              [not]
                [filter_wml]
                    [variables]
                        updated=yes
                    [/variables]
                [/filter_wml]
              [/not]
            [/filter]
            kill=no
            variable=side1units
        [/store_unit]
		{FOREACH side1units i}
		[object]
			silent=yes
			[filter]
				id=$side1units[$i].id
			[/filter]
			[effect]
				apply_to=new_ability
				[abilities]
					{ABILITY_SKIRMISHER}
				[/abilities]
			[/effect]
			[effect]
				apply_to=attack
				range=melee
				increase_damage=1
				duration=forever
			[/effect]
		[/object]
		{MODIFY_UNIT id=$side1units[$i].id variables.updated yes}
		{NEXT i}
		{CLEAR_VARIABLE side1units}
   [/event]
#enddef	

#define MODIFICATION_DIRE_WOLF
	[event]
		name=side turn
		first_time_only=no
		[store_unit]
            [filter]
              type=Direwolf
              [not]
                [filter_wml]
                    [variables]
                        updated=yes
                    [/variables]
                [/filter_wml]
              [/not]
            [/filter]
            kill=no
            variable=side1units
        [/store_unit]
		{FOREACH side1units i}
		[object]
			silent=yes
			[filter]
				id=$side1units[$i].id
			[/filter]
			[effect]
				apply_to=new_ability
				[abilities]
					{ABILITY_SKIRMISHER}
				[/abilities]
			[/effect]
			[effect]
				apply_to=attack
				range=melee
				increase_damage=1
				duration=forever
			[/effect]
		[/object]
		{MODIFY_UNIT id=$side1units[$i].id variables.updated yes}
		{NEXT i}
		{CLEAR_VARIABLE side1units}
   [/event]
#enddef	
	
#define MODIFICATION_GREAT_TROLL
	[event]
		name=side turn
		first_time_only=no
		[store_unit]
            [filter]
              type=Great Troll
              [not]
                [filter_wml]
                    [variables]
                        updated=yes
                    [/variables]
                [/filter_wml]
              [/not]
            [/filter]
            kill=no
            variable=side1units
        [/store_unit]
		{FOREACH side1units i}
		[object]
			silent=yes
			[filter]
				id=$side1units[$i].id
			[/filter]
			[effect]
				apply_to=attack
				range=melee
				name=hammer
				increase_damage=-5
			[/effect]
			[effect]
				apply_to=hitpoints
				increase=-13
				increase_total=-13
			[/effect]
			[effect]
				apply_to=new_ability
				[abilities]
					{ABILITY_LEADERSHIP_LEVEL_3}
				[/abilities]
			[/effect]
		[/object]
		{MODIFY_UNIT id=$side1units[$i].id variables.updated yes}
		{NEXT i}
		{CLEAR_VARIABLE side1units}
   [/event]
#enddef
	
#define MODIFICATION_SEA_SERPENT
	[event]
		name=side turn 
		first_time_only=no
		[store_unit]
            [filter]
              type=Sea Serpent
              [not]
                [filter_wml]
                    [variables]
                        updated=yes
                    [/variables]
                [/filter_wml]
              [/not]
            [/filter]
            kill=no
            variable=side1units
        [/store_unit]
		{FOREACH side1units i}
		[object]
			silent=yes
			[filter]
				id=$side1units[$i].id
			[/filter]
			[effect]
				apply_to=attack
				range=melee
				name=fangs
				[set_specials]
					mode=append
					{WEAPON_SPECIAL_POISON}
				[/set_specials]
			[/effect]
		[/object]
		{MODIFY_UNIT id=$side1units[$i].id variables.updated yes}
		{NEXT i}
		{CLEAR_VARIABLE side1units}
   [/event]
#enddef

#define MODIFICATION_TENTACLE_OF_THE_DEEP
	[event]
		name=side turn
		first_time_only=no
		[store_unit]
            [filter]
              type=Tentacle of the Deep
              [not]
                [filter_wml]
                    [variables]
                        updated=yes
                    [/variables]
                [/filter_wml]
              [/not]
            [/filter]
            kill=no
            variable=side1units
        [/store_unit]
		{FOREACH side1units i}
		{MODIFY_UNIT id=$side1units[$i].id moves 6}
		[object]
			silent=yes
			[filter]
				id=$side1units[$i].id
			[/filter]
			[effect]
				apply_to=movement
				set=6
			[/effect]
			[effect]
				apply_to=movement_costs
				replace=yes
				[movement_costs]
					deep_water=1
					shallow_water=2
					reef=2
					swamp_water=2
					flat=3
					sand=2
					desert=4
					forest=4
					hills=5
					village=2
					castle=1
					cave=3
					frozen=2
					fungus=3
				[/movement_costs]
			[/effect]
			[effect]
				apply_to=defense
				replace=yes
				[defense]
					deep_water=40
					shallow_water=50
					reef=50
					swamp_water=60
					flat=70
					sand=70
					desert=80
					forest=70
					hills=70
					village=70
					castle=70
					cave=80
					frozen=70
					fungus=80
				[/defense]
			[/effect]
			[effect]
				apply_to=resistance
				replace=yes
				[resistance]
					blade=90
					pierce=110
					impact=90
					fire=120
					cold=70
					arcane=90
				[/resistance]
			[/effect]
		[/object]
		{MODIFY_UNIT id=$side1units[$i].id variables.updated yes}
		{NEXT i}
		{CLEAR_VARIABLE side1units}
   [/event]
#enddef

#define MODIFICATION_CUTTLE_FISH
	[event]
		name=side turn
		first_time_only=no
		[store_unit]
            [filter]
              type=Cuttle Fish
              [not]
                [filter_wml]
                    [variables]
                        updated=yes
                    [/variables]
                [/filter_wml]
              [/not]
            [/filter]
            kill=no
            variable=side1units
        [/store_unit]
		{FOREACH side1units i}
		[object]
			silent=yes
			[filter]
				id=$side1units[$i].id
			[/filter]
			[effect]
				apply_to=movement_costs
				replace=yes
				[movement_costs]
					deep_water=1
					shallow_water=2
					reef=2
					swamp_water=2
					flat=3
					sand=2
					desert=4
					forest=4
					hills=5
					village=2
					castle=1
					cave=3
					frozen=2
					fungus=3
				[/movement_costs]
			[/effect]
			[effect]
				apply_to=defense
				replace=yes
				[defense]
					deep_water=40
					shallow_water=50
					reef=50
					swamp_water=60
					flat=70
					sand=70
					desert=80
					forest=70
					hills=70
					village=70
					castle=70
					cave=80
					frozen=70
					fungus=80
				[/defense]
			[/effect]
			[effect]
				apply_to=resistance
				replace=yes
				[resistance]
					blade=80
					pierce=100
					impact=70
					fire=100
					cold=40
					arcane=80
				[/resistance]
			[/effect]
		[/object]
		{MODIFY_UNIT id=$side1units[$i].id variables.updated yes}
		{NEXT i}
		{CLEAR_VARIABLE side1units}
   [/event]
#enddef

#define MODIFICATION_GIANT_RAT
	[event]
		name=side turn
		first_time_only=no
		[store_unit]
            [filter]
              type=Giant Rat
              [not]
                [filter_wml]
                    [variables]
                        updated=yes
                    [/variables]
                [/filter_wml]
              [/not]
            [/filter]
            kill=no
            variable=side1units
        [/store_unit]
		{FOREACH side1units i}
		{MODIFY_UNIT id=$side1units[$i].id moves 7}
		[object]
			silent=yes
			[filter]
				id=$side1units[$i].id
			[/filter]
			[effect]
				apply_to=movement
				set=7
			[/effect]
			[effect]
				apply_to=attack
				range=melee
				name=bite
				increase_damage=1
				increase_attacks=2
			[/effect]
			[effect]
				apply_to=movement_costs
				replace=yes
				[movement_costs]
					swamp_water=2
					flat=1
					forest=1
					frozen=2
					fungus=1
				[/movement_costs]
			[/effect]
			[effect]
				apply_to=defense
				replace=yes
				[defense]
					swamp_water=50
					flat=40
					forest=30
					frozen=70
					fungus=40
				[/defense]
			[/effect]
			[effect]
				apply_to=resistance
				replace=yes
				[resistance]
					blade=90
					pierce=110
					impact=100
					fire=110
					cold=80
					arcane=90
				[/resistance]
			[/effect]
			[effect]
				apply_to=new_ability
				[abilities]
					{ABILITY_SKIRMISHER}
					{ABILITY_AMBUSH}
				[/abilities]
			[/effect]
		[/object]
		{MODIFY_UNIT id=$side1units[$i].id variables.updated yes}
		{NEXT i}
		{CLEAR_VARIABLE side1units}
   [/event]
#enddef

#define MODIFICATION_MUDCRAWLER
	[event]
		name=side turn
		first_time_only=no
		[store_unit]
            [filter]
              type=Mudcrawler
              [not]
                [filter_wml]
                    [variables]
                        updated=yes
                    [/variables]
                [/filter_wml]
              [/not]
            [/filter]
            kill=no
            variable=side1units
        [/store_unit]
		{FOREACH side1units i}
		{MODIFY_UNIT id=$side1units[$i].id moves 4}
		[object]
			silent=yes
			[filter]
				id=$side1units[$i].id
			[/filter]
			[effect]
				apply_to=movement
				increase=1
			[/effect]
			[effect]
				apply_to=movement_costs
				replace=yes
				[movement_costs]
					swamp_water=1
				[/movement_costs]
			[/effect]
			[effect]
				apply_to=defense
				replace=yes
				[defense]
					swamp_water=50
				[/defense]
			[/effect]
			[effect]
				apply_to=resistance
				replace=yes
				[resistance]
					blade=80
					pierce=80
					impact=40
					fire=160
					cold=110
					arcane=130
				[/resistance]
			[/effect]
		[/object]
		{MODIFY_UNIT id=$side1units[$i].id variables.updated yes}
		{NEXT i}
		{CLEAR_VARIABLE side1units}
   [/event]
#enddef

#define MODIFICATION_GIANT_MUDCRAWLER
	[event]
		name=side turn
		first_time_only=no
		[store_unit]
            [filter]
              type=Giant Mudcrawler
              [not]
                [filter_wml]
                    [variables]
                        updated=yes
                    [/variables]
                [/filter_wml]
              [/not]
            [/filter]
            kill=no
            variable=side1units
        [/store_unit]
		{FOREACH side1units i}
		{MODIFY_UNIT id=$side1units[$i].id moves 5}
		[object]
			silent=yes
			[filter]
				id=$side1units[$i].id
			[/filter]
			[effect]
				apply_to=movement
				increase=1
			[/effect]
			[effect]
				apply_to=movement_costs
				replace=yes
				[movement_costs]
					swamp_water=1
				[/movement_costs]
			[/effect]
			[effect]
				apply_to=defense
				replace=yes
				[defense]
					swamp_water=40
				[/defense]
			[/effect]
			[effect]
				apply_to=resistance
				replace=yes
				[resistance]
					blade=80
					pierce=80
					impact=40
					fire=160
					cold=110
					arcane=130
				[/resistance]
			[/effect]
		[/object]
		{MODIFY_UNIT id=$side1units[$i].id variables.updated yes}
		{NEXT i}
		{CLEAR_VARIABLE side1units}
   [/event]
#enddef

#define MODIFICATIONS_START
[event]
	name=side 1 turn 1
	first_time_only=no
	{MODIFICATION_ELDER_MAGE}
	{MODIFICATION_GREAT_TROLL}
	{MODIFICATION_DIRE_WOLF}
	{MODIFICATION_GREAT_WOLF}
	{MODIFICATION_WOLF}
	{MODIFICATION_TROLL_HERO}
	{MODIFICATION_SEA_SERPENT}
	{MODIFICATION_TENTACLE_OF_THE_DEEP}
	{MODIFICATION_CUTTLE_FISH}
	{MODIFICATION_GIANT_RAT}
	{MODIFICATION_MUDCRAWLER}
	{MODIFICATION_GIANT_MUDCRAWLER}
	{Able_Wolf_Rider}
	{Able_Ghoul}
	{Able_Elder_Mage}
	{Able_Chocobone}
	{Able_Great_Troll}
	{Able_Trolls}
	{Able_Death_Knight}
	{Able_Ancient_Lich}
	{Able_Great_Wolf}
	{Able_Wolf}
	{Able_Skeletal_Dragon}
	{Able_Armageddon_Drake}
	{Able_Dwarvish_Runesmith}
	{Able_Dwarvish_Runemaster}
	{Able_Dwarvish_Arcanister}
	{Able_Gryphon}
	{Able_Elvish_Lord_1}
	{Able_Elvish_Lord_2}
	{Able_Royal_Warrior_1}
	{Able_Royal_Warrior_2}
	{Able_Sea_Serpent}
	{Able_Water_Serpent_And_Cuttle_Fish}
[/event]
#enddef
If someone wish to use it in own scenarios its easy, just put this "MODIFICATIONS_START" in scenario.
Last edited by ChaosRider on May 30th, 2013, 3:43 pm, edited 4 times in total.
Creator of WOTG (+2880 units), MWC (+615 units), SurvivorsArea, RandomColosseum, RC WOTG, RC MWC, ColosseumRandomClonesBattle, BetweenDarknessAndLight, StealingWeapons, MoreUnitsForms, MoreDamageTypes, CanBeOnlyOne, ColosseumOneWinner, BonusSpam, CriticalStrike - available at 1.12 Wesnoth server.
User avatar
ChaosRider
Posts: 846
Joined: April 15th, 2012, 1:15 pm

Re: ChaosRider’s WML questions

Post by ChaosRider »

Just checked in multiplayer game and it makes oos... But! If all could have that addon then maybe it wont do that... But who knows... Btw oos was only at the moment of changing unit, and it not making worse game later... As for me its acceptable :P.
__________________________________________________________________________________________________________________
Hmmmm, now i know that game dont allow to load game in which was used that code and it work. So if you have dwarv fighter and he will lvlup to rune smith then after that you cant load game : ).
Creator of WOTG (+2880 units), MWC (+615 units), SurvivorsArea, RandomColosseum, RC WOTG, RC MWC, ColosseumRandomClonesBattle, BetweenDarknessAndLight, StealingWeapons, MoreUnitsForms, MoreDamageTypes, CanBeOnlyOne, ColosseumOneWinner, BonusSpam, CriticalStrike - available at 1.12 Wesnoth server.
User avatar
ChaosRider
Posts: 846
Joined: April 15th, 2012, 1:15 pm

Re: ChaosRider’s WML questions

Post by ChaosRider »

Hello, i got a new question, how to filter sides by controllers ? I wish to use my code for sides controlled by ai, not human players.
That code is going to add new recruits for that sides.
1.
Spoiler:
2.
Spoiler:
Is some of these options could be good ?

Btw my second question is about code written below:
Spoiler:
This which is not working in that code its not started for second side (if first is not generated/created in game = that side is empty). I am using same part of code but with event name=side 2 turn 1.
Last edited by ChaosRider on May 30th, 2013, 3:44 pm, edited 1 time in total.
Creator of WOTG (+2880 units), MWC (+615 units), SurvivorsArea, RandomColosseum, RC WOTG, RC MWC, ColosseumRandomClonesBattle, BetweenDarknessAndLight, StealingWeapons, MoreUnitsForms, MoreDamageTypes, CanBeOnlyOne, ColosseumOneWinner, BonusSpam, CriticalStrike - available at 1.12 Wesnoth server.
User avatar
ChaosRider
Posts: 846
Joined: April 15th, 2012, 1:15 pm

About WC and MWC...

Post by ChaosRider »

Hello people, i know how much you love my questions :D, now i have new one. I will be happy if you fix your movement type: mounted (in default wesnoth), cause there you have "forest=-70", this is why horseman and cavalryman works bad with WC and MWC codes (woodscraft which is increase defense in forest). First i was thought thats my code is bad written, but now i see that its not my fault this time :P.
WC - World Conquest
MWC - Modified World Conquest
Creator of WOTG (+2880 units), MWC (+615 units), SurvivorsArea, RandomColosseum, RC WOTG, RC MWC, ColosseumRandomClonesBattle, BetweenDarknessAndLight, StealingWeapons, MoreUnitsForms, MoreDamageTypes, CanBeOnlyOne, ColosseumOneWinner, BonusSpam, CriticalStrike - available at 1.12 Wesnoth server.
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: About WC and MWC...

Post by Dugi »

I was mentioning the same problem some time ago. You were around already by then, but it seems you have not noticed it. The -70 forest defence is somewhat bugged, because [effect]s affect it wrongly. This causes quite significant problems if you have for example an object that can affect a lot of units and adds a fixed value to forest defence of any possible unit. There are workarounds, but they aren't trivial. The bug was fixed in wesnoth 1.11.2, but it won't be fixed in 1.10 due to the need for multiplayer stability.
Spoiler:
User avatar
ChaosRider
Posts: 846
Joined: April 15th, 2012, 1:15 pm

Re: About WC and MWC...

Post by ChaosRider »

Well, so i will have to make code which will work at recruit moment (to change forest=-70 to forest=70), btw is it possible to filter units by movement_type ? If not then i will have to make filter by id/type of units which they are using it. It would be good if author of Wolrd Conquest could do same thing to fix it.
Creator of WOTG (+2880 units), MWC (+615 units), SurvivorsArea, RandomColosseum, RC WOTG, RC MWC, ColosseumRandomClonesBattle, BetweenDarknessAndLight, StealingWeapons, MoreUnitsForms, MoreDamageTypes, CanBeOnlyOne, ColosseumOneWinner, BonusSpam, CriticalStrike - available at 1.12 Wesnoth server.
Post Reply