Thanks for taking the time to mull this over.
So, for starters, if you want to try the current version you can get it from
here
This is the version i am now working on, and it includes a rather large mod
that shows it's use. I will be posting a separate topic on this mod, so for now let me just go over what has changed.
The way a hook is defined is now through an item. As a concept i have dubbed them advertisers. Let me show you its syntax
Code: Select all
<ItemType UNID="&it-DSAdvertiser;"
name= "DockScreen Advertiser"
frequency= "notrandom"
modifiers= "ScreenHook; ShipInterior; CannotOrder; NotForSale;"
>
<Image imageID="&rsItems1;" imageX="0" imageY="288" imageWidth="96" imageHeight="96"/>
<StaticData>
<HookName>"DockscreenFrameworks"</HookName>
<HookText>"Although scared, you can't help but look."</HookText>
<HookScreen>"&dsSomePlotThatIs;"</HookScreen>
</StaticData>
</ItemType>
CannotOrder and NotForSale are required, since this item should never be in circulation (you don't want to buy a DSAvertiser!). What actually defines this item as an Advertiser is the "ScreenHook;" modifier. The "ShipInterior;" is an example of a hook that is being advertised. You can have any (sane) amount of hooks advertised in an item. Moving on to <StaticData>
In the <StaticData> we define the appearance and actions of this hook. There are quite a few fields that can be defined here, and they can all take functions. The advertiser above sets a title, subtitle and a target dockscreen. That is all it takes. Any screen that publishes "ShipInterior" hooks, will include this advertiser. Speaking of publishers, lets mention them.
A publisher is a screen that displays certain advertised hooks.
As an example, the overridden ShipInterior screen, publishes "ShipInterior" and "TerminalService" hooks. The hook screen itself has been abstracted away completely, so it is defined by the action that invokes it. As an example here is the action in the ShipInterior that invokes that screen.
Code: Select all
<Action name="External Interface" key="E">
(block Nil
(dsf_RunScreenHook
"&dsShipInterior;"
"Default"
'("+ShipInterior;" "+TerminalService;")
"External Interface"
"You feel a buzz as you hook into your External Interface")
)
</Action>
prevScreen, prevPane, paneDesc are optional and can be Nil (or left out in case ot paneDesc).
Off the top of my head, that is all there is too it. Try out the mod from the link above, and let me know if it makes any sense. It completely replaces the previous DockScreenHook files, so they shouldn't be played at the same time.
-------------------
So, I would like to comment some on the points you talk about.
The fact that this mod is *trying* to be "all-encompassing" is indeed it's biggest problem. Apart from the fact that I will use it myself, there is little point in releasing it as a framework if it doesn't suit people's needs. A game can only support so many mutually exclusive frameworks.
I have thought hard about the needs for building DS centric mods, and to this end I have built a DS Framework, that sits as an abstraction on top of the DS xml. Again, more about this in another post. You will find the framework included in the link above. The DSHook and the DSFramework will end up being one (almost are as we speak).
I have actually moved away from the randomized action naming. Not so much because I don't like it, but because for the ShipInterior screen (the only one i am working with at the moment) it became annoying and impractical.
It has actually been removed completely, and would have to be re-structured to work at the current moment.
On the idea of multiple actions, I kind of like it. My main problem with it is that having 8 or 9 actions on a DS, is more confusing than helpful (especially if they have randomized naming). As a solution to the 80000 hooks (that would be the day!) problem, I propose a filter. Eg. When a HookPublisher is set to show over a set amount of hooks, the default screen has a TextInput and a Filter action. This filter action shows only hooks with names matching the filter text. Then it would be quite simple to drill down to the required screen. (We could make something snazzy to avoid having to use the mouse).
Other than that, I don't think the ShipInterior DockScreen is mean't for combat lookups. A usable item with an Invoke Key is more suitable for that.
(and yes, an <Invoke key="B"> action *can* bring up a DS, almost every time )
So, enough about DockScreens for now. Look forward for you comments.
Have fun .]