Search found 1431 matches
- September 16th, 2020, 7:35 pm
- Forum: Coder’s Corner
- Topic: Wesnoth for Löve
- Replies: 36
- Views: 40702
Re: Wesnoth for Löve
I'm wondering to you think you will eventuall need to run umc code on the client aswell? I mean wesnoth currently has certain functions like wensoth.show_dialog and the theme ui callbacks that in their current implementation require instant reaction from the code. Implementing these without running ...
- September 16th, 2020, 6:16 pm
- Forum: Coder’s Corner
- Topic: Wesnoth for Löve
- Replies: 36
- Views: 40702
Re: Wesnoth for Löve
I'm not really a fan of this idea, tbh since there are quite a few wml keys that can be present once or or multiple times, and then you have to wrote your lua/moonscript code in a way that can handle both.
- September 16th, 2020, 12:53 pm
- Forum: Coder’s Corner
- Topic: Wesnoth for Löve
- Replies: 36
- Views: 40702
Re: Wesnoth for Löve
I took a short look at your code and i was wondering how moonscript works exactly. I oftem see codes like side: { side: 1 ... } side: { side: 2 ... } does this mean that "side" is automaticially a (lua) array of sides if you use the side : { key } syntax and how is it different form the us...
- September 15th, 2020, 10:15 am
- Forum: Lua Labs
- Topic: Issue with distribution of Lua code in a multiplayer scenario
- Replies: 10
- Views: 5856
Re: Issue with distribution of Lua code in a multiplayer scenario
Does the initial layout break the convention for distributing the Lua files? What is this convention? Are subdirectories allowed? wesnoth itself does not impose any restrictions on your directory structure, if it didn't work with src/ then you probably did something wrong during testing. However mo...
- September 14th, 2020, 9:07 pm
- Forum: Coder’s Corner
- Topic: Wesnoth for Löve
- Replies: 36
- Views: 40702
Re: Wesnoth for Löve
Löve ships with luajit and only luajit, so there is simply no option. (Considering love2d is not modified, but I really do want to avoid that) I agree that it'd be best to not modify love2d. Another issue with luajit though is it supports an older version of lua than Wesnoth currently does, so that...
- September 14th, 2020, 8:53 pm
- Forum: Coder’s Corner
- Topic: Wesnoth for Löve
- Replies: 36
- Views: 40702
Re: Wesnoth for Löve
I need to trust that Löve secures the lua code execution well enough. I would not assume that this is the case in particular since i have seen no place so far where they claim that they do this. running 'untrusted' code is still a somewhat rare requirement for games EDIT: furthermore if you want to...
- September 14th, 2020, 7:22 pm
- Forum: Coder’s Corner
- Topic: Wesnoth for Löve
- Replies: 36
- Views: 40702
Re: Wesnoth for Löve
I also want to say that i really like being able to use luajit over classic lua. When writing add-ons i was once in the situation where my code was just not fast enough so i added a lua api for an existent c++ core wesnoth function which does the same job (which i usually dislike to do (unlike some ...
- September 14th, 2020, 7:02 pm
- Forum: Coder’s Corner
- Topic: Wesnoth for Löve
- Replies: 36
- Views: 40702
Re: Wesnoth for Löve
This looks like a promising appoach.
Out or curiosity, have you thought about how to implement addon support and the sandboxing of addons? Tbh if i were to do it now again i'd probably try to use operating system level sandboxing with child processes rather than blocking lua api as we do now.
Out or curiosity, have you thought about how to implement addon support and the sandboxing of addons? Tbh if i were to do it now again i'd probably try to use operating system level sandboxing with child processes rather than blocking lua api as we do now.
- September 14th, 2020, 6:35 pm
- Forum: WML Workshop
- Topic: How to insert moveto events into randomly generated cave maps
- Replies: 8
- Views: 977
Re: How to insert moveto events into randomly generated cave maps
@gfgtdf, @CelticMinstrel, would it make sense for the mainline Lua cave map generator to create named areas corresponding to the generated chambers and passageways? While this does somewhat make sense, i personally i won't have the time to do it, also since [time_area] are not part of the raw 'map_...
- September 12th, 2020, 3:10 pm
- Forum: WML Workshop
- Topic: How to resync in wml for [set_menu_item]
- Replies: 2
- Views: 502
Re: How to resync in wml for [set_menu_item]
EDIT: i have also seen the [sync_variable] syntax and am wondering if i could potentially use this as a part of the process. perhaps the unsynced menus wouldn't allow for players to necessarily change their heroes (unit) through the menu, but it would be able to select the hero creation process and...
- August 9th, 2020, 12:02 pm
- Forum: Multiplayer Development
- Topic: GForce0's Multiplayer Scenario's
- Replies: 15
- Views: 139514
Re: GForce0's Multiplayer Scenario's
yes you can add require_scenario=yes to your [multiplayer] tags
- July 20th, 2020, 1:28 am
- Forum: WML Workshop
- Topic: Help for New Abilities and Weapon Specials
- Replies: 104
- Views: 9395
Re: Help for New Abilities and Weapon Specials
I think this should work to check whether there is an adjacent unit with a lower level adjacent. I didn ttest it though and im not an expert on wesnoth frmoula filte syntax so it might not work. formula = "def adjacent_occupied_locs(loc) filter( adjacent_locs(loc), 'loc', unit_at(loc) != null()...
- July 19th, 2020, 11:41 pm
- Forum: WML Workshop
- Topic: Help for New Abilities and Weapon Specials
- Replies: 104
- Views: 9395
Re: Help for New Abilities and Weapon Specials
If you use formula you don't need to use $this_unit, you can just write:Barbaros wrote: ↑July 19th, 2020, 10:12 pmCode: Select all
[filter_self] formula="(($this_unit.max_hitpoints -1+1) / ($this_unit.hitpoints -1+1)) > 2" [/filter_self]
formula="max_hitpoints / hitpoints > 2"
- July 19th, 2020, 9:42 pm
- Forum: WML Workshop
- Topic: Help for New Abilities and Weapon Specials
- Replies: 104
- Views: 9395
Re: Help for New Abilities and Weapon Specials
Fighter Spirit: I am not sure how to do it. I think you will have to give the unit two different weapon specials. One increases damage, the other decreases it. Then you can do something like this for finding the lower-level units: [filter_adjacent] level="$($this_unit - 1)" [or] level=&qu...
- July 19th, 2020, 5:53 pm
- Forum: Developers’ Discussions
- Topic: Allow more new api in stable releases
- Replies: 16
- Views: 11832
Re: Allow more new api in stable releases
I guess I'm not really understanding what you're meaning by at the same time saying that it should be allowed because it will be useful but also won't cause many problems because not many people will use the new features. Those sound contradictory to me. No it's not, it useful for people to use it ...