Page 5 of 31
Posted: Fri Jun 24, 2005 12:36 am
by Rxke
Arexack,
*shy voice:* erm, could you upload your models separately? I can't get the hang of Wings (I'm not trying hard enough, I guess...) and when I try to export to .obj file, to then export to .dat/png... I get confusing stuff.... like three stationmodels, and i don't know how to seperate them....
or could you-if it's not too much bother- mail the .dat and pngs to me or put them up at the Yahoogroups? (sent you a PM with email)
Posted: Fri Jun 24, 2005 3:08 am
by Rxke
5 AM, and not much to show...
put the last 'nightly build' (oh the irony) up at the groups, ...
I wanted to get the coord system hammered down, but i cant reliably spawn objects...
some stuff at the right place, but never all of them. (6 mega-buoys at a rough sphere... I succeeded once, but forgot how, and now ... mind melting, mosquitos draining me moths circling around monitor... dizzy.... heehee.
Posted: Fri Jun 24, 2005 3:14 am
by Rxke
oh, btw: if you actually feel like running the oxp, go up to the tripplebuoy (me bad, its three stations plus a ship!) and rocket/shoot it till it blows. No matter how far you are, you blow up first, and there appears a *VVERY WEIRD* thing on the radar, just before you blow up... an expanding oval of some sorts...
New secret weapon?
(EDIT)
newbie launches a mine w/o realising it and thinks it's a secret weapon
Posted: Fri Jun 24, 2005 7:05 am
by aegidian
Selezen - I took a look at the script on your site for creating the orbital graveyard.
Currently, it adds the objects when you launch from the station or exit witchspace. Did you know that you can also write in a file called planetinfo.plist which provides overrrides for local and global elements in each system?
You could have your script execute from there each time the system for Tionisla is created by Oolite, thus:-
planetinfo.plist (in old-style ASCII plist form):
Code: Select all
{
"0 124" = {
"script_actions" = (
"checkForShips: gravestation",
{
conditions = ("shipsFound_number lessthan 1");
do = ( "addShipsAt: grave_station 1 psu 0 0 0.1" );
},
"checkForShips: gravebeacon",
{
conditions = ("shipsFound_number lessthan 1");
do = ( "addShipsAt: grave_beacon 6 psu 0 0 0.1" );
},
"checkForShips: gravemonument1",
{
conditions = ("shipsFound_number lessthan 1");
do = ( "addShipsAt: grave_monument1 50 wpu 0 0 0.1" );
},
"checkForShips: gravemonument2",
{
conditions = ("shipsFound_number lessthan 1");
do = ( "addShipsAt: grave_monument2 50 wpu 0 0 0.1" );
},
"checkForShips: gravemonument3",
{
conditions = ("shipsFound_number lessthan 1");
do = ( "addShipsAt: grave_monument3 50 wpu 0 0 0.1" );
}
);
};
}
[edited to remove bug!]
And well done for managing to do this without a computer to run it on. I only found one (repeated) error in your script - which was that the
between entries - should have been a comma instead.
Posted: Fri Jun 24, 2005 8:43 am
by dajt
aegidian wrote:Currently, it adds the objects when you launch from the station or exit witchspace. Did you know that you can also write in a file called planetinfo.plist which provides overrrides for local and global elements in each system?
I have made the same mistake with my oxps - thanks for the tip.
Also, it's great you guys are working on the Tionisla GY :)
Posted: Fri Jun 24, 2005 8:43 am
by Arexack_Heretic
Rxke wrote:Arexack,
*shy voice:* erm, could you upload your models separately? I can't get the hang of Wings (I'm not trying hard enough, I guess...) and when I try to export to .obj file, to then export to .dat/png... I get confusing stuff.... like three stationmodels, and i don't know how to seperate them....
or could you-if it's not too much bother- mail the .dat and pngs to me or put them up at the Yahoogroups? (sent you a PM with email)
Sorry for the confused mail, Ryxe.
I'll upload a seperate model in obj format. Plus skins in PNG.
(I uploaded in wings-format for easy viewing/editing of skins etc.)
So: Undertaker is to become a beacon? >Need for new skin.
Or is it going to be a perimeter sub-station-base? Or both?
edit: would it be better to generate new shipmodels+single skinfile or use the ingame models+3skinfiles for the derelict ships?
Or is every extra skin also an extra complete shiptype entry?
(In which case a single skin would be better)
Not talking about monuments or debris-ships.
Posted: Fri Jun 24, 2005 9:29 am
by Rxke
1) Giles: good tip, probably way to go (surely way to go)
but how on earth... well nevermind.
Oh, and i fixed the brackets, and some other stuff.
But *still* can't find a reliable way to generate 6 copies of ONE item ons specified points. (XYZ) sometimes i get one, sometimes 2 or three... confusing. Gonna try to do it in planetinfo.plist, frobably more error-proof...
Arexack, thanks for the uploads. I'll have a look at then *and* going to try Wings again...
Undertaker: given its size and structure: indeed a cross 'btween sub-station, and beacon (so sending messages, launch fighters etc... I think the skins are ok,
>....would it be better to generate new shipmodels+single skinfile or use the ingame models+3skinfiles for the derelict ships?
Whatever you fancy, thoug there should be some existing models, so from the game, but also I guess model you won't see anywhere else, either because so old or from farawayciv etc...
extra skins= indeed extra entry, skins taking most memory, 'caus grapics file, ship.dat not too much, but yes, every skin, different entry. so rusty1adder, rusty3adder for same model w/ diff skins or shinyadder, shinyadder1: same skin diff model....
Posted: Fri Jun 24, 2005 11:11 am
by Arexack_Heretic
Ok.
I didn't really mean NEW ships, (although there will be some) rather;
I meant, the skins Aeg gives are projection-wrapped (Top/bottom/rear),
as I see it, when I take the same model, re-map the UV-skin, the UV-coordinates are specific for that model. In essence making it a new ship. Although it is an exact copy verticewise.
confused? I am.
What I was trying to ask was:
Is it worth it, memorywise, to condense the 3 skins into a single skin for (simple/standard) derelics?
Or should we modify the 3 skins supplied?
idea: Maybe for simplicity, we could just take a 'rustymetal'-image and use that as the common/shared skin for some derelict-hulls, adding a second/third to add detail, such as engines. Or would this make objects look too similar?
ps I am working on a Broken Boa right now, 4 pieces.
Don't know how to do the interior!
Difficult adding boxes etc in wings)
Posted: Fri Jun 24, 2005 11:34 am
by aegidian
Rxke wrote:But *still* can't find a reliable way to generate 6 copies of ONE item ons specified points. (XYZ) sometimes i get one, sometimes 2 or three... confusing. Gonna try to do it in planetinfo.plist, frobably more error-proof...
The problem here is that I didn't design the addShips routines with very precise positioning in mind.
Instead the coordinates for each ship are randomised within a large cube surrounding the coordinates given. Occasionally these coordinates will overlap and *poof* bang go two ships.
I'm rejigging the routines for v1.52.
For the most part this involves ensuring that when multiple ships are added at once that they don't overlap. However, I think I should also rework it so that the ships are added as close as possible to the coordinates given.
I'll give it a go today and see if I can't make it work at least a bit better.
Posted: Fri Jun 24, 2005 12:04 pm
by Rxke
almost gnawed my keyboard to death, thinking i was really stupid... Turns out what we want to do (precise positioning) isn't supported (yet
)
BTW Giles: you say the m stands for meters, but that doesnt feel right... is it actually meters, or closer to kilometers?
BTW2 tried the planetinfo.plist, almost identical to yours, (edit: then identical to yours...) it get parsed (at least: i get no errormsg anymore) but does nothing... normally it should throw a lot of flags (errors, actually, but I use 'em as a poor man's flag...) Oolite just hangs during initialisating
the plist you put up here, some posts higher, is that sufficient, or does it need more?
update: d'oh! put two spaces tween gal and planet numbers... now one, but...
24 15:57:44.155 Oolite[497] *** -[NSCFArray keyEnumerator]: selector not recognized
2005-06-24 15:57:44.156 Oolite[497] Exception raised during posting of notification. Ignored. exception: *** -[NSCFArray keyEnumerator]: selector not recognized
(Off Googling)
(Edit: found nothing)
BTW: can one convert the ascii plists to the other type (the ones that say <dict> etc, with the <XML version...... stuff at the beginning)
Posted: Fri Jun 24, 2005 4:18 pm
by aegidian
Rxke wrote:BTW: can one convert the ascii plists to the other type (the ones that say <dict> etc, with the <XML version...... stuff at the beginning)
Yes, use
Property List Editor.app.
For debugging .plists you can also use the command
plutil in Terminal.app — just type
plutil and a space then drag your .plist file into Terminal's window (which adds the path to the file to the command line) and press return.
Posted: Fri Jun 24, 2005 9:33 pm
by Selezen
Hi everyone. Cor! Loads to catch up on. Sorry for not being around today - a combination of son's birthday and having an asthma attack that warranted being taken to hospital have kept me away from computers today.
Thanks for the compliment, Giles. It's more a testament to how easy you have made it to create addons. Nice to know that I'mon the right track with this stuff though!!
Question though. Installing OXPs. As the PC lacks some of the more useful Mac methods for installing stuff, I am forced to use crappy Windows methods to try installing stuff. As such, I am copying the files manually to where I think they need to go.
In my oolite-linux folder I have two places that seem to be right. I have assumed that the Resources folder is the right place to put them (it has the right subfolders) but there's an oolite-app folder too. I have assumed that this is the source code area.
If I just copy the files into the Resources folder, will they overwrite any important information?
I take it the planetinfo.plist file goes into the Config dir? If I use the ASCII format instead of the XML format will this mean the information might be incorporated? I know that dajt said the XML files can't be read, which is why OXPs aren't working in the PC version yet.
I may not get to do a lot of work on this today - I still feel like poo. I'm going to try to add the planetlist info and see what happens - now that I have a save game at Tionisla I might try and have a look...
EDIT: copying the files over is not a good idea - it overwrites the existing ones, stripping all of the required information out of the files. My script.plist and shipdata.plist files now ONLY contain information about the graveyard and nothing about the game as a whole.
Poo. Time to decompress the original files AGAIN!!!
EDIT 2: OK, when I create a planetinfo.plist file, I get an error from GNUStep:
NSInvalidArgumentException: GSMutableArray(instance) does not recognise keyEnumerator
My code (testing) is:
Code: Select all
{
"0 124" = (
{
"script_actions" = (
"checkForShips: adder",
{
conditions = ("shipsFound_number lessthan 1");
do = ( "addShipsAt: adder 5 wpu 0 0 0" );
}
);
}
);
}
The same error occurs when I use Giles' graveyard version from earlier.
I take it that the checkForShips: object can be anything listed in the shiplist.plist file?
Posted: Fri Jun 24, 2005 10:40 pm
by aegidian
Selezen wrote:Question though. Installing OXPs. As the PC lacks some of the more useful Mac methods for installing stuff, I am forced to use crappy Windows methods to try installing stuff. As such, I am copying the files manually to where I think they need to go.
For the removal of doubt OXPs should always be placed in a folder named 'AddOns' in the same folder as Oolite.app.
Selezen wrote:If I just copy the files into the Resources folder, will they overwrite any important information?
Yes, don't put them there. Oolite will look in AddOns if it's there and look for items in a similar directory structure to that in the the Resources folder ie:
AddOns
for folders/packages with the .oxp extension
AddOns/Config
for scripts and configuration files (
all .plist files unless they're in a subfolder of a .oxp)
AddOns/Models
for .dat files
AddOns/Music
AddOns/Sounds
AddOns/Textures
for .png files and other images referenced by .dat files and .plist files
Selezen wrote:I take it the planetinfo.plist file goes into the Config dir? If I use the ASCII format instead of the XML format will this mean the information might be incorporated? I know that dajt said the XML files can't be read, which is why OXPs aren't working in the PC version yet.
Yes, and yes if you use the ASCII format files should get read okay.
Selezen wrote:OK, when I create a planetinfo.plist file, I get an error from GNUStep:
NSInvalidArgumentException: GSMutableArray(instance) does not recognise keyEnumerator
Yeugh. I made a mistake and wrapped array brackets around the dictionary.
Your code should look like this (and I'll correct my code above!)
Code: Select all
{
"0 124" = {
"script_actions" = (
"checkForShips: hunter",
{
conditions = ("shipsFound_number lessthan 1");
do = ( "addShipsAt: hunter 5 wpu 0 0 0" );
}
);
};
}
Selezen wrote:I take it that the checkForShips: object can be anything listed in the shiplist.plist file?
It checks for ships that have their
roles attribute set to the desired value. When ships are added to the universe they're assigned a particular role from the list in their
shipdata.plist entry. So if you are checking for a particular ship you have to ask for it by its role rather than the identifier for the object.
So, for example, in the code above I changed
adder to
hunter (a role an adder might have). If you have a special adder defined in
shipdata.plist you might add
adder-special (or some othjer unique identifying name - with no spaces) to the
roles it may have and go on to use
adder-special in place of
hunter in the test example.
If any of that's unclear ask me more questions and I'll try to clarify!
Posted: Fri Jun 24, 2005 10:59 pm
by Selezen
Thanks for that...
So the structure for an addons directory could be AddOns/graveyard.oxp/<content> ?
Would the planetdata.plist file for the graveyard thus be in oolite.app/AddOns/graveyard.oxp/Config?
Now at least I know what arrays look like in Oolite!!
That's all great - I'm gonna go tryh it out now with a cargopod cluster appearing at the Tionisla witchpoint!
Is there a list of planets anywhere? (so I can match up planet names to numbers)
Also, how do I place something relative to the space station? Does the station have a predetermined location relative to the planet, or is the position hardcoded?
Posted: Fri Jun 24, 2005 11:15 pm
by aegidian
Selezen wrote:So the structure for an addons directory could be AddOns/graveyard.oxp/<content> ?
Yes, by George you've got it!
Selezen wrote:Would the planetdata.plist file for the graveyard thus be in oolite.app/AddOns/graveyard.oxp/Config?
Ideally yes, and that's planet
info.plist.
Oolite checks all the relevant files in it's own folder and in the corresponding places in Addons and in the corresponding places in .oxp folders within AddOns, and compiles extended arrays and merged dictionaries from what it finds.
Selezen wrote:That's all great - I'm gonna go try it out now with a cargopod cluster appearing at the Tionisla witchpoint!
Is there a list of planets anywhere? (so I can match up planet names to numbers)
Well, I'm not sure if it's working in the PC version but try going to the Galactic Chart map and pressing '!' (shift-1 on my keyboard). It should dump the map and a key to planets and system numbers to your Oolite folder.
Selezen wrote:Also, how do I place something relative to the space station? Does the station have a predetermined location relative to the planet, or is the position hardcoded?
The location of the space station is determined pseudo-randomly for each system (in other words it's always in the same place in Tionisla, but this will not be at the same coordinates as it is in Lave, or Orerve, or anywhere else). Unfortunately this means that in order to place objects near it, you'll have to work by trial and error in the system you want to customise.
I may have to code up a special addition to the HUD to show your ship's position according to one of the coordinate systems so that this can be made easier...