MadBeardMan
April 14th, 2018, 17:10
Folks,
Is there a nice easy way for me to remove the 'Effects' button (shown top right on the desktop).
I can see that CoreRPG creates the node and shares it public. For Traveller I won't be using them so would like to remove the button.
Cheers,
Col
Trenloe
April 14th, 2018, 17:17
Look at scripts\data_desktop.lua - this sets up the various buttons in buildDesktop - which uses the aCoreDesktopStack table to build the little buttons in the top right.
MadBeardMan
April 14th, 2018, 17:24
Look at scripts\data_desktop.lua - this sets up the various buttons in buildDesktop - which uses the aCoreDesktopStack table to build the little buttons in the top right.
Yes and looked and you have to copy a lot of the code, plus when I added the basic code it doubled up the buttons.
Trenloe
April 14th, 2018, 17:32
Try just overriding Desktop.aCoreDesktopStack in your ruleset. You don't need to replicate any of the code.
MadBeardMan
April 14th, 2018, 17:32
Look at scripts\data_desktop.lua - this sets up the various buttons in buildDesktop - which uses the aCoreDesktopStack table to build the little buttons in the top right.
Ok I just copied data_desktop into my folder, renamed it 'data_desktop_traveller.lua' and in base.xml added:
<script name="Desktop" file="scripts/data_desktop_traveller.lua" />
I'm not a fan of overriding stuff like this incase it all gets changed, so I hoped there was a one/two line command to remove the button rather than overriding the entire build desktop function.
However it now doesn't show the button, so that's fine if this is the correct way to remove buttons.
Cheers,
Col
MadBeardMan
April 14th, 2018, 17:36
Try just overriding Desktop.aCoreDesktopStack in your ruleset. You don't need to replicate any of the code.
That does nothing.
File is called 'desktop_traveller2.lua' holds on the aCoreDesktopStack
In base.xml
<script name="DesktopTraveller" file="scripts/data_desktop_traveller2.lua" />
Tried /reload and quitting/reloading and the FX button still exists.
Cheers,
Col
Trenloe
April 14th, 2018, 17:37
If you have the Savage Worlds ruleset, look in scripts\data_desktop_sw.lua for an example of overriding Desktop.aCoreDesktopStack
MadBeardMan
April 14th, 2018, 17:38
If you have the Savage Worlds ruleset, look in scripts\data_desktop_sw.lua for an example of overriding Desktop.aCoreDesktopStack
I do, looked at SW and found out earlier when doing WOiN that it does a lot of overriding of things, thanks for the help. I'll solve this, just finding all the little things take all the time!
Cheers,
Col
MadBeardMan
April 14th, 2018, 17:48
If you have the Savage Worlds ruleset, look in scripts\data_desktop_sw.lua for an example of overriding Desktop.aCoreDesktopStack
Bingo! Worked a treat, very minimalist which I like:
--
-- Please see the license.html file included with this distribution for
-- attribution and copyright information.
--
function onInit()
Desktop.aCoreDesktopStack["host"] = aCoreDesktopStack["host"];
Desktop.aCoreDesktopStack["client"] = aCoreDesktopStack["client"];
end
aCoreDesktopStack =
{
["local"] =
{
{
icon="button_color",
icon_down="button_color_down",
tooltipres="sidebar_tooltip_colors",
class="pointerselection",
},
},
["host"] =
{
{
icon="button_ct",
icon_down="button_ct_down",
tooltipres="sidebar_tooltip_ct",
class="combattracker_host",
path="combattracker",
},
{
icon="button_partysheet",
icon_down="button_partysheet_down",
tooltipres="sidebar_tooltip_ps",
class="partysheet_host",
path="partysheet",
},
{
icon="button_calendar",
icon_down="button_calendar_down",
tooltipres="sidebar_tooltip_calendar",
class="calendar",
path="calendar",
},
{
icon="button_color",
icon_down="button_color_down",
tooltipres="sidebar_tooltip_colors",
class="pointerselection",
},
{
icon="button_light",
icon_down="button_light_down",
tooltipres="sidebar_tooltip_lighting",
class="lightingselection",
},
{
icon="button_options",
icon_down="button_options_down",
tooltipres="sidebar_tooltip_options",
class="options",
},
{
icon="button_modifiers",
icon_down="button_modifiers_down",
tooltipres="sidebar_tooltip_modifiers",
class="modifiers",
path="modifiers",
},
},
["client"] =
{
{
icon="button_ct",
icon_down="button_ct_down",
tooltipres="sidebar_tooltip_ct",
class="combattracker_client",
path="combattracker",
},
{
icon="button_partysheet",
icon_down="button_partysheet_down",
tooltipres="sidebar_tooltip_ps",
class="partysheet_client",
path="partysheet",
},
{
icon="button_calendar",
icon_down="button_calendar_down",
tooltipres="sidebar_tooltip_calendar",
class="calendar",
path="calendar",
},
{
icon="button_color",
icon_down="button_color_down",
tooltipres="sidebar_tooltip_colors",
class="pointerselection",
},
{
icon="button_modifiers",
icon_down="button_modifiers_down",
tooltipres="sidebar_tooltip_modifiers",
class="modifiers",
path="modifiers",
},
{
icon="button_options",
icon_down="button_options_down",
tooltipres="sidebar_tooltip_options",
class="options",
},
},
};
Cheers chap, all done. Now time for dinner.
Back later to finish up the final few things....
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.