From The Battle for Wesnoth Wiki

§ ActionWML rather circular with Conditional: … AddonStructure the '_main.cfg' is required for the Add–on client to recognize it. you'd think that a '_server.pbl' would suffice, but it does not. AI_Recruitment “Tests have shown that it plays slightly better (against other AIs, at least)” hmm. how did they qualify that? BinaryPathWML the default is … ConditionalActionsWML The [while] tag is useful for iterating over an array. An array is a list of values. The numberth value in the array array is stored in the WML variable array[number]. Note that if number is the value of the variable variable, the expression $array[$variable] will return the numberth value in array. ? an array not used as a container? ConventionsWML my AvernumScript style of indenting works well in these such uses — though for different reason: can_recruit = yes [and] side = $side_number [/and] Editingwesnoth garbage. EffectWML it should be clearer that most of these are not “keys” but are values for apply_to= status: it should indent the “Beware” and make it more visible. EraWML [era] [multiplayer_side] type= this defaults with "random". EventWML side turn end $side_number hasn't changed yet, so it is at the very end of turn, not sursequent to it? when it does not accept input of troop commands, but that Side is yet active. GameConfigWML village_support is not described here! IGNFileFormat lines such as these aren't registered: folder/filename ImagePathFunctionWML #BLIT:_Blit_Function ! all this is erroneous. i was mis-using the CROP function's 'width' and 'height' args. • this doesn't hierate any functions applied to the 'src' arg prior to applying the image on the background. i.e. if the original would exceed the boundaries of the background prior to any cropping, the blit will fail. e.g.: _~BLIT( _~CROP( N1,N1,N3,N4 ),N5,N6 ) workaround is to envelope the operation in adjusted CROP or SCALE, et simila, as necessary. e.g.: … ? this also means that it will forget, beneath the blit prior to and resizing or cropping of it, any layers — at least those above the background. ? i haven't examined the C++ code. this limitation can be always applying BLIT from top–left to bottom–right if the blits would overlap. ! no — this may yet be a problem, but it wasn't what was vexing my trials. the problem, apparently, was with it blitting the second InterfaceActionsWML #.5Bwml_message.5D badly written Note paragraph. #.5Bmessage.5D 0x27? nope: i tested that with other strings. 0x27 does not work for a cartouchier. try these and see: • [message] message=' • [message] message=' test' • [message] message=' ' #.5Bset_menu_item.5D [command] first_time_only=no this is the default. however, does setting this =yes make it so the menu item no longer appears? LuaWML immideately OptionWML [options] [combo] if the [item] which matches the default= has a null value= then the dropdown menu box will show no choice. [slider] default = 100 min = 1 max = 100 step = 3 it jumps to 99, not 100, and the minimum is 0. obviously, therefore, it instantiates at 0 first, proceeds to the $max via the $step, and then goes to some minimum value which it can reach via the $step again. [campaign] [options] apparently this only is possible with 1.13 and not 1.12 edition. PblWML icon= max is 72x72 — correct? anything which would go outside is omitted; e.g., attempting to BLIT something that would extend beyond 72 in either axis is not BLITted. PreprocessorRef you can't provide an empty arg by doing {example ""} #.23define it does not substitute for its ‘symbol’. e.g. #define example shoyu#enddef #define {example}_test A B "something,anything,{A},{B}" #enddef {shoyu_test a b} ¶ Macro/file 'shoyu_test' is missing ! feature request pending to be pending does not allow 0x09 as delimiter between symbol and arguments; it works between trigger #define and ‘symbol’, though. #Preprocessor_directives it recognizes any of these, even when they don't begin a new word. some syntax highlighters don't recognize that fact. SavefileWML you can view them with 'zless', WinRAR, or any such thing. ScenarioWML experience_modifier looks like IFDEF MULTIPLAYER then this is 70 #The_.5Bscenario.5D_tag [multiplayer] name= value type is a literal SideWML team_name= literal [village] • you can't do this format: x = 1, 2 y = 2, 1 if you do, only the first in the set is recognized StandardUnitFilter [filter_wml] this is described very badly. SyntaxWML e.g. for secondary expansion, where it does the piped ones first $$Vx|_$Vy|_$vill_slot_sur| $villconq__$Vx|_$Vy|_$vill_slot_sur| the 0x2D causes “Invalid” savegames when present in other id= Remarks than the unit_type ones. envars too, at least. it doesn't strip cartouchiers like most shells do. 0x5E in a string of text will cause it and all text preceding it in that string to be not displayed. it becomes the new Start–Of. <p>The full name of a scalar variable is its given name, in this case <i>my_variable</i>. Note that the value of the variable can be translatable or even a formula expression (<a rel="nofollow" class="external text" href="">Special Attribute Values</a>). wrong wiki link form automatically stored envars, e.g. x1 are cleared regularly and often. the newline is preserved within the cartouche and it isn't treated as a partition in these cases: #define _fac coject nation variant edition {~add-ons/{coject}/rsrc/faction/{nation}_{variant}_ed-{edition} } #enddef #define mne-Merf faction_TBFW-Merfolk_CnF #enddef {_fac {mne-Merf} Merfolk shallows 1-0 } 0x20 & 0x5F • i've seen some Add–on which appeared as though they expected that Wesnoth substituted the two freely. however, when i attempted something which referenced a [unit_type]id=Vampire_Bat Error loading game configuration files. The game will now exit. Details: unit type not found: Vampire_Bat then, again, with [advancefrom]unit=Vampire_Bat Error loading game configuration files. The game will now exit. Details: unit type 'Vampire_Bat' not found when resolving [advancefrom] tag for 'test' the Add–on was one from Wesnoth_1-10 or earlier or so, and i can't remember exactly where i saw it use the 0x5F in a type ident, but i did see it use that in the [ai]recruitment_pattern= when it had mixed_fighter or so. that was probably a simple error which, of course, wouldn't be terminal. • it does convert the two for Event names, as noted already. ThemeWML index.php?title=ThemeWML&oldid=56254 doesn't mention the ‘whiteboard’ actions, e.g. wbexecuteallactions wbexecuteaction wbdeleteaction UnitTypeWML level: the amount of upkeep the unit costs. After this unit fights, its opponent gains 'level' experience. See also kill_experience (GameConfigWML), and leadership (AbilitiesWML). ? so this is the gains when an enemy survives? why not give it a more intuitive name, then? is this also the gold upkeep? [attack] parry= the wiki says this is used offensively. ugh. please tell me that it is incorrect. UnitsWML [movetype] [movement_costs] the range is 0..100? giving this a value of 0, is interpreted as a 1. if a type is not declared here, then it defaults to some value which make movement impossible. WML_for_Complete_Beginners:_Chapter_11 “ Talk about basic parts of loops, variations of loops (do/while, etc.) “ heh. anyway, the problem is that it lacks a TODO prefix or header. § § overall, the root of many paths is rarely given. ! this is the [binary_path], as i understand it. all this section is useless. [message] image= apparently, these are rooted at $(wesnoth --data-path)/data/core/images/. but such is only inferrable, not documented. PblWML icon= this is rooted at $(wesnoth --data-path)/images/. — i do remember noting this when i studied it. this is the sequence, more or less, at which the Add–on server expected the requisite items and either complained or suppled them (passphrase); icon= was already provided: passphrase= "viczuggt" title= "do_not_download" description= "this is a cheap way to avoid use of the image tester." type= "other" author= "anonymous" version= "0" email= "slarti.blartfast@magrathea.plt" § § [binary_path] each new addition in a scope|theater is … [color_range] from team-colors.cfg recruit extra_recruit the one belongs to a Side, whereas the other belongs to a Cmdr Wesnoth reads, and applies in the scope|theater, Modifications by the order that they are enabled. scope | theater scenario this concept should be discussed. … minimap_terrain_coding=no this is counterintuitive. you'd expect that “terrain coding” is what it does when the above condition is set: show terrain by its major type, not a smaller tile. impassable and unwalkable are variations of red, flat is green, paths are cyan, water is blue, et c. these must be defined somewhere with the terraintypes. they can't be hardcoded. concurrent with this is the icon for a Side during their Turn. rather than show their flag, it will then show a little bevelled square with their color in a bar. <span> mark–up does not work with [multiplayer] description= shown verbatim — no parsing. [era] name= "<span color='#0000FF'>Watery theme:</span> <span color Kate accenting the syntax also shows a single Error underline for the text–unit immediately succeeding the 0x3D. it doesn't do so when the span is used deep in the description= trial (previous). and probably so for others; [message] is probably the only one that uses it. using the older <0,0,0> for color doesn't work with [era] description= but it did somewhat work with [multiplayer] name= shows the color but also displays the code. the <i></i> was tested with [era] description= no parsing. ! but why, then, does the Kate syntax Highlighting show the <i> as not colored with the cartouched text? i also recall that it <0,0,0> did not show any color for [era] name= maybe color only works for start of a string? alas, you can't do [multiplayer_side] name="EotF - " + <255,255,0>"Brungar" EotF - <255,255,0>Brungar values for gold are rounded to the 25. map editor ? the Map Editor will remember placement of participant sites even if you resize the map and lose those. How can we create hilly forest in map editor now? Place the hills, then hold down [Shift] while you place the trees. In the same way, you can place any overlay terrain (like forests, bridges or villages) on top of any base terrain (like mountains, caves or oceans). if you have several Eras which use the same identifier, then you will see each distinct entity in the list — showing any differences in their internal data i.e. Name — but will only be able to select the first one. identifier names sometimes it seems that it tolerates non-ASCII — but i wasn't thorough it verifying that it did. other times it seemed to cause problems much like invalid envar names. § § “error config: Unexpected characters at line start” ! first, it should be reporting what is the unexpected text, yes? as shown below, sometimes it is not obvious. #define example _ "this" #enddef [something] \ description = _"example "+ {example} #define example example #enddef description=_"test "+{example} ◊ okay, but the 0x09 doesn't display properly. #define example _ "example" #enddef description=_"test "+{example} ◊ okay. #define example _ "example" #enddef description=_"test "+{example} ◊ okay. #define example _ "example" #enddef description=_ "test "+{example} ◊ okay. #define example _ "example" #enddef description= _ "test "+{example} ◊ okay #define example _ "example" #enddef description = _ "test "+{example} ◊ okay #define example _ "example" #enddef description = _ "test "+{example} ◊ okay #define example _ "example" #enddef description = _ "test "+ {example} ◊ okay #define CnF_mod_village-conquest_read-order-instruction _ "example" #enddef description = _ "test "+ {CnF_mod_village-conquest_read-order-instruction} ◊ okay {example}+ ◊ that's it. ◊ i suppose that it is inserting the newline prior to the 0x2B. ◊ you can always simply include the snippet inside the cartouche, but that would make you unable to prefix it as a translatable string. ◊ best thing to do is to provide the + in the snippet.

This page was last edited on 29 July 2017, at 03:48.