Modifié par ShadowM, 12 juin 2011 - 09:28 .
2da columns moving
#1
Posté 12 juin 2011 - 09:25
#2
Posté 12 juin 2011 - 09:45
#3
Posté 12 juin 2011 - 09:55
#4
Posté 12 juin 2011 - 10:03
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.
#5
Posté 12 juin 2011 - 10:10
#6
Posté 12 juin 2011 - 10:13
#7
Posté 12 juin 2011 - 10:25
#8
Posté 12 juin 2011 - 11:09
ShadowM wrote...
Tested it out, it workedthank 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..
#9
Posté 14 juin 2011 - 09:57
Modifié par Invisig0th, 14 juin 2011 - 10:10 .
#10
Posté 09 février 2012 - 03:42
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.
#11
Posté 09 février 2012 - 04:06
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>
#12
Posté 09 février 2012 - 04:14
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?
#13
Posté 09 février 2012 - 06:27
#14
Posté 09 février 2012 - 07:12
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.
#15
Posté 09 février 2012 - 07:58
Modifié par YeOlde, 09 février 2012 - 08:00 .
#16
Posté 09 février 2012 - 08:04
#17
Posté 09 février 2012 - 10:39
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.
I have done this for awhile, if you look at my HR DM tool I use a apptail 2da to match up creatures and tails to run through a custom scale function. Make it a lot easier. I also did one connecting humanoid monster to riding humanoids that do not have full animation in my riding hak (not sure if I have updated that to the vault yet.) I will be also use this system for my custom flying system coming HR base) well if your 2da are custom and you use unque names for you colums you should ok and it easy to point them back to the standard apperance.2da for you row check. Other systems could be custom tail/back models, helmet etc..
#18
Posté 10 février 2012 - 09:05
henesua wrote...
oh... i was confused because I was practicing thread necromancy. This is an 8 month old thread.
Oh... Oh, uhm... I have a slow internet... *coughs*





Retour en haut







