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

ChaosRider’s WML questions

Post by ChaosRider »

In this game you have 8 waves of enemies. I would like to be strengthened. In attachment is packaged game (transformed Colosseum). Here you have a table of pros for hp, dmg, strikes, movement points, resistances and defenses terrain. I do not know how to do so would be nice if someone posted a gain in the game code for units controlled by the computer, written in the table below. Entered the game with these changes could include in this topic.


Bonuses for ai units with each, next wave:
nr of wave__+hp__+dmg___+strikes___+movements points___+all resistances___+all terrain defences(max 80%)
__1_________0_____1_______0____________0_________________0%________________0%
__2________10_____2_______1____________1_________________5%________________5%
__3________20_____3_______1____________1_________________5%________________5%
__4________30_____4_______2____________2________________10%_______________10%
__5________40_____5_______2____________2________________10%_______________10%
__6________50_____6_______3____________3________________15%_______________15%
__7________60_____7_______3____________3________________15%_______________15%
__8________70_____8_______4____________4________________20%_______________20%
Attachments
Colosseum_edit.zip
(25.57 KiB) Downloaded 203 times
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: I need help with programming

Post by ChaosRider »

Och, come on... I know there are many people here which can do program for this scenario... I cant do this cause i dont know how, but if someone know how then why they dont want help other player ? I am not doing this scenario only for me, but for all players...
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
alexanderthegre
Posts: 193
Joined: December 8th, 2011, 3:23 am
Location: nowhere

Re: I need help with programming

Post by alexanderthegre »

For the hitpoints:

Code: Select all

[event]
 name=turn #Turn number
 [object]
  silent=yes
  duration=forever
  [filter]
   side=#Side number
  [/filter]
  [effect]
   apply_to=hitpoints
   increase_total=#Ammount to increase hitpoints
  [/effect]
 [/object]
[/event]
Look at eventwml and effectwml for the others. It sould use the same format.
User avatar
Ravana
Forum Moderator
Posts: 2953
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: I need help with programming

Post by Ravana »

alexanderthegre wrote:For the hitpoints:

Code: Select all

 [object]
  silent=yes
  duration=forever
  [filter]
   side=#Side number
  [/filter]
  [effect]
   apply_to=hitpoints
   increase_total=#Ammount to increase hitpoints
  [/effect]
 [/object]
[/event]
Your way works only for 1 unit.

But

Code: Select all

  [effect]
   apply_to=hitpoints
   increase_total=#Ammount to increase hitpoints
  [/effect]
should be

Code: Select all

  [effect]
   apply_to=hitpoints
   increase_total=#Ammount to increase hitpoints
   increase=#Ammount to increase hitpoints
  [/effect]
Would be helpful if someone could tell what is wrong in

Code: Select all

[store_unit]
[filter]
side=1
[/filter]
variable=units
kill=no
[/store_unit]
{FOREACH units i}
[object]
    side_for=1
    silent=yes
    name=_ "Damage+2"
    [filter]
        x,y="units[$i].x","units[$i].y"
    [/filter]
    [effect]
        apply_to=attack
        increase_damage=2
        [/effect]
    [/object]
{NEXT i}
{FOREACH units i}
[unstore_unit]
variable=units[$i]
[/unstore_unit]
{NEXT i}
{CLEAR_VARIABLE units}
Ceres
Forum Regular
Posts: 620
Joined: September 18th, 2010, 7:56 pm
Location: Germany

Re: I need help with programming

Post by Ceres »

Would be helpful if someone could tell what is wrong in

Code: Select all

...
[filter]
   x,y="units[$i].x","units[$i].y"
[/filter]
You're missing two dollar signs here (should be $units[$i].x,$units[$i].y).
User avatar
ChaosRider
Posts: 846
Joined: April 15th, 2012, 1:15 pm

Re: I need help with programming

Post by ChaosRider »

Ok, it is nice to see so many new posts in this topic, but could anyone upload here colosseum (this changed) with all of this codes which you have write here?
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
Ravana
Forum Moderator
Posts: 2953
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: I need help with programming

Post by Ravana »

After things like

Code: Select all

{COLOSSEUM_ENEMY_A "Goblin Spearman"}
{COLOSSEUM_ENEMY_B "Goblin Spearman"}
{COLOSSEUM_ENEMY_C "Peasant"}
{COLOSSEUM_ENEMY_D "Peasant"}
{COLOSSEUM_ENEMY_E "Woodsman"}
{COLOSSEUM_ENEMY_F "Woodsman"}
{COLOSSEUM_ENEMY_G "Woodsman"}
{COLOSSEUM_ENEMY_H "Peasant"}
{COLOSSEUM_ENEMY_I "Peasant"}
Add

Code: Select all

[store_unit]
[filter]
side=1
[/filter]
variable=units
kill=no
[/store_unit]
{FOREACH units i}
[object]
	side_for=1
	silent=yes
	name=_ "Damage+2"
	[filter]
x,y=$units[$i].x,$units[$i].y
	[/filter]
#effect
	[/object]
{NEXT i}
{CLEAR_VARIABLE units}
And replace #effect with any of these you need

Code: Select all

[effect]
apply_to=attack
increase_damage=#amount
[/effect]

[effect]
apply_to=movement
increase=#amount
[/effect]

[effect]
	apply_to=hitpoints
	increase_total=#amount
[/effect]
[effect]
	apply_to=hitpoints
	increase=#amount            
[/effect]

[effect]
	apply_to=attack
	increase_attacks=#amount
[/effect]

[effect]
	apply_to=resistance
	replace=no
	[resistance]
		cold=-#amount
	[/resistance]
[/effect]
[effect]
	apply_to=resistance
	replace=no
	[resistance]
		fire=-#amount
	[/resistance]
[/effect]
[effect]
	apply_to=resistance
	replace=no
	[resistance]
		arcane=-#amount
	[/resistance]
[/effect]
[effect]
	apply_to=resistance
	replace=no
	[resistance]
		blade=-#amount
	[/resistance]
[/effect]
[effect]
	apply_to=resistance
	replace=no
	[resistance]
		impact=-#amount
	[/resistance]
[/effect]
[effect]
	apply_to=resistance
	replace=no
	[resistance]
		pierce=-#amount
	[/resistance]
[/effect]
User avatar
ChaosRider
Posts: 846
Joined: April 15th, 2012, 1:15 pm

Re: I need help with programming

Post by ChaosRider »

No matter how many times i will try add this codes, i have allways bug which dont let me run 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: I need help with programming

Post by ChaosRider »

btw i cant give all resistances in one effect ? For example:

Code: Select all

[store_unit]
[filter]
side=1
[/filter]
variable=units
kill=no
[/store_unit]
{FOREACH units i}
[object]
   side_for=1
   silent=yes
   name=_ "resistance+2"
   [filter]
x,y=$units[$i].x,$units[$i].y
   [/filter]
[effect]
   apply_to=resistance
   replace=no
   [resistance]
      cold=-#amount
      fire=-#amount
      arcane=-#amount
      pierce=-#amount
      impact=-#amount
      blade=-#amount
   [/resistance]
[/effect]
   [/object]
{NEXT i}
{CLEAR_VARIABLE units}


and this "-#amount" i have to change for -2 ? To have 2% resistance more ?
Last edited by Crendgrim on May 7th, 2012, 9:11 am, edited 1 time in total.
Reason: Please put WML code inside of BBC [code] tags to make it easier to read. I edited this post accordingly.
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: I need help with programming

Post by ChaosRider »

Hmmm i have try create that for first wave, but something is bad cause still i have bug when i run game.
Attachments
Colosseum_scenario.cfg
(22.17 KiB) Downloaded 183 times
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: I need help with programming

Post by ChaosRider »

Thx to 5 players (Laela,Nephrite,ChaosRider,alexanderthegre,Ceres) now we can play in other changed colosseum which is working well : ). Enjoy, pls try survive to the last wave :D.

Put it in your addons.
Attachments
Colosseum_edit.rar
(23.82 KiB) Downloaded 177 times
Last edited by ChaosRider on May 8th, 2012, 10:55 am, 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

Re: I need help with programming

Post by ChaosRider »

In attachment you have a bit changed factions and units :P, for example lich can lvlup to ancient lich, or inferno drake to armageddon drake and many other changes.


Battle for wesnoth 1.10.0/data/multiplayer here you have to copy and paste this folder factions.

Battle for wesnoth 1.10.0/data/core here you have to copy and paste this folder units.
Attachments
Desktop.rar
(258.03 KiB) Downloaded 161 times
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: I need help with programming

Post by ChaosRider »

Topic will be continued elsewhere (the link is below), and MG please close this topic. Any changes to the files added in this topic also will be charged in the Wesnoth forum link below.


http://forums.wesnoth.org/viewtopic.php?f=8&t=36773
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

I need a little help : ).

Post by ChaosRider »

The last file that I created to upload their own era, but Not really sure how to do it here.

Code: Select all

[era]
    id=Chaotic_Era
    name= _ "Chaotic Era"
    [multiplayer_side]
        id=Random
        name={MENU_IMG_TXT "random-enemy.png" _"Random"}
        random_faction=yes
    [/multiplayer_side]
    [multiplayer_side]
        id=
        name={MENU_IMG_TXT "any image file in the game's ./images directory" (_"faction name")}
        type=
        leader=
        recruit=
        music=
        terrain_liked=
        [ai]
            recruitment_pattern=
        [/ai]
    [/multiplayer_side]
[/era]

I do not know just what's going on in the abandoned, not written locations.
Last edited by artisticdude on May 12th, 2012, 9:55 pm, edited 1 time in total.
Reason: Edited to include BB [code] tags around WML code. Please remember to do this yourself.
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.
Ceres
Forum Regular
Posts: 620
Joined: September 18th, 2010, 7:56 pm
Location: Germany

Re: I need a little help : ).

Post by Ceres »

Have you read the EraWML page where all possible keys for [multiplayer_side] are explained?
Post Reply