Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Random Hits OXP

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

Moderators: winston, another_commander

User avatar
Tivva
---- E L I T E ----
---- E L I T E ----
Posts: 279
Joined: Wed Sep 03, 2008 5:32 pm
Location: Right behind you in a cloaked Thargoid Warship prototype

Post by Tivva »

Westwood wrote:

And here is my "description.plist"
Image

As I have basically no knowledge of coding...I am completely at the mercy of ignorance to find out what this means. :?
I get the same too.
When using "get info" of the description.plist file it says it is a plain text file but text edit 1.5 won't open it. Can open all the other .plist files ok though.
(mac os 10.5)
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Tivva wrote:
I get the same too.
When using "get info" of the description.plist file it says it is a plain text file but text edit 1.5 won't open it. Can open all the other .plist files ok though.
(mac os 10.5)
The bug is in the part:

Code: Select all

	<string>Ioollia</string>
	<string>Kr¸ger</string>
	<string>Luyten</string>
Delete the line

Code: Select all

	<string>Kr¸ger</string>
It contains an illegal symbol that makes the mac completely ignoring the plist.

And I also could not open it at first. I opened it with "Dascode" and saved it again. After that it did open in textedit.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

I have since 1 week an shader capable mac. And since today a cable modem. (Another world started now). So I downloaded the latest version of RH. After entering an anarchy system I had several pages of errors in my log.

Code: Select all

Oolite [shader.compile.fragment.failure] OOShaderProgram.m:231: ***** GLSL fragment shader compilation failed for griff_spacebar_rock.fragment:
>>>>> GLSL log:
ERROR: 0:20: 'diffuse' : syntax error syntax error
ERROR: Parser found no code to compile in source strings.


>>>>> GLSL source code:
#define OO_USER_DEFINED_BINDINGS  1
#define OO_TEXTURE_UNIT_COUNT  4
.....

All came down to two files: griff_spacebar_rock.fragment and griff_spacebar_solarpanel.fragment

When I removed the line:

Code: Select all

   //   diffuse += gl_LightSource[idx].ambient; \
in both files, the problems were over and the "OpenGL Shader Builder" said that the file compiled okay. Don't ask my why as I never looked as shader code and at first glance it just looked like a line that was commented out.

It it a line that can be removed?
User avatar
Westwood
Above Average
Above Average
Posts: 23
Joined: Sat May 24, 2008 1:50 am

Post by Westwood »

Dascode? What is that?
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Eric Walch wrote:

Code: Select all

   //   diffuse += gl_LightSource[idx].ambient; \
It it a line that can be removed?
Yes. It is a comment. But I don't see anything wrong with it. Or is it a 'comment-problem' again?
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

@ Eric, yes it's ok to delete that line, as you guessed it is actually commented out, the bits of code inside that Light macro in the shader are really fussy, there must not be any characters (even spaces) after the \ symbol at the end of each line, I'd better check all those shaders for mistakes in case there's more of them
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Westwood wrote:
Dascode? What is that?
It was just the first alternative editor I tried and immediately worked.

It is part of the developer package that is on the Mac installation disk. (Not installed by a default installation but as you are also on OSX it must also be on your installer disk). It is just an editor for easy editing code. That kind of editors often save their text files as plain text.

Griff: I now finally start to fully appreciate your shader work. Can see it now since a week in its full glory. Nice neon sign on top of the spacebar :D
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8512
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

Griff is the god of rooftop advertising for spacebars and Constores!
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Westwood
Above Average
Above Average
Posts: 23
Joined: Sat May 24, 2008 1:50 am

Post by Westwood »

I doubt my Mac has shader capability....this is probably not the best place to ask (derailing of the topic and such :P) but is there a topic where I can see shader/non-shader images in relation to eachother?
User avatar
Tivva
---- E L I T E ----
---- E L I T E ----
Posts: 279
Joined: Wed Sep 03, 2008 5:32 pm
Location: Right behind you in a cloaked Thargoid Warship prototype

Post by Tivva »

Eric Walch wrote:

The bug is in the part:

Code: Select all

	<string>Ioollia</string>
	<string>Kr¸ger</string>
	<string>Luyten</string>
Delete the line

Code: Select all

	<string>Kr¸ger</string>
It contains an illegal symbol that makes the mac completely ignoring the plist.
Thanks Eric 8)
I downloaded a trial version of TextMate (free for 30 days)
Now works fine, but it took some searching to find the string to edit- I changed the umlauted letter to a plain 'u' rather than delete the line altogether.

Tivva

ps
@ LB - Nice touch adding lots of forum members names & forum handles to the scripting 8)
looking forward to doing a hit on me :wink:
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2868
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Think that was the problem. I'd just C&Ped a load of text in from lots of internet Elite pages as words for the generator (too lazy to type it all in :wink: ) and that one (German format?) u from an FFE system name meant the Mac refused to read the whole file! :roll:.


I C&Ped in the Oolite BB Member List as names for Victims and Posters. I then took a few out as they didn't really work as surnames (my handle included), so don't be offened if you are not on the death-list!

I'll put up a 1.3.6 with this fixed over the weekend.

Big thanks to Eric for spotting that one!
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

<string>who framed [random_hits_guard_name1] [random_hits_guard_surname]</string>

why not.,,,

Who framed Frame & I was framed..

would have made some interesting sentences :P
Bounty Scanner
Number 935
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

I know it was fixed in this specific case, but for future reference here’s how to work around the problem without extra tools.
Tivva wrote:
Westwood wrote:
And here is my "description.plist"
Image

As I have basically no knowledge of coding...I am completely at the mercy of ignorance to find out what this means. :?
I get the same too.
When using "get info" of the description.plist file it says it is a plain text file but text edit 1.5 won't open it. Can open all the other .plist files ok though.
(mac os 10.5)
Workaround: use the File->Open… command in TextEdit (don’t double-click the file), set Plain Text Encoding to Western (Mac OS Roman) or Western (Windows Latin 1) and open the file.

If you still get the error, you need to use the command line:

Code: Select all

cd <path of folder>
cp -X <name of file> <new name>
This will create a copy of the file you can open using the Open… command as above. (To get the path of the folder, you can type “cd ”, then drag the folder into the Terminal window.)

Once you have it open, you can save it with Plain Text Encoding set to UTF-8, and then use as many umlauts as you like.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Griff wrote:
@ Eric, yes it's ok to delete that line, as you guessed it is actually commented out, the bits of code inside that Light macro in the shader are really fussy, there must not be any characters (even spaces) after the \ symbol at the end of each line, I'd better check all those shaders for mistakes in case there's more of them
That isn’t valid. Inside a macro, you can only use comments of the form: /* comment */ (with a backslash at the end of the line).
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8512
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

LittleBear wrote:
Think that was the problem. I'd just C&Ped a load of text in from lots of internet Elite pages as words for the generator (too lazy to type it all in :wink: ) and that one (German format?) u from an FFE system name meant the Mac refused to read the whole file! :roll:.


I C&Ped in the Oolite BB Member List as names for Victims and Posters. I then took a few out as they didn't really work as surnames (my handle included), so don't be offened if you are not on the death-list!

I'll put up a 1.3.6 with this fixed over the weekend.

Big thanks to Eric for spotting that one!
I think "LittleBear" would work for any name of Native American origins... :wink:
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
Post Reply