PDA

View Full Version : Question about encounters in the Classic Traveller ruleset



Andraax
June 7th, 2013, 03:22
I've been working on figuring this ruleset out. I can add some thugs into the encounters, but when I add a weapon to the thug under the combat tab, it doesn't take into account any skills that I add to general tab. Is there a special formula for entering the skill or whatever so that it takes the skill level into account?

Trenloe
June 7th, 2013, 05:19
The issue is that the skill field location is not correct in this community produced ruleset.

On the NPC you can see the headings Weapons, Skill, Damage and Info (which is a link to bring up a bigger window). The actual field for "Skill" is located with the damage field so it is virtually impossible to enter the skill level. But, try this:

Create a new weapon.
Type in the name and then press SHIFT+TAB - this will move the focus to the next right field which is the skill field. Type in the skill level.
Press SHIFT+TAB again and type in the damage - the entry will look terrible because the skill and damage are showing in the same location.

The following screenshot shows an example of this:
https://dl.dropboxusercontent.com/u/39085830/Screenshots/TravellerNPCWeaponSkill.JPG
I have entered:

"Body Pistol" - SHIFT+TAB - "2" - SHIFT+TAB "3D"
"Revolver - SHIFT+TAB" - "3"

You can see that the body pistol has a mess for the skill/damage as +2 and 3D are being displayed on top of each other. But, when the NPC is dragged to the combat tracker the +2 is applied and the "to hit" score is reduced from 8 to 6.

The issue is caused by the offset of the skilllevel control in adventure_npcs.xml is set to 5:

<NumberField name="skilllevel">
<anchored>
<to>damage</to>
<position>left</position>
<offset>5</offset>
<right>
<relation>relative</relation>
</right>
<size>
<width>40</width>
</size>
</anchored>
...
...
Where this really should be 40 (the width of the control):

<NumberField name="skilllevel">
<anchored>
<to>damage</to>
<position>left</position>
<offset>40</offset>
<right>
<relation>relative</relation>
</right>
<size>
<width>40</width>
</size>
</anchored>
...
...
So, if you feel like doing a little bit of XML modification in the ruleset this will fix the issue for you! :)

Andraax
June 7th, 2013, 06:01
Yup, that change from 5 to 40 makes it great!

Now, you have any tips on setting up animal encounters? If I put the "wounds" figure in for damage (which is typically a fixed # of hits), I can't just drag the number into the target's stat box to inflict the damage, and I can't drag it into chat, then drag it back, either.

I guess I could put the damage *dice* into the damage field...

Trenloe
June 7th, 2013, 07:29
The code in utility_combattracker.xml that handles items being dropped on Str, Dex or End (numberfields C1, C2 and C3 respectively) is looking for a type of "number" but it is actually a type of "string":

function onDrop(x, y, draginfo)
if draginfo.getType() == "number" then
setValue(getValue() - draginfo.getNumberData());
end
return true;
end

Changing this for C1, C2 and C3 to should cover the wounds field and still allow numbers to be applied as damage:

function onDrop(x, y, draginfo)
if draginfo.getType() == "number" then
setValue(getValue() - draginfo.getNumberData());
else
if draginfo.getType() == "string" then
setValue(getValue() - draginfo.getStringData());
end
end

return true;
end

Andraax
June 7th, 2013, 15:01
Actually, your code did not work. I did some digging and discovered that the dropped data type is "dice" rather than "string". Also, with type "dice", the return of getNumberData() is a 0 if an actual dice value is entered (something like "2d6") but if a fixed value is stored (something like "9"), then getNumberData() returns the value. So, the following code is good - if you put in a die roll, then it does nothing (forcing you to double click the die roll and then drag the result into the box, as you would expect), while if you put in a fixed value, dragging and dropping it will do what you expect.

Also, I added a quick check to prevent the number from dropping below 0. From the CT rules:

Once a characteristic has been reduced to zero, further points may not be applied to it; they must be applied to other (non-zero) characteristics.


function onDrop(x, y, draginfo)
local type = draginfo.getType();
if type == "number" or type == "dice" then
setValue(getValue() - draginfo.getNumberData());
end
if getValue() &lt; 0 then
setValue(0);
end
return true;
end

Trenloe
June 7th, 2013, 16:35
Actually, your code did not work.
Sorry, it was late last night when I replied and I should have mentioned what I was actually coding for... I was coding for dragging the "Wounds" value from an NPC "Animal" (specified by clicking the "Animal?" check circle in the top right hand corner of the "Stats" tab of the NPC). An "Animal" NPC has the wounds value displayed in the weapon section of the combat tracker and this is stored in a StringField.

So, I enter animals like this (taking the Hunter example from page 35 of Book 3):

https://dl.dropboxusercontent.com/u/39085830/Screenshots/CT%20Animal%20NPC.jpg

And then enter the weapon (Claws in this case) without any damage:

https://dl.dropboxusercontent.com/u/39085830/Screenshots/CT%20NPC%20Animal%20Weapon.jpg

This allows the attack to be rolled on the Combat Tracker and then the "Wounds" to be applied as damage - which matches the Classic Traveller animal format from book 3.



I did some digging and discovered that the dropped data type is "dice" rather than "string". Also, with type "dice", the return of getNumberData() is a 0 if an actual dice value is entered (something like "2d6") but if a fixed value is stored (something like "9"), then getNumberData() returns the value. So, the following code is good - if you put in a die roll, then it does nothing (forcing you to double click the die roll and then drag the result into the box, as you would expect), while if you put in a fixed value, dragging and dropping it will do what you expect.

Also, I added a quick check to prevent the number from dropping below 0. From the CT rules:



function onDrop(x, y, draginfo)
local type = draginfo.getType();
if type == "number" or type == "dice" then
setValue(getValue() - draginfo.getNumberData());
end
if getValue() &lt; 0 then
setValue(0);
end
return true;
end

Glad you took the plunge and did some digging around and got to understand a bit of the ruleset. As you can see, this was a community developed ruleset that got about 80% of the way and then development stopped - there are a few little bugs and gotchas and there is certainly scope for a lot of improvements. It would be nice if the whole damage application process got an overhall - to allow the damage dice to be applied separately, to handle applying the excess damage when a characteristic hits zero to another characteristic, to apply the first wound to a random characteristic, etc...