question: witchspace countdown....

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

User avatar
nijineko
---- E L I T E ----
---- E L I T E ----
Posts: 353
Joined: Wed Jul 04, 2007 3:37 pm
Location: two strange quarks short of a graviton....
Contact:

question: witchspace countdown....

Post by nijineko »

can this count-down be lengthened or shortened by any means? (short of recoding core stuff, that is....)
arukibito ga michi wo erabu no ka, michi ga arukibito wo erabu no deshou ka?

Image
Play games. Win Amazon gift cards! Brag. Repeat.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Re: question: witchspace countdown....

Post by another_commander »

nijineko wrote:
can this count-down be lengthened or shortened by any means? (short of recoding core stuff, that is....)
Yes, and it does not seem to be such a big deal doing it either (btw, every single time I thought something would be easy to code, reality has proven me wrong).
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

... and done. A new key in shipdata.plist has been added, namely hyperspace_motor_spin_time. If not set, it defaults to 15.0 seconds countdown. If set, the countdown time will be whatever number you set it to. This way, different ships can have different hyperspace motors (i.e. motors that take a long time to spin or others that can spin up really fast).

Game tactics can be affected by this. Players intending to ramp up their kill count by deliberately getting into trouble may want to acquire a ship with a quick-spin motor, just to be able to get out of said trouble in a flash, if they have to. Obviously, at this time, all ships are the same, but this may be something to keep in mind for future designs.

One other thing to note is that, if you have any of the custom sounds OXPs that have a timed sound file for the countdown and you change the default HMST, the voice counting down will be completely out of sync with the actual countdown on screen. Also, ships with spin times longer than 15 to 20 seconds may not be capable of completing the Nova mission,
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 »

another_commander wrote:
... and done. A new key in shipdata.plist has been added, namely hyperspace_motor_spin_time. If not set, it defaults to 15.0 seconds countdown. If set, the countdown time will be whatever number you set it to. This way, different ships can have different hyperspace motors (i.e. motors that take a long time to spin or others that can spin up really fast).

Game tactics can be affected by this. Players intending to ramp up their kill count by deliberately getting into trouble may want to acquire a ship with a quick-spin motor, just to be able to get out of said trouble in a flash, if they have to. Obviously, at this time, all ships are the same, but this may be something to keep in mind for future designs.

One other thing to note is that, if you have any of the custom sounds OXPs that have a timed sound file for the countdown and you change the default HMST, the voice counting down will be completely out of sync with the actual countdown on screen. Also, ships with spin times longer than 15 to 20 seconds may not be capable of completing the Nova mission,
read/write or read-only ?.. i suggest making it read/write...

Since i then can make Equipment that Jumps you out, in a jiffy, at a cost ofcourse... ;-P
Bounty Scanner
Number 935
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Frame wrote:
read/write or read-only ?.. i suggest making it read/write...
Actually, it is just a key in shipdata.plist, like fuel, max_energy, etc. It is not under JavaScript control yet, but once a ship has been set up from shipdata, the value remains fixed. May add JS visibility if I manage to find the time to do it.
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6885
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Post by Disembodied »

There is a function listed in the keyconfig.plist (at least, in 1.68's keyconfig.plist) as <key>key_emergency_hyperdrive</key>, but I don't think it ever did anything. Might this be made to do something here, if you had something like a one-shot (random destination?) drive-spinner-thing?
User avatar
Amen Brick
Deadly
Deadly
Posts: 187
Joined: Sat May 10, 2008 5:22 pm
Location: Bolton!

Post by Amen Brick »

How's about an 'emergency' witchspace jump that takes no time, but you have no control over which nearby system you land in, which could put you in deeper doodoo or safe?
User avatar
JohnnyBoy
---- E L I T E ----
---- E L I T E ----
Posts: 490
Joined: Mon May 05, 2008 9:41 pm
Location: West Sussex, UK (rich agricultural)

Post by JohnnyBoy »

Yeah, you'll know you've jumped into a TL1 Anarchy system, when there's a "welcoming party" waiting for you at the witchspace beacon... :(
"That's no vicious Treeoid. That's my wife."
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Post by TGHC »

Amen Brick wrote:
How's about an 'emergency' witchspace jump that takes no time, but you have no control over which nearby system you land in, which could put you in deeper doodoo or safe?
That would be a wormhole. :wink:
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
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 »

What about being able to install different hyperdrives in your ships. Better engines take more room or are more expensive.
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
kermit
Average
Average
Posts: 10
Joined: Mon Oct 06, 2008 11:21 am

Post by kermit »

another_commander wrote:
... and done. A new key in shipdata.plist has been added, namely hyperspace_motor_spin_time. If not set, it defaults to 15.0 seconds countdown. If set, the countdown time will be whatever number you set it to.
Can we have a little bit more info - I like the idea of smaller ships having faster witchspace countdown

The only 'Shipdata.plist' I can find is in '\oolite.app\Resources\Config' so I guess this is it (I'm running Oolite off a USB Flashdrive)

I also assume that you place 'hyperspace_motor_spin_time' in one of the 'player' groups (I've got a cobra mk 3 so it'll be in '"cobra3-player" =' section for example)

I've tried this hyperspace_motor_spin_time = 5; (placed it just after 'thrust = 32'), but countdown stays at 15secs

Am I putting it in the wrong place ??

I'm using WindowsXP with Oolite v1.71.2 (OXP = fighterHud/SystemRedux)
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

kermit: All of what you did to get it to work is correct (and you will also have to press and hold Shift next time you restart Oolite), except for one detail:
This is a feature coming up in v1.72. ;-)
User avatar
kermit
Average
Average
Posts: 10
Joined: Mon Oct 06, 2008 11:21 am

Post by kermit »

Awww shame - I was looking forward to shorter Witchspace countdowns, but now I have to wait for v1.72 - dam :cry:

But what's this about 'holding shift' when restarting Oolite ?? :?

What is it/will it suppose to do ?

When do we hold shift down ?
> When we double-click 'RunOolite.bat'
> When Oolite main [black] screen pops up
> When asked 'Load New Commander ?'
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

I'll try to explain it as simply as I can: Oolite creates a cache file the first time it runs, which consists of almost all information read from all the Resources and OXP folders that it can locate. It does that in order to avoid having to look up this information during game time, thus improving performance. This cache file under Windows is located in [GameDir]\oolite.app\GNUstep\Library\Caches and is completely rebuilt every time you add or remove an OXP folder, since the game info changes. You may have noticed that the first startup - and any startup after removing or adding an OXP - takes considerably longer than normal to complete.

The catch is that if you just edit .plist files within a folder, the game information still changes, but Oolite cannot see the modifications. It has to see a folder removal or addition to rebuild its cache file. So, if you edit plists and start Oolite, it will still be reading information from its cache file, which does not contain your edits.

In order to get the game to see the modifications, you must hold Shift while doubleclikcikng the RunOolite.bat file. This instructs Oolite that it must unconditionally rebuild the cache file. This way, your changes are read in and incorporated for future use. How long you must hold Shift is something that cannot be determined exactly, but it is safe to say that if you keep it pressed until the spinning Cobra appears you can be sure that the cache has been rebuilt successfully.

This is why it is important to hold Shift when you edit shipdata.plist in your case. You are editing a file inside a game folder, so you must inform the game yourself of the change.

I hope this is clear enough and helps a bit.
User avatar
kermit
Average
Average
Posts: 10
Joined: Mon Oct 06, 2008 11:21 am

Post by kermit »

Many thanks for that - it made it very clear

It could explain why some 'alterations' I've done to 'fighterHUD' (like moving the clock over) has never shown up

Quite simply - this newbie didn't know about the Cache file
Post Reply