Author Topic: 2da columns moving  (Read 1007 times)

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
2da columns moving
« on: June 12, 2011, 10:25:01 pm »


               Is there any easy way to move whole clumns in 2da to other parts of the 2da or to copy one colum info and paste it in another? program or trick?
               
               

               


                     Modifié par ShadowM, 12 juin 2011 - 09:28 .
                     
                  


            

Legacy_s e n

  • Hero Member
  • *****
  • Posts: 654
  • Karma: +0/-0
2da columns moving
« Reply #1 on: June 12, 2011, 10:45:32 pm »


               excel
               
               

               
            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
2da columns moving
« Reply #2 on: June 12, 2011, 10:55:02 pm »


               I do not have excel and I tried it through open office but cannot get it to work
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
2da columns moving
« Reply #3 on: June 12, 2011, 11:03:41 pm »


               Excell or OpenOffice should work. 
Ill try a test myself and get back to you. 
First one warnning.  Here is a Quote from the 2da file format.

Columns
Applications may reference a column by position (column 0, column 1, etc.) or by name. To avoid
breaking code that depends on column position, the following rules apply:
· Always add new columns after the very last column.
· Never insert a new column inbetween two existing ones or as the first one.
· Never delete a column from a 2da.
· Never rename a column.
· When adding a column, make sure that all rows include entries for the new column.


So do not be supprised if reording OC column's in the 2DA's starts breaking things.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
2da columns moving
« Reply #4 on: June 12, 2011, 11:10:56 pm »


               2da Edit 0.63 can do that
               
               

               
            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
2da columns moving
« Reply #5 on: June 12, 2011, 11:13:24 pm »


               Ahhh these are custom 2da '<img'> thanks ShaDoOoW I been trying different stuff all over the net to get it to work. I give that one a look at. '<img'>
               
               

               
            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
2da columns moving
« Reply #6 on: June 12, 2011, 11:25:05 pm »


               Tested it out, it worked '<img'> thank you again ( add that thing to the tools sticky) I do not think I saw it. Thanks again ShadoOoW was very frustrating trying to move all that data the old way.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
2da columns moving
« Reply #7 on: June 13, 2011, 12:09:22 am »


               

ShadowM wrote...

Tested it out, it worked '<img'> thank you again ( add that thing to the tools sticky) I do not think I saw it. Thanks again ShadoOoW was very frustrating trying to move all that data the old way.


Cool,
My tests with Open Office where getting messy.
Glad you found something that works for you..
               
               

               
            

Legacy_Invisig0th

  • Sr. Member
  • ****
  • Posts: 279
  • Karma: +0/-0
2da columns moving
« Reply #8 on: June 14, 2011, 10:57:26 pm »


               If you are on Windows, don't bother using a spreadsheet program for this unless you are a glutton for punishment. Textpad is a simple, free-to-try-out text editor that allows you to copy and paste using vertical selections (a feature they call "block select"). I've done tons of cutting and pasting 2DA columns myself using Textpad, and it literally could not be easier. See http://www.textpad.c...d/features.html
               
               

               


                     Modifié par Invisig0th, 14 juin 2011 - 10:10 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
2da columns moving
« Reply #9 on: February 09, 2012, 03:42:48 pm »


               I want to add that this works very well. I am adding some columns to appearance.2da that are much needed. I'm thinking that some scripts can be completely rewritten. There are a number of scripts that use test the creature's appearance index in a switch statement. Would be much better to store the information in an ACTUAL table rather than a virtual one. AND then you only need to store the information in one place.

Things like FLYING, AQUATIC, INCORPOREAL, SOFTBODIED and for creatures that have alternate appearances such as birds that can fly or walk... you can provide a "pointer" to the other appearance type making it very easy to switch appearances between the two states.

Anyway... adding table data to a 2DA is gold. For some reason I did not realize this was possible.
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
2da columns moving
« Reply #10 on: February 09, 2012, 04:06:11 pm »


                <looking a little wild...>

Damn. I *like* that idea about pointers to alternate appearances!

May I also suggest using a column to give creators a place to put author, version, and usage info? Been thinking about this for a while, and planned it for the region 2das, but haven't got around to it.

The trick will be to add columns in a standard way, because any script that looks for them will look for them with the same position/name. <heh. herding cats again>
Yup.

Make the custom columns "Custom1" through "Custom9" and store your appearance flags in the text strings?. And add "Comments" to the end for author/version/etc stuff?

Something to think about. But set a standard early and save headaches later.

<...and a little frustrated>
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
2da columns moving
« Reply #11 on: February 09, 2012, 04:14:08 pm »


               Well the way I look at these kinds of 2DA changes... they are module specific. BUT if someone wants to setup a standard... I'm all for it.

That said, I think you simply need to add the custom columns after the standard columns. Get2DAString looks for columns by string name. So you could completely reorder the columns and it would still find them. The problem with changing column order is for the engine itself BUT if you simply add on to the end it doesn't matter because the hardcoded functions won't be looking at them anyway.

However is there a faster 2DA lookup that allows you to specifiy column and row each with an int?
               
               

               
            

Legacy_YeOlde

  • Jr. Member
  • **
  • Posts: 66
  • Karma: +0/-0
2da columns moving
« Reply #12 on: February 09, 2012, 06:27:13 pm »


               Use Notepad++. You can select and copy columns with it. It's outstanding, and free.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
2da columns moving
« Reply #13 on: February 09, 2012, 07:12:25 pm »


               YeOlde were you responding to me?

My question was: Is there a function for looking up 2DA data by column index and row index? As opposed to Get2DAString which uses row index but is given the string name for the column.
               
               

               
            

Legacy_YeOlde

  • Jr. Member
  • **
  • Posts: 66
  • Karma: +0/-0
2da columns moving
« Reply #14 on: February 09, 2012, 07:58:46 pm »


               I responded to the topic starter ShadowM '<img'>
               
               

               


                     Modifié par YeOlde, 09 février 2012 - 08:00 .