Steve Jackson Games - Site Navigation
Home General Info Follow Us Search Illuminator Store Forums What's New Other Games Ogre GURPS Munchkin Our Games: Home

Go Back   Steve Jackson Games Forums > Roleplaying > GURPS > GURPS Character Assistant

Reply
 
Thread Tools Display Modes
Old 01-18-2011, 06:38 PM   #41
tmedwards
 
tmedwards's Avatar
 
Join Date: Feb 2006
Location: Krotz Springs, LA US
Default Re: Draft GDF of Low Tech armor sets underway

XPDF, eh? I'm going to go out on a limb here, but my bet is that you didn't change the output encoding from the default "Latin1". XPDF will translate some non-Latin-1 characters to equivalents—in my experience this amounts to only the extended characters from CP1252—and will silently eat anything outside of that set.

XPDF only supports one output encoding that's a superset of Latin-1, UTF-8. So, you'll have to change the output encoding to "UTF-8" to preserve the daggers, diesis, etc. You can do this in either the xpdfrc file:
Code:
textEncoding		UTF-8
Or via the -enc command line argument:
Code:
-enc UTF-8
The options are case sensitive, BTW.

You can then use disciplines/IO-layers to specify an encoding translation upon read and write in your Perl program. You'll probably also need to set utf8 as well. For example:
Code:
use utf8;

open(my $infh, '<:encoding(UTF-8)', $infile)	# auto decode on read
	or die("cannot open input file for reading");

open(my $outfh, '>:encoding(Windows-1252)', $outfile)	# auto encode on write
	or die("cannot open output file for writing\n");
This way Perl will do most of the heavy lifting for you. You'll probably have to force a few translations yourself, smart-quotes and the like.

PS: It's just easier to assume you don't know any of this, I'm not trying to be insulting. :)
__________________
Thomas M. EDWARDS <tmedwards@motoslave.net>

GCA4 resources: GCA Repository, Phoenix (r66), GMCS (2.17), Bookish (r12)
tmedwards is offline   Reply With Quote
Old 01-19-2011, 06:47 AM   #42
Bruno
 
Bruno's Avatar
 
Join Date: Sep 2004
Location: Canada
Default Re: Draft GDF of Low Tech armor sets underway

I, in fact, did not know any of this. Thank you! This could be VERY helpful in ways utterly unrelated to GURPS.

*goes off to fiddle with something*
__________________
All about Size Modifier; Unified Hit Location Table
A Wiki for my F2F Group
A neglected GURPS blog
Bruno is offline   Reply With Quote
Old 01-19-2011, 06:49 AM   #43
Bruno
 
Bruno's Avatar
 
Join Date: Sep 2004
Location: Canada
Default Re: Draft GDF of Low Tech armor sets underway

By the by, I'd like to thank SJG for not using a custom encoding system to save file space. I have yet to encounter a program that does that properly, and oi with the migraines when you try to get text out again...
__________________
All about Size Modifier; Unified Hit Location Table
A Wiki for my F2F Group
A neglected GURPS blog
Bruno is offline   Reply With Quote
Old 01-19-2011, 07:20 AM   #44
Rohan
 
Join Date: Jan 2007
Location: Germany
Default Re: Draft GDF of Low Tech armor sets underway

Hello there,

one little question:

Are the weights of Armor in the data files in kg?

If not is there any chance to replace the weight with kg?

Thanx

Rohan
Rohan is offline   Reply With Quote
Old 01-19-2011, 08:38 AM   #45
Bruno
 
Bruno's Avatar
 
Join Date: Sep 2004
Location: Canada
Default Re: Draft GDF of Low Tech armor sets underway

No, the weights are in pounds, as they are in all SJG books. I do not modify the statistics, merely transcribe them.

Phoenix sheet has an option that converts to KG I think?
__________________
All about Size Modifier; Unified Hit Location Table
A Wiki for my F2F Group
A neglected GURPS blog
Bruno is offline   Reply With Quote
Old 01-19-2011, 12:02 PM   #46
Rohan
 
Join Date: Jan 2007
Location: Germany
Default Re: Draft GDF of Low Tech armor sets underway

No, but there are Gurps Basic and Martial Arts GCA Files for metric terms. I think Phoenix use this files.
Rohan is offline   Reply With Quote
Old 01-19-2011, 04:45 PM   #47
tmedwards
 
tmedwards's Avatar
 
Join Date: Feb 2006
Location: Krotz Springs, LA US
Default Re: Draft GDF of Low Tech armor sets underway

Quote:
Originally Posted by Bruno View Post
Phoenix sheet has an option that converts to KG I think?
Quote:
Originally Posted by Rohan View Post
No, but there are Gurps Basic and Martial Arts GCA Files for metric terms. I think Phoenix use this files.
Bruno is correct, actually.

If you set the Metric stat to 1 (default: 0), Phoenix—and Bookish—will convert virtually all measurements to metric, both weights and distances/lengths. They won't convert measurements in strings—descriptions, names and the like—but, generally, everything else will be. They will also try to scale measurements to the most appropriate unit, regardless of system—no other sheets, or the data files, do this. Finally, they do not require the metric equipment variant files—those variants are compatible with my sheets, and they also convert descriptions/names as well, so I do recommend using them, but my sheets do not require them.

Note: This only applies to some of my sheets—Phoenix, Bookish, and probably other sheets which are based on them. Any other sheet requires the appropriate metric equipment variant data files to be loaded.


Long(er) version/Extra info --------------------------------------------------

Most character sheets rely solely on whatever metrication is provided by the data files. Some of my sheets—specifically, Phoenix and Bookish—go farther, and try to provide for measurement conversion of values—but not strings, like descriptions and names—internally. The reason why my sheets do this is because metrication in my sheets predate the metric equipment variant data files by quite a while.

On the data file side:
For statistics: When you set a character's Metric statistic to 1 (default: 0), most statistics will render their measurements as metric instead of the default US customary. This is built into the basic data files.

For ads/disads/skills/spells: Generally, if a measurement is included, it's in US customary and there no current method via the data files to auto-convert it to anything else. I don't think that there are a lot of these, so this isn't that big of a deal.

For equipment: There are metric equipment variant data files you can use that will change the measurements of the associated equipment to metric—these files also generally set the Metric statistic to 1 to enable statistic conversion as well.
On the character sheet side:
For Phoenix, Bookish, and probably other sheets which are based on them: You only need to set the Metric statistic to 1 and they will convert virtually all measurements to metric. I still recommend using the metric equipment variant data files, but you don't require them.

For other sheets: Use the metric equipment variant data files.
__________________
Thomas M. EDWARDS <tmedwards@motoslave.net>

GCA4 resources: GCA Repository, Phoenix (r66), GMCS (2.17), Bookish (r12)

Last edited by tmedwards; 01-19-2011 at 05:32 PM.
tmedwards is offline   Reply With Quote
Old 01-19-2011, 05:19 PM   #48
panton41
 
panton41's Avatar
 
Join Date: Jul 2005
Location: Jeffersonville, Ind.
Default Re: Draft GDF of Low Tech armor sets underway

I need to learn Perl (and Python, which I think is based on it), it looks like a programming language that actually makes sense.

I think I'm going to look for some Perl (and Python) programming guides on Amazon to load on my Kindle as "light reading" for when I go to the gym.
__________________
The user formerly known as ciaran_skye.

__________________

Quirks: Doesn't proofread forum posts before clicking "Submit". [-1]

Quote:
"My mace speaks Goblin." Antoni Ten Monros
panton41 is offline   Reply With Quote
Old 01-20-2011, 07:05 AM   #49
Woodman
 
Woodman's Avatar
 
Join Date: Aug 2004
Location: Hannover - Germany
Default Re: Draft GDF of Low Tech armor sets underway

Quote:
Originally Posted by ciaran_skye View Post
I need to learn Perl (and Python, which I think is based on it), it looks like a programming language that actually makes sense.
Perl isnt based on Python, but both influenced each other. And someone, who isnt a Perl programmer, saying that Perl makes sense is also something new. If you want to become a believer take a look at http://www.perlmonks.org/ .
Woodman is offline   Reply With Quote
Old 01-20-2011, 07:10 AM   #50
Bruno
 
Bruno's Avatar
 
Join Date: Sep 2004
Location: Canada
Default Re: Draft GDF of Low Tech armor sets underway

As far as languages go, Perl is in many ways an "old fashioned" language - it's roots are in the C/C++ era, although I think it's much more friendly to a new programmer than those... but when you get into fancier work, you'll need to know how "references" work, which are almost C-style pointers, for perl, and the oddness with its datatypes is certainly odd.

A foundation in that generation of languages will definitely give you a leg up with Perl.

But in short: It's an interesting, slightly quirky little language, and it's absolutely fabulous for text processing, but it's an interpreted language so compiling stand-alone binaries isn't really its forte.
__________________
All about Size Modifier; Unified Hit Location Table
A Wiki for my F2F Group
A neglected GURPS blog
Bruno is offline   Reply With Quote
Reply

Tags
gca, low-tech

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Fnords are Off
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 08:13 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.