Page 1 of 1

Shaders - help required

Posted: Sun Jun 08, 2008 10:08 pm
by DaddyHoggy
In an attempt to run before I can walk (still haven't got to grips with wings3d) I was wondering how these new shaders work from a texture and scripting point of view.

I've downloaded shady cobra and freaky thargoids and I just don't get it - sorry.

Is there a definite thread I could be pointed at to read up on the nitty gritty of texturing and scripting for the shader?

Finally, some time over a year ago Littlebear created a tiny oxp that with a bit of jiggery-pokery made sure that one of your ships was sat just outside the station when you launched. I have searched but cannot find. Again, could somebody shove me in the right direction of the thread or reproduce the details here.

TIA

DaddyH

EDIT: D'oh! :oops: have just found: https://bb.oolite.space/viewtopic.php?t=3460&start=0 will investigate but may be back with question later!

Posted: Sun Jun 08, 2008 10:16 pm
by LittleBear
Just need to put this in a Script file:-

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict> 
   <key>testship</key> 
   <array> 
      <dict> 
         <key>conditions</key> 
         <array> 
            <string>status_string equal STATUS_EXITING_WITCHSPACE</string>
         </array> 
         <key>do</key> 
         <array> 
	   <string>addShipsWithinRadius: my_test_ship 1 wpm 0 0 4000 10000</string>
	     </array> 
      </dict> 
   </array> 

</dict> 
</plist>
A ship with the role "my_test_ship" will be added near the w/p everytime you jump anywhere. Give you ship the role "my_test_ship" then it'll be spawned by the w/p. If there is something wrong with your code though (for the ship) then it may not appear and you'll get an error report in the stdrr.

Posted: Sun Jun 08, 2008 10:37 pm
by DaddyHoggy
Much appreciated LB.

I'm now reading through Griff's shader explanation and I have to admit, I'm scared, excited, but definitely scared - I haven't got a hope!

Re: Shaders - help required

Posted: Mon Jun 09, 2008 9:01 am
by Commander McLane
DaddyHoggy wrote:
Finally, some time over a year ago Littlebear created a tiny oxp that with a bit of jiggery-pokery made sure that one of your ships was sat just outside the station when you launched. I have searched but cannot find. Again, could somebody shove me in the right direction of the thread or reproduce the details here.
You wanted the ship outside the station, not after the next jump. There are two ways to achieve that:

(1) change two lines in LB's code: STATUS_LAUNCHING instead of STATUS_EXITING_WITCHSPACE and "addSystemShips: my_test_ship 1 1" instead of the addShipsWithinRadius.

(2) and much easier: Install Debug.oxp, which adds a nice Debug-menu to Oolite, which contains the entry "Create Ship...". Click on that (or use the keyboard-shortcut), and enter the role of the ship you want to spawn in the pop-up box. The ship will be spawned close to the station. And you can repeat that as much as you want, with any role you want, without having to restart the game and edit a plist.

Posted: Mon Jun 09, 2008 9:30 am
by DaddyHoggy
@Cmdr M - now that sounds like an excellent oxp - this game/life has come on leaps and bounds since I was involved last time!