The Feudal States

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Re: The Feudal States

Post 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?
JazHaz

Gimi wrote:
drew wrote:
£4,500 though! :shock: <Faints>
Cheers,
Drew.
Maybe you could start a Kickstarter Campaign to found your £4500 pledge. 8)
Thanks to Gimi, I got an eBook in my inbox tonight (31st May 2014 - Release of Elite Reclamation)!
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: The Feudal States

Post 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.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: The Feudal States

Post by cim »

And %H also works in 1.76, so not every OXP which gets system names that way will be affected, either.
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Re: The Feudal States

Post 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.
Download Resistance Commander plus many other exciting OXPs HERE
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: The Feudal States

Post by Eric Walch »

cim wrote:
And %H also works in 1.76.
It always has worked, even in 1.65. :D

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.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: The Feudal States

Post by Commander McLane »

As far as I remember, I have never put any of the '%'-type special expansions listed Image 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.
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Re: The Feudal States

Post 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.
Download Resistance Commander plus many other exciting OXPs HERE
User avatar
Rorschachhamster
---- E L I T E ----
---- E L I T E ----
Posts: 274
Joined: Sun Aug 05, 2012 11:46 pm
Contact:

Re: The Feudal States

Post 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]");
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Re: The Feudal States

Post 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.
Download Resistance Commander plus many other exciting OXPs HERE
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: The Feudal States

Post 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)
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: The Feudal States

Post 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.
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: The Feudal States

Post 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.
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: The Feudal States

Post 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) :).
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Re: The Feudal States

Post 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!
Download Resistance Commander plus many other exciting OXPs HERE
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: The Feudal States

Post 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
Post Reply