system names from the numbers

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

Moderators: winston, another_commander

Post Reply
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

system names from the numbers

Post by Lestradae »

I can't find the info I'm searching for here or on the wiki ... :oops:

I want to write the sentence:

"Buy a near-derelict Rock Hermit station in the SYSTEMNAME system in galactic sector 1 for 2 million Cr. The resulting income that the future owner can expect has been estimated at about 4000 Cr per witchjump."

... into my equipment.plist (multiple times) and the sentence:

"<string>You own a Rock Hermit station in the SYSTEMNAME system in galactic sector 1. Income: 4000 Cr / Witchjump</string>"

... into my missiontext.plist.

How do I have to formulate the SYSTEMNAME so that the game produces it from the systems number, irrelevant which galactic sector it is in (some of the missiontext.plist names will refer to other galactic sector systems than the one the commander is in currently) and also use the new name if the name was changed by whatever oxp?

I think the options for this were recently expanded for the "1.73" trunk version?!

Thanks in advance

L
User avatar
Rustybolts
---- E L I T E ----
---- E L I T E ----
Posts: 293
Joined: Sun Jun 07, 2009 6:22 pm
Location: UK

Post by Rustybolts »

Hi Bud hows tricks? What your looking for is here. I have placed in bold exactly what you need.
Special Expansions

These can be include in your text, within the <string>..</string>, to automatically insert the following detail;
[commander_name] - Displays the name of the saved game file.
[commander_shipname] - Displays the name of the players ship, as specified by shipdata.plist.
[commander_rank] - Displays the players Elite rating.
[commander_legal_status] - Displays the players current legal status.
[Thanks-for-assist] - Err, thanks the player for their assistance.
[Thargoid_curses] - Random Thargoid curses.
[police_attack_warning] - Random warning of immediate(?) attack.
%H - Will display the current system name i.e. Isinor.
%I - Displays the current system name with "ian" attached i.e. Isinorian.
%R - Random word.
%Jxxx - Will display the system name of system with ID number "xxx". xxx must be a 3 digit number or no replacement takes place. e.g. %J007 is Lave. This replacement follows any system renaming by other oxp's. (Feature added with Oolite 1.73)
See also Communications in Methods.
[edit] Layout

Several spacial characters are used in determining the layout of the text, just as in Wiki.
\" Enables the use of colons.
\\n Insers a hard Enter.
In XML:
\n Inserts a hard Enter.
full page located here
http://wiki.alioth.net/index.php/Missiontext.plist
STE.+ Firefly/Dragonfly + BlackJacksbullion v.1.23 link below.
http://www.mediafire.com/?sharekey=ca16 ... f6e8ebb871
Image
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

Hi Rustybolts,
%Jxxx - Will display the system name of system with ID number "xxx". xxx must be a 3 digit number or no replacement takes place. e.g. %J007 is Lave. This replacement follows any system renaming by other oxp's. (Feature added with Oolite 1.73)
Thanks for the tip! :D

My problem is, though, that this would also have to work with other galactic sectors!

When a player buys a station, the information is saved via a mission variable and the existence of the station is noted on the missions list. But when it says i.e. "You own a Rock Hermit station in the Ribilebi system in galactic sector 1 etc." it should also say "Ribilebi" when the player is not in Galaxy 1!

That's my problem. Any way around it?

:?:

L
User avatar
Rustybolts
---- E L I T E ----
---- E L I T E ----
Posts: 293
Joined: Sun Jun 07, 2009 6:22 pm
Location: UK

Post by Rustybolts »

I will have a think about it.
Beyond me i think
STE.+ Firefly/Dragonfly + BlackJacksbullion v.1.23 link below.
http://www.mediafire.com/?sharekey=ca16 ... f6e8ebb871
Image
User avatar
saint
Dangerous
Dangerous
Posts: 75
Joined: Fri Jul 24, 2009 5:17 pm
Location: 45.371747 N, 12.011885 E - Sol III
Contact:

Post by saint »

Sound like you have to find the ObjC method and call it from JavaScript in a way that the name generation is done using the seed for galaxy 1, if what I remember is right, it should be possible.

But why don't store the name in oolite savefile ?
Image
Cmdr. Saint, Golden Gladstone with 4 leaves Clovers of the Most Noble Order or The B.D.c.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

Already solved it - by adding in 192 system names by hand - thrice :?

It wasn't my best day.
User avatar
saint
Dangerous
Dangerous
Posts: 75
Joined: Fri Jul 24, 2009 5:17 pm
Location: 45.371747 N, 12.011885 E - Sol III
Contact:

Post by saint »

It seems that you really need Emacs !
Image
Cmdr. Saint, Golden Gladstone with 4 leaves Clovers of the Most Noble Order or The B.D.c.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

What is Emacs?

:?:

L
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Post by Diziet Sma »

A Unix program that has been described as "a text editor that thinks it's an Operating System"... very arcane and non-intuitive.. so naturally its fans think its the best thing since sliced bread. :lol:
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
saint
Dangerous
Dangerous
Posts: 75
Joined: Fri Jul 24, 2009 5:17 pm
Location: 45.371747 N, 12.011885 E - Sol III
Contact:

Post by saint »

Diziet Sma wrote:
A Unix program
That's not correct commander. It exists for many platform, Windows and Mac OS X included. The latter has a terminal only version in the default installation, but a version with a more complete integration in the system is available (i.e. has Machintoshish keybinding, so that a long time Mac user finds that the same keystrokes have the same meaning in AquaEmacs like they have in other 'well behaved' (behaving ?) apps. CUA mode is available via menu for Windows users.
Diziet Sma wrote:
that has been described as "a text editor that thinks it's an Operating System"...
This too is not correct :), commander, I am so sorry ! :).

It is the editor (The True One Editor), the language (Emacs-Lisp), and the operating system. But if this is three in one or one in three is a theological debate still open.
Diziet Sma wrote:
very arcane and non-intuitive..


Anithing unknown is arcane. I could prove this sentence false (beware, I lectured on it :) :) :) :) :)), but this is not the place, I was OT enought.

Is enought to say that you can expand Emacs as you can expand OOlite. But you do not need more tool and Emacs helps you in expanding itself. More on this subject by e-mail. And I should have done what Lestradae did... by making Emacs doing it for me :).

Again, my apologies for being OT for so long.
Diziet Sma wrote:
so naturally its fans think its the best thing since sliced bread. :lol:
Commander, it seems you can't get one right! :) It is the best thing since sliced bread with Nutella! :)

May we have a beer together in friendship. A Coriolis 0-g bar should be the perfect place, but any pub on Sol III should work well nevertheless :) :) :)

P.S. : about the posts in https://bb.oolite.space/viewtopic.php?t= ... highlight=... :lol: :lol: :lol: :lol: :lol:
Image
Cmdr. Saint, Golden Gladstone with 4 leaves Clovers of the Most Noble Order or The B.D.c.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Post by Diziet Sma »

saint wrote:
Diziet Sma wrote:
A Unix program
That's not correct commander. It exists for many platform, Windows and Mac OS X included.
You are correct, Commander.. I should have said "Originally a Unix program, since ported to many other platforms"
saint wrote:
Diziet Sma wrote:
that has been described as "a text editor that thinks it's an Operating System"...
This too is not correct :), commander, I am so sorry ! :).
It is the editor (The True One Editor), the language (Emacs-Lisp), and the operating system. But if this is three in one or one in three is a theological debate still open.
Well, sir (or madam as the case may be), I would suggest that that is a matter of opinion, (or perhaps, as you have implied, Faith, which is often the same thing). I've also heard it referred to as an Operating System masquerading as a text editor..
saint wrote:
Diziet Sma wrote:
very arcane and non-intuitive..

Anithing unknown is arcane. I could prove this sentence false.
My handy one-click dictionary defines Arcane as "Requiring secret or mysterious knowledge". I would say the phrase 'requiring mysterious knowledge' sums Emacs up quite well, actually.. :D
saint wrote:
Diziet Sma wrote:
so naturally its fans think its the best thing since sliced bread. :lol:
Commander, it seems you can't get one right! :) It is the best thing since sliced bread with Nutella! :)
Thank you! Quod erat demonstrandum... :lol:
saint wrote:
May we have a beer together in friendship. A Coriolis 0-g bar should be the perfect place, but any pub on Sol III should work well nevertheless :) :) :)
Gladly! It has been a pleasure! I'm currently situated in Brisbane, Australia, and I see you are in what looks to be a charming little area, adjacent to a field, not too far from Venice, so I don't know if it would be convenient for you to drop by, but you have an open invitation..
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
saint
Dangerous
Dangerous
Posts: 75
Joined: Fri Jul 24, 2009 5:17 pm
Location: 45.371747 N, 12.011885 E - Sol III
Contact:

Post by saint »

Diziet Sma wrote:
I would suggest that that is a matter of opinion, (or perhaps, as you have implied, Faith, which is often the same thing). I've also heard it referred to as an Operating System masquerading as a text editor.
It is both, as the Church of Emacs says, with the language being the bond
between the two. See http://www.dina.dk/~abraham/religion/trinity.txt

I admit that Lisp stays to programming languages as Tibetan to human languages... exotic and mysterious indeed, but through it many attained illumination... “These are your father’s parentheses. Elegant weapons, for a more… civilized age.” (http://xkcd.com/297/)

[quote "Diziet Sma"]Gladly! It has been a pleasure! I'm currently situated in Brisbane, Australia, and I see you are in what looks to be a charming little area, adjacent to a field, not too far from Venice, so I don't know if it would be convenient for you to drop by, but you have an open invitation..[/quote]

Nice nice nide. Yep, it's a bit of a trip to come there without a .5lm ship, but the invitation is open on this side too!

A novice of the temple once approached the Master Programmer with a question: “Master, does Emacs have the Buddha nature?” the novice asked.

The Master Programmer had been in the temple for many years and could be relied upon to know these things. He thought for several minutes before replying: “I don’t see why not. It’s bloody well got everything else.
Image
Cmdr. Saint, Golden Gladstone with 4 leaves Clovers of the Most Noble Order or The B.D.c.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Post by Diziet Sma »

saint wrote:
“These are your father’s parentheses. Elegant weapons, for a more… civilized age.” (http://xkcd.com/297/)

...

A novice of the temple once approached the Master Programmer with a question: “Master, does Emacs have the Buddha nature?” the novice asked.

The Master Programmer had been in the temple for many years and could be relied upon to know these things. He thought for several minutes before replying: “I don’t see why not. It’s bloody well got everything else.
Nicely done... I laughed 'til I choked at both of these! :lol: 8)

Anyways.. enough with the OT entertainment..

I like this suggestion.. maybe a request should be made for it in the scripting requests thread. It ought to be simple enough to make it work for all 8 galactic charts, too..
saint wrote:
Sound like you have to find the ObjC method and call it from JavaScript in a way that the name generation is done using the seed for galaxy 1, if what I remember is right, it should be possible.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
Post Reply