Wesnoth 1.13.2

Get help with compiling or installing the game, and discuss announcements of new official releases.

Moderators: Forum Moderators, Developers

User avatar
shadowm
Site Administrator
Posts: 6579
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Wesnoth 1.13.2

Post by shadowm » January 21st, 2016, 9:34 pm

Bob_The_Mighty wrote:Actually, I didn't know I was redefining macros. I always do it like the mainlines ones
And that’s precisely why this warning was introduced, to inform you of what you are doing. Redefining a macro means that all future substitutions of it will use the latest definition. In some cases, this can have unexpected consequences. The recommendation is either to use names that won’t clash, or (if you know no-one else is relying on the previous definition in a given preprocessor context) #undef the macro prior to redefinition.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.

User avatar
zookeeper
WML Wizard
Posts: 9740
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Wesnoth 1.13.2

Post by zookeeper » January 21st, 2016, 10:11 pm

Bob_The_Mighty wrote:Actually, I didn't know I was redefining macros. I always do it like the mainlines ones, like this:

Code: Select all

#define TAM_SCROLL_TO X Y
	[scroll_to]
		x={X}
		y={Y}
	[/scroll_to]
#enddef
Where would you put #undef?
Redefining a macro just means defining a macro which is already defined. And the game lets you know if you're doing that. So if you want to get rid of those messages, either don't redefine a macro, or put an #undef for it before the definition.
Bob_The_Mighty wrote:Yeah, looking at the log every macro (and there's tons of them) are coming up lots of times. I can't remember why I ended up including everything in the macro_hub. I don't understand this too well, I just go with what works. Can you explain what method is best?
Well, I don't know what it is that you don't understand. In general terms, the best method is to throw all your macro definitions at the preprocessor only once, not several times. Those files which only contain macro definitions you should include only once in your _main.cfg, and if you have files which contain other things you actually need to include in every scenario (like events), then include only those in each scenario. And don't try to have both kinds of things in a single file.

User avatar
Bob_The_Mighty
Posts: 785
Joined: July 13th, 2006, 1:15 pm

Re: Wesnoth 1.13.2

Post by Bob_The_Mighty » January 22nd, 2016, 3:37 am

zookeeper wrote:Well, I don't know what it is that you don't understand. In general terms, the best method is to throw all your macro definitions at the preprocessor only once, not several times. Those files which only contain macro definitions you should include only once in your _main.cfg, and if you have files which contain other things you actually need to include in every scenario (like events), then include only those in each scenario. And don't try to have both kinds of things in a single file.
Well, I don't really understand how the file structure works, but it makes sense now you've told me where to properly include my macros. Thank you!

Anyway, whilst playing around I've noticed two more issues with this build:

1. I'm getting deprecated messages about DescriptionWML. The new style is a nice, clean addition. However, I use loads of options menu - can you confirm if wmlint will care of this? By the way, I looked at the 'A New Land' files shipped with 1.13.2a and noticed they are still using the old style of formatting.

2. I've attached a screengrab of an error message that keeps happening when the game crashes on loading a certain map. I've narrowed it down and it seems to be caused by my use of the SCATTER_IMAGE macro included in core/data/macros/terrain-utils.cfg. My map already has lots of terrain like Wog^Edt on it - is this macro trying to add an extra layer of embellishments? I thought it would only add an image.

Code: Select all

{SCATTER_IMAGE (terrain=Ww,Wog x,y=1-16,6-11) 4 terrain/interior/wood-tan-debris4.png}
Attachments
terrain-string-error.jpg
My current projects:
2p Campaign: The Altaz Mariners
3p Survival: Save The Village

User avatar
zookeeper
WML Wizard
Posts: 9740
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Wesnoth 1.13.2

Post by zookeeper » January 22nd, 2016, 8:55 am

Bob_The_Mighty wrote:2. I've attached a screengrab of an error message that keeps happening when the game crashes on loading a certain map. I've narrowed it down and it seems to be caused by my use of the SCATTER_IMAGE macro included in core/data/macros/terrain-utils.cfg. My map already has lots of terrain like Wog^Edt on it - is this macro trying to add an extra layer of embellishments? I thought it would only add an image.

Code: Select all

{SCATTER_IMAGE (terrain=Ww,Wog x,y=1-16,6-11) 4 terrain/interior/wood-tan-debris4.png}
Well, the error message is correct. Your list of terrain= in that SLF is:
Ww
Wog x
y=1-16
6-11

Just split the terrain,x,y keys to separate lines or use (terrain,x,y="Ww,Wog",1-16,6-11).

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

Re: Wesnoth 1.13.2

Post by Pentarctagon » January 23rd, 2016, 10:56 pm

The water generally seems fine for me, the water -> sand transition animations do seem a bit off though - almost like there are frames missing or something.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

Locked