The Feudal States

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

Moderators: winston, another_commander

Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Ramirez wrote:
One other question (for the moment at least) - what's the syntax for calling a function from one javascript to another? For example, in the feudal-challenge.js script I have a function, 'defineChallengerGender'. To save repeating stuff I want to call on this in the feudal-tournament.js script.
I've just seen that for the first time in the caduceus script:

Code: Select all

					worldScripts["rockHermit_Locator"].shipLaunchedFromStation() // use the inbuild scripting of the OXP to restart it.

Screet
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

That only works for the main world script.

One other possibility would be to connect a specific js script or function to a global object (an object that's guaranteed to be there, no matter what script executes it).

Player is a global object, so one 'easy' option could be:

Code: Select all

player.defineChallegerGender = this.defineChallengerGender = function ()
The only two gotchas: you need to be sure that player.defineChallegerGender is defined first before calling it, and we could potentially have yet another possible oxp clash, ie different scripts using the same function name for internally different functions...

Hope this helps.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
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

Post by Ramirez »

Thanks for that. In the end I realised that the functions weren't quite general enough to be reused, so for the moment I've just replicated the bits I need. It may well be that I end up creating a standalone word script that covers all the name and rank generation stuff, which is then called by each of the mission, challenge, tournament and promotion scripts as appropriate. If/when I expand the OXP into other galaxies this would mean only having to change one script instead of several.

Just been playtesting the melee, with about 50 other ships. At the moment I'm experimenting with different AI and ship stats to ensure they're able to fight each other effectively, without making things too easy for the player. I've almost got the basic tournament wrapped up, though there are still some other event ideas I might try fitting in.
Download Resistance Commander plus many other exciting OXPs HERE
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

50! Ships? Cool:)
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
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

Post by Ramirez »

Finally! I've finished the tournament and have put together another test OXP. There are still a few tweaks to make but I'd value any input from fellow Ooliteers on some of the gameplay points. I've included some basic instructions and points to note in the readme.

To turn off the tournament element, simply delete or remove the feudal-tournament.js script from the folder. Good luck!

Feudal States WIP v0.4
Last edited by Ramirez on Wed Nov 11, 2009 7:35 pm, edited 1 time in total.
Download Resistance Commander plus many other exciting OXPs HERE
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

Post by Ramirez »

Just looked at my profile and realised that today is my 4th Oolite Bulletin Birthday - doesn't time fly when you're having fun!

Now all the planned elements for this OXP are pretty much in place I'll aim to put together a version 1.0 for formal release. In the meantime though I haven't had much feedback on the missions and challenges; if you've tried out any of the WIP OXPs I've been posting do let me know what you think. I believe they're relatively bug free - it's more the gameplay that I could do with views on. Would it help if I provide some simple savegames for people to work with?
Download Resistance Commander plus many other exciting OXPs HERE
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Ramirez wrote:
Now all the planned elements for this OXP are pretty much in place I'll aim to put together a version 1.0 for formal release. In the meantime though I haven't had much feedback on the missions and challenges; if you've tried out any of the WIP OXPs I've been posting do let me know what you think. I believe they're relatively bug free - it's more the gameplay that I could do with views on. Would it help if I provide some simple savegames for people to work with?
I had a very old WiP and did go back to G1 for testing - it appeared to me that those low-level missions have both a very low pay for many jumps to do (= creation of maintenance costs) but it also appeared to me that they could have used some sort of intervention by people not wanting me to deliver the goods ;)

I also was a bit confused because I often met many knights en route to the target planet but they appeared not to do anything.

I instantly did DL this newer version but did not try it yet as my main machine had a Mobo update and then the new Mobo had BIOS troubles which forced me to send it back - it's only since of yesterday that my development machine is configured for oolite real playing again....and now I do hope that it's also running outside G1 now, as it would be quite some work to get back there...

As to what I've read about this oxp, I would even go back there if necessary! It just sounds soooo great!

Screet
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Time is short! Will have some feedback for you in the next few days! :)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

OK, just made one flight and have been invited to a tournament ;)

There was a typo: "Majesy" instead of "Majesty". Later in the text I also had the impression that a word (possibly "of") was missing, but english is not my natural language, so maybe everything was right.

I tried to sell some cargo I found around a fuel station (at least something they are still good for, not only blowing up my ship), but everytime was re-invited to the tournament. Should it really be this way that the cargo screen does become inaccessible?

I then saved and tried to launch - oolite closed.

The log is filled with these shader errors:

Code: Select all

[shader.compile.fragment.failure]: ***** GLSL fragment shader compilation failed for feudal-fragment-shader.fragment:
>>>>> GLSL log:
0(88) : error C0000: syntax error, unexpected '{' at token "{"
0(88) : error C0501: type name expected at token "{"
0(89) : error C0000: syntax error, unexpected $undefined at token "<undefined>"
0(89) : error C0501: type name expected at token "<undefined>"
0(90) : error C1038: declaration of "vec3" conflicts with previous declaration at 0(89)
0(90) : error C0000: syntax error, unexpected $undefined at token "<undefined>"
0(90) : error C0501: type name expected at token "<undefined>"
0(91) : error C1038: declaration of "diffuse" conflicts with previous declaration at 0(91)
0(91) : warning C7531: pointers require "#extension GL_NV_shader_buffer_load : enable" before use
0(91) : error C1307: non constant expression for array size
0(91) : error C0000: syntax error, unexpected '.', expecting ',' or ';' at token "."
0(91) : error C0501: type name expected at token "."
0(91) : error C1038: declaration of "diffuse" conflicts with previous declaration at 0(91)
0(91) : warning C7531: pointers require "#extension GL_NV_shader_buffer_load : enable" before use
0(91) : error C0000: syntax error, unexpected '(' at token "("
0(91) : error C0501: type name expected at token "("
0(91) : warning C7022: unrecognized profile specifier "dot"
0(91) : error C0000: syntax error, unexpected ')' at token ")"
0(91) : error C0501: type name expected at token ")"
0(91) : warning C7022: unrecognized profile specifier "lightVector"
0(92) : error C1307: non constant expression for array size
0(92) : error C0000: syntax error, unexpected '.', expecting ',' or ')' at token "."
0(92) : error C0501: type name expected at token "."
0(92) : warning C7531: pointers require "#extension GL_NV_shader_buffer_load : enable" before use
0(92) : error C1121: pow: function type parameters not allowed
0(92) : error C0000: syntax error, unexpected '(' at token "("
0(92) : error C0501: type name expected at token "("
0(92) : warning C7022: unrecognized profile specifier "max"
0(92) : error C1121: dot: function type parameters not allowed
0(92) : error C0000: syntax error, unexpected ',' at token ","
0(92) : error C0501: type name expected at token ","
0(92) : warning C7022: unrecognized profile specifier "reflection"
0(92) : warning C7022: unrecognized profile specifier "eyeVector"
0(92) : error C1109: function type not allowed for parameter "dot"
0(92) : error C1109: function type not allowed for parameter "pow"
0(95) : error C1109: function type not allowed for parameter "main"
0(96) : error C0000: syntax error, unexpected '{', expecting ',' or ')' at token "{"
0(96) : error C0501: type name expected at token "{"
0(97) : error C0000: syntax error, unexpected '=' at token "="
0(97) : error C0501: type name expected at token "="
0(97) : warning C7022: unrecognized profile specifier "specular"
0(97) : error C1109: function type not allowed for parameter "vec4"
0(98) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
0(98) : error C0501: type name expected at token ";"
0(101) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
0(101) : error C0501: type name expected at token ";"
0(102) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
0(102) : error C0501: type name expected at token ";"
0(105) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
0(105) : error C0501: type name expected at token ";"
0(115) : warning C7531: pointers require "#extension GL_NV_shader_buffer_load : enable" before use
0(119) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
0(119) : error C0501: type name expected at token ";"
0(124) : warning C7531: pointers require "#extension GL_NV_shader_buffer_load : enable" before use
0(124) : error C0000: syntax error, unexpected ',' at token ","
0(124) : error C0501: type name expected at token ","
0(124) : warning C7022: unrecognized profile specifier "Decal1_Scale_and_Position"
0(124) : warning C7022: unrecognized profile specifier "Decal1_Rotation"
0(124) : error C1109: function type not allowed for parameter "the_decaliser"
0(125) : warning C7531: pointers require "#extension GL_NV_shader_buffer_load : enable" before use
0(125) : error C0000: syntax error, unexpected ',' at token ","
0(125) : error C0501: type name expected at token ","
0(125) : warning C7022: unrecognized profile specifier "Decal2_Scale_and_Position"
0(125) : warning C7022: unrecognized profile specifier "Decal2_Rotation"
0(125) : error C1109: function type not allowed for parameter "the_decaliser"
0(126) : warning C7531: pointers require "#extension GL_NV_shader_buffer_load : enable" before use
0(126) : error C0000: syntax error, unexpected ',' at token ","
0(126) : error C0501: type name expected at token ","
0(126) : warning C7022: unrecognized profile specifier "Decal3_Scale_and_Position"
0(126) : warning C7022: unrecognized profile specifier "Decal3_Rotation"
0(126) : error C1109: function type not allowed for parameter "the_decaliser"
0(127) : warning C7531: pointers require "#extension GL_NV_shader_buffer_load : enable" before use
0(136) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
0(136) : error C0501: type name expected at token ";"
Screet
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

Post by Ramirez »

Wow, I've never seen all those shader errors on my install - are those in the usual Oolite console log or should I be looking somewhere else? DO they show up all the time or only when the application crashed?

Re the tournament elements in v0.4, for the purposes of easy testing I've set things up so the invite and event screens are always triggered whenever you access the F8 screen, regardless of where you are. In the proper implementation, the feudal lodges won't have market screens, only challenge or tournament screens. To deactivate the tournament element from v0.4, move the tournament.js script file out of the script folder.

I'll check up for typos - some of the 'of's are generated by the script so I'll double check if any are not working as they should.
Download Resistance Commander plus many other exciting OXPs HERE
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Ramirez wrote:
Wow, I've never seen all those shader errors on my install - are those in the usual Oolite console log or should I be looking somewhere else? DO they show up all the time or only when the application crashed?
They do show up in the log. Since after updating feudal states I simply made one jump and then got that offer I'm not sure about when they show up, but my guess is that it's only happening when the objects using them are around.

From some other shader error, I know that it's sometimes driver dependent. That other error only happens with ATI cards, not nVidia ones, but it doesn't lead to a crash.

This one probably also has not to do with the crash, as it's reporting the error multiple times before oolite crashes.
Ramirez wrote:
Re the tournament elements in v0.4, for the purposes of easy testing I've set things up so the invite and event screens are always triggered whenever you access the F8 screen, regardless of where you are. In the proper implementation, the feudal lodges won't have market screens, only challenge or tournament screens. To deactivate the tournament element from v0.4, move the tournament.js script file out of the script folder.
Ahh, that F8 thing then explains a lot. I'm still worried about possible reputation changes by launching with narcotics in the 0.4 version though. Maybe I should set it to another screen for my own testing ;)

Removal of the script sounds like an easier solution than to disable the whole oxp (which I did to get rid of the repeating crash). However, I'd really prefer to fix the crash ;) Guess I'll boot my development machine later today, add the test version there and see whether I can get some additional info from there - however I recently often had problems to get something useful out of my debug builds :?

Screet
User avatar
Nijik
Competent
Competent
Posts: 32
Joined: Mon Feb 09, 2009 11:24 am
Location: Beds, UK

Post by Nijik »

Don't mind me, just registering my interest, can't wait for this to be formally released!
Might even fire up an old savegame to have a play with the WIP.
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

about the shader error in 'feudal-fragment-shader.fragment', make sure there are no spaces after the \ at the end of lines 83-87. There must not be anything at all written after the \ in the LIGHT(idx) macro lines, not even blank spaces.

edit: @ ramirez, i think the download link to the WIP test version has tttp:// written in it instead of http://
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Griff wrote:
about the shader error in 'feudal-fragment-shader.fragment', make sure there are no spaces after the \ at the end of lines 83-87. There must not be anything at all written after the \ in the LIGHT(idx) macro lines, not even blank spaces.
Thanks! That did fix it (was required up to line 88 though?!?).

With the tournament save file and tournaments enabled, oolite still does crash...will try to find out more with the other system....

Screet
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

you're right, thinking about it, line 82 has a \ too, probably best to check lines 82-88 ramirez and delete any spaces after the \
Post Reply