PDA

View Full Version : more than 1 Minisheet.



Samarex
January 7th, 2016, 09:41
Question, Can you have more than 1 mini sheet branch off the main Sheet.
I am tryin to add a Ship minisheet to my main character sheet.
I got the button on there and have all the sheets as xml's for the ship but
the button keeps opening the main minisheet. there named differemt but cant seem to see where the button
knows what to open


<template name="button_charmini">
<windowreferencecontrol>
<icon normal="button_minisheet" pressed="button_minisheet_down" />
<class>charsheetmini</class>
<tooltip textres="char_label_minisheet" />
<description field="name" />
<script>
function onClickRelease(button, x, y)
local w = activate();
if w then
local tabindex = window.tabs.getIndex();
if tabindex == 1 or tabindex == 2 or tabindex == 6 then
w.tabs.activateTab(1);
elseif tabindex == 3 or tabindex == 4 then
w.tabs.activateTab(2);
elseif tabindex == 5 then
w.tabs.activateTab(3);
elseif tabindex == 7 then
w.tabs.activateTab(4);
end
end
return true;
end
</script>
</windowreferencecontrol>
</template>

<template name="button_charship">
<windowreferencecontrol>
<icon normal="button_miniship" pressed="button_miniship_down" />
<class>charsheetship</class>
<tooltip textres="char_label_minisheet" />
<description field="name" />
<script>
function onClickRelease(button, x, y)
local w = activate();
if w then
local tabindex = window.tabs.getIndex();
if tabindex == 1 or tabindex == 2 or tabindex == 6 then
w.tabs.activateTab(1);
elseif tabindex == 3 or tabindex == 4 then
w.tabs.activateTab(2);
elseif tabindex == 5 then
w.tabs.activateTab(3);
elseif tabindex == 7 then
w.tabs.activateTab(4);
end
end
return true;
end
</script>
</windowreferencecontrol>
</template>

Moon Wizard
January 7th, 2016, 18:03
You can have any number of minisheets that you want. The underlying data in the campaign database is not tied to any particular display window.

If I were looking at adding ships, there are a couple things I would think about:

1. A "minisheet" as we're talking about here is just another view of the same database record (i.e. a PC in this case)
2. Is the PC to ship relationship a one-to-one relationship? (i.e. each PC has exactly one unique ship that is only theirs and is not shared by other PCs) If not, then the ship data should not be part of the same database record as the PC.
3. Either way, you would need to build a separate ship record. This record would either be a child of the PC record (if one-to-one) or stored somewhere else (if not).
4. My guess would be that ships are not unique to each PC, so they should be stored in a top level campaign database node (such as "vehicles"). Then, you could drag and drop a link to the vehicle to a linkcontrol on the PC sheet. (The linkcontrol can look just like a button if you want.)

Regards,
JPG

Samarex
January 7th, 2016, 22:14
@Moon
Ok thanks for the reply. After reading your it I relize that I need to do as you said in 4. But if I do that (Basically making it a Item that can drop into there inventory. as some ships are Group ships and some are single person ships so there would be PC Property. But still that could be a item to make things easier. How could I go about making a separate Weapons section in the Actions Tab to separate Hand held and Ship Weapons.

Moon Wizard
January 7th, 2016, 22:41
You might want to ask around to see if you can get someone to work together with you on the Lua logic integration side. Unfortunately, I am always neck deep in building stuff for the core engine, or trying to move us to the next generation platform. There are others who have worked on vehicles within FG that may have more thoughts on this.

The biggest limitation for any vehicle is that the record can only be owned by one player, and only that player or the GM can edit the vehicle. However, anyone can activate entries on the vehicle as allowed by the ruleset, and can view the vehicle (if shared).

Here are some random thoughts:

1. How important is it to track vehicle to PC relationships?
a. If not that important, then I would suggest tracking in a notes field in either the PC or vehicle. Then, just share the vehicle record with the players who can use it. (drop on chat for share all, drop on portrait for share to single player). This will be the easiest to implement, since all you really need to do is focus on getting the ship (i.e. vehicle) records working and creating a campaign sidebar button for vehicles.

b. If important for both, then you would need to provide a list on the PC showing which vehicles are linked, and a list on the vehicle showing which PCs are linked. You can even tie this into visibility of the vehicle record with the right code. I would have the PCs open the vehicle sheet to make any vehicle attacks. You can potentially adjust attacks by the active character with the correct code. (assuming some sort of Gunnery skills are a factor)

c. Otherwise, pick how you want to track, and how much you want to implement.

2. The lists on a sheet are literally just list controls on the sheet. Each list control has a default window class that it will use to display any existing records in the source database node. New windows using any window class can be added to a list at any time via Lua. Lists can also be sourceless, which means that you generate and manage all the windows in the list. Based on some of the suggestions in 1b above, you would need someone comfortable with Lua to help you do these things.

Regards,
JPG