Samonella's questions: currently unsolved

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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.
User avatar
Samonella
Posts: 359
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Samonella's questions: currently solved

Post by Samonella » December 9th, 2017, 10:39 pm

Hello again.

I must just be overlooking something obvious, but could someone please tell me why this code isn't working? It adds the attack, but the animation doesn't play.

Code: Select all

	[modify_unit]
		[filter]
			id=Voadar
		[/filter]

		[effect]
			apply_to=new_attack
			name=trident
			description=_"trident"
			type=pierce
			[specials]
				{WEAPON_SPECIAL_FIRSTSTRIKE}
			[/specials]
			damage=15
			number=2
			range=melee
			icon=attacks/trident.png
		[/effect]
		
		[effect]
			apply_to=new_animation
			[attack_anim]
				[filter_attack]
					name=trident
				[/filter_attack]
				start_time=-200
				[frame]
					image=units/drakes/fire.png:300
				[/frame]
				{SOUND:HIT_AND_MISS spear.ogg spear-miss.ogg -100}
			[/attack_anim]
		[/effect]
	[/modify_unit]
EDIT: I used an object for the new animation and it works now. Apparently, without the [object], there's no way to leave the animation in the unit's [modifications] container (it was empty in the inspect window).
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG

User avatar
Samonella
Posts: 359
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Samonella's questions: currently unsolved

Post by Samonella » December 16th, 2017, 4:12 am

Here's a strange problem. It might have to do with 1.13.10's big graphic updates?

My goal is to change a certain unit's image (base image, none of the animations). This is the closest I've got:

Code: Select all

[modify_unit]
	[filter]
		id=Voadar
	[/filter]
	variation=holds_hay
[/modify_unit]		

[store_unit]
    [filter]
        id=Voadar
    [/filter]
    variable=Voadar.unit
    kill=yes
[/store_unit]
{VARIABLE Voadar.unit.image "units/fire-hay.png"}
[unstore_unit]
	variable=Voadar.unit
	find_vacant=no
[/unstore_unit]
And in the [unit_type] is

Code: Select all

[variation]
	variation_id=holds_hay
	hide_help=yes
	inherit=yes
	image="units/fire-hay.png"
[/variation]
This manages to change the unit's icon in the [acronym=the big bar on the right of the screen, below the mini-map. Is there an official name for that?]status bar[/acronym] but not its image on the actual map.

Does anyone know why it only works halfway, or know a different way to do it?
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG

gnombat
Posts: 153
Joined: June 10th, 2010, 8:49 pm
Contact:

Re: Samonella's questions: currently unsolved

Post by gnombat » December 16th, 2017, 1:58 pm

Samonella wrote:the big bar on the right of the screen, below the mini-map. Is there an official name for that?
I don't know if there's an official name for it, but I think it's usually called the sidebar.

User avatar
Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Re: Samonella's questions: currently unsolved

Post by Sapient » December 16th, 2017, 2:54 pm

While I don't have a lot of experience with this type of modification, I think it is necessary to change the unit's "standing animation"

See this previous similar question: viewtopic.php?p=517308#p517308

Hope that helps!
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."

User avatar
Samonella
Posts: 359
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Samonella's questions: currently solved

Post by Samonella » December 16th, 2017, 3:23 pm

Sapient wrote:While I don't have a lot of experience with this type of modification, I think it is necessary to change the unit's "standing animation"

See this previous similar question: viewtopic.php?p=517308#p517308
Awesome, thanks for digging that up! Unfortunately that method didn't work too well, the game randomly switched between the original image and the new animation when I selected or moved the unit. I thought maybe the game had applied the new animation as well as the old default on, so I put base_score=100 in the new one (see how animations are chosen) but that didn't fix it.
EDIT: I also tried adding selected and default animations, but they didn't help either.
EDIT 2: I also just realized that since the unit is a drake it already has standing/movement/post-movement animations, so that could be part of the problem. Of course base_score=100 should definitely still override those, but whatever, I still got it working how I described below.

Meanwhile, I was looking at Heir to the Throne as an example, when Konrad/Li'sar gets the sceptre. The only difference I could spot there was that the [variation]s in their unit types don't use inherit=yes. I tried doing it that way, and happily enough it worked! Storing/unstoring the unit to manually change its image was unnecessary, too.

And another edit, I forgot to say:
gnombat wrote:I don't know if there's an official name for it, but I think it's usually called the sidebar.
Official or not, it's better than "status bar." Thanks!
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG

User avatar
Samonella
Posts: 359
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Samonella's questions: currently unsolved

Post by Samonella » March 6th, 2018, 4:45 am

Hello again! This time I'm dealing with a really nasty bug. I'm nowhere near figuring out exactly what's going wrong, so I'm mostly looking for advice instead of specific answers.

Basically, the situation is that after updating to 1.13.11 from 13.10, my scenario's save files are unreliable. Often (but no always :doh:), when I load back in, the first time I end turn I'm bombarded by previous events (that should have happened before the save) all trying to happen one after another. If I load with "Show replay" checked, then different things go wrong. In this case I know even less about the problem, but after the replay I usually wind up with a different state than from loading normally.

The natural thing to suspect is that I've broken replay safety rules, which is entirely possible, but for the life of me I can't reproduce the bug in 13.10 (in which version replays work fine). I've spent a few hours trying to isolate the problem but have made no progress, which isn't really a surprise since I'm dealing with 6 MB of WML in this single scenario and don't have much of a starting point. Efforts to reproduce it in a smaller scenario have also been fruitless.

So, the meat of the question: I was glancing through the wesnoth repo and it looks like there's been some recent work on files related to game state and replays. Can anyone tell me if there was a known bug that might be related to this, or should I continue investigating?

Any general advice for large scale wml debugging?

And of course, if anyone is intrigued and wants to see things themself... :whistle:
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG

User avatar
vultraz
Community Manager
Posts: 938
Joined: February 7th, 2011, 12:51 pm
Location: Dodging Daleks

Re: Samonella's questions: currently unsolved

Post by vultraz » March 6th, 2018, 6:01 am

This is almost certainly an unforeseen regression from my refactoring of the game event code in 1.13.10+dev. Another user has reported a similar problem, so now I need to figure out a concrete repro case...

EDIT: I've committed something that should help mitigate the issue.
Creator of Shadows of Deception (for 1.12) and co-creator of the Era of Chaos (for 1.12/1.13).
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?

User avatar
Samonella
Posts: 359
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Samonella's questions: currently unsolved

Post by Samonella » March 6th, 2018, 6:09 am

I'm pretty sure I could find steps for reliably reproducing it, but in my massive scenario that probably wouldn't be much help.
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG

User avatar
Samonella
Posts: 359
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Samonella's questions: currently unsolved

Post by Samonella » March 24th, 2018, 8:03 pm

The problems seem to be gone in 1.13.12, thanks!

Here's a small question that might be a bug. When I use [inspect] in a name=victory event I get an assertion error dialog box. If I click the 'ignore' option things seem to proceed without problem. Does anyone know if that's intentional?
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG

User avatar
Pentarctagon
Forum Administrator
Posts: 3627
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Samonella's questions: currently unsolved

Post by Pentarctagon » March 24th, 2018, 8:16 pm

It's not, and was fixed earlier today in fact, so it shouldn't happen in the next release.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

User avatar
Samonella
Posts: 359
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Samonella's questions: currently unsolved

Post by Samonella » July 24th, 2018, 5:31 pm

I just noticed something strange with [set_menu_item]. It's possible for users to change the option's hotkey, but I just noticed that the Preferences->Hotkeys doesn't have a 'Custom WML Commands' section any more (last time I checked was in 1.13). The custom commands still appear in the full list, but not in any of the individual filters. Do I have to do something like assigning a hotkey_section= that hasn't been documented yet, or is it a bug?
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG

Post Reply