Search found 2067 matches

by Ravana
June 17th, 2019, 7:12 pm
Forum: WML Workshop
Topic: EarthCake's problems
Replies: 95
Views: 2744

Re: EarthCake's problems

When unit picks item or kills leader, set variable. Later look if that variable exists.

If you mean that specific unit and that specific item, then assuming event with $unit, like {VARIABLE unit.variables.item_mystic yes} and later check $unit.variables.item_mystic.
by Ravana
June 17th, 2019, 6:10 am
Forum: Scenario & Campaign Development
Topic: Delfador in HttT should be lvl 4 instead of 5, and Yeti should be lvl 5 instead of just 4
Replies: 3
Views: 126

Re: Delfador in HttT should be lvl 4 instead of 5, and Yeti should be lvl 5 instead of just 4

Yeti would need to have ranged attack to be level 5, otherwise being source of too free xp.
by Ravana
June 14th, 2019, 6:01 pm
Forum: Release Announcements, Compiling & Installation
Topic: Wesnoth - new version?
Replies: 6
Views: 659

Re: Wesnoth - new version?

The option to store userdata in install location was removed because people misused it - selected it when they installed to location that requires admin rights to access. Some time during early 1.13. The userdata folder will be created in the location you specify as command line parameter, you do no...
by Ravana
June 14th, 2019, 3:26 pm
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 50
Views: 3359

Re: Xalzar's WML Headaches

Reloaded games maybe. But if common tests succeed its enough to go forward.
by Ravana
June 14th, 2019, 11:53 am
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 50
Views: 3359

Re: Xalzar's WML Headaches

Wiki indicates that ai turn is unsynced. Did you test for oos?
by Ravana
June 14th, 2019, 6:26 am
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 50
Views: 3359

Re: Xalzar's WML Headaches

wesnoth.wml_actions.event{ name="side turn", first_time_only=false, {"lua", {code="wesnoth.message(wesnoth.wml_conditionals.is_ai())"}} } Is exactly same as [event] name="side turn" first_time_only=no [lua] code=<<wesnoth.message(wesnoth.wml_conditionals.is_ai())>> [/lua] [/event] Which works as [e...
by Ravana
June 13th, 2019, 4:56 am
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 50
Views: 3359

Re: Xalzar's WML Headaches

Unit events are only added when unit is placed on map, and preload happens before map is loaded, so yes, it should be scenario/era/modification event.
by Ravana
June 12th, 2019, 11:08 pm
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 50
Views: 3359

Re: Xalzar's WML Headaches

wesnoth.wml_conditionals is special - if you add functions to it, they become available to wml. So wesnoth.wml_conditionals.is_ai() defines condition tag [is_ai]. Preload event fires each time game is started, including reloaded. It is used to set up lua variables and functions, since unlike wml var...
by Ravana
June 12th, 2019, 5:56 pm
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 50
Views: 3359

Re: Xalzar's WML Headaches

I tried it out in debug, it only works for sides that start out as ai - and 1.14 does not allow undroiding such sides. If you droid side, it is still treated as human. Code used for testing (:debug, then lua console) function wesnoth.wml_conditionals.is_ai() return wesnoth.synchronize_choice( functi...
by Ravana
June 11th, 2019, 11:04 pm
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 50
Views: 3359

Re: Xalzar's WML Headaches

Preload event is important.

If said it needs table, returns would be

function wesnoth.wml_conditionals.is_ai()
return wesnoth.synchronize_choice(
function()
return {value=false}
end,
function()
return {value=true}
end).value
end
by Ravana
June 11th, 2019, 9:25 pm
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 50
Views: 3359

Re: Xalzar's WML Headaches

I believe it is possible to use it with [event] first_time_only=no name=preload [lua] code=<< function wesnoth.wml_conditionals.is_ai() return wesnoth.synchronize_choice( function() return false end, function() return true end) end >> [/lua] [/event] And then in your [if] or [filter_condition] have ...
by Ravana
June 11th, 2019, 8:45 pm
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 50
Views: 3359

Re: Xalzar's WML Headaches

Whether side is AI or not depends on who looks - 1.14 decided that it is private information whether side is played by AI or something else. I guess you need something like local is_ai = wesnoth.synchronize_choice( function() return false end, function() return true end) to ask playing side whether ...
by Ravana
June 9th, 2019, 3:53 pm
Forum: Users’ Forum
Topic: Is anyone interested in having the game translated to Arabic?
Replies: 12
Views: 459

Re: Is anyone interested in having the game translated to Arabic?

Translating is completely unrelated to programming.
by Ravana
June 6th, 2019, 6:58 pm
Forum: Faction & Era Development
Topic: Era of Magic (EoMa) 3.2
Replies: 1623
Views: 216964

Re: Era of Magic (EoMa) 3.2

Based on code it should be available.
by Ravana
June 2nd, 2019, 8:27 am
Forum: WML Workshop
Topic: EarthCake's problems
Replies: 95
Views: 2744

Re: EarthCake's problems

[fire_event] immediately triggers event - it does not register event. You need nested event.