How to change side leader hitpoints?
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.
How to change side leader hitpoints?
I did try my own consepts but ended up to code that crashed wesnoth witout an error message
Last edited by alluton on May 6th, 2011, 11:35 am, edited 1 time in total.
"This game cured me of my real life addiction."
-Flameslash
-Flameslash
-
- Developer
- Posts: 546
- Joined: January 12th, 2011, 2:18 am
- Location: Pennsylvania, USA
Re: How to change side leader hitpoints?
Should be doable with the [modify_unit] tag in 1.9, otherwise, there's the {MODIFY_UNIT} macro.
http://wiki.wesnoth.org/DirectActionsWM ... fy_unit.5D
http://wiki.wesnoth.org/DirectActionsWM ... fy_unit.5D
Co-Author of Winds of Fate
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
-
- Posts: 1549
- Joined: June 18th, 2009, 1:45 am
Re: How to change side leader hitpoints?
side.hitpoints=
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: How to change side leader hitpoints?
If you find some wml and/or another extension language used in the wesnoth environment which crashes wesnoth report that at gna as a bug.alluton wrote:I did try my own consepts but ended up to code that crashed wesnoth witout an error message
http://gna.org/bugs/?group=wesnoth
A wesnoth crash is if the apllication window shuts down and you are on the desktop again. Also if the application window freezes. It is not a wesnoth crash if you are taken to the mainscreen (you should get an ideally informative error message in that case).
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
Re: How to change side leader hitpoints?
Well application window freezes and then it completly shuts down..but propably that kind of code is terrible wrong:D
edit: [modifyunit]
[filter]
type=I8_DB_Shaman
[/filter]
hitpoints=50
[/modifyunit]
should that work?
cause this was the code in link: example usage (see also the test scenario):
edit: [modifyunit]
[filter]
type=I8_DB_Shaman
[/filter]
hitpoints=50
[/modifyunit]
should that work?
cause this was the code in link: example usage (see also the test scenario):
Code: Select all
[modify_unit]
[filter]
type=Troll Rocklobber
[/filter]
hitpoints=10
[modifications]
[trait]
# first trait is unmodified
[/trait]
{TRAIT_HEALTHY}# second trait is replaced with the healthy trait
[/modifications]
[/modify_unit]
"This game cured me of my real life addiction."
-Flameslash
-Flameslash
-
- Posts: 1549
- Joined: June 18th, 2009, 1:45 am
Re: How to change side leader hitpoints?
Isn't the problem obvious?
Re: How to change side leader hitpoints?
NO IT ISNT! i woudent ask otherwise
Last edited by Gambit on May 4th, 2011, 4:26 pm, edited 1 time in total.
Reason: Removed shouting, which is against posting guidelines 1A.
Reason: Removed shouting, which is against posting guidelines 1A.
"This game cured me of my real life addiction."
-Flameslash
-Flameslash
-
- Posts: 1549
- Joined: June 18th, 2009, 1:45 am
Re: How to change side leader hitpoints?
alluton wrote:Code: Select all
[modifyunit] [filter] type=I8_DB_Shaman [/filter] hitpoints=50 [/modifyunit]
Does that look similar to you? No.the wiki wrote:Code: Select all
[modify_unit] [filter] type=Troll Rocklobber [/filter] hitpoints=10 [modifications] [trait] # first trait is unmodified [/trait] {TRAIT_HEALTHY}# second trait is replaced with the healthy trait [/modifications] [/modify_unit]
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: How to change side leader hitpoints?
A wml editor with syntax highlite makes it easy to spot such things.alluton wrote:[modifyunit]
EDIT
Not your problem then. The engine is supposed to take care for all kinds of evil it may receive so to say. Wrong code is uncommon and thus likely to trigger bugs.alluton wrote:Well application window freezes and then it completly shuts down..but propably that kind of code is terrible wrong:D
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
-
- Developer
- Posts: 546
- Joined: January 12th, 2011, 2:18 am
- Location: Pennsylvania, USA
Re: How to change side leader hitpoints?
Also, you can change leader hitpoints in the [side] tag if you create the leader there, just add a 'hitpoints=50'.
Co-Author of Winds of Fate
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
-
- Posts: 1549
- Joined: June 18th, 2009, 1:45 am
Re: How to change side leader hitpoints?
SigurdTheDragon wrote:Also, you can change leader hitpoints in the [side] tag if you create the leader there, just add a 'hitpoints=50'.
monochromatic wrote:side.hitpoints=
-
- Developer
- Posts: 546
- Joined: January 12th, 2011, 2:18 am
- Location: Pennsylvania, USA
Re: How to change side leader hitpoints?
Ooops, had seen that, but it didn't click right away that that was equivalant.
Co-Author of Winds of Fate
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
Re: How to change side leader hitpoints?
thanks for your answers. I'll tryt that solution mby thye help.
something like this? [side]
this dont cause bugs or errors but dont modify leaders hitpoints...
something like this? [side]
Code: Select all
side=1
controller=human
team_name=darkblood
user_team_name= _ "team_name^Darkblood"
color=green
type=I8_DB_Shaman
id=Rhaxiz
name= _ "Rhaxiz"
hitpoints=50
canrecruit=yes
recruit=I8_DB_Lancer,I8_DB_ShamanAdept,I8_DB_Shooter,I8_DB_ZSalamander
{GOLD 70 70 70}
{INCOME 6 6 6}
[/side]
"This game cured me of my real life addiction."
-Flameslash
-Flameslash
Re: How to change side leader hitpoints?
In case it wasn't clear (not meant to insult you, but you don't seem like you understood): in your code, you wrote [modifyunit], while the wiki uses [modify_unit]. Note the underscore ( _ ) between "[modify" and "unit]".monochromatic wrote:alluton wrote:Code: Select all
[modifyunit] [filter] type=I8_DB_Shaman [/filter] hitpoints=50 [/modifyunit]
Does that look similar to you? No.the wiki wrote:Code: Select all
[modify_unit] [filter] type=Troll Rocklobber [/filter] hitpoints=10 [modifications] [trait] # first trait is unmodified [/trait] {TRAIT_HEALTHY}# second trait is replaced with the healthy trait [/modifications] [/modify_unit]
Jazz is not dead, it just smells funny - Frank Zappa
Current projects: Internet meme Era, The Settlers of Wesnoth
Current projects: Internet meme Era, The Settlers of Wesnoth
Re: How to change side leader hitpoints?
i try.
"This game cured me of my real life addiction."
-Flameslash
-Flameslash