Is there any way to edit a module via Text?

I’ve come to some segments where I need to update some old stuff that i’m using

Now I’m already using prototypes as references to minimize the workload.

But I was wondering if there was any way I could view and edit my module via text? Such as a raw code of the module so I could search and replace the specific strings that I need to change.

I’m fixing my issues manually right now, but I’m wondering if there’s a way available that I could streamline this process?

Inside the module there is a file called buildfile. This is the raw code for the
module. It is editable in a text editor, however be warned, a lot of it is not
human readable (ala xml) and it is very easy to mess up and break the module
completely if you are not careful in what you are doing - always make a back up
if you want to go down this dark path


From: Zackreaver zackreaver@gmail.com
To: messages@vassalengine.org
Sent: Fri, March 16, 2012 12:40:34 PM
Subject: [messages] [Module Design] Is there any way to edit a module via Text?

I’ve come to some segments where I need to update some old stuff that
i’m using

Now I’m already using prototypes as references to minimize the workload.

But I was wondering if there was any way I could view and edit my module
via text? Such as a raw code of the module so I could search and
replace the specific strings that I need to change.

I’m fixing my issues manually right now, but I’m wondering if there’s a
way available that I could streamline this process?


Read this topic online here:
https://forum.vassalengine.org/t/is-there-any-way-to-edit-a-module-via-text/4772/1


messages mailing list
messages@vassalengine.org
vassalengine.org/mailman/listinfo/messages


messages mailing list
messages@vassalengine.org
vassalengine.org/mailman/listinfo/messages

That’s what I was looking for, and yes I know the risks of dealing with the raw of it.

Thank you for the assistance.

Edit: Another couple of questions, I made a copy of my module to examine the details, what would be the best format for editing the contents of the module directly?

Additionally, what application would be the best to use for editing the XML document, would notepad work? or should I use something else to prevent breaking the format.

A module is simply a zipfile so any zip utility should work for editing
contents.

Notepad works, Wordpad, pretty much any editor does. I usually use Dreamweaver
or Context personally


From: Zackreaver zackreaver@gmail.com
To: messages@vassalengine.org
Sent: Fri, March 16, 2012 1:30:17 PM
Subject: [messages] Edit: Re: [Module Design] Is there any way to edit a module
via Text?

[This message has been edited.]

That’s what I was looking for, and yes I know the risks of dealing with
the raw of it.

Thank you for the assistance.

Edit: Another couple of questions, I made a copy of my module to examine
the details, what would be the best format for editing the contents of
the module directly?

Additionally, what application would be the best to use for editing the
XML document, would notepad work? or should I use something else to
prevent breaking the format.


Read this topic online here:
https://forum.vassalengine.org/t/is-there-any-way-to-edit-a-module-via-text/4772/3


messages mailing list
messages@vassalengine.org
vassalengine.org/mailman/listinfo/messages


messages mailing list
messages@vassalengine.org
vassalengine.org/mailman/listinfo/messages

right then, thank you.

Just to verify, no problems with Wordpad and line breaks?

None here, works perfect

Wordpad?!? Yikes. Notepad++ forever!

i use microsoft works myself

I use nedit for the editing I’m doing, langague mode set to XML makes it nice and easy on the eyes.

BTW, I’m working on creating the code using a python script for a counter’s description so I can loop through a large number of counter images and out put a separate line of XML that I can then paste into my buildfile. Is this anything like what you guys are doing?

Chris

Thus spake chap:

I use nedit for the editing I’m doing, langague mode set to XML makes it
nice and easy on the eyes.

BTW, I’m working on creating the code using a python script for a
counter’s description so I can loop through a large number of counter
images and out put a separate line of XML that I can then paste into my
buildfile. Is this anything like what you guys are doing?

I wrote some Perl scripts for generating the counter images and buildfile
entries for counters in the module for The Longest Day. For large games,
this is far superior to doing it manually.


J.

Note that Version 3.2 has an ‘Add Multiple Pieces’ feature that let’s you create a counter ‘template’ and point at a folder full of appropriately names images and Vassal will load all of the images and create the counters automatically based on the template.

Brent and J. you guys LD and TDC are my inspiration in mod design. >;-)
Thanks for the the feedback, I’ll definitely chk out the Add Multiple Pieces feature and continue w/my scripting as well.
Do you guys have a workflow for naming a huge numbers of counter images? I plan to use action scripts in PS as I resize/format the original counter files but would love to know if there are any elegant methods others use.

thanks,

Chris

Thus spake chap:

Brent and J. you guys LD and TDC are my inspiration in mod design. >;-)
Thanks for the the feedback, I’ll definitely chk out the Add Multiple
Pieces feature and continue w/my scripting as well.
Do you guys have a workflow for naming a huge numbers of counter images?
I plan to use action scripts in PS as I resize/format the original
counter files but would love to know if there are any elegant methods
others use.

For TLD, I consecutively numbered all of the counter face images
(0000.svg to 3070.svg). My “pieces” spreadsheet has one row per
piece, containing the name of the piece and the numbers of its front
and back.


J.

Ah, so is this data then exported out of the spreadsheet and using your perl scripts written into the XML tagged lines describing the counters? I need to dig into some spreadsheet skills and leverage that functionality.

thanks,

Chris

Thus spake chap:

For TLD, I consecutively numbered all of the counter face images
(0000.svg to 3070.svg). My “pieces” spreadsheet has one row per
piece, containing the name of the piece and the numbers of its front
and back.

Ah, so is this data then exported out of the spreadsheet and using your
perl scripts written into the XML tagged lines describing the counters?
I need to dig into some spreadsheet skills and leverage that
functionality.

Exactly. I export the spreadsheet as CSV, because that’s an easy format
to read. There are Perl modules for handling it, but it’s also mostly
trivial to parse it yourself.


J.

For scripting, it can also be useful to look at ImageMagick, a command-line
image processing tool.
I have used that to generate counter images from prototype print art to
support another module designer.

On Tue, May 8, 2012 at 12:26 PM, Joel Uckelman uckelman@nomic.net wrote:

Thus spake chap:

For TLD, I consecutively numbered all of the counter face images
(0000.svg to 3070.svg). My “pieces” spreadsheet has one row per
piece, containing the name of the piece and the numbers of its front
and back.

Ah, so is this data then exported out of the spreadsheet and using your
perl scripts written into the XML tagged lines describing the counters?
I need to dig into some spreadsheet skills and leverage that
functionality.

Exactly. I export the spreadsheet as CSV, because that’s an easy format
to read. There are Perl modules for handling it, but it’s also mostly
trivial to parse it yourself.


J.


messages mailing list
messages@vassalengine.org
vassalengine.org/mailman/listinfo/messages

Thanks guys, I will definitely look into both exporting spreadsheet data and explore ImageMagick to do the heavy lifting.
Very useful thread IMHO.

Cheers,

Chris