Search found 1342 matches

by gfgtdf
September 16th, 2020, 10:41 pm
Forum: Coder’s Corner
Topic: Wesnoth for Löve
Replies: 34
Views: 1310

Re: Wesnoth for Löve

I think you misunderstood me, i wasn't expecting you to support the gui2 syntax in your new engine. My point was that wesnoth currently at some places allows direct callbacks of certain types of ui events ( in particular the 'mouse move' type of event) where a possible delay ( caused by networking) ...
by gfgtdf
September 16th, 2020, 7:35 pm
Forum: Coder’s Corner
Topic: Wesnoth for Löve
Replies: 34
Views: 1310

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 ...
by gfgtdf
September 16th, 2020, 6:16 pm
Forum: Coder’s Corner
Topic: Wesnoth for Löve
Replies: 34
Views: 1310

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.
by gfgtdf
September 16th, 2020, 12:53 pm
Forum: Coder’s Corner
Topic: Wesnoth for Löve
Replies: 34
Views: 1310

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 usual attrib...
by gfgtdf
September 15th, 2020, 10:15 am
Forum: Lua Labs
Topic: Issue with distribution of Lua code in a multiplayer scenario
Replies: 6
Views: 194

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...
by gfgtdf
September 14th, 2020, 9:07 pm
Forum: Coder’s Corner
Topic: Wesnoth for Löve
Replies: 34
Views: 1310

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...
by gfgtdf
September 14th, 2020, 8:53 pm
Forum: Coder’s Corner
Topic: Wesnoth for Löve
Replies: 34
Views: 1310

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...
by gfgtdf
September 14th, 2020, 7:22 pm
Forum: Coder’s Corner
Topic: Wesnoth for Löve
Replies: 34
Views: 1310

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 ...
by gfgtdf
September 14th, 2020, 7:02 pm
Forum: Coder’s Corner
Topic: Wesnoth for Löve
Replies: 34
Views: 1310

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.
by gfgtdf
September 14th, 2020, 6:35 pm
Forum: WML Workshop
Topic: How to insert moveto events into randomly generated cave maps
Replies: 8
Views: 271

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_...
by gfgtdf
September 12th, 2020, 3:10 pm
Forum: WML Workshop
Topic: How to resync in wml for [set_menu_item]
Replies: 2
Views: 136

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...
by gfgtdf
August 9th, 2020, 12:02 pm
Forum: Multiplayer Development
Topic: GForce0's Multiplayer Scenario's
Replies: 14
Views: 1490

Re: GForce0's Multiplayer Scenario's

yes you can add require_scenario=yes to your [multiplayer] tags
by gfgtdf
July 20th, 2020, 1:28 am
Forum: WML Workshop
Topic: Help for New Abilities and Weapon Specials
Replies: 104
Views: 4658

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() ); s...
by gfgtdf
July 19th, 2020, 11:41 pm
Forum: WML Workshop
Topic: Help for New Abilities and Weapon Specials
Replies: 104
Views: 4658

Re: Help for New Abilities and Weapon Specials

Barbaros wrote: July 19th, 2020, 10:12 pm

Code: Select all

          [filter_self]
              formula="(($this_unit.max_hitpoints -1+1) / ($this_unit.hitpoints -1+1)) > 2"
          [/filter_self]
If you use formula you don't need to use $this_unit, you can just write: formula="max_hitpoints / hitpoints > 2"
by gfgtdf
July 19th, 2020, 9:42 pm
Forum: WML Workshop
Topic: Help for New Abilities and Weapon Specials
Replies: 104
Views: 4658

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="$($this_unit...