Aller au contenu

Photo

Changing placeables.2da lines


  • Veuillez vous connecter pour répondre
28 réponses à ce sujet

#1
Banshe

Banshe
  • Members
  • 557 messages
I gather that if you change the location of the lines in this 2da, you lose the appearance. I made prefabs with Nytir's oriental set. When designing these prefabs, I used the old, unreserved lines.

I just installed the BCK combined for autodownloader and tried out my prefabs. The individual placeables within the prefab lost their appearance.

I did the following:

Override: my prefabs, the bck combined utp files, pain's placeables.2da

Hak: the 6 hak files for BCK 1 and 2.

I attached the six haks to the module.


So is there a way to convert this over easily to use the new lines? Or did I make a mistake that caused the appearances to disappear?

#2
Friar

Friar
  • Members
  • 293 messages
Sounds like a puzzle.

I'm not sure why you would be using both overrides and a hak?

Sometimes those two conflict if I'm not mistaken.

#3
Morbane

Morbane
  • Members
  • 1 883 messages
Initially, the placement of new content in the placeables.2da is arbitrary. But if content from a specific version of a placeables.2da has been used, then the placement is static and should not be moved or the info will be out of sync. BUT, to add to the 2da, any new unused rows are again arbitrary until they are implemented. You should revert to the old 2da, then add the new lines to it, All the new stuff will work fine regardless of its location.

Also, the hak version of the placeable.2da will override the override. You should ultimately have only 1 placeables.2da...

Modifié par Morbane, 26 septembre 2010 - 07:27 .


#4
Banshe

Banshe
  • Members
  • 557 messages
Thnks guys.



As for the haks, they have no 2da files in them so they are ok.



I can use these prefabs without too much problem. I won't be using Tupoun's work so I have few worries about taking his reserved lines in my personal placeables.2da.



However, I would like to offer these prefabs to folks on the vault. And I don't think it would be such a great idea to force anyone to use my customized 2da file (especially because Tupoun's work is good).



So if there is a way to convert these prefabs so that the individual placeables within it use the new lines, I may give it a shot. But I won't remake these as that is a little too painful and took me too long to make them the first time.



@ Morbane: I think I can add the lines from my personal 2da to the standard "reserved lines" 2da for my own work. But I can't for a general release (see above).

#5
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
AFAIK you will need to reassign by hand the proper appearance to each placeable that now has a new/changed 2da line. Quite a PITA.

Modifié par _Knightmare_, 26 septembre 2010 - 11:47 .


#6
Banshe

Banshe
  • Members
  • 557 messages

_Knightmare_ wrote...

AFAIK you will need to reassign by hand the proper appearance to each placeable that now has a new/changed 2da line. Quite a PITA.


If there are 10 prefabs with 50 placeables each in them but there are only 40 placeables in the Oriental pack, would I have to do this 500 times or 40 times?

Also, what if I made an erf of my placeables and imported that?

And, is this really only in regards to the toolset, the prefabs would show up fine in game?

#7
Banshe

Banshe
  • Members
  • 557 messages
Ok. I did a bit of digging and found something interesting, Kivinen's perl tools. At the bottom of the page:

"Changes appearance numbers inside erfs, modules, or haks."

From here:

http://www.kivinen.i.../downloads.html

Apparently, you can do this in a batch. His words:

If you move the 2DA entries to new numbers, you need to update the blueprints too, otherwise you cannot the item placeables, as the blueprints have wrong numbers. Chaning the blueprints is very easy if you use my perl tools with command like this:

gffmodify.pl -v -v -v -v -s "^/$" -f "Appearance:=:^5...$" -P "app=Appearance" -m "Appearance=9@substr(@app@,1)@" *.utp

which changes all appearance values from 5xxx to 9xxx (or whatever you put there.

The reason there is item blueprints in the custom palette is to keep the correct model being displayed. Placeables can only have one model part, and we cannot use CopyItemAndModify to change their look, thus we need to have specific placeable for each model. Currently I only created models for each model that has all the parts same (i.e. top = middle = bottom). It could be possible to create each model part as separate placeable and put them down with correct placement by script, but that would mean there is 3 placeables on the ground not one, so mouse over and such would see them as separate models, which would look ugly. The default scripts already do select suitable placeable based on the item appearance, and do change the name and description of the placeable to match the item name.

From here: http://nwvault.ign.c...l.Detail&id=153
<<<>>>

It is actually his stuff that I would conflict with (placeable items) rather than Toupon's.

Modifié par Banshe, 26 septembre 2010 - 01:02 .


#8
dunniteowl

dunniteowl
  • Members
  • 1 559 messages
That should work, Banshe, though _Knightmare_'s comment about naming the blueprints is salient. I do think, though, that if you select the placeables that need their blueprints renamed as a group (not a prefeab, but by selecting in the Area Contents tab all the same blueprints) and then changing their item appearance in the Properties tab, that you can do each separate item that uses the same blueprint as a single large group at a time.

Mind, I haven't had to do this personally, but I do believe it should function properly if done in that manner.

dno

#9
_Knightmare_

_Knightmare_
  • Members
  • 643 messages

Banshe wrote...

If there are 10 prefabs with 50 placeables each in them but there are only 40 placeables in the Oriental pack, would I have to do this 500 times or 40 times?

Also, what if I made an erf of my placeables and imported that?

And, is this really only in regards to the toolset, the prefabs would show up fine in game?


Personally, I'd go with the 40 instead of 500 lol. That might require you to again alter the lines in your 2DA, depending on what is now different or what you will have to switch.

dunniteowl wrote...

That should work, Banshe, though _Knightmare_'s comment about naming the blueprints is salient. I do think, though, that if you select the placeables that need their blueprints renamed as a group (not a prefeab, but by selecting in the Area Contents tab all the same blueprints) and then changing their item appearance in the Properties tab, that you can do each separate item that uses the same blueprint as a single large group at a time.
Mind, I haven't had to do this personally, but I do believe it should function properly if done in that manner.
dno


DNO is on to it here. You will need to reassign the appearance to both the placeable's blueprint (so it is correct next time you use it) and any instances you have of it (placeables painted down in an area). For the painted down instances, you can batch select them as per DNO's suggestion above and change them all in one shot (within a single area that is).

If that program off the vault will automate this process, then quite useful, wish I had known about it sooner lol. Let us know if it works!

#10
Banshe

Banshe
  • Members
  • 557 messages
Thanks guys for the feedback. This is one of those weird situations where, if everything is left alone, everything should work out ok. But there is a better way to do it (i.e. use only the reserved lines).



I had a look at Kivinen's item placeables. It is about 900 weapon and shield placeables plus about 100 kitchen utensils. He pretty much takes up the whole range that he reserved (lines 5000-6000). The reason why there are 900 weapon/shield models is that the same weapon has a number of different poses (lying on its side, propped up against a wall etc.). As they are all medievil weapons (not oriental), the chances of conflict with oriental content... I dunno.



I'm not sure what I am going to do yet...

#11
Morbane

Morbane
  • Members
  • 1 883 messages

_Knightmare_ wrote...
If that program off the vault will automate this process, then quite useful, wish I had known about it sooner lol. Let us know if it works!


I am curious as well with respect to how kivinen's tool works 
:whistle:

#12
Banshe

Banshe
  • Members
  • 557 messages
I'm not sure I will be using it after all though. Mostly because of the way the 2da that I want to use is structured. The 2da that I used to make my prefabs has the placeables but with numeric gaps between groups of them. The combined 2da that I am trying to port to has them all sequential. So I can't mass move them.



By the way, if I use DNO's idea, is the appearance the only setting I will have to change for the placeables?

#13
_Knightmare_

_Knightmare_
  • Members
  • 643 messages

Banshe wrote...

By the way, if I use DNO's idea, is the appearance the only setting I will have to change for the placeables?


Yes, that should be all you need to do.

#14
Banshe

Banshe
  • Members
  • 557 messages
Ok. Some weirdness that might stop me in my tracks. Some of my prefabs are not actually staying complete. I have been using DNO's idea. And it works (mass select the individual matching items and change the appearance in one step).



But some of the prefabs are incomplete. It seems to be the roofs of some buildings. Either part of the roof or the whole roof is no longer a part of the prefab. I add appearances to all the roof parts but some roof parts are simply not in the list.



The prefabs are fine (complete) if I am using my placeables.2da.

#15
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
What i do is this ( i've done a lot of migrations as i had the old BCK config which was in reserved ranges, and have done a lot of management of this for my PW. I got it all sorted now except for one stalactite which i got to verify i am not using so i can use kivinens placeable items )



First, for each current row in the 2da you wish to move. Find it's value in the Label column and change it, assuming its name is now "Super_Tree", change it to "Super_Tree_REMOVED" by adding _REMOVED in all caps to the end. If its using a StrRef ref for it's name ( anything but a **** ), go ahead and remove that and use ****. You want to make sure all names are unique in the label column, and by making the StrRef **** you are making the toolset use the actual label, this will make it very easy to fix a placeable appearance in the toolset later on ( the correct one will always be right next to the incorrect one in the list ).



Now go ahead and copy the above row to the desired line you want it to be on. Make sure "Super_Tree" is still being using used and the StrRef is ****. This will allow things to be alot easier in the toolset.



Now this is the cool part. The engine does not care if you use or don't use a row, so having 2 rows at the same time is not an issue and you can leave it like this forever until you need the old row for something else, until you change the old row to something else entirely all your old content will keep working. I would plan on leaving this in place for at least a week, perhaps a few months and do a final audit of rows you have moved prior to getting rid of the old rows. For ALL new content make sure it is using the row that does not say _REMOVED. If you know you have a conflict do this step today, even if you are not ready to fix your old content as it's very easy and leave the actual fixing of your content until you have time, since you have what you are moving to already implemented you can reduce the future work by adjusting anything new you do. It also makes it very easy to flip a incorrect row to the correct row.



Now tell your QA person if you have one to monitor all blueprints and placed items as they do their thing to look for "_REMOVED" being used. You really could almost make a tool to do this if you make plugins.



Now the next step is to fix any blueprints. Go ahead and find your old blueprints, click on them one at a time and look at the appearance value in properties. If it says REMOVED ( which is pretty obvious since it's all caps ) you just have to click on it, and look one above or one below the current selection for what you have to change it to. It's always going to be right next to the current selection in the list. This is because you set the strRef to a **** and your new "Label" is in alphabetical order right next to the old one. This can be tedious, once you have this done redistrubute these along with your new placeables.2da to your entire dev team.



Now you have stopped the problem from getting bigger, the next thing to do is fix your old content which has been instanced from the blueprint template. The Area Contents tab can be used to look for these, and you have to look at both blueprints and environment objects. You can sort by resref ( the file name of the original blueprint ) and again click on each one looking for REMOVED in the appearance value. When you see it, select everything with the same appearance ( if it's all indeed the same it will keep saying REMOVED, if one is different it will go blank ) and change it to the new row which again is just one row above or below the current one.



Now that you have verified the transition, I would advise not removing the original row right away, over time you will notice things you did not see before and slowly all the old row usage will be noticed and removed.



One thing you can do is use an obnoxious model which is easy to spot to indicate you have a bad row, which can be noticed by QA people and players easily. I would only do this after all previous steps and i know for sure it's not in use. Just change "NWN2_ModelName" to something big and ugly of your choice ( just copy from another row basically ). If you see this in game or in toolset you know to select it and flip it from _REMOVED to the correct row.



After you've had a chance to make the change settle, you can then go and use the old rows for new things. Just make sure what you are using is either in a generally reserved row, or its author reserved it on the reserved 2da ranges. I would advise against putting things near the padded content as too often new content makers tend to congregate there. If at all possible communicate what range you are using and we can get things so they match up between PW's and SP modules ( i have no trouble adding what you are doing to my placeables.2da since nothing is actually installed without the blueprint being present ).



Note i use the same technique to move things in appearance.2da, and i've got a few hundred rows i use there which are marked as removed but allow content on some random row picked by some SP modules author to keep working.

#16
Banshe

Banshe
  • Members
  • 557 messages
Small update: The mystery unfolds

In my OA thread here, you can see this in the screenshots:

http://social.biowar...7/index/4820514

If you notice, some of the roofs are gold colored. I did not do that on purpose. I copied those roofs from Nytir's prefab to use and learn from. Well... It is the golden roofs that are the missing ones.

I was able to transfer them between modules and put them into my prefabs. But for some reason, they don't like this placeables.2da line changing.

Anyone have an idea of why that might be?

Edit: Ok. So I guess Nytir made them environmental objects... :D

Modifié par Banshe, 27 septembre 2010 - 07:53 .


#17
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
You need to check both environment and placeables tabs in area contents. Nytir likely did not do that, but it's a good practice to convert all blueprints to environmental to reduce server load. Basically they are separate categories of the same thing.

#18
Banshe

Banshe
  • Members
  • 557 messages
Yep. I noticed that the properties for Nytir's roof was a lot shorter than the typical property page for a placeable. So I checked the environmental object area contents and there they were.



I'm going to make the prefabs 100% placeables and convert them to env. objects when they are placed. These roofs are ninja walkable so I don't want them automatically off.

#19
Banshe

Banshe
  • Members
  • 557 messages
Hi all,

First a big thank you to all of you (DNO especially) for getting me through this. Secondly, my apologies for not trying out the tool but I couldn't mass change the line numbers because the gaps changed.

I have converted the prefabs to 100% placeables and will let the end user decide what to change to environmental objects. Kamal was telling me about "shadows". Should I turn off all the shadows (receiving and casting) for all the placeables in the prefabs?

Modifié par Banshe, 28 septembre 2010 - 09:49 .


#20
dunniteowl

dunniteowl
  • Members
  • 1 559 messages
I would turn off recieves shadows, but not casts shadows. I also believe that there are selections within the selection (in other words, there's a set of choices.) In this, you should be able to select Casts Shadows from: (the choices are) Cast shadows from all lights, and self-shadow; Cast shadows from directional lights only; Cast shadows from directional lights only; Cast shadows from point lights only; Don't cast shadows and; Self-shadow. Honestly of those choices for casting shadows with buildings, probably self shadow or from directional lights only would be the best choices (and you should check them out in game to see how they do before you decide.)

In the case for Recieves Shadows, the choices are: Don't receive shadows; Receive shadows from directional lights; Receive shadows from point and directional lights; Receive shadows from point lights -- I would select: Don't receive shadows, as there's really not that big a deal with no extra shadows being 'recieved' by the buildings. Especially as the shadows other things cast are still going to be around.

Clearly, I would stamp this with the caution: Test this your self in game to see the effects your changes have before you decide. Cutting down on the number of shadows an object casts and recieves should cut down on the rendering intensity of your areas. However, do make sure that things like creatures recieve all the shadows that are out there, unless you want to create them as 'stand out' glowing objects in the shadows of the buildings, forests and caves of your module areas.

In your case, setting the placeables to self shadow or the cast from Directional Lights would probably be best (I would think from directional lights would be most effective as that would be like the sun and moon lighting.) Point lights would be like torches, glows from magical effects and such things, and, as such, should be providing LIGHT not shadow on the walls and thus, shouldn't pose any issues.

Just some considerations for you.

dno

#21
Banshe

Banshe
  • Members
  • 557 messages
Thanks DNO. I was talking to Kamal about this in IRC and just wanted to get more feedback on it before I did anything.



In normal NWN2, to make a town, you place a bunch of buildings each one being a single placeable. With Nytir's stuff, each of those buildings can be up to 10-40 placeables. So this is going to be a major deal for me. I am tempted to make them all env. objects with no shadows at all (not for the prefabs but for my own use of the prefabs) and use the terain tool to define the walkmesh. But it will depend on how big the area gets (I doubt I could do more than one street or family compound per area).

#22
dunniteowl

dunniteowl
  • Members
  • 1 559 messages
I think even as EOs they still have the option for shadows cast and received. I don't know that for a fact, because I mostly work with trees, which as SpeedTrees, cannot be converted to EOs.

dno

#23
Banshe

Banshe
  • Members
  • 557 messages
Yep, I think they do. :)

#24
Bonzoli

Bonzoli
  • Members
  • 7 messages
Banshe in that perl script set, look for a script called remap.pl then do perldoc remap.pl on the cmd line. Its easier then trying to figure out the regular expressions for Tiles and Placables. With remap.pl you can do use -t tiles against the .GIT file and this will change all placed items in a given area.

Modifié par Bonzoli, 06 octobre 2010 - 12:38 .


#25
Banshe

Banshe
  • Members
  • 557 messages
Thanks Bonzoli. I'm going to subscribe to this thread in case it comes up again but I already did it the DNO way.



On a side note, something should be done about those tools. It would be a pity for them to disappear. Perhaps they can be put on the vault.