Cantr Item List Formatter

General out-of-character discussion among players of Cantr II.

Moderators: Public Relations Department, Players Department

User avatar
joo
Posts: 5021
Joined: Fri Jun 17, 2005 2:26 pm
Location: London, UK

Cantr Item List Formatter

Postby joo » Sun Nov 23, 2008 8:20 am

Sometimes a character needs to make a list of items, such as a manifest of goods, or a list of items for trade to be given to potential trading partners. When there are a lot of items, the standard method is to copy and paste from the objects page - however a lot of returns, spaces and other whitespace characters get copied along with the item list, often requiring additional formatting by hand or by find and replace in notepad.

So to speed up the process of formatting a list of items, I wrote up a few scripts to format and sort lists of objects and merge redundant stacks of items (for example, of you were making a list of all resources in a town, you would need to copy and paste from multiple buildings, and there might be duplicate resource names).

I though this might be useful to other players of Cantr, so I added a GUI to it and embedded it in a web page as a Shockwave object. (If you don't have the Adobe Shockwave Player you can download it here). Anyway, I haven't tested it a lot so there might be one or two bugs with the interface - if you find any, please PM me.

http://joo.freehostia.com/cantr/itemlist/
User avatar
DylPickle
Posts: 1228
Joined: Sun Aug 15, 2004 6:01 pm
Location: Canada

Postby DylPickle » Sun Nov 23, 2008 8:31 am

That's awesome Joo. Can't wait to try it out. This'll make life so much easier when I play my managers.
User avatar
BarbaricAvatar
Posts: 3489
Joined: Wed Mar 09, 2005 5:01 pm

Postby BarbaricAvatar » Sun Nov 23, 2008 3:26 pm

Hey that's brilliant, it works a treat. Image
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(" )_(" ) signature to help him gain world domination.
User avatar
CantrFreak
Posts: 1243
Joined: Sun Nov 19, 2006 5:57 pm

Postby CantrFreak » Sun Nov 23, 2008 7:52 pm

This is great!

Now all we need is something that works out how much an amount of a resource (or resources) is worth in DOW.
Image
User avatar
joo
Posts: 5021
Joined: Fri Jun 17, 2005 2:26 pm
Location: London, UK

Postby joo » Mon Nov 24, 2008 3:04 am

CantrFreak wrote:This is great!

Now all we need is something that works out how much an amount of a resource (or resources) is worth in DOW.

That might indeed be possible, if the data that is used for Cantr2Projects was used... I shall think about it.
User avatar
Doug R.
Posts: 14857
Joined: Wed Mar 23, 2005 6:56 pm
Contact:

Postby Doug R. » Mon Nov 24, 2008 2:25 pm

Thanks Joo!
Hamsters is nice. ~Kaylee, Firefly
User avatar
SekoETC
Posts: 15526
Joined: Wed May 05, 2004 11:07 am
Location: Finland
Contact:

Postby SekoETC » Sun Jan 18, 2009 1:22 am

Otherwise a great thing except when I paste the copied list to Notepad, the line endings are displayed as a box instead of an actual line ending. Could you include some Notepad-compatible line endings option? It seems to work okay in WordPad and if I copy from WordPad to Notepad then that fixes the boxes, but I wouldn't like having to do that every time.
Not-so-sad panda
User avatar
joo
Posts: 5021
Joined: Fri Jun 17, 2005 2:26 pm
Location: London, UK

Postby joo » Sun Jan 18, 2009 2:06 am

Ah, yes, I should have used a CRLF instead of just a carriage return.

Clear your cache, and it should work now.
User avatar
*Wiro
Posts: 5855
Joined: Mon Sep 29, 2008 1:24 pm

Postby *Wiro » Mon Jan 26, 2009 3:22 pm

Awesome, much easier like this. :) Thanks.
Read about my characters by following this link.
User avatar
*Wiro
Posts: 5855
Joined: Mon Sep 29, 2008 1:24 pm

Postby *Wiro » Fri Jun 12, 2009 1:37 pm

omg. Why is it down? Q_Q
Read about my characters by following this link.
User avatar
El_Skwidd
Posts: 628
Joined: Mon Jun 28, 2004 10:07 pm
Location: Pittsburgh, PA

Postby El_Skwidd » Fri Jun 12, 2009 1:56 pm

joo, you are a Cantr wizard. 8)
Cdls wrote:Explaining Cantr to a newb would be like explaining sex to a virgin.


Let the world hear these words once more:
Save us, oh Lord, from the wrath of the Norsemen!
User avatar
joo
Posts: 5021
Joined: Fri Jun 17, 2005 2:26 pm
Location: London, UK

Postby joo » Fri Jun 12, 2009 6:22 pm

It's not down for me, but maybe the Freehostia servers went down temporarily.

I should rewrite this in Javascript some time...
User avatar
BlueNine
Posts: 332
Joined: Fri Oct 21, 2005 4:52 pm
Location: Essex, England

Postby BlueNine » Sat Jun 13, 2009 8:35 pm

This is the exact thing I was thinking I should learn some programming to be able to make (was going for a java app)...thanks for doing it for me!, but also curse you for enabling me to go on without learning it!
Lying in the depths of your imagination, worlds above and worlds below, you can tell a man from what he has to say

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest