PDA

View Full Version : 'Tactics' Tab for CoreRPG Encounters..



Blackfoot
May 11th, 2016, 19:48
I'm working on an extension to create a 'Tactics' tab for encounters. A place to put the tactics for the encounter rather than the monster... which makes a good deal of sense seeing as the same monster can be used over and over in different encounters and have different tactics in each one...

Anyway.. I need to create a new Tab that says 'Tactics'.. what is the font and font size used in those tab graphics?

Trenloe
May 11th, 2016, 19:53
https://www.fantasygrounds.com/forums/showthread.php?20790-Font-Name-Please

Blackfoot
May 11th, 2016, 20:13
Thanks. I'm not sure that's actually right... but it is at least a step in the right direction. :)
The Poor Richard I have looks pretty different... I guess there's no official info anywhere for this stuff... Font size looks to be somewhere around 13.. ish.

Moon Wizard
May 11th, 2016, 20:59
We actually inherited the tabs, and have been trying to match the font as well. We usually go for close enough. :)

JPG

Blackfoot
May 11th, 2016, 22:34
Hrm. Might it be a good idea to do 'all new' ones that have one font (that you keep on file)? Not suggesting that they be vastly different.. just would be easier to be consistent if you actually had the font there at the office. :)
There are probably some fonts that are pretty cool, easy to read, and commonly available. Hrm. Anything that ships with Windows is probably fairly common to everyone. Hrm.
Verdana maybe?
Or perhaps Trebuchet? Trebuchet seems like it would have a similar issue with Poor Richard.. it gets kinda compact and bunched up when small.
Palatino Linotype is generally clear and easy to read.. Verdana seems to be the best of those... in terms of clarity.. but not a lot of 'fun'.
Book Antiqua is fun.. but does get harder to read again.
Century Gothic is great.. but not very playful... and 'thin' when reduced.

damned
May 12th, 2016, 05:41
I think Verdana wouldnt work as its quite a wide font.
I use Poor Richard for CoreRPG.
You could absolutely replace all of the tabs in your Tactics Extension - it would not be a whole lot more work.

Blackfoot
May 13th, 2016, 00:53
I'm having an issue with this thing that I can't quite figure out. I have it all working, except that it isn't hiding the extra stuff when the tabs are switched.

<root>
<windowclass name="battle" merge="merge">
<script file="campaign/scripts/encounter_tactics.lua" />
<sheetdata>
<genericcontrol name="contentframe">
<anchored>
<top parent="header" anchor="bottom" offset="15" />
<left offset="35" />
<right offset="-45" />
<bottom offset="-57" />
</anchored>
<invisible />
<frame name="groupbox" offset="20,17,20,17" />
</genericcontrol>

<ft_record name="text">
<anchored to="contentframe" position="over" />
<!--<invisible />-->
</ft_record>

<subwindow_record name="npcframe" mergerule="replace">
<anchored>
<right offset="-45" />
<bottom offset="-57" />
</anchored>
<invisible />
</subwindow_record>
<tabs_recordsheet>
<tab>
<icon>tab_main</icon>
<subwindow>npcframe</subwindow>
</tab>
<tab>
<icon>tab_tactics</icon>
<subwindow>contentframe</subwindow>
</tab>
</tabs_recordsheet>

<scrollbar>
<target>text</target>
</scrollbar>

</sheetdata>
</windowclass>
</root>

This is trying to overlay..

<windowclass name="battle">
<frame>recordsheet</frame>
<placement>
<size width="350" height="400" />
</placement>
<sizelimits>
<minimum width="350" height="400" />
<dynamic />
</sizelimits>
<minimize>minimized_combat</minimize>
<tooltip field="name" />
<nodelete />
<script file="campaign/scripts/encounter.lua" />
<sheetdata>
<sub_record_header name="header">
<class>battle_header</class>
</sub_record_header>

<frame_record_content name="npcframe">
<anchored>
<bottom offset="-57" />
</anchored>
</frame_record_content>

<label>
<anchored to="npcframe" position="insidetopleft" offset="13,0" />
<static>#</static>
<center />
</label>
<label>
<anchored to="npcframe" position="insidetopleft" offset="33,0" />
<static textres="battle_label_token" />
<center />
</label>
<label>
<anchored to="npcframe" position="insidetopleft" offset="90,0" />
<static textres="battle_label_name" />
<center />
</label>

<windowlist name="npcs">
<anchored to="npcframe" position="over">
<top offset="25" />
<right offset="-5" />
</anchored>
<child><backcolor>1A40301E</backcolor></child>
<child></child>
<datasource>.npclist</datasource>
<class>battle_npc</class>
<allowdelete />
<sortby><field>name</field></sortby>
<empty font="list-empty" gmtextres="battle_emptylist" />
<script file="campaign/scripts/encounter_npclist.lua" />
</windowlist>
<scrollbar>
<anchored to="npcs" />
<target>npcs</target>
</scrollbar>

<button_iedit name="npcs_iedit">
<anchored to="npcs" position="aboveright" offset="5,10" />
<target>npcs</target>
</button_iedit>

<buttoncontrol name="addct">
<bounds>22,-40,33,26</bounds>
<icon normal="button_arrowdown" pressed="button_arrowdown_down" />
<tooltip textres="battle_tooltip_addct" />
<gmvisibleonly />
<script>
function onButtonPress()
if User.isHost() then
for _,vNPC in pairs(window.npcs.getWindows()) do
for _,vMapLink in pairs(vNPC.maplinks.getWindows()) do
vMapLink.deleteLink();
end
end

CombatManager.addBattle(window.getDatabaseNode());
Interface.openWindow("combattracker_host", "combattracker");
end
end
</script>
</buttoncontrol>

<resize_recordsheet />
<close_recordsheet />
</sheetdata>
</windowclass>npcs_iedit (and a few other things that can't be seen) isn't getting hidden when npcs is hidden when the tabs are switched.

Blackfoot
May 17th, 2016, 22:46
Anyone got any suggestions as to what I might be doing wrong here? Just to be clear.. it does not seem to be attaching the edit toggle to the tab.. (it isn't attaching a few other things.. but the edit toggle is the only one that's visible.. and then only when the item is 'unlocked' for editing) .. so when switching tabs the toggle appears in a tweaky spot (as shown in the image posted with my previous post). Not a big thing.. but not 'right'.

Trenloe
May 18th, 2016, 02:05
I'd recommend you get this working first in a full version of the "battle" windowclass (i.e. not a merged one), then look into moving your fully working windowclass into a merged windowclass.

Now, to your actual issue: you're not doing tabs/subwindows properly for this. The "encounters" windowclass was not implemented with subwindows/tabs, so you need to change the whole encounters windowclass to use tabs/subwindows. The way you've tried to do it in this extension is merge together some tabs/subwindow code into a windowclass that didn't have tabs to start with, which means that the controls on the "main" page are actually still present on the "Tactics" tab - you're just going to have issue, after issue going this way. I'd recommend you look at how the NPC record in CoreRPG is setup - you'll notice that the main tab is defined as a windowclass npc_main.

So, yeah, back to the drawing board, sorry.