PDA

View Full Version : Adding up Encumberance



Veelivar
March 19th, 2006, 23:46
Hello,

After a bit of a break I have picked up me character sheets again.

I've just got round to Trappings andf I have a bit of a deign decision to make. I have asked this before but i htink it got lost so sorry for reposting but I hope someone can help :)

What I want to do is:

Set up entries in the Trappings, Weapon and armour lists like spells are in the d20 charsheet. I have this working so I can right click and add an entry in the list.

What I want to be able to do is add up all the encumberances from the entries so that I can then get a total Enc value for everything that the character is carrying.

Can I do this in the current version?

Cheers,
Dan

Paradoxic
March 20th, 2006, 00:24
Hrm... well, if the number of entries were hardcoded, then you definately could since each item's encumbrance would be a uniquely named object in the charactersheet. For this application you would need a way to apply an operation to a set of objects of an uncertain amount.

Adding to Veelivar's question, is there way to reference the properties of a windowlist object? A nice analog that anyone can try messing with would simply be to sum, say, all the 'level' fields for spelllist entries... or the total 'prepared' on the spelllist mini window (where it shows all your spells and indicates the number prepared).

Toadwart
March 20th, 2006, 00:51
Hmm, I ran into the same issue. I'm waiting for 1.06 to see if scripting helps.
Do let us know if you find a way to do this in the current version ;)

joshuha
March 20th, 2006, 03:03
Well I modded the D20 SRD sheet to add a weight column for encumberance. Looks like this:

https://home.earthlink.net/~joshuha/data/charsheet_inventory.png

I then went and added a bunch of columns for the weight like so:



<numbercontrol name ="wt1">
<bounds rect="228,49,24,15"/>
<hideonvalue value="0" />
</numbercontrol>

<numbercontrol name ="wt2">
<bounds rect="228,69,24,15"/>
<hideonvalue value="0" />
</numbercontrol>

<numbercontrol name ="wt3">
<bounds rect="228,89,24,15"/>
<hideonvalue value="0" />
</numbercontrol>
.
.
.


I increased the bounds by 20 pixels each time to cover each box.
Then I total all these fields and set the encumbrance shown to this value:


<numbercontrol name="encumbranceload">
<bounds rect="448,328,55,23" />
<nodrag />
<noreset />
<nodrop />
<source name="enchelper"/>
</numbercontrol>


<numbercontrol name="enchelper">
<invisible />
<source name="wt1" op="+" />
<source name="wt2" op="+" />
<source name="wt3" op="+" />
<source name="wt4" op="+" />
.
.
.


It works out ok but hopefully can do more when scripting comes out in 1.06.

Tailz Silver Paws
March 20th, 2006, 04:58
We are hoping to be able to add up item weights, then give a weight total that is then slotted into the various encumberance sets as per the characters strength stat. This then also sets the characters speed stat.

But we are waiting for the next version :)

Veelivar
March 20th, 2006, 09:02
Thanks for the replies. I knew I could sum them if they were a hardcoded list but I thought it would be pretty neat to just be able to keep adding stuff.

Unless the dev's can step in I think I will go for a hardcoded list they can't carry pages of stuff anyway. Thinking about it it would get more complicated if the characters start to keep pack horses and carts as this would vastly inceasr the about they could carry. but then a character sheet is just personal stuff... hmm.


Oh well. Roll on 1.06......


Dan.

Tailz Silver Paws
March 20th, 2006, 23:33
Thanks for the replies. I knew I could sum them if they were a hardcoded list but I thought it would be pretty neat to just be able to keep adding stuff.

Unless the dev's can step in I think I will go for a hardcoded list they can't carry pages of stuff anyway. Thinking about it it would get more complicated if the characters start to keep pack horses and carts as this would vastly inceasr the about they could carry. but then a character sheet is just personal stuff... hmm.

Oh well. Roll on 1.06......

Dan.
I've thought about this with designing our character sheet system, our equipment section has ended up as a group of popup charts. Since its for a WWII setting we have a chart for equiped equipment per location on the characters body as per a standard Webbing layout (webbing being the load bearing harness soldiers wear), then we have a Containers chart where a player can list a box or bag and its contents, and a special Vehicle chart used to cover the characters transport and its cargo...

Plus we also have a simple list form chart that players can fill out if they don't wish to use the other charts.

I'm quite certain it will give Ghingis a headake coding it all :eek: