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: 135
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: 1038
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 60 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: 1038
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: 1038
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 59 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: 135
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: 1038
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: 135
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: 20
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: 20
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: 135
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: 20
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: 135
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

Post Reply