Page 40 of 46
Re: The Feudal States
Posted: Fri Jan 04, 2013 7:38 pm
by JazHaz
JazHaz wrote:I got this warning in trunk the other day:
And here is the solution:
Eric Walch wrote:Unknown expansion key [%H] in string.
That is an oxp error. 1.77 is a bit more strict and does no longer accept '[%H]'. It should be just '%H'. A lot more oxp's will suffer from this.
Would I be correct in saying that this expansion key is related to mission screens? So any OXP that uses mission screens will be affected?
Re: The Feudal States
Posted: Fri Jan 04, 2013 7:52 pm
by Thargoid
It's the expansion for the current system name when used on things like missiontext and description plists. In 1.76.x [%H] worked, but from 1.77 only %H will do so.
So yes it can be used in mission screens, but it's not mandatory to do so, so some OXPs which use missions screens won't be affected. But arguably any such OXP which hard-wires such information as system names into screens without using the expansions is liable for problems anyway if the names get altered by other scripts.
Re: The Feudal States
Posted: Fri Jan 04, 2013 7:53 pm
by cim
And %H also works in 1.76, so not every OXP which gets system names that way will be affected, either.
Re: The Feudal States
Posted: Fri Jan 04, 2013 9:26 pm
by Ramirez
Good point - I've done a quick scan through the rest of the scripts and missiontext to replace any expanded %Hs as appropriate. Also just running the Melee under v1.77 I noticed one of the escort setup scripts needed a bit of a tweak; I've refreshed the download link.
Note though I haven't tested the rest of this OXP on 1.77 as yet.
Re: The Feudal States
Posted: Fri Jan 04, 2013 10:11 pm
by Eric Walch
cim wrote:And %H also works in 1.76.
It always has worked, even in 1.65.
I even think that [%H] was never expandable as such. Only before, the brackets were just removed when the content could not expand but did not raise an error. Then, in a second pass, the code did encounter the %H string and it did expand after all.
It is not only %H but all the variations with %. I think I already used [%H] in UPS under Oolite 1.65 and probably copied it from an other oxp. So, I suspect it to be in much more oxps, and even old abandoned ones.
Re: The Feudal States
Posted: Sun Jan 06, 2013 2:48 pm
by Commander McLane
As far as I remember, I have never put any of the '%'-type special expansions listed
here in square brackets, for the simple reason that the documentation doesn't put them in square brackets, and generally it's best to follow the documentation.
Whoever came up with the idea of using square brackets around these special expansions in the first place simply made a mistake—or probably didn't read the documentation.
Re: The Feudal States
Posted: Wed Jan 23, 2013 8:34 pm
by Ramirez
The Feudal States has been updated to v1.16 with further fixes for Oolite 1.77 (at least the obvious ones) and little corrections encountered along the way.
Download from the link below.
Re: The Feudal States
Posted: Wed Mar 13, 2013 7:05 pm
by Rorschachhamster
I just had no adversary show up in a challenge...
This showed up in the debug console:
Warning: Unknown expansion key [feudal_level_english_she_rank] in string.
Active script: feudal-challenge.js 9.0
feudal-ranks.js, line 58:
player.rankGenerator_feudal_specific_rank = expandDescription("[feudal_level"+[player.rankGenerator_level]+"_"+[rankGenerator_language]+"_"+[player.rankGenerator_gender]+"_rank]");
Warning: Unknown expansion key [feudal_level_spanish_he_rank] in string.
Active script: feudal-challenge.js 9.0
feudal-ranks.js, line 58:
player.rankGenerator_feudal_specific_rank = expandDescription("[feudal_level"+[player.rankGenerator_level]+"_"+[rankGenerator_language]+"_"+[player.rankGenerator_gender]+"_rank]");
Warning: Unknown expansion key [feudal_level_dutch_she_rank] in string.
Active script: feudal-challenge.js 9.0
feudal-ranks.js, line 58:
player.rankGenerator_feudal_specific_rank = expandDescription("[feudal_level"+[player.rankGenerator_level]+"_"+[rankGenerator_language]+"_"+[player.rankGenerator_gender]+"_rank]");
Warning: Unknown expansion key [feudal_level_english_he_rank] in string.
Active script: feudal-challenge.js 9.0
feudal-ranks.js, line 58:
player.rankGenerator_feudal_specific_rank = expandDescription("[feudal_level"+[player.rankGenerator_level]+"_"+[rankGenerator_language]+"_"+[player.rankGenerator_gender]+"_rank]");
Warning: Unknown expansion key [feudal_level_swedish_she_rank] in string.
Active script: feudal-challenge.js 9.0
feudal-ranks.js, line 58:
player.rankGenerator_feudal_specific_rank = expandDescription("[feudal_level"+[player.rankGenerator_level]+"_"+[rankGenerator_language]+"_"+[player.rankGenerator_gender]+"_rank]");
Warning: Unknown expansion key [feudal_level_english_she_rank] in string.
Active script: feudal-challenge.js 9.0
feudal-ranks.js, line 58:
player.rankGenerator_feudal_specific_rank = expandDescription("[feudal_level"+[player.rankGenerator_level]+"_"+[rankGenerator_language]+"_"+[player.rankGenerator_gender]+"_rank]");
Re: The Feudal States
Posted: Sat Mar 16, 2013 6:18 pm
by Ramirez
I may have messed up a dependency somewhere while I was making some other fixes. I've had a look and have updated the OXP to v1.16.2 - try it out and see if you get any further recurrence of the problem.
Re: The Feudal States
Posted: Sat Mar 23, 2013 4:14 pm
by cim
There's a bug in the raid mission: only the first ship in the convoy actually drops the goods, because after that the mission state is set to RAID_SUCCESS. That significantly limits how well you can do with the mission. (feudal-target.js around line 200)
Re: The Feudal States
Posted: Sat Mar 23, 2013 5:40 pm
by CommRLock78
cim wrote:There's a bug in the raid mission: only the first ship in the convoy actually drops the goods, because after that the mission state is set to RAID_SUCCESS. That significantly limits how well you can do with the mission. (feudal-target.js around line 200)
Are you using the newest version, because I had this problem a while back, and I think he fixed it.
Re: The Feudal States
Posted: Sat Mar 23, 2013 5:51 pm
by cim
CommRLock78 wrote:cim wrote:There's a bug in the raid mission: only the first ship in the convoy actually drops the goods, because after that the mission state is set to RAID_SUCCESS. That significantly limits how well you can do with the mission. (feudal-target.js around line 200)
Are you using the newest version, because I had this problem a while back, and I think he fixed it.
1.16.2, so maybe it's come back.
Re: The Feudal States
Posted: Sat Mar 23, 2013 5:54 pm
by CommRLock78
cim wrote:CommRLock78 wrote:cim wrote:There's a bug in the raid mission: only the first ship in the convoy actually drops the goods, because after that the mission state is set to RAID_SUCCESS. That significantly limits how well you can do with the mission. (feudal-target.js around line 200)
Are you using the newest version, because I had this problem a while back, and I think he fixed it.
1.16.2, so maybe it's come back.
- that's too bad. It was very annoying to have that happen. I'm sure you know this, but you can just enter whatever cargo count you want to your save-file (if I recall there's a total of 16 possible containers)
.
Re: The Feudal States
Posted: Sun Mar 24, 2013 5:07 pm
by Ramirez
Sorry, really don't know what happened there as I'm sure I fixed that bug. Maybe I did a classic case of noting down how to fix it but never actually implemented it into the script. Anyway I've tweaked the line and have re-uploaded v.1.16.2.
cim, the variable to alter either though the console or savegame is feudal_mission_cargocount, though I'm sure you'll have spotted that already!
Re: The Feudal States
Posted: Sun Mar 24, 2013 7:20 pm
by cim
Ramirez wrote:Sorry, really don't know what happened there as I'm sure I fixed that bug. Maybe I did a classic case of noting down how to fix it but never actually implemented it into the script. Anyway I've tweaked the line and have re-uploaded v.1.16.2.
cim, the variable to alter either though the console or savegame is feudal_mission_cargocount, though I'm sure you'll have spotted that already!
The next mission was a normal delivery one, so it hasn't yet been an issue since I spotted the bug.
Thanks