PDA

View Full Version : Exporting from Word



NeoDante
February 18th, 2005, 16:45
Is it possible to write out a module in a program like word (so that it can be spell checked for example) and cut & paste into FG? If not; is this a feature we may see at some point (I hope)?
NeoDante

Visigodo
February 18th, 2005, 17:32
You can copy from word and then past to FG open window, i dont know if is this what you where thinking.

You can click on the windows logo key to bring up the taskbar and then change from word window and FG window. Thats what i do, dont know if theres others ways.

tarrasque
February 18th, 2005, 18:45
i think someone in another thread was asking for an easy way..It would be nice if there was a word (or text) to xml utility that you could run easily from the desktop, perhaps as a seperate entity to FG.

i was thinking along the lines that you could put some kind on control string in word inbetween different rooms and chat text etc , then the converter would automatically split it and do all the xml goodies

tarrasque
February 19th, 2005, 15:03
well i've been playing around with excel and word

I already had a word file that had the room titles in BOLD and box (chat) text in RED, room descriptions etc are left as std text

I built a excel macro to convert word to xml

(see notes below)

run FG and create a new campaign, then exit FG

1.right click this link (https://homepage.ntlworld.com/c-manning/fg/fg-builder.xls) and save as

2. open the sheet and click yes to the macro warning
3. just cut and paste the word text into the excel sheet
4. save a copy of the excel sheet somewhere useful, the xml output will be in the same directory
5. run the macro (alt+F8 ) select 'build'

6. a file will be generated called module export.xml

copy this file into your campaign directory and rename as db.xml (delete or rename the old db.xml file first)

run FG..select your campaign and the import should be there in your storyboard..just add the bells and whistles now

Notes

single quotes " in your text or other illegal characters can cause the import into FG to fail, edit the word file to remove them. (this is especially true of OCR imports)

room titles should be BOLD

boxed (chat) text should be RED

all other text will be treated as standard entries

make the last line of your word file END

all testing done using win XP & excel 2000

any queries, ideas etc email me

[email protected]

Chris

NeoDante
February 19th, 2005, 20:39
This looks really good-I just need a copy of excel now ;-)
I'll let you know how it goes once I get it.
Thanks again!

richvalle
February 21st, 2005, 04:35
Very, very nice.

A note to others that try to use it.. one of the 'illegal' characters seems to be a -

It was not a problem in every place it was used but some places it generated errors when I tried to load the file up in FG. If you look at the error that FG generates it gives you the line number it does not like. You can open the db.xml file in Notepade and fine the line it is complaining about and figure out what to remove.

The program makes a seperate entry for each room. You can then go in and make links to hook them all together.

rv

Ged
February 21st, 2005, 08:25
I have not tried it out myself yet, but could the occasional problem with character '-' be that either dash or hyphen is treated correctly and the other is not (ie whether the line is long or short)? Although the hyphen-dash variance is actually much broader ( https://en.wikipedia.org/wiki/Dash ).

Bagpuss2
February 21st, 2005, 10:00
Yeah I found the following characters cause problems when converted from Word.

The ' in words like can't, won't, etc. When typed in Word, Word converts that to a different character, a curved ' that might look identical to the one you typed depending on the font you use, but isn't. The XML cuts off the text at the odd character a block of text with the word can't in it will appear to end with the word "can" and nothing after that.

Also Word changed the character -, depending on what it is between, it has three different lengths only one of which works. The other cause the same problem as the ' character.

What you need to do is open the XML file in your XML reader (or Notepad) find the offensive character, select it and copy it. Then open Replace..., paste it into the Find box, then type the standard character in the Replace box, and Replace all. Admittedly with the ' it will look like Find ' and Replace with ', but they are different characters.

You need to do this for ', and two versions of - in most documents.

tarrasque
February 21st, 2005, 12:33
a little update

no need for excel now, works straight from word

Word converter (https://homepage.ntlworld.com/c-manning/fg/FG_converter.doc)

just load the document

replace the text with your own & run the macro (build) using alt+f8

i have removed the check for single quotes, as discussed there are quite a few illegal characters, when i've got time i will address that as well

Chris

richvalle
February 21st, 2005, 17:23
tarrasque, thanks a lot for working on this!

2 things. When I run your new word doc converter it is not making an xml file...? I do get ~$_converter.doc file but it is only 1kb in size.

Would it be possbile to add the NPC guys here as well so they go into their own section. Then the monsters could be added in the word doc in the same place as the rooms they are in and in FG they will show up under Personalities.

rv

richvalle
February 21st, 2005, 17:38
Hmm, Actually the format of that stat block might be tricky to get into word. Hmmm. Maybe that is a bad idea.

I have been able to just enter the mobs into FG and then take the entries from that db.xml and cut and paste them into the db.xml that has the room stuff in it. I guess that will work.

rv

tarrasque
February 21st, 2005, 18:19
you have to save the word file in a directory, then run the macro & it will create the xml file in the same directory

as for monsters / npc thats a little more involved..what the word converter does is just put the xml 'wrapper' round the text

next on my adjenda is a monster / npc converter but you might need to wait till next week for that :)

Chris

NeoDante
February 21st, 2005, 19:35
a little update

no need for excel now, works straight from word

Chris

Thanks so very much Chris-really, above the call of duty as they say!

Quick 'off-topic' question-I seem to be having trouble getting any new campaigns to save within FG-I put this in 'House of Healing' but haven't gotten any responses yet-No big deal as I've been able to keep working in Word (Thanks to Chris!) but at some point I'm actually going to want to play with this program ;-) Any help or thoughts over there would be greatly appreciated (I don't want to hijack my own thread :) )

Bagpuss2
February 21st, 2005, 22:05
I keep getting macros in this document are disabled... for the word document, even if I set Macro security to low. Any ideas on how to enable them?

richvalle
February 21st, 2005, 22:07
I keep getting macros in this document are disabled... for the word document, even if I set Macro security to low. Any ideas on how to enable them?

After you disable it close the document and open it up again.

rv

Tharivol
March 26th, 2005, 21:40
For those of you that wanted to beable to assign tabs in the word file before compiling i have updated Tarrasque's FG_Converter.doc to do just that

The very first line has to be your Handle

Also on a line by itself you have to put the number in italics that you want the information to appear on which tab

0 =1, 1=2, etc.

You can switch back and forth if you want. Also the last number used will be the tab number used till it encounters a new tab number. So if you decide to write a lot of stuff for one tab and then move to the next there is only the need to enter the tab number once before the first entry

i hope this makes sense
here is the link for the file https://www.frontiernet.net/~rgiboo/FG_converter2.doc

richvalle
March 26th, 2005, 22:21
Tharivol,

That sounds very promising... can you post an example of how the tabbing should look like?

rv

Tharivol
March 27th, 2005, 04:24
There are examples in the file i used what was there and added the required elements. Here is an example of what is in the file (sorta missed the last kitchen in the file but had to illustrate.
The numbers used do not show up in the file they are only flags for setting tabs


Begin File-------------------------------------------------------------------------------
Lestat <------Handle used by creator


Tomb Antechamber <------ this will be on tab 0

Several cleverly hidden arrow slits Line the walls between area 8A and this room. While closed, only a keen eye (Spot DC 25) or a careful search (Search DC 20) can uncover them; the arrow slits are all currently closed. The double doors are locked (Open Locks DC 30) but not trapped

1 <-------- this will be on tab 1
Ambush Hall

This chamber was once used as a killing floor, several monks hidden in area 8A observed anyone who entered the tomb by this antechamber and used the cleverly hidden arrow slits in the walls to assault anyone trying to invade by this entrance.

0
Privy <-------- this will be on tab 0

This small room is obviously a privy, a latrine sits to the north, its lid open but any odours that once may have plagued this room have long since fled

The walls of the latrine shaft are smooth and caked with crumbly filth (Climb DC 30). The hole is 3 feet wide and drops down for 100 feet before ending in a 2-foot-deep layer of dried nastiness.

1
Larder <-------- this will be on tab 1

This chamber is full of crates and boxes. In one corner, large wooden casks stand in an orderly fashion near the walls. The floor is covered with bits of hay and grain and the room smelts faintly of cedar

The boxes are filled with foodstuff and dried goods (dried meat and vegetables, flour, wheat, and sugar) and the barrels contain either wine or fresh water (50% chance of either). The items appear to be ready for consumption, but are actually tainted by the evil that fills the tomb. Anyone who eats or drinks any of this room's contents must make a Fortitude save (DC 17) or be poisoned (initial and secondary damage is 2d6 Strength).

2
Kitchen and Cafeteria <-------- this will be on tab 2

The air here is fetid, a nauseating combination of death and the lingering odour of cooked food. Four large tables stand in the centre of the room, with three places set at each table. Two huge fireplaces, their hearths dark and obviously cold, dominate two walls. Three of the corners hold barrels and the fourth a door.


Kitchen and Cafeteria <-------- this will be on tab 2 because that was the last tab assigned

The air here is fetid, a nauseating combination of death and the lingering odour of cooked food. Four large tables stand in the centre of the room, with three places set at each table. Two huge fireplaces, their hearths dark and obviously cold, dominate two walls. Three of the corners hold barrels and the fourth a door.

end file -----------------------------------------------------------------------------

freckle_smoker
February 8th, 2006, 01:52
What exactly do I need to have in order for this to run .