Fred Tetra Posted September 19, 2005 Share Posted September 19, 2005 I am working on a new feature in the Kotor Tool module editor that I could use some input on. What I need to know is, does the TemplateResRef field play any role in the game itself? I know that the Tag field is important, and in Neverwinter Nights, it is often the name for a given instance of a template file. The reason is that I need to know if the field is "inactive" outside of the toolset environment. It suspect that it is. If so, this would allow a better workflow in the module editor when users drag something onto the map. Sometimes you just need a reference to the template file, such as all of the beds in the Telos medical center; you don't need a file for each. Other times you need to create an instance of a template so you can edit it's properties without disturbing those of all of the others that are just references. If I can use the TemplateResRef field as in NWN, the editor will know from whence a reference came, and can then allow the user to change a it to an instance by making a copy of the template file and allowing them to edit it. Does anyone have any definitive experience with this field? Link to comment Share on other sites More sharing options...
tk102 Posted September 19, 2005 Share Posted September 19, 2005 Once an instance 'in the game itself', it is stored in the .git file or in Inventory.res, or as AVAILNPC#.utc in the savegame.sav -- but in each case the TemplateResRef field is not stored. I can't remember ever seeing the TemplateResRef field exist outside of the template files (.ut*). Maybe I'm just reading your question wrong. Link to comment Share on other sites More sharing options...
Fred Tetra Posted September 19, 2005 Author Share Posted September 19, 2005 No, I think you're right. I am looking for just this sort of confirmation before I go building a feature around it! I think the TemplateResRef field is like the PaletteID field; just for the Toolset. Anyone else? Link to comment Share on other sites More sharing options...
stoffe Posted September 19, 2005 Share Posted September 19, 2005 No, I think you're right. I am looking for just this sort of confirmation before I go building a feature around it! I think the TemplateResRef field is like the PaletteID field; just for the Toolset. Anyone else? I have some vague memory of reading somewhere official that the TemplateResref must match the filename of the file (minus the file suffix) or bad things might potentially happen. Something about how the engine sometimes used this field and sometimes the filename. Don't know if this is still the case though, I haven't felt inclined to test my luck. If you want to get rid of the field in the user interface, just set it to automatically match the filename when you save the files. The NWN toolset does this, and won't let you set the TemplateResref and filename independently. Link to comment Share on other sites More sharing options...
Darth333 Posted September 19, 2005 Share Posted September 19, 2005 If you want to get rid of the field in the user interface, just set it to automatically match the filename when you save the files. The NWN toolset does this, and won't let you set the TemplateResref and filename independently.I believe that would be the best thing to do. It would save many beginners mistakes. If the TemplateResRef is different from the file name, then the object does not appear in the game. This is what the Bioware documentation says: TemplateResRef - CResRef - The filename of the UTC (edit: UTI, UTP, etc) file itself. It is an error if this is different. Certain applications check the value of this Field instead of the ResRef of the actual file. If you manually rename a UTC file outside of the toolset, then you must also update the TemplateResRef Field inside it. Link to comment Share on other sites More sharing options...
Fred Tetra Posted September 19, 2005 Author Share Posted September 19, 2005 I believe that would be the best thing to do. It would save many beginners mistakes. If the TemplateResRef is different from the file name, then the object does not appear in the game. I didn't know that! Well, that would certainly be a "quality-of-modding-life" improver! I'll have to add that update to my to-do list. Also, I guess I could always implement my own parent-indicating field, since the game ignores fields it doesn't use. While I am on the subject of Module editing, does anyone know about the following: * Do any of the modules have weather effects? * " " have day/night cycles? * " " have more that one .are/.git set, as in NWN * What flag/field prevents you from the auto health/FP restore on Korriban? (Script perhaps?) * Why Kriea's body will stay on the slab in the morgue and not fall through to the floor? Thanks for the help, everyone! Link to comment Share on other sites More sharing options...
stoffe Posted September 19, 2005 Share Posted September 19, 2005 1) Do any of the modules have weather effects? 2) " " have day/night cycles? 3) " " have more that one .are/.git set, as in NWN 4) What flag/field prevents you from the auto health/FP restore on Korriban? (Script perhaps?) 5) Why Kriea's body will stay on the slab in the morgue and not fall through to the floor? 1) Yes, it's snowing on the Telos Polar Plateau, and it's raining in the Dxun Jungle. 2) No, passage of time has no meaning in KotOR/TSL, unlike NWN. You can't even view the in-game time in the GUI (unless I have overlooked something obvious). 3) No, the engine is changed for KotOR/TSL to only support 1 area per module. The Area part of the scripting location datatype has been removed and it only keeps track of position and facing now, for example. 4) The DisableHealthRegen() scripting command can be used to turn off health regen. However, the ForceRating value set for each Room in the .ARE is what is making lightsiders weak and darksiders more potent in the Korriban Tomb and Academy. It affects both the player party and all other creatures in the affected area. Negative values boost darksiders and make lightsiders weaker. Positive values boost lightsiders and penalizes darksiders. 0 is default, meaning no effect, and is used in most game areas. Neutral creatures are always unaffected. The range of the ForceRating field is -100 to 100. The Korriban tomb has all rooms set to ForceRating -100, meaning full DS boost and massive LS penalties. 5) Not having investigated more thoroughly, I would guess that the slab is part of the map and has a walkmesh. Another possibility is that Kreia's corpse is a placeable, as it could be placed on top of the slab placeable. There are a few quick fades to/from black in that scene, which might be intended to conceal swapping the placeable for the creature. Link to comment Share on other sites More sharing options...
Darth333 Posted September 19, 2005 Share Posted September 19, 2005 5) Not having investigated more thoroughly, I would guess that the slab is part of the map and has a walkmesh. Another possibility is that Kreia's corpse is a placeable, as it could be placed on top of the slab placeable. There are a few quick fades to/from black in that scene, which might be intended to conceal swapping the placeable for the creature. It is indeed a placeable: gencrps004.utp in the 101PER module. Link to comment Share on other sites More sharing options...
Fred Tetra Posted September 19, 2005 Author Share Posted September 19, 2005 1) Yes, it's snowing on the Telos Polar Plateau, and it's raining in the Dxun Jungle. 2) No, passage of time has no meaning in KotOR/TSL, unlike NWN. You can't even view the in-game time in the GUI (unless I have overlooked something obvious). 3) No, the engine is changed for KotOR/TSL to only support 1 area per module. The Area part of the scripting location datatype has been removed and it only keeps track of position and facing now, for example. 4) The DisableHealthRegen() scripting command can be used to turn off health regen. However, the ForceRating value set for each Room in the .ARE is what is making lightsiders weak and darksiders more potent in the Korriban Tomb and Academy. It affects both the player party and all other creatures in the affected area. Negative values boost darksiders and make lightsiders weaker. Positive values boost lightsiders and penalizes darksiders. 0 is default, meaning no effect, and is used in most game areas. Neutral creatures are always unaffected. The range of the ForceRating field is -100 to 100. The Korriban tomb has all rooms set to ForceRating -100, meaning full DS boost and massive LS penalties. 5) Not having investigated more thoroughly, I would guess that the slab is part of the map and has a walkmesh. Another possibility is that Kreia's corpse is a placeable, as it could be placed on top of the slab placeable. There are a few quick fades to/from black in that scene, which might be intended to conceal swapping the placeable for the creature. This is all good news, especially #2 & 3. Those are fields I won't have to code for in the editor! As for #4, now I will have to add support for that! Link to comment Share on other sites More sharing options...
Darkkender Posted September 19, 2005 Share Posted September 19, 2005 Isn't that the other corpse in the morgue Darth333? Link to comment Share on other sites More sharing options...
Darth333 Posted September 19, 2005 Share Posted September 19, 2005 Isn't that the other corpse in the morgue Darth333? no, the other corpse is g_tresgencorp004.utp Link to comment Share on other sites More sharing options...
T7nowhere Posted September 20, 2005 Share Posted September 20, 2005 I don't know how relevant this is, often when I'm testing new items I'll just change the file name to something like "1" to save key strokes. The game doesn't seem to care about the Resref for uti's at least when using the cheat console. Link to comment Share on other sites More sharing options...
Darth333 Posted September 20, 2005 Share Posted September 20, 2005 Yes, you're right, the game doesn't seem to care about that field. I just tested a script and when I change the filename, objects do not appear but when I modify the TemplateResRef, they appear. Same thing happens when I place objects using the .git file (TemplateResRef field). It seems that the game checks the filename only and that the TemplateResRef doesn't matter at all, at least in those cases. Link to comment Share on other sites More sharing options...
Fred Tetra Posted September 20, 2005 Author Share Posted September 20, 2005 Yes, you're right, the game doesn't seem to care about that field. I just tested a script and when I change the filename, objects do not appear but when I modify the TemplateResRef, they appear. Same thing happens when I place objects using the .git file (TemplateResRef field). It seems that the game checks the filename only and that the TemplateResRef doesn't matter at all, at least in those cases. That seems like what I had originally hoped for. The NWN Toolset has an option for you to propagate a change made in a custom template (an instance of a Bioware template that you added to the palette) to all of its inheritors (instances). When you tell it to add your instance to the palette, you get a chance to customize it, and the TemplateResRef becomes editable. Since you need a way to easily track a custom template's instances, having their TemplateResRef set to the custom template's filename makes sense. Link to comment Share on other sites More sharing options...
Fred Tetra Posted September 20, 2005 Author Share Posted September 20, 2005 1) Yes, it's snowing on the Telos Polar Plateau, and it's raining in the Dxun Jungle. 2) No, passage of time has no meaning in KotOR/TSL, unlike NWN. You can't even view the in-game time in the GUI (unless I have overlooked something obvious). 3) No, the engine is changed for KotOR/TSL to only support 1 area per module. The Area part of the scripting location datatype has been removed and it only keeps track of position and facing now, for example. 4) The DisableHealthRegen() scripting command can be used to turn off health regen. However, the ForceRating value set for each Room in the .ARE is what is making lightsiders weak and darksiders more potent in the Korriban Tomb and Academy. It affects both the player party and all other creatures in the affected area. Negative values boost darksiders and make lightsiders weaker. Positive values boost lightsiders and penalizes darksiders. 0 is default, meaning no effect, and is used in most game areas. Neutral creatures are always unaffected. The range of the ForceRating field is -100 to 100. The Korriban tomb has all rooms set to ForceRating -100, meaning full DS boost and massive LS penalties. 5) Not having investigated more thoroughly, I would guess that the slab is part of the map and has a walkmesh. Another possibility is that Kreia's corpse is a placeable, as it could be placed on top of the slab placeable. There are a few quick fades to/from black in that scene, which might be intended to conceal swapping the placeable for the creature. #1. The Rain/Snow/Lightning are all easily controlled in the .ARE file of a module. I should have realized... #2. Time does pass in the game, though I haven't seen a module that uses it. I wrote a small script to print the current game time to the Feedback log and it does change. Also, if you set up the .ARE right, (sun and moon colors, flags, etc.) the environment does change with time. On Dxun, I have the daytime all red and the night blue. 1 hour before dusk, the ambient light fades from one color to the other over the course of an hour (in game time). It probably fades back, too As an aside, you can also mess around with the grass density, texture, sway direction probability, etc. You can have dense red grass or sparse blue grass or anything in between! Link to comment Share on other sites More sharing options...
stoffe Posted September 20, 2005 Share Posted September 20, 2005 #1. The Rain/Snow/Lightning are all easily controlled in the .ARE file of a module. I should have realized... Yes, they still use the same system as in NWN where you can set a percentage chance for a certain type of weather phenomenon (rain, lightning, snow) to occur. As far as I can remember it's only used in those 3 areas though in TSL. #2. Time does pass in the game, though I haven't seen a module that uses it. I wrote a small script to print the current game time to the Feedback log and it does change. The engine still keeps track of the in-game time where seconds pass as normal but there are 2 minutes/hour (which can be changed in module.ifo), however no modules in TSL makes use of that in any direct way that marks the passage of time, which you asked. (Can't say I'm sorry they decided to not use day/night transitions since it always felt a bit silly that you could stand talking to a single NPC for a whole in-game day if they had a lengthy conversation.) (But technically it's not entirely true, since the minigame modules (swoops and turrets) does make use of the in-game time, but not for day/night transitions. No normal areas/modules seem to use it though. ) Link to comment Share on other sites More sharing options...
Jackel Posted September 20, 2005 Share Posted September 20, 2005 #2. Time does pass in the game, though I haven't seen a module that uses it. I wrote a small script to print the current game time to the Feedback log and it does change. Also, if you set up the .ARE right, (sun and moon colors, flags, etc.) the environment does change with time. On Dxun, I have the daytime all red and the night blue. 1 hour before dusk, the ambient light fades from one color to the other over the course of an hour (in game time). It probably fades back, too Making this useful in game would be interesting as you would be able to make people only appear at certain times of the day "Meet the mark behind the turret as the sun goes down, otherwise he wont be there" .. Well if I am reading you right anyway. As an aside, you can also mess around with the grass density, texture, sway direction probability, etc. You can have dense red grass or sparse blue grass or anything in between! Would be able to finally have really alien looking worlds rather then the "oh look its kinda like earth" thing going on now. Link to comment Share on other sites More sharing options...
Fred Tetra Posted September 20, 2005 Author Share Posted September 20, 2005 Making this useful in game would be interesting as you would be able to make people only appear at certain times of the day "Meet the mark behind the turret as the sun goes down, otherwise he wont be there" .. Well if I am reading you right anyway. You could add such behavior to the script for a trigger nearby to the target location but out of sight. Have it only spawn the NPC if the time is right. How about merchants that actually close their shops, or regular folks that go home? Would be able to finally have really alien looking worlds rather then the "oh look its kinda like earth" thing going on now. Sort of like on Stargate SG-1! "Wow, another planet that looks like the Pacific Northwest woods!" How about Dxun with red grass, a blue (really blue) moon, and snow? Or the new sun-warmed heat beds on Telos to counteract the indoor snow? Link to comment Share on other sites More sharing options...
Fred Tetra Posted September 20, 2005 Author Share Posted September 20, 2005 BTW, FT, do you know that the secondary tab for editing doors and triggers in the module editor won't save changes? Just thought I'd better tell you I need some more details; also, would you mind deleting and re-posting your question over on the Kotor Tool thread? Link to comment Share on other sites More sharing options...
Fred Tetra Posted September 20, 2005 Author Share Posted September 20, 2005 #2. Time does pass in the game, though I haven't seen a module that uses it. I wrote a small script to print the current game time to the Feedback log and it does change. Also, if you set up the .ARE right, (sun and moon colors, flags, etc.) the environment does change with time. On Dxun, I have the daytime all red and the night blue. 1 hour before dusk, the ambient light fades from one color to the other over the course of an hour (in game time). I can now say that it does fade back to "daytime" in the same manner. Link to comment Share on other sites More sharing options...
maaneeack Posted September 20, 2005 Share Posted September 20, 2005 Fred, why is it snowing inside? Link to comment Share on other sites More sharing options...
Fred Tetra Posted September 20, 2005 Author Share Posted September 20, 2005 Because I can make it do that Link to comment Share on other sites More sharing options...
maaneeack Posted September 20, 2005 Share Posted September 20, 2005 Works for me. Can you make it so your PC can control the weather? Link to comment Share on other sites More sharing options...
Fred Tetra Posted September 20, 2005 Author Share Posted September 20, 2005 I think rain is the only thing you can enable/disable from within the scripting language. Link to comment Share on other sites More sharing options...
maaneeack Posted September 21, 2005 Share Posted September 21, 2005 I can see it now: "You doubt my power? My strength of will? Then I shall prove my power to you" *makes it rain on Atton* "Do not question me again." *you gain influence with Atton* (an option when he comments on your features when you're going DS). Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.