Page 16 of 45

Posted: Wed Dec 16, 2009 5:48 pm
by Eric Walch
No crash with me, but when flying with a Jameson to Aronar I also got in the log:

Code: Select all

[dataCache.write.success] OOCacheManager.m:408: Wrote data cache.
[bigShips_populator] OOJSGlobal.m:197: 0 big trader(s) added to the Lave system.
[bigShips_populator] OOJSGlobal.m:197: 3 big trader(s) added to the Zaonce system.
[script.addShips.failed] PlayerEntityLegacyScriptEngine.m:1617: ***** SCRIPT ERROR: in <anonymous actions>, addShipsAtPrecisely: could not add 4 ships with role '-knight'
[bigShips_populator] OOJSGlobal.m:197: 4 big trader(s) added to the Tionisla system.
[script.addShips.failed] PlayerEntityLegacyScriptEngine.m:1617: ***** SCRIPT ERROR: in <anonymous actions>, addShipsAtPrecisely: could not add 4 ships with role '-knight'
[bigShips_populator] OOJSGlobal.m:197: 0 big trader(s) added to the Qutiri system.
[script.addShips.failed] PlayerEntityLegacyScriptEngine.m:1617: ***** SCRIPT ERROR: in <anonymous actions>, addShipsAtPrecisely: could not add 4 ships with role '-knight'
[bigShips_populator] OOJSGlobal.m:197: 2 big trader(s) added to the Aronar system.
[script.addShips.failed] PlayerEntityLegacyScriptEngine.m:1617: ***** SCRIPT ERROR: in <anonymous actions>, addShipsAtPrecisely: could not add 4 ships with role '-knight'
 
So there must be some un-initialised variable as there are a lot of places were:

Code: Select all

system.legacy_addShipsAtPrecisely([missionVariables.feudal_mission_house]+"-knight", 4, "wsu", [0, 0, 0.3])
is used. Looking in my log, it seems he tries to add those ships in every system I entered.

EDIT: found this error in feudal-mission, one of the last lines:

Code: Select all

	if(missionVariables.feudal_mission == "RANSOM_RUNNING" && system.ID == [missionVariables.feudal_mission_location_no])

		system.legacy_addShipsAtPrecisely([missionVariables.feudal_mission_house]+"-lord", 1, "wsu", [0, 0, 0.3])// add the ransom target
		system.legacy_addShipsAtPrecisely([missionVariables.feudal_mission_house]+"-knight", 4, "wsu", [0, 0, 0.3])// add some knights as escort
must be

Code: Select all

	if(missionVariables.feudal_mission == "RANSOM_RUNNING" && system.ID == [missionVariables.feudal_mission_location_no])
		{
		system.legacy_addShipsAtPrecisely([missionVariables.feudal_mission_house]+"-lord", 1, "wsu", [0, 0, 0.3])// add the ransom target
		system.legacy_addShipsAtPrecisely([missionVariables.feudal_mission_house]+"-knight", 4, "wsu", [0, 0, 0.3])// add some knights as escort
		}
Now the second line is not part of the if statement.

Posted: Wed Dec 16, 2009 6:19 pm
by Edmund
Edmund wrote:
Incidentally, My main commanders Griff Cobra MkIII has lost it's custom paint job and decal in the trunk version. The shipdata.plist edits and save game edits are the same as 1.73.4 and it works there.
Ah, scratch that, my red and orange with black decal Cobra has just reappeared. The Feudal States still not working though.

Is it working on anyone's Windoppy XP/Nvidia system?

Posted: Thu Dec 17, 2009 12:33 pm
by Screet
Hi,

from the previous test release my commander still has an active tournament in the save file but that couldn't start as it was causing a crash - and now I do wonder whether I should edit my file to get rid of it. If that's the case, what would I have to do?

Furthermore, aside from the shader issues, I've got some script error in the log:

Code: Select all

[script.javaScript.exception.parenAfterArgs]: ***** JavaScript exception (<unidentified script>): SyntaxError: missing ) after argument list
[script.javaScript.exception.parenAfterArgs]:       ../AddOns/The Feudal States v1.0.oxp/Scripts/feudal-promotion.js, line 135: 							mission.feudal_tournament_jumpcount = 0
[script.javaScript.load.failed]: ***** Error loading JavaScript script ../AddOns/The Feudal States v1.0.oxp/Scripts/feudal-promotion.js -- compilation failed
[script.load.notFound]: ***** Could not find a valid script file named feudal-promotion.js.
Screet

Posted: Thu Dec 17, 2009 12:48 pm
by Commander McLane

Code: Select all

[script.javaScript.exception.parenAfterArgs]: ***** JavaScript exception (<unidentified script>): SyntaxError: missing ) after argument list
This one is perhaps leading to

Code: Select all

[script.javaScript.load.failed]: ***** Error loading JavaScript script ../AddOns/The Feudal States v1.0.oxp/Scripts/feudal-promotion.js -- compilation failed
[script.load.notFound]: ***** Could not find a valid script file named feudal-promotion.js.
But it's kind of hard to tell, because the first error doesn't mention the script name. So probably they are unrelated.

Code: Select all

[script.javaScript.exception.parenAfterArgs]:       ../AddOns/The Feudal States v1.0.oxp/Scripts/feudal-promotion.js, line 135: 							mission.feudal_tournament_jumpcount = 0
This one is easy. It is "missionVariables.foo", not "mission.foo" (twice, in line 121 and 135).

EDIT: After fixing this I don't get any error messages after starting Oolite. Other errors might be triggered only later, though.

Posted: Thu Dec 17, 2009 5:12 pm
by Ramirez
Again, apologies for the errors - there were some last minute tweaks I applied that I evidently didn't test fully. I'll aim to do some fixes at the weekend before I disappear for the holidays. If you encounter any other strange goings on, post them here and I'll pick them up.

Earlier on this week I did come up with a single generic script to handle much of the name and rank generation elements, but I'll put this on the back burner while I fix the more material issues.

Posted: Thu Dec 17, 2009 5:25 pm
by Chrisfs
Is there a bug fixed version available on your website or is it still the original version?

Posted: Sat Dec 19, 2009 6:24 pm
by Ramirez
I've uploaded a version 1.1 that contains fixes for the errors that have been identified. Haven't had time to do much detailed checking but hopefully this will give you enough to go on for now.

Screet, if you want to use a previous save game for the tournament, you need to make sure two mission variables are present. One should be mission_feudal_tournament_offer, which needs to be set to 'EVENT_BRIEFING'. The other is mission_feudal_tournament, and this should be set to whatever event you're on, e.g. EVENT1, EVENT2, etc.

Generic Name & Rank Generator

Posted: Thu Dec 31, 2009 6:36 pm
by Ramirez
Just thought I'd share the results of the work on the generic script I talked about. Quite often there's a need to generate names and ranks for specific characters, and at the moment each world script has a long and convoluted routine to produce these and save them as mission variables. I wanted to put this all into a single generic script, which could be called by different world scripts as necessary.

Several posts ago, Kaks suggested this was doable by attaching a generic function to the player, e.g.

Code: Select all

player.defineChallegerGender = this.defineChallengerGender = function
While this worked, I realised that each thread of the OXP (missions, promotions, tournaments and challenges) all needed to have their own set of variables, often running in parallel. So, for example, the name of a challenger opponent mustn't overwrite the name of a mission target. As a result, I needed to overhaul the way the OXP was handling names and ranks.

Here's how I've handled it. Below is the generic name and rank generator in its entirety (note the logs are just there for test purposes):

Code: Select all

this.name = "feudal-ranks.js";
this.author = "Ramirez";
this.copyright = "December 2009";
this.description = "Script used to generate ranks and names for feudal characters";
this.version = "1.0";

player.feudalRankGenerator = this.feudalRankGenerator = function()

{
    if(player.rankGenerator_house == "Geinona")
    {var rankGenerator_language = "spanish"
    player.rankGenerator_of = "de"}
    
    if(player.rankGenerator_house == "Oreseren" || player.rankGenerator_house == "Aronar")
    {var rankGenerator_language = "dutch"
    player.rankGenerator_of = "van"}
    
    if(player.rankGenerator_house == "Digibeti" || player.rankGenerator_house == "Edzaon")
    {var rankGenerator_language = "english"
    player.rankGenerator_of = "of"}

    if(player.rankGenerator_house == "Esredice" || player.rankGenerator_house == "Ededleen")
    {var rankGenerator_language = "german"
    player.rankGenerator_of = "von"}
    
    if(player.rankGenerator_house == "Gelaed")
    {var rankGenerator_language = "french"
    player.rankGenerator_of = "de"}

    if(player.rankGenerator_house == "Onusorle" || player.rankGenerator_house == "Tibedied")
    {var rankGenerator_language = "swedish"
    player.rankGenerator_of = "af"}
    
    if(player.rankGenerator_house == "Tibecea")
    {var rankGenerator_language = "italian"
    player.rankGenerator_of = "di"}
    
    log([rankGenerator_language])
    log([player.rankGenerator_house])
    log([player.rankGenerator_gender])
       
    player.rankGenerator_feudal_middle_rank = expandDescription("[feudal_middle_"+[rankGenerator_language]+"_"+[player.rankGenerator_gender]+"_rank]"); 
    log([player.rankGenerator_feudal_middle_rank]);
    
    player.rankGenerator_feudal_high_rank = expandDescription("[feudal_high_"+[rankGenerator_language]+"_"+[player.rankGenerator_gender]+"_rank]");
    log([player.rankGenerator_feudal_high_rank]);
    
    player.rankGenerator_feudal_specific_rank = expandDescription("[feudal_level"+[player.rankGenerator_level]+"_"+[rankGenerator_language]+"_"+[player.rankGenerator_gender]+"_rank]");
    log([player.rankGenerator_feudal_specific_rank]);
    
    player.rankGenerator_feudal_firstname = expandDescription("[feudal_firstname_"+[rankGenerator_language]+"_"+[player.rankGenerator_gender]+"]");
    log([player.rankGenerator_feudal_firstname]);
   
    player.rankGenerator_feudal_lastname = expandDescription("[feudal_lastname_"+[rankGenerator_language]+"]");
    log([player.rankGenerator_feudal_lastname]);
       
}
In order to sent some data to this generator, it has to be attached to the player. In the feudal-challenger world script, for example, this is done by doing something like:

Code: Select all

this.defineGeneratorInputs = function()
{
	player.rankGenerator_house = missionVariables.feudal_challenger_house
	player.rankGenerator_gender = missionVariables.feudal_challenger_gender
player.rankGenerator_level = missionVariables.feudal_challenger_rank_no
}
The player.rankGenerator variables are not persistent and only serve to send the data to the generator.

With these details, the generator does its stuff and churns out a load of other variables; the relevant world script picks up the data it wants and saves them as mission variables:

Code: Select all

this.defineGeneratorOutputs = function()
{
	missionVariables.feudal_challenger_of = player.rankGenerator_of
	missionVariables.feudal_challenger_firstname = player.rankGenerator_feudal_firstname
	missionVariables.feudal_challenger_lastname = player.rankGenerator_feudal_lastname
missionVariables.feudal_challenger_rank = player.rankGenerator_feudal_specific_rank
}
In the calling worldscript, you just need to include these three lines in an appropriate function, e.g.:

Code: Select all

this.feudalChallengeOffer = function()
{	
		this.defineGeneratorInputs()
		player.feudalRankGenerator()
		this.defineGeneratorOutputs()}
So, if a script needs say a level 4 female noble from the House of Tibecea, a quick run of the generator will give you Antoinetta Romano, Contessa di Tibecea, and each of those terms will be available to use in the mission text..

The point of all this is that it allows me to expand the OXP into other galaxies while minimising the amount of additional scripting. It also makes it easier to introduce additional languages and ranks as well. The real trick has been working out the syntax to put variables inside the expandDescription parts of the script, as this has done the most to avoid repetition.

Posted: Fri Jan 15, 2010 12:53 pm
by JazHaz
Ramirez wrote:
I've uploaded a version 1.1 that contains fixes for the errors that have been identified. Haven't had time to do much detailed checking but hopefully this will give you enough to go on for now.
Don't know if you are aware, but the download link to this on your website is not working. Luckily the link in your quote above works...

Posted: Thu Jan 21, 2010 4:12 am
by gabbakeisen
I downloaded v1.1 running on 1.73.4 on XP with Nvidia and get a crash to desktop on Hyperspace to Aronar too. Removed the oxp and all works fine, does this mean v1.1 still has the same issues? I tried to follow the advice of the comments in this thread but all of those edits seemed to be implimented in 1.1.

Posted: Thu Jan 21, 2010 5:58 am
by allikat
Same situation as gabbakeisen, feudal systems 1.1 on 1.73.4 causes crash do desktop on a jump into Aronar. Disabling the OXP makes everything happy again.

System:
Windows Vista SP2
Amd AthlonII x2 240 (2.8GHz stock normally at 3.5Ghz), 2GB ddr2, stacks'o'drivespace, NVidia GF 8500GT

Yes, I overclock, and I'm proud of it :twisted: but I tested this at stock settings, with a few cache clears as well to be sure.

Posted: Thu Jan 21, 2010 7:24 am
by gabbakeisen
OK thanks for the confirm allikat. :)

Posted: Thu Jan 21, 2010 9:53 am
by Kaks
Will have a proper look this weekend, to see if we can track down this crash to desktop.

Posted: Thu Jan 21, 2010 10:53 am
by gabbakeisen
thanks kaks :-) no need to hurry tho, no need to turn a labour of love into a ball and chain, especially when its handed out for us adoring masses or free. May you enjoy fine wine, easy women and mountains of hard cash for all eternity (plenty of which can be found on Zaonce despite what the guide books say) :wink:

Posted: Fri Jan 22, 2010 5:50 pm
by Ramirez
Following some updates to models used in Asteroid Storm I've uploaded a version 1.2 to resolve any potential clashes.

I can't replicate the crashes to desktop people are having - not sure if it's still shaders or if it's something else. I'll be ready to apply a fix once we know what the problem is!