bugBattle for Wesnoth - Bugs: bug #20765, Game crashing when custom unit...

 
 
Show feedback again

bug #20765: Game crashing when custom unit appears

Submitted by:  None
Submitted on:  Thu 25 Apr 2013 12:29:09 AM UTC  
 
Category: BugSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Units
Status: FixedPrivacy: Public
Assigned to: Jérémy Rosen <boucman>Originator Email: -unavailable-
Open/Closed: ClosedRelease: 1.11.2
Operating System: Windows

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 02 May 2013 07:27:14 AM UTC, comment #5:

thx vinipsmaker, pushed...

Jérémy Rosen <boucman>
Project MemberIn charge of this item.
Thu 02 May 2013 03:12:26 AM UTC, comment #4:

I fixed the bug: https://github.com/wesnoth/wesnoth-old/pull/3

Now it's a matter of time till the fix being accepted.

Vinícius dos Santos Oliveira <vinipsmaker>
Wed 01 May 2013 10:00:41 PM UTC, comment #3:

I was able to reproduce the bug.

I'll try to fix it now.

Vinícius dos Santos Oliveira <vinipsmaker>
Thu 25 Apr 2013 12:46:39 PM UTC, comment #2:

Note the last post in that thread; the triggering part of the wml is the terrain string.

Anonymissimus <anonymissimus>
Project Member
Thu 25 Apr 2013 12:44:59 PM UTC, comment #1:

thread: http://forums.wesnoth.org/viewtopic.php?f=21&t=38704
gna messed up that terrain string, it should be

Also, it is neccessary to enable unit standing animations in the preferences.

Anonymissimus <anonymissimus>
Project Member
Thu 25 Apr 2013 12:29:09 AM UTC, original submission:

I have originally posted this problem on the forum, and I was told to put it here as well... As the title says, the game simply crashes when a custom unit I created appears onscreen. The problem is in the second exclamation mark in the DRAGON_UNWALKABLE_TERRAINS, but it apparently shouldn't be causing the game to crash.
I am placing the coding of the custom unit below; I am removing the macros that are not in the core game and changing the textdomain to httt, so it will be easier to test it. Just place this unit anywhere in the first scenario of HttT to test it.

#textdomain wesnoth-httt

#define DRAGON_UNWALKABLE_TERRAINS
!,Wwf,*^B*,!,W*,W*^V*,Chs,Chw,S*,S*^V*,Q*#enddef

[unit_type]
id=Sky Dragon
name= _ "Sky Dragon"
race=monster

hitpoints=350
movement_type=smallfly
movement=12
experience=3000
level=7
alignment=neutral
advances_to=null
{AMLA_DEFAULT}
cost=300
undead_variation=drake
usage=archer
die_sound=drake-die.ogg
description= _ "The Sky Dragon Svarballi is the mightiest of the three ancient High Dragons. After being defeated by the other two, he was placed in a deep slumber that lasted millennia. Now that he has been awakened again, every single being of Irdya is at great danger.

Having been created by the hands of the so-called Ancient Ones themselves, Svarballi, by his power and nigh-invincibility, is the closest thing to a god any dweller of Irdya has ever seen."+{SPECIAL_NOTES}+{SPECIAL_NOTES_MARKSMAN}+{SPECIAL_NOTES_LEADERSHIP}+{SPECIAL_NOTES_REGENERATES}+{SPECIAL_NOTES_SKIRMISHER}

[standing_anim]
start_time=0
terrain_type={DRAGON_UNWALKABLE_TERRAINS}
submerge=0.01
[frame]
image="units/svarballi/gold-dragon-fly-[01~09].png:50"
[/frame]
[frame]
sound=dragon-wing-beat.ogg
image="units/svarballi/gold-dragon-fly-10.png:50"
[/frame]
[frame]
image="units/svarballi/gold-dragon-fly-[11~27].png:50"
[/frame]
[/standing_anim]
[pre_movement_anim]
start_time=0
terrain_type=!,{DRAGON_UNWALKABLE_TERRAINS}
[frame]
image="units/svarballi/gold-dragon-liftoff-[01~22].png:50"
[/frame]
[/pre_movement_anim]
[movement_anim]
start_time=0
submerge=0.01
[frame]
image="units/svarballi/gold-dragon-fly-[01~09].png:50"
[/frame]
[frame]
sound=dragon-wing-beat.ogg
image="units/svarballi/gold-dragon-fly-10.png:50"
[/frame]
[frame]
image="units/svarballi/gold-dragon-fly-[11~27].png:50"
[/frame]
[/movement_anim]
[post_movement_anim]
terrain_type=!,{DRAGON_UNWALKABLE_TERRAINS}
start_time=0
[frame]
image="units/svarballi/gold-dragon-landing-[01~15].png:50"
[/frame]
[/post_movement_anim]

[abilities]
{ABILITY_LEADERSHIP_LEVEL_5}
{ABILITY_REGENERATES}
{ABILITY_SKIRMISHER}
[/abilities]
[resistance]
arcane=90
blade=50
fire=30
cold=30
impact=50
pierce=50
[/resistance]
[attack]
name=bite
description= _"bite"
icon=attacks/fangs-animal.png
type=blade
range=melee
damage=50
number=2
[/attack]
[attack]
name=tail
description= _"tail"
icon=attacks/tail-dragon.png
type=impact
range=melee
damage=70
number=1
[/attack]
[attack]
name=heavenly fire
description= _"heavenly fire"
icon=attacks/fire-breath-drake.png
type=arcane
[specials]
{WEAPON_SPECIAL_MARKSMAN}
[/specials]
range=ranged
damage=100
number=1
[/attack]
[attack]
name=heavenly wrath
description= _"heavenly wrath"
icon=attacks/divine-lightning.png
type=fire
[specials]
{WEAPON_SPECIAL_MAGICAL}
[/specials]
range=ranged
damage=40
number=6
[/attack]

[attack_anim]
[filter_attack]
name=bite
[/filter_attack]
start_time = -700
[frame]
image="units/svarballi/gold-dragon-bite-s-[01~09].png:50"
[/frame]
[if]
hits=no
[frame]
sound=dragon-bite-miss.ogg
image="units/svarballi/gold-dragon-bite-s-10.png:50"
[/frame]
[/if]
[else]
[frame]
sound=dragon-bite-hit.ogg
image="units/svarballi/gold-dragon-bite-s-10.png:50"
[/frame]
[/else]
[frame]
image="units/svarballi/gold-dragon-bite-s-[11~21].png:50"
[/frame]
[/attack_anim]

[attack_anim]
[filter_attack]
name=tail
[/filter_attack]
start_time = -950
[frame]
image="units/svarballi/gold-dragon-tail-se-[01~12].png:50"
[/frame]
[if]
hits=no
[frame]
sound=dragon-tail-miss.ogg
image="units/svarballi/gold-dragon-tail-se-13.png:50"
[/frame]
[/if]
[else]
[frame]
sound=dragon-tail-hit.ogg
image="units/svarballi/gold-dragon-tail-se-13.png:50"
[/frame]
[/else]
[frame]
image="units/svarballi/gold-dragon-tail-se-[14~29].png:50"
[/frame]
[/attack_anim]

#define DRAGON_LIGHTNING DIRECTION_NUMBER
[attack_anim]
[filter_attack]
name=heavenly wrath
[/filter_attack]

{LIGHTNING_BOLT {DIRECTION_NUMBER} }
[frame]
begin=-600
end=-400
image="units/svarballi/gold-dragon-cast-[01~06].png:50"
[/frame]
[if]
hits=yes
[frame]
begin=-400
end=0
image="units/svarballi/gold-dragon-cast-[07~22].png:50"
sound=lightning.ogg
[/frame]
[/if]
[else]
hits=no
[frame]
begin=0
end=200
image="units/svarballi/gold-dragon-cast-[23~27].png:50"
sound=lightning-miss.ogg
[/frame]
[/else]
[/attack_anim]
#enddef

{DRAGON_LIGHTNING 1}
{DRAGON_LIGHTNING 2}
{DRAGON_LIGHTNING 3}

[attack_anim]
[filter_attack]
name=heavenly breath
[/filter_attack]

start_time = -1900
[frame]
image="units/svarballi/gold-dragon-fire-se-[01~16].png:50"
[/frame]
[frame]
sound=dragon-flames.ogg
image="units/svarballi/gold-dragon-fire-se-17.png:50"
[/frame]
[frame]
image="units/svarballi/gold-dragon-fire-se-[18~61].png:50"
[/frame]
[/attack_anim]

[/unit_type]

Anonymous

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by shadowmaster (Updated the item)
  • -unavailable- added by boucman (Posted a comment)
  • -unavailable- added by vinipsmaker (Posted a comment)
  • -unavailable- added by anonymissimus (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 13 Jun 2013 08:55:24 AM UTCshadowmasterOpen/ClosedOpen=>Closed
    Thu 02 May 2013 07:27:14 AM UTCboucmanStatusNone=>Fixed
      Assigned toNone=>boucman
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup