the perception sound is for the races that get a +2 to sound based perception checks
others get taste and feel
anyways
chris
Printable View
the perception sound is for the races that get a +2 to sound based perception checks
others get taste and feel
anyways
chris
Since you guys are more advanced, you can always adjust the skills to meet your needs. For an extension for the general public including people that aren't comfortable tinkering in the code, I think the one I put out there works better for them.
For NPC field layout, look at the templates for npcabilityfield and npcsavefield. They are hard-coded to be right below another specific field. If you want to place them below a different field, then you will need to changed the hard-coded anchor value inside those templates.
For level 0 spells, I'm not sure that you really need to do anything, just don't check them off. I don't think it's really worth the work. If it really bugs you, then you'd have to:
* Modify the spell entry to hide the current spellcounter control for Level 0 spells
* Add a different icon for Level 0 spells for the player to press
* Add code for new icon to output spell
* Update the minisheet as well
* Make sure nothing breaks, or throws errors
Cheers,
JPG
well i do not know enough to rearrange the npc sheet.
i can not get the abilities or the saves to relocate without getting them to be
placed over the top of another field.
tried to add offset and rearranging all anchors but i have had no luck.
must be a tag i need to add or remove and i can not find it.
thought about totally redoing the npc sheet and not using the same format.
as the d20 and more like the gurps rule set.
anyway if you can help me
Thanks
Chris
madman, if you want someone to help you, you are going to have to tell what it is you are trying to do. Posting code is often a useful way to get advice on the code.
You are going to have to get familiar with the ruleset modification documentation under the library link and study the Windows and Controls section, particularly on anchors and so on.
I am just learning myself, and it is confusing at first. Just keep trying and observing the change, and remember "/reload ruleset" chat command is your friend.
Code:template name="npcabilityfield">
<jpgnumberfield>
<nodrop />
<noreset />
<hideonvalue>0</hideonvalue>
<font>sheettextsmall</font>
<frame>
<name>modifier</name>
<offset>5,2,5,4</offset>
</frame>
<keyeditframe>
<name>sheetfocus</name>
<offset>7,4,7,5</offset>
</keyeditframe>
<script>
function onInit()
setAnchor("top", "specialqualities", "bottom", "absolute", 17);
if anchor then
setAnchor("left", anchor[1], "right", "relative", 5);
else
setAnchor("left", "specialqualities", "left", "absolute", -2);
end
setAnchoredWidth(20);
setAnchoredHeight(18);
if getDatabaseNode().isStatic() then
setFont("chatfont");
end
end
function onDrag(button, x, y, draginfo)
if OptionsManager.isOption("DRGR", "on") then
draginfo.setType("dice");
draginfo.setDieList({ "d20" });
else
draginfo.setType("number");
end
draginfo.setDescription(self.description[1].text[1]);
local bonus = math.floor((getValue() - 10) / 2);
draginfo.setNumberData(bonus);
draginfo.setShortcutData("npc", window.getDatabaseNode().getNodeName());
return true;
end
function onDoubleClick(x,y)
local bonus = math.floor((getValue() - 10) / 2);
ChatManager.DoubleClickNPC("dice", bonus, self.description[1].text[1], {npc = window.getDatabaseNode()});
return true;
end
</script>
</jpgnumberfield>
</template>
im trying to get the anchors arranged so that this group will be between like hd and xp for example.
i can do just about everything else but i can not get the templates for saves or abilities to go between two other fields they are always on top,and in between of the fields it does not occupy its own spaceCode:</script>
<sheetdata>
<columnstringfield name="hd">
<tabtarget next="init" prev="name" />
</columnstringfield>
<columnfieldlabel>
<anchor>hd</anchor>
<static>HD/Type</static>
</columnfieldlabel>
<columnnumberfield name="cr">
<anchor>hd</anchor>
<tabtarget next="xp" prev="hd" />
</columnnumberfield>
<columnfieldlabel>
<anchor>cr</anchor>
<static>CR</static>
</columnfieldlabel>
<columnnumberfield name="xp">
<anchor>hd</anchor>
<tabtarget next="init" prev="cr" />
<description>
<text>XP</text>
</description>
</columnnumberfield>
<columnfieldlabel>
<anchor>xp</anchor>
<static>XP</static>
</columnfieldlabel>
i can not get it the right spot because (i think maybe i need to add the abilities individually so that they all have the same vertical anchor somehow)
i did not write this i am just trying to make an extension for itCode:<npcabilityfield name="strength">
<tabtarget next="dexterity" prev="specialqualities" />
<description>
<text>Strength check</text>
</description>
</npcabilityfield>
<npctoplabel>
<anchor>strength</anchor>
<static>Str</static>
</npctoplabel>
<npcabilityfield name="dexterity">
<anchor>strength</anchor>
<tabtarget next="constitution" prev="strength" />
<description>
<text>Dexterity check</text>
</description>
</npcabilityfield>
<npctoplabel>
<anchor>dexterity</anchor>
<static>Dex</static>
</npctoplabel>
<npcabilityfield name="constitution">
<anchor>strength</anchor>
<tabtarget next="intelligence" prev="dexterity" />
<description>
<text>Constitution check</text>
</description>
</npcabilityfield>
<npctoplabel>
<anchor>constitution</anchor>
<static>Con</static>
</npctoplabel>
<npcabilityfield name="intelligence">
<anchor>strength</anchor>
<tabtarget next="wisdom" prev="constitution" />
<description>
<text>Intelligence check</text>
</description>
</npcabilityfield>
<npctoplabel>
<anchor>intelligence</anchor>
<static>Int</static>
</npctoplabel>
<npcabilityfield name="wisdom">
<anchor>strength</anchor>
<tabtarget next="charisma" prev="intelligence" />
<description>
<text>Wisdom check</text>
</description>
</npcabilityfield>
<npctoplabel>
<anchor>wisdom</anchor>
<static>Wis</static>
</npctoplabel>
<npcabilityfield name="charisma">
<anchor>strength</anchor>
<tabtarget next="babgrp" prev="wisdom" />
<description>
<text>Charisma check</text>
</description>
</npcabilityfield>
<npctoplabel>
<anchor>charisma</anchor>
<static>Cha</static>
</npctoplabel>
<columnfieldlabel>
<anchor>strength</anchor>
<static>Abilities</static>
</columnfieldlabel>
<npcsavefield name="fortitudesave">
<tabtarget next="reflexsave" prev="hp" />
<description>
<text>Fortitude save</text>
</description>
</npcsavefield>
<npctoplabel>
<anchor>fortitudesave</anchor>
<static>Fortitude</static>
</npctoplabel>
<npcsavefield name="reflexsave">
<anchor>fortitudesave</anchor>
<tabtarget next="willsave" prev="fortitudesave" />
<description>
<text>Reflex save</text>
</description>
</npcsavefield>
<npctoplabel>
<anchor>reflexsave</anchor>
<static>Reflex</static>
</npctoplabel>
<npcsavefield name="willsave">
<anchor>fortitudesave</anchor>
<tabtarget next="speed" prev="reflexsave" />
<description>
<text>Will save</text>
</description>
</npcsavefield>
<npctoplabel>
<anchor>willsave</anchor>
<static>Will</static>
</npctoplabel>
<columnfieldlabel>
<anchor>fortitudesave</anchor>
<static>Saves</static>
</columnfieldlabel>
If you will tell us specifically what you want to do, we can probably show you the code for it. What you have posted looks like it's straight out of 3.5e_jpg. I know you are trying to move the saves, but I don't know where you are trying to move them. Without that, I can't show you how (and, since I am no expert yet, even with that, I might not be able to help, as you might notice from some of my posts).
I presume that the "cr" field you moved is working correctly, right?
yes, i can move the other fields and create new ones. and they all work just fine and i am using d20_JPG for the extension. and if i could see an example of it wroking anywhere but the bottom of the npc sheet i could figure out how to put it somewhere else but i can not give you an example of the code for it, as i can not make it work. so if it was moved to anywhere, in between two other fields it would work, i want to move saves under the hp field and stats under the special abilities field in the end.
thank for trying to help me with my little escapade.
Chris
I am sure we can figure this out, but the location you want to move the saves to is currently occupied by the languages block. And, pardon me, but why in the world would you ever want to move the stats to the special abilities tab? I think I'm just not understanding you, and therefore won't be able to help you get what you want.
this is not the character sheet it is the npc personalities sheet.
Chris
Oops. Let me look at that then.
OK, the problem you're facing is that you have is that the onInit code for the saving throws is forcing them to be after the abilities.
So, the first thing is to move the saving throw blocks up just under hp. While not always required, it helps to see the xml in the order it will be in the window. Then, once you've done that, find the onInit routine of the npcsavefield template (which is above the windowclass in adventure_npcs).
Change this code to:
That should do it. If you do that, your stats should stay where you want them (I think?) If not, let me know where you want those to be.Code:function onInit()
setAnchor("top",hp,"bottom","relative",17);
if anchor then
setAnchor("left",anchor[1],"right","relative",5);
else
setAnchor("left",hp,"left","absolute",0);
end
setAnchoredWidth(47);
setAnchoredHeight(18);
if getDatabaseNode().isStatic() then
setFont("chatfont");
end
end