Legend of the Invincibles

Discussion and development of scenarios and campaigns for the game.

Moderators: Forum Moderators, Developers

Post Reply

Which of these crafting recipes you are using or planning to use? Unpopular ones will be reworked.

The End of All that Is
4
9%
Gloombringer
1
2%
Soul Eclipse
4
9%
Guerilla
5
11%
Scaryface
6
13%
Thundering Revenge
2
4%
Marie Byrd
4
9%
Marrowrend
11
23%
Deathblade Inheritance
0
No votes
Soul Render
10
21%
 
Total votes: 47

IljaNastase
Posts: 1
Joined: May 29th, 2016, 5:06 pm

Re: Legend of the Invincibles

Post by IljaNastase » May 29th, 2016, 5:12 pm

Hello,

I am just starting with campaing, chapter one and episode 6.

Could you please answer the following questions:
At the beginning you get an alliance with the elves - and you are able to play and to call (or buy, at the beginning of a episode :) ) them.

Can I summone them for the whole campaign? Of course if they do not dy. :)

Reason why I am asking:
Nearly all kills have been made by elves ... and if they are gone in a couple of episode anyway ... I would very very much regret all the good EP (for killing) and have killed as much as possible with my own soldats.


Thank you very much in advance!

Delicius169
Posts: 178
Joined: February 16th, 2015, 5:02 pm

Re: Legend of the Invincibles

Post by Delicius169 » May 29th, 2016, 6:29 pm

Dont worry, you can use them as much as you want, you will keep them until the end.

Conrad00
Posts: 1
Joined: May 31st, 2016, 10:59 pm

Re: Legend of the Invincibles

Post by Conrad00 » June 1st, 2016, 12:06 am

Would making an add on that decreases font size fix the iphone soul eater bug?

wesnoth_20160531
Posts: 5
Joined: June 1st, 2016, 2:33 am

Re: Legend of the Invincibles

Post by wesnoth_20160531 » June 1st, 2016, 3:12 am

First some preliminaries: I installed Wesnoth 1.13.4 on a MacBook Pro running OSX. sw_vers reports:

Code: Select all

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.9.5
BuildVersion:	13F1077
I installed the Legend of the Invincibles (3.1.21c) addon and tried playing the first campaign.
I noticed many lua/wml errors. Some indicated that "advance" was now "advancement"
so I fiddled around a bit and got things to work. Looking back at my bash history I believe
running the following from
~/Library/Application Support/Wesnoth_1.13/data/add-ons/Legend_of_the_Invincibles/
will fix most of them.

Code: Select all

for i in `grep -lr 'advance\]' .`; do    sed -i -e 's/advance\]/advancement\]/g' $i; done
for i in `grep -rl modifications.advance . `; do sed -i -e 's/modifications.advance/modifications.advancement/g' $i; done
Unfortunately now I'm often seeing a problem that's harder to fix. Often after a character
picks up an item (Take) I'll get a stack backtrace, something will cause the unit to vanish and
if it's one of the main characters the scenario will end.

This is easily reproducable in the second scenario which starts out with just Lethalia
by giving yourself some gems and crafting an item.

First I create a lua file caled cheat.lua in ~/Library/Application Support/Wesnoth_1.13/data
with the following contents

Code: Select all

function set(a,b)
  wesnoth.set_variable(a,b)
end
function gems(n)
    set('obsidians', n)
    set('topazes', n)
    set('opals', n)
    set('pearls', n)
    set('diamonds', n)
    set('rubies', n)
    set('emeralds', n)
    set('amethysts', n)
    set('sapphires', n)
    set('black_pearls', n)
end
gems(40)
Then I start with the debug option enabled:

Code: Select all

bash-3.2$ /Applications/Wesnoth.app/Contents/MacOS/Wesnoth --log-debug scripting/lua
.. lots of output ..
Then I run the following command after enabling debug mode:

Code: Select all

lua wesnoth.dofile "~cheat.lua"
Now use the menu sequence:

Code: Select all

* Items
* Crafting
* Craft a weapon
* Soul Renderer  (second to last)
* Yes
* Axe (or battle axe, pickaxe, ...)
* Take It
You'll see a lua stacktrace, Lethalia will vanish and you'll get the "Defeat" dialog.
Back in the window where you started wesnoth you'll see something like the following
with more details.

Code: Select all

20160531 20:05:18 warning unit: Unknown attribute 'animate' discarded.
20160531 20:05:18 error engine: Cannot do [set_variables] with invalid to_variable variable: advanced.modifications.object[0].specials.damage[] with mode = replace
name = $variable_name
to_variable = $variable_to_variable

20160531 20:05:18 error config: Error: attempting to delete non-existing child: damage[0]
20160531 20:05:18 error scripting/lua: Mandatory WML child missing yet untested for. Please report.
stack traceback:
	[C]: in function 'cmd'
	lua/wml-utils.lua:137: in function 'handle_event_commands'
	lua/wml-tags.lua:278: in function 'cmd'
	lua/wml-utils.lua:137: in function 'handle_event_commands'
	lua/wml-tags.lua:278: in function 'cmd'
	lua/wml-utils.lua:137: in function 'handle_event_commands'
	lua/wml-tags.lua:383: in function 'cmd'
	lua/wml-utils.lua:137: in function 'handle_event_commands'
	lua/wml-tags.lua:264: in function <lua/wml-tags.lua:263>
	[C]: in function 'fire_event'
	...
	lua/wml-tags.lua:278: in function 'cmd'
	lua/wml-utils.lua:137: in function 'handle_event_commands'
	lua/wml-tags.lua:383: in function 'cmd'
	lua/wml-utils.lua:137: in function 'handle_event_commands'
	lua/wml-tags.lua:264: in function <lua/wml-tags.lua:263>
	[C]: in function 'fire_event'
	lua/wml-tags.lua:138: in function 'cmd'
	lua/wml-utils.lua:137: in function 'handle_event_commands'
	lua/wml-tags.lua:278: in function 'cmd'
	lua/wml-utils.lua:137: in function 'handle_event_commands'
	lua/wml-tags.lua:264: in function <lua/wml-tags.lua:263>
I think the problem has to do with one of the [set_variables] blocks in utils/stats.cfg like the following one

Code: Select all

    {VARIABLE variable_name "attack_$count2|.specials.$count|[$index]"}
    {VARIABLE variable_to_variable "advanced.modifications.object[$i].specials.$count|[$k]"}
    [set_variables]
        name=$variable_name
        mode=replace
        to_variable=$variable_to_variable
    [/set_variables]
but I don't know enough to be sure.

User avatar
Dugi
Posts: 4931
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Legend of the Invincibles

Post by Dugi » June 1st, 2016, 5:46 am

You've done a very nice research.

I am aware of the [advancement] → [advance] issue and the possible fix, but the problem is that it would break compatibility with 1.12 and I don't quite know what to do. I might write something that would find all occurrences of [advancement], wrap it in a version check and add the [advance] for the case the version check isn't met.

For the second issue:

Code: Select all

20160531 20:05:18 error scripting/lua: Mandatory WML child missing yet untested for. Please report.
This means that there is an error the WML engine. The construct that causes it is used a lot and there's no reason why it should be unusable, WML isn't very good at checking for presence of variables and simply not checking anything is often the best way. Will you report it on GNA or should I do it?

wesnoth_20160531
Posts: 5
Joined: June 1st, 2016, 2:33 am

Re: Legend of the Invincibles

Post by wesnoth_20160531 » June 1st, 2016, 6:20 am

Happy to help. I'm not familiar with GNA but a search turned up
this link http://gna.org/bugs/?20852 which looks related so
so I'll post the details there.

EDIT: reported as https://gna.org/bugs/index.php?24719

User avatar
Dugi
Posts: 4931
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Legend of the Invincibles

Post by Dugi » June 1st, 2016, 6:37 am

No, submit a new bug. Mandatory WML child missing yet untested for is a very generic class of errors, they all mean that somewhere it was assumed that WML has a variable somewhere, but it does not and the C++ code is not prepared to handle that. Errors like this are added and removed quite often.

wesnoth_20160531
Posts: 5
Joined: June 1st, 2016, 2:33 am

Re: Legend of the Invincibles

Post by wesnoth_20160531 » June 1st, 2016, 6:40 am

I submitted https://gna.org/bugs/index.php?24719
Is that one ok or should I revise it?

User avatar
Dugi
Posts: 4931
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Legend of the Invincibles

Post by Dugi » June 1st, 2016, 6:48 am

20160531 20:05:18 warning unit: Unknown attribute 'animate' discarded. ← that's unrelated to the issue
Otherwise it's okay.

wesnoth_20160531
Posts: 5
Joined: June 1st, 2016, 2:33 am

Re: Legend of the Invincibles

Post by wesnoth_20160531 » June 1st, 2016, 7:02 am

I agree - that's probably unrelated. But I can't seem to edit comments on GNA so :-P
Running with --log-debug from a shell causes you to see a lot of similar messages.

If there's any other output I can capture or anything else I can do to help let me know.

Thank you for a great add-on. This is my favorite Wesnoth campaign!
I played an earlier version all the way to the end (?) and was excited
to see it appear on the the add-ons menu in 1.13 this holiday weekend.

User avatar
Dugi
Posts: 4931
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Legend of the Invincibles

Post by Dugi » June 1st, 2016, 7:36 am

I hope they'll know that it's unrelated. It's not really an error, it's rather a side effect of a tricks LotI uses to set up some animations comfortably. I think you've provided enough information.

The 1.13 version is quite experimental, the changes done on 1.13 are disturbingly hard to adjust to. On the other hand, 1.13.5 will contain (and the more recent 1.13.4+ do contain) my new name generator that can be used to generate much cooler names than the old one.

I am glad you like it.

wesnoth_20160531
Posts: 5
Joined: June 1st, 2016, 2:33 am

Re: Legend of the Invincibles

Post by wesnoth_20160531 » June 1st, 2016, 2:39 pm

I thought of a way to narrow down where in the WML the problem was: there aren't very many places
where [set_variables] is used in utils/stats.cfg with to_variable = $variable_to_variable so I changed
the code in each place adding a number to the end of the "variable_to_variable" and retried.

Now my altered code produced the exception:

Code: Select all

20160601 07:27:36 error engine: Cannot do [set_variables] with invalid to_variable variable: advanced.modifications.object[0].specials.damage[] with mode = replace
name = $variable_name
to_variable = $variable_to_variable1

20160601 07:27:36 error config: Error: attempting to delete non-existing child: damage[0]
20160601 07:27:36 error scripting/lua: Mandatory WML child missing yet untested for. Please report.
which shows the culprit is indeed this part around line 849:

Code: Select all

{VARIABLE variable_to_variable1 "advanced.modifications.object[$i].specials.$count|[$j]"}
[set_variables]
    name=$variable_name
    mode=replace
    to_variable=$variable_to_variable1
[/set_variables]
Unfortunately Daniel took a look at https://gna.org/bugs/index.php?24719 and couldn't repro
because his version crashes before it gets to this point but from what he explained
This means the addon uses in invalid variable syntax, specials.damage[] is invalid syntax, to access the filrst element, use 'specials.damage[0]', to access the whole array use 'specials.damage'
I wonder if the problem might be that $j is a blank "" when $count is the string "damage" ? But the output does say

Code: Select all

Error: attempting to delete non-existing child: damage[0]
so I suspect the error message about the invalid to_variable is a little misleading and $j is actually 0 when this happens.
Will think about this more later.

User avatar
Dugi
Posts: 4931
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Legend of the Invincibles

Post by Dugi » June 1st, 2016, 3:23 pm

It worked on 1.10 and 1.12, I made no changes to that because I barely understand that part of code at the moment. Your experiments seem to further show that it fails to copy one variable elsewhere because there is no variable in the target location is missing - which is quite an illogical error. 1.13 seems to contain some deep changes in the internal WML engine and they were not tested properly.

I have commented about the error that prevents the campaign to load, how to fix it and why is it still there.

User avatar
ZIM
Posts: 71
Joined: September 22nd, 2015, 10:04 am
Location: Indonesia

Re: Legend of the Invincibles

Post by ZIM » June 2nd, 2016, 12:21 pm

Sorry for the late report,
For the ally drop item case, unfortunately the save file has erased. But it did happened in front of my own eyes. When I played it some time ago, maybe the middle of 2015 (I start over playing this month to balance my unit building because the newly introduced AoE penalty), it also happened.

Also, I want to report bug, when I unequip my Duke items from the "show items on units on recall list" and I choose unequip all items, the items still gives effect despite the item has been removed. Here is the save file.

And, I think scenario Into Our Frozen Land is too easy, maybe increase the enemies gold to 125 or more for each?
Attachments
LotI1-Achilles'_Revenge_Turn_1.gz
Check the Duke's inventory and you'll notice it's empty, but his sword is Thornsword and his crossbow is still Chu-Ko-Nu.
(1001.51 KiB) Downloaded 180 times
Only hope and faith can save us.

User avatar
Dugi
Posts: 4931
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Legend of the Invincibles

Post by Dugi » June 2nd, 2016, 5:11 pm

ZIM wrote:But it did happened in front of my own eyes.
I am not asking for evidence. If I see it, I can learn a lot about the conditions and it makes finding it much easier.
ZIM wrote:Here is the save file.
I am aware of this bug, but fixing it is not trivial and I am thinking how to do it.
ZIM wrote:And, I think scenario Into Our Frozen Land is too easy, maybe increase the enemies gold to 125 or more for each?
Some changes to chapter 4 are being planned currently, one of the known issues is that the enemies are often too easy against Efraim.

Post Reply