The Feudal States

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

Moderators: winston, another_commander

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 »

I'm in the middle of scripting the Cascade event - things are working OK but it needs a bit of polish. Hopefully some of you guys can help me out on some questions:

1. In amongst an asteroid field I have things that need to be scooped, but I want to be able to identify them on the scanner. Would I be right in thinking only objects with a scanClass of CLASS_ROCK or CLASS_CARGO can be scooped?

2. I tried borrowing some asteroids from Asteroid Storm OXP and they have a nice slow rotation to them. The buoys do the same kind of thing. How is this done? I can get an object to rotate around a certain axis but it always goes as the same speed, no matter what I do to the pitch/roll, thrust or the rotational velocity quarternion.

3. I believe in 1.73 it's possible to use all the various oolite font icons in the ASC. What do you need to enter in the shipdata.plist to use these as beacon icons? Are there specific codes or something?
Download Resistance Commander plus many other exciting OXPs HERE
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 »

Ramirez wrote:
3. I believe in 1.73 it's possible to use all the various oolite font icons in the ASC. What do you need to enter in the shipdata.plist to use these as beacon icons? Are there specific codes or something?

Code: Select all

beacon = "R";
You can also get the icons in the first two rows, except the Anarchy one, by fiddling with codes like beacon = "\10". These codes are octal – "\10" is eight, "\11" is nine, "\7" is 7, "\8" is meaningless. The XML equivalent is <string>& #08;</string>, without the space (in this case, the number is decimal).
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 »

...and you can even add your own icon to the beacon in 1.73.x - it's in the same format as the hud missile icons. As an example, Thargoid is using a beacon icon inside his fuel station oxp, courtesy of _ds_.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
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:

Post by Commander McLane »

Is there a howto guide for the HUD missile icons? I seem to be unable to create any shape with a flat top (like something resembling the letter 'T' or 'E'). It seems the line between the first and second coordinate couple is always drawn as a diagonal, no matter what. You probably don't notice it with small, box-like icons, but it becomes pretty obvious with bigger icons.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

If I remember correctly all points defined have a line drawn back to 0,0 from them. That tends to mess up shapes like F and E.
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:

Post by Commander McLane »

Ah! That explains it. And why, tell, have they?
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 »

That would explain why the icon for my anti-Thargoid missile, which was meant to be a 'T', is a triangle with the point at the bottom. Also I suppose that's why you often see shaded diagonals in some of the large square icons.
Download Resistance Commander plus many other exciting OXPs HERE
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Commander McLane wrote:
Ah! That explains it. And why, tell, have they?
Now there is a question I too would like to know. My knowledge in this area is entirely empirical and experimental...
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 »

Because the icons are drawn in GL_POLYGON mode, which is only intended for convex polygons. The result of using GL_POLYGON mode for non-convex polygons is undefined.

This would be quite an easy thing to fix, but since there’s no bug report on the bug tracker, there is officially no bug. ;-)
zevans
---- E L I T E ----
---- E L I T E ----
Posts: 332
Joined: Mon Jul 06, 2009 11:12 pm
Location: Uncharted backwaters of the unfashionable end of the western spiral arm

Post by zevans »

There is no mention of "bug tracker" on the Wiki, which I thought was now our canonical documentation. So what we need is some documentation on how to submit a bug, on the Wiki.

Ha! King me!
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:

Post by Commander McLane »

zevans wrote:
So what we need is some documentation on how to submit a bug, on the Wiki.
Hmmm. As you and I--and most of the other people who would report bugs--are active members of these boards, the official documentation on how to submit bugs should be sufficient, shouldn't it?

And it shouldn't really surprise you that this documentation can be found as a sticky in the Testing and Bug Reports forum of the boards. That should be the first place for you to look anyway, shouldn't it?
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:

Post by Commander McLane »

Ahruman wrote:
Because the icons are drawn in GL_POLYGON mode, which is only intended for convex polygons. The result of using GL_POLYGON mode for non-convex polygons is undefined.

This would be quite an easy thing to fix, but since there’s no bug report on the bug tracker, there is officially no bug. ;-)
To repeat myself from yesterday: Now there is. :wink:

Oh, and the one from yesterday got fixed already. Thanks, Eric! :D

So, who is going to bring the number of open bugs down to nine again today? :wink:
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 »

Ahruman wrote:
This would be quite an easy thing to fix, but since there’s no bug report on the bug tracker, there is officially no bug. ;-)
Indeed it's quite easy to forget some issues if they're not on the bug tracker, but while this is still fresh in our minds, I expect you're talking about polygon tessellation...
In that case, I'd vote to use the ODD tessellation winding rule when that part of the code is changed, since it would make it easier to create really interesting shapes! :) (see here for a little example of what I mean)

edit: Commander McLane, I think it's Ahruman's turn this time! :P
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
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 »

Kaks wrote:
In that case, I'd vote to use the ODD tessellation winding rule when that part of the code is changed, since it would make it easier to create really interesting shapes! :) (see here for a little example of what I mean)

edit: Commander McLane, I think it's Ahruman's turn this time! :P
Conveniently, the even-odd winding rule is GLUtesselator’s default setting. :-) (The eagle-eyed will observe that I have assigned the bug to myself.)
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 »

I've managed to answer some of the questions I posted earlier:
Ramirez wrote:
2. I tried borrowing some asteroids from Asteroid Storm OXP and they have a nice slow rotation to them. The buoys do the same kind of thing. How is this done? I can get an object to rotate around a certain axis but it always goes as the same speed, no matter what I do to the pitch/roll, thrust or the rotational velocity quarternion.
It looks like performTumble does the job - I've tried applying it to other objects and so long as the pitch and roll are reasonable it results in a nice slow rotation.
Ramirez wrote:
3. I believe in 1.73 it's possible to use all the various oolite font icons in the ASC. What do you need to enter in the shipdata.plist to use these as beacon icons? Are there specific codes or something?
Thanks for the help on this - I have the hunting lodges showing up on the compass with the little castle icon.

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.
Download Resistance Commander plus many other exciting OXPs HERE
Post Reply