An Independence War: SP campaign for 1.12/1.14

Discussion and development of scenarios and campaigns for the game.

Moderators: Forum Moderators, Developers

User avatar
tamanegi
Posts: 139
Joined: August 25th, 2014, 11:38 am
Location: Japan

Re: An Independence War: SP campaign for 1.12/1.14

Post by tamanegi » November 11th, 2018, 8:23 am

:augh: :augh: :augh: :augh: I forgot to import AI attack event from the previous version... :oops:

Thank you pauxlo again and again and again!
All these bugs are fixed and a new version is uploaded.
Among this, ally didn't send troops bug is a critical one. Thank you for reporting!

0.3.0beta9
* CRITICAL FIX: kingdom and empire also could not do anything...

0.3.0beta8
* CRITICAL FIX: AI SIDE NEVER ATTACK OTHER SIDES
* fix: unit type name upon promotion was wrong (current one used)
* fix: unit list has a bug when the leader is a rider
(guards were overwritten by shooters)
* fix: defeated leader does not have exploit and causes error upon opening status
* fix: village owner has been wrong for the kingdom domain
* other minor fixes
Discord: @tamanegi
It is true that we cannot be free from bugs, but at least let our bugs not always the same...
A Group in a War: my first campaign, An Independence War: and the sequel

User avatar
pauxlo
Posts: 1046
Joined: September 19th, 2006, 8:54 pm

Re: An Independence War: SP campaign for 1.12/1.14

Post by pauxlo » December 15th, 2018, 7:16 pm

I just installed the new version, and played a bit more. (Thanks for the fixes.)

After defeating some insurgents with my own company, I tried to remove units from them.
It worked for the first three, but afterwards I can neither open that "remove units" dialog nor show the status of that troop (being in the antechamber right now).

When choosing remove units:

Code: Select all

20181215 19:50:26 error scripting/lua: ~add-ons/An_Independence_War/lua/status.lua:87: attempt to index a nil value (field '?')
stack traceback:
	~add-ons/An_Independence_War/lua/status.lua:87: in function '.aiw_show_status_table'
	[string "..."]:2: in local 'bytecode'
	lua/wml-tags.lua:272: in local 'cmd'
	lua/wml-utils.lua:145: in field 'handle_event_commands'
	lua/wml/message.lua:431: in local 'cmd'
	lua/wml-utils.lua:145: in field 'handle_event_commands'
	lua/wml-flow.lua:6: in function <lua/wml-flow.lua:5>
	[C]: in field 'fire_event'
	lua/wml-tags.lua:153: in local 'cmd'
	lua/wml-utils.lua:145: in field 'handle_event_commands'
	...
	lua/wml-flow.lua:6: in function <lua/wml-flow.lua:5>
	[C]: in field 'fire_event'
	lua/wml-tags.lua:153: in local 'cmd'
	lua/wml-utils.lua:145: in field 'handle_event_commands'
	lua/wml-flow.lua:38: in local 'cmd'
	lua/wml-utils.lua:145: in field 'handle_event_commands'
	lua/wml-flow.lua:6: in function <lua/wml-flow.lua:5>
	[C]: in field 'fire_event'
	lua/wml-tags.lua:153: in local 'cmd'
	lua/wml-utils.lua:145: in field 'handle_event_commands'
	lua/wml-flow.lua:6: in function <lua/wml-flow.lua:5>
When choosing "status of this troop":

Code: Select all

20181215 19:51:08 error scripting/lua: ~add-ons/An_Independence_War/lua/status.lua:87: attempt to index a nil value (field '?')
stack traceback:
	~add-ons/An_Independence_War/lua/status.lua:87: in function '.aiw_show_status_table'
	[string "..."]:2: in local 'bytecode'
	lua/wml-tags.lua:272: in local 'cmd'
	lua/wml-utils.lua:145: in field 'handle_event_commands'
	lua/wml-flow.lua:6: in function <lua/wml-flow.lua:5>
Trying "remove" again:

Code: Select all

20181215 19:55:35 error scripting/lua: ~add-ons/An_Independence_War/lua/status.lua:87: attempt to index a nil value (field '?')
stack traceback:
	~add-ons/An_Independence_War/lua/status.lua:87: in function '.aiw_show_status_table'
	[string "..."]:2: in local 'bytecode'
	lua/wml-tags.lua:272: in local 'cmd'
	lua/wml-utils.lua:145: in field 'handle_event_commands'
	lua/wml/message.lua:431: in local 'cmd'
	lua/wml-utils.lua:145: in field 'handle_event_commands'
	lua/wml-flow.lua:6: in function <lua/wml-flow.lua:5>
	[C]: in field 'fire_event'
	lua/wml-tags.lua:153: in local 'cmd'
	lua/wml-utils.lua:145: in field 'handle_event_commands'
	lua/wml-flow.lua:6: in function <lua/wml-flow.lua:5>
AIW-Field Runde 154-c.gz
(656.93 KiB) Downloaded 126 times
This happened both with a fresh compile of the 1.4 branch (v1.14.5+dev (125e0e14610-Clean)) and an older version (I unfortunately don't know when exactly, might be around my previous post).
Of course, this might be related to corrupt data from previous versions.

Also, when trying to create a new troop from the lancer I removed from my troop, I get this Lua error:

Code: Select all

20181215 20:17:26 error scripting/lua: ~add-ons/An_Independence_War/lua/status.lua:87: attempt to index a nil value (field '?')
stack traceback:
	~add-ons/An_Independence_War/lua/status.lua:87: in function '.aiw_show_status_table'
	[string "..."]:2: in local 'bytecode'
	lua/wml-tags.lua:272: in local 'cmd'
	lua/wml-utils.lua:145: in field 'handle_event_commands'
	lua/wml/message.lua:431: in local 'cmd'
	lua/wml-utils.lua:145: in field 'handle_event_commands'
	lua/wml-flow.lua:6: in function <lua/wml-flow.lua:5>
	[C]: in field 'fire_event'
	lua/wml-tags.lua:153: in local 'cmd'
	lua/wml-utils.lua:145: in field 'handle_event_commands'
	lua/wml/message.lua:431: in local 'cmd'
	lua/wml-utils.lua:145: in field 'handle_event_commands'
	lua/wml-flow.lua:6: in function <lua/wml-flow.lua:5>
	[C]: in field 'fire_event'
	lua/wml-tags.lua:153: in local 'cmd'
	lua/wml-utils.lua:145: in field 'handle_event_commands'
	lua/wml-flow.lua:6: in function <lua/wml-flow.lua:5>
I also get the "status table" error when looking at some of my field troops (Near Sceptoria: Heinrich, Andrzej, but not Christopher, Vugogin or Taenyc).

User avatar
pauxlo
Posts: 1046
Joined: September 19th, 2006, 8:54 pm

Re: An Independence War: SP campaign for 1.12/1.14

Post by pauxlo » December 15th, 2018, 9:36 pm

I think I found the reason:

Code: Select all

  while i <= #shooters do
    if guards[i].exploit == "" then  -- <<<< this line 87 is the one which throws the error.
      guards[i].exploit = 999
    end
    ...
  end
This iterates over the "shooters" array, but tries to access the "guards" one. This fails if I have more shooters than guards in the list I want to show, which happens to be the case for Heinrich, Andrzej.

After fixing this (also the next line), I can see the status of my own troop again. But for "status of the reserve units" or "create a squad/troop/company" (the middle one should be Platoon, right?) I now get an error at line 102. This is the same for riders vs. guards. Replacing "guards" by "riders" fixes the problem here too.

User avatar
pauxlo
Posts: 1046
Joined: September 19th, 2006, 8:54 pm

Re: An Independence War: SP campaign for 1.12/1.14

Post by pauxlo » December 16th, 2018, 1:38 am

Another thing ... I asked the trolls to attack the elves, and they said yes.
They also field troops, but the troops never leave troll territory – they just stand there around and do nothing.
trolls-not-attacking.png
After several rounds they decide it is enough, and go home.
(I sent them money and asked them to attack the elves several times, this is why they have so many troops.)
AIW-Field-Autospeichern183.gz
(704.77 KiB) Downloaded 120 times
With the goblins that worked better, they at least made it half way there (and battled the Kingdom troops gathered on the way).

User avatar
tamanegi
Posts: 139
Joined: August 25th, 2014, 11:38 am
Location: Japan

Re: An Independence War: SP campaign for 1.12/1.14

Post by tamanegi » December 23rd, 2018, 7:03 am

Hi, pauxlo!
Thank you for reporting, sorry for the late reply :augh: (and what are you doing with paperpushers :lol:).

The first bug you met this time is originated from the corrupted data.
But what is guilty is the newly introduced code for workaround recently added by me. :augh:
(If that work around code did not exist, the window might open at least...)

The second one, stacked trolls, is caused by the wrong avoiding region definition.
That bug is fixed now. Trolls won't hesitate to enter into allied goblin region anymore.
Secretary will warn you when you ask trolls to attack elves, though. :P

Fixed version 0.3.1 is available on the add-on server.
(I still don't have time or/and motivation to play through my campaign... Sorry.)
Discord: @tamanegi
It is true that we cannot be free from bugs, but at least let our bugs not always the same...
A Group in a War: my first campaign, An Independence War: and the sequel

User avatar
pauxlo
Posts: 1046
Joined: September 19th, 2006, 8:54 pm

Re: An Independence War: SP campaign for 1.12/1.14

Post by pauxlo » December 24th, 2018, 12:44 am

tamanegi wrote:
December 23rd, 2018, 7:03 am
(and what are you doing with paperpushers :lol:)
I thought that is how they were supposed to be used? ;)

Thanks for updating. I now finished the game (at medium difficulty). At some time in the future I'll try again on hard, but not right now.
Thanks again for the campaign!

User avatar
tamanegi
Posts: 139
Joined: August 25th, 2014, 11:38 am
Location: Japan

Re: An Independence War: SP campaign for 1.12/1.14

Post by tamanegi » December 24th, 2018, 3:30 am

Congrats! :D
And thank you for so many important bug reports!
Discord: @tamanegi
It is true that we cannot be free from bugs, but at least let our bugs not always the same...
A Group in a War: my first campaign, An Independence War: and the sequel

StellarStar
Posts: 21
Joined: July 12th, 2018, 3:52 pm

Re: An Independence War: SP campaign for 1.12/1.14

Post by StellarStar » January 6th, 2019, 3:57 pm

Can you explain how the flags work? Because when I kill the guardian I dont control the area or get extra income

StellarStar
Posts: 21
Joined: July 12th, 2018, 3:52 pm

Re: An Independence War: SP campaign for 1.12/1.14

Post by StellarStar » January 7th, 2019, 12:02 pm

And I finished the scenario on normal. The hardest part was the attack of the kingdom in the begining when you dont have many 6 member squads. Once I crushed the forward base the game wasnt even a challenge. I used the Bowmaster and Silver Mage to kill the capital and because the Kingodm didnt have any money it couldnt defend itself

User avatar
tamanegi
Posts: 139
Joined: August 25th, 2014, 11:38 am
Location: Japan

Re: An Independence War: SP campaign for 1.12/1.14

Post by tamanegi » January 7th, 2019, 1:10 pm

Thank you for playing :D
The hardest part was the attack of the kingdom in the begining when you dont have many 6 member squads.
Indeed. The beginning of the game is often the hardest part. :P

As for Flags, they will appear when you defeat guardian (NOT LEADER) units. For example, units on the Frontline Fort and Mouth labels are guardians.
You can get extra income as long as these Flags exist. If a Flag is killed by the enemy, the enemy will regain the control of that site.
If a Flag didn't appear when you defeat the guardian, please tell me the site where you defeat the guradian and show me the save file if possible.
Discord: @tamanegi
It is true that we cannot be free from bugs, but at least let our bugs not always the same...
A Group in a War: my first campaign, An Independence War: and the sequel

StellarStar
Posts: 21
Joined: July 12th, 2018, 3:52 pm

Re: An Independence War: SP campaign for 1.12/1.14

Post by StellarStar » January 7th, 2019, 3:08 pm

The flags did appear, it just seems to me that they just dont give extra income

User avatar
tamanegi
Posts: 139
Joined: August 25th, 2014, 11:38 am
Location: Japan

Re: An Independence War: SP campaign for 1.12/1.14

Post by tamanegi » January 7th, 2019, 3:28 pm

:augh: :augh:
I got it. You are right.
Extra income from Flags (10g/Flag) does not work for player side due to my silly typo. (This income works fine for enemy sides, though.)

Bug fixed version 0.3.1a is uploaded.

Thank you for reporting, StellarStar! :)
Discord: @tamanegi
It is true that we cannot be free from bugs, but at least let our bugs not always the same...
A Group in a War: my first campaign, An Independence War: and the sequel

User avatar
mateus_70
Posts: 5
Joined: January 20th, 2019, 5:29 am
Location: Brazil

Re: An Independence War: SP campaign for 1.12/1.14

Post by mateus_70 » October 16th, 2019, 12:15 am

bug report: It seems when I send an emissary to Goblins the map near them is with fog. (As far as I remember, when I finish one skirmish the fog near them disappear. The behavior does not happen only with Goblins, but for any ally.

[add] I've found that we can "fix" the problem by copying (from a save that the problem is not active, to the save that the problem is active. (i tested only the same turn, autosave+manual save)) the attributes "fog" and "fog_data" for a given people, lets say, Goblins, with <user_team_name=_"PEOPLE">. And we don't need to give the gold for fog to appear, we can cancel at the end and the problem will appear. [/add]

<This is a very good campaign, thank you!>

Code: Select all

The Battle for Wesnoth version 1.14.6
Running on Debian GNU/Linux 9.11 (stretch)

Game paths
==========

Data dir:        /usr/local/share/wesnoth
User config dir: /home/USER/.config/wesnoth
User data dir:   /home/USER/.local/share/wesnoth/1.14
Saves dir:       /home/USER/.local/share/wesnoth/1.14/saves
Add-ons dir:     /home/USER/.local/share/wesnoth/1.14/data/add-ons
Cache dir:       /home/USER/.cache/wesnoth

Libraries
=========

Boost:             1.62
OpenSSL/libcrypto: 1.1.0j (runtime 1.1.0l)
Cairo:             1.14.8 (runtime 1.14.8)
Pango:             1.40.5 (runtime 1.40.5)
SDL:               2.0.5  (runtime 2.0.5)
SDL_image:         2.0.1  (runtime 2.0.1)
SDL_mixer:         2.0.1  (runtime 2.0.1)
SDL_ttf:           2.0.14 (runtime 2.0.14)

Features
========

Experimental OpenMP support:    no
JPG screenshots:                no
Lua console completion:         yes
Legacy bidirectional rendering: yes
D-Bus notifications back end:   yes
Attachments
2019-10-15-with-fog-near.png
2019-10-15-with-no-fog-near.png
AIW-Field-Auto-Save2.gz
(631.62 KiB) Downloaded 16 times
Last edited by mateus_70 on October 17th, 2019, 4:15 am, edited 1 time in total.

User avatar
mateus_70
Posts: 5
Joined: January 20th, 2019, 5:29 am
Location: Brazil

Re: An Independence War: SP campaign for 1.12/1.14

Post by mateus_70 » October 16th, 2019, 5:00 pm

I got a message and I'm not sure what it means or what are the consequences of it.

Code: Select all

<Invalid WML found> division by zero on variable tmp_damage_to_the_unit
Attachments
2019-10-16-invalid-wml-found-message.png
AIW-Field-Auto-Save46.gz
(680.5 KiB) Downloaded 20 times

User avatar
tamanegi
Posts: 139
Joined: August 25th, 2014, 11:38 am
Location: Japan

Re: An Independence War: SP campaign for 1.12/1.14

Post by tamanegi » October 18th, 2019, 10:49 am

0.3.2a uploaded. :D

I believe the fog bug is fixed. The cause of the bug is: fog is removed when emissary menu is invoked and I forgot to recover fog of ai sides. :augh:
So I added fog upon transition from the office to the field. It seems to work.
(Note: you may need to enter a skirmish to load updated scenario file.)

For the division by zero message, it must be involved in damage calculations in my WML code (wesnoth battle system is not used in troop battles).
I frequently use that variable in damage calculation. It also means there are too many of them... And I could not identify where the bug happens... :P

Anyway, the bug may happen when already dead unit takes damages. So i believe it is not a critical issue at least...
I will investigate this issue when I have enough time.

Thank you, mateus_70!
Discord: @tamanegi
It is true that we cannot be free from bugs, but at least let our bugs not always the same...
A Group in a War: my first campaign, An Independence War: and the sequel

Post Reply