Several of our mainline campaigns are in the works for upgrades at the moment, which includes adding characters and enhancing existing scenarios. We are looking for more artwork to supplement these upgrades, including the following:
We are happy to announce that Wesnoth is now able to accept donations on Liberapay . While Wesnoth does rely on the work of dedicated volunteers, no project can function completely cost-free. Revenue from the Apple App Store and from donations goes towards maintaining our servers,...
There have been numerous important forum posts and wiki articles written by users and developers. We reference these pages a lot, and decided to put them together in a convenient list.
Write clearly, be nice to others, and be very careful when posting anything related to politics or religion. When asking for help, remember that everyone here is a volunteer. Prefer editing your previous post over double posting. No animated avatars or graphical signatures. Don’t plagiarize other’s...
For the custom campaign I'm designing, I want to personalize it using JSON data from a server. This would be quite easy to do in Lua if I had access to the Lua socket library from within LuaML, but I realize there are security considerations. I was thinking of modifying Scripting/lua.cpp so as to...
So I started to learn Lua, too. I'll use this thread to ask questions which will come up during my learning phase.
The first is already there:
I'm creating an (easy) inventory system, because I think that this will be useful for some future add-ons of mine while being not too difficult.
After...
Hello everyone. I'm trying to use the dialog building stuff. I'm trying to turn a series of s with s into one dialog with two lists and a set of sliders (much more user friendly).
Here's what I have so far:
It gives me the following error which doesn't really tell me much:
With Wesnoth's built-in dialog creation, there is a lot of flexibility. However, there's also a lot of boilerplate and room for mistakes, making even simple dialogs a pain and a half to set up. With ModularLua, you simply input a quick lua table representing the dialog, and it does the rest for...
Finally, while you can use string.format() , you don't have to.
I'm very sorry to use this thread for my question, but as this topic arose here: What are the advantages / disadvantages of using string.format() ?
Or is it just a matter of taste?
Sapient was right, I should've asked if someone already did this before. Obviously just checking the patches on Gna and the changelog wasn't enough. On that note, why isn't it yet mainlined then? Well, now it is. I committed in trunk the version from the WLP, with a small modification. :)
One thing that bugged me using , is that it's not possible to set any colour. So I just went ahead and modified the tag, so that you may set green, red or blue text colour. The problem is, when qouting the span color part, 'text' is no longer recognized as a variable. Is there any way to solve this?
I've been trying to display a framed dialog message that simply shows text in the format of some of the standard Wesnoth messages, such as It is now XXX's turn , the objectives, defeat messages etc. I'm in way over my head here, but with the help of the posts on this forum and...
Well, there seems to be no such thread until now. No editor war please, just want to hear what others use and the pros and cons.
There seem to be quite some good editors for windows. I'm usually using the SciTe editor included in the Lua for windows package, it is a bit lua-specialized. It...
Below is a list of most of the changes for LuaWML in 1.9.0. As always, the complete documentation can be found at LuaWML .
Action handlers, sides, and unit types, are now stored as simple tables, so as to simplify their handling. Function accessors (e.g. register_wml_action, get_unit_type_ids)...
I'm working on using wesnoth.show_dialog to create a custom dialog in 1.9.0, and I've run into a stumbling block. I need to color the text in a label widget. Using the old dialog, I just applied Pango to the string, but the label doesn't process the markup by default. As far as I can tell, it...
Anyways, I've been looking at a couple online tutorials for Lua and the documentation in LuaWML, and I think I have a general grasp for the syntax and stuff. I've looked at a number or examples (especially the ones in core), and I've been able to...
hi, I'm new to Lua development in Wesnoth. Just trying to write some simple lua code for a task, and I wonder how to log and debug lua. e.g. if i want to print the value of a variable on screen or in a log file or whatever console if there is one, how to do so? i heard that Wesnoth client could be...
For the last couple months I've been slowly working on reducing the download size of inferno8's campaign To Lands Unknown.
My current project is to reduce the number of files needed for many of the animations seen in game by allowing movement without restricting it to hexes.
Since it's now at a...
The point: Should wml action tags (implemented in lua or C++) which take a standard filter have an additional tag introducing that filter ? Such as although it is not really neccessary there.
pros:
-Better overview, separation, especially if additional -specific keys get added later.
-Keys...
I'm looking for a way to feed raw WML files into Lua so I can extract data from them, but no matter what I do, I can't get to actually store any data. The following code is in a testing state to show exactly what doesn't work.
for my campaign I decided it would be useful if I could read the faction files in {multiplayer/factions} and put the contents of a tag into a lua table, and then send the contents of some of the keys into wesnoth variables.
Exasperation, on request, coded this a-ways back for me to fix my problem with wesnoth crashing for my WML version of the code.
But I noted that the effect from his terrain-defense variable had no effect (I tested it by having a unit attack a target in grassland and forest, 20 and 30 respectively,...
Well, I said I was gonna put myself to Lua, which I have done. For the past few days/weeks, I have read a few tutorials, browsed our wiki, etc. So now at least I understand the basic syntax of the language, I've looked at a few example, and I'm able to understand most of them.
I have a file, called 'globals.lua', that I've been using to contain all the boilerplate that I believe should go at the top of every Wesnoth Lua file. From reading this forum, it seems there are a lot of new Lua coders who are starting themselves off by making content for Wesnoth 1.9. I think my...
Hey everyone, I was attempting to disable autosaving in an RPG scenario, and instead go for a manual save so that there would be no cheating involved. I cannot disable the save mechanism, so I tried to utilize the :nosaves command.
This is from menu_events.cpp for some context:
I felt I might as well, since LUA is what WML is built upon. Unfortunately, I've managed to break LUA after changing three values.
Derived from and stuck in a scenario ( event). All I've changed is gold to steal_gold to avoid identical functions. Looks like function wml_actions is only valid in...
The wesnoth core macro MODIFY_UNIT does not allow changing more than one key per unit per call. This results in the need to repeatedly store and unstore the unit (performance ?!) to change more than one key, or to not use the macro at all.
First I wrote a wml version of this functionality using :...
Downloaded the game last week and observed a lot of games. RPG maps are what makes this game very interesting to play for me and so found out about Bob's RPG addons what makes the game even cooler now.
Used to making scripts for Warcraft 3 in the long past and the...
EDIT
At least in this case the backtrace was helpful, the problem was that the SLF looking for a suitable nearest hex was quite restrictive, thus nNearestHex was nil...
Since 1.9 it happens very few times that I get a backtrace that doesn't make any sense, here is one.
The attempt to index field...
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum