@tycho, on Dec 18 2008, 05:43 PM, said in attn: plugin developers:
if multiple weapons use the same snd, then it would merely be some kind of symbolic link....
Or hard link? Anyways, I still don't think the benefits of such a thing would be worth the effort, at least if it was to be a special "EV-plug FS". Of course if the format is just zip then it's up to the user how they manage that archive and they are free to use FUSE if they so desire
@tycho, on Dec 18 2008, 05:43 PM, said in attn: plugin developers:
yep, that's what i'm thinking. could use FUSE here as well. zip the bundle, then "mount" the zip in memory.
do you think this would eliminate the need for an editor? the dev basically decides on whatever tools they want to use, then saves the files in the bundle.
If it's all just zip and xml then obviously you don't need an editor but editing the xml will be no better than ResEdit templates. There are no bounds on the possible features of an editor - imagine a full-blown plugin IDE complete with collaboration tools including subversion or git
But you're right, it does mean editing can be done without any special tools so you wouldn't need to focus on writing an editor of some sort.
@tycho, on Dec 18 2008, 05:43 PM, said in attn: plugin developers:
yep, thinking of binary plists would be best(fastest?). but i don't really want to stop cross platform plugin creation. seems an odd consideration, but i think it's one worth thinking about.
I haven't dealt with reading plists within a program before but surely the cocoa libraries wouldn't care whether they were text or binary, right? It'd simply be up to the plug dev as to which format they save their plists in.
@tycho, on Dec 18 2008, 05:43 PM, said in attn: plugin developers:
i agree. ID's are old hat. the file's path would be enough to use as a unique identifier. and since the macos will not allow you to have 2 files with the same name in the same directory, it's perfect!(and no, i'm not considering case-sensitive hfs :D)
Oh, so you're thinking one file per resource? I just thought it might be simpler to use only one file with arrays of resources. Anyway, it would work fine that way though you would only need the filename (minus the extension) as the identifier rather than the whole path (you wouldn't care if you had both outfit/BigGun.plist and weapon/BigGun.plist as they're different resource types). Remember you'll be using this identifier when one resource references another and you don't really want to be typing in long paths all the time
@tycho, on Dec 18 2008, 05:43 PM, said in attn: plugin developers:
i didn't really make myself clear, but inheritance would work inside plugs as well as across multiple ones. yep, i think we're on a winner here.
Ah, yeah I didn't quite understand what the purpose of plug-in inheritance was as opposed to simply overriding or inheriting from single resources. Say plug X contains a ship with identifier "SuperShip" then you make plug Y with "SuperShip" which will override plug X's "SuperShip" according to the alphabetical ordering of the plugs (the same way EV currently works but with these identifier names rather than IDs).
@tycho, on Dec 18 2008, 05:43 PM, said in attn: plugin developers:
i keep thinking of a sprite map with no colour. you could easily create a fleet of them of different rank/version by inheriting a different coloured mask on them. obviously this would reduce plug size considerably(if made correctly).
Heh, yeah I've thought of a similar thing myself but for Nova. Various different methods using alt sprites or running lights (which can be transparent) and PICT-based sprites of solid colours, allowing easy 'painting' of only parts of a ship (rather than the whole ship). I don't quite understand how inheritance would be relevant here though.
Data Sets
There are some places where are resource needs to reference a single, fixed resource of some other type (eg, a syst needs a govt, a weapon-type outf needs a weap). In this case you can simply enter the identifier for the desired resource.
There are other cases where a single resource is needed but there is no need for it to be fixed - it could be a different resource each time you encounter it (eg, a misn needs an 'availstel' spob, a spob needs a landing image). Then there are cases where multiple resources may referenced (eg, systs contain multiple ship types, ships have multiple different weaps). In these cases, you could simply enter a list of all the different identifiers desired.
...Or you could use a highly flexible approach and describe a complex data set using something like:
("Kestrel" | "Zephyr" | {"govt"="Federation" || ("techlevel">5 && "cost">1000000 && "cost"<3000000)}) & !"Raven"
Here we've specified a number of data sets and combined them together with | (union) and & (intersection). The first two are single identifiers and are equivalent to sets containing just that one element. The third is a query and contains all elements that match those conditions. The fourth is a set containing everything except the Raven. The result is a set containing the Kestrel, the Zephyr, everything belonging to the Federation and everything with tech level greater than 5 and cost between 1m and 3m, but excluding the Raven.
A set could be saved (as a dsët resource :p) and easily referred to at any time:
"Shuttle" | (@"SuperShips" & !@"CheatShips")
Here I've arbitrarily decided to use the @ symbol to indicate a set as opposed to an identifier for a single resource (this might not be very good syntax but it'll do fine for my example).
This allows us to do away with things like govt classes (or outfit classes). We can use data sets to finely control what weapons trigger weapon animations on what ships, what outfits trigger the 'keycarried' appearance of a ship, even what ships and outfits are available at a particular spob, rather than specifying a techlevel plus half a dozen specialtechs. Or allow a planet to have a random landing pic, which was so complicated in ARPIA 2.
This post has been edited by Guy : 18 December 2008 - 06:17 PM