Jump to content

Adding Chest To Circle Tower


AFGMAlpha

Recommended Posts

You still have some 'tal_' in there, but better and you can try it to see if it works without having all of the naming perfect. Because this is such a small script, you don't really need to have constants defined. But it also won't hurt anything and might not be bad practice for when you have longer scripts to write.

 

It compiled? Try running the mod and see if it works (and remove the '//' from the displayfloaty). It might not, but at least you will be closer.

 

Forgot to ask under 'hierarchy' is it under 'single player'?

Link to comment
Share on other sites

You still have some 'tal_' in there, but better and you can try it to see if it works without having all of the naming perfect. Because this is such a small script, you don't really need to have constants defined. But it also won't hurt anything and might not be bad practice for when you have longer scripts to write.

 

It compiled? Try running the mod and see if it works (and remove the '//' from the displayfloaty). It might not, but at least you will be closer.

 

Forgot to ask under 'hierarchy' is it under 'single player'?

 

'Single Player' was selected under 'Hierarchy'.

 

Ran the mod and it worked; container was in the correct spot, items were in said container and items were obtainable from container. I also ran the mod without anything having 'Plot' flagged like the original did.

 

Also while I was trying the mod, "storage script running" was always above my head, is this a good thing? lol

Link to comment
Share on other sites

I'm getting a late start this morning and have to be away from the computer for a while so if you read this before I get back....

 

Leave displayfloaty enabled and have your GW 'run around a bit' inside the tower, places other than the tower, load some saves and run that GW around. Just notice how often 'storage script running' appears over your GW's head and realize that there are times that it won't appear over the GW's head.

 

I WILL make suggestions on efficiency when I get back inside.

Link to comment
Share on other sites

If you haven't done the displayfloaty test, then go ahead and do that before you decide which option to use.

 

The first thing to realize is that your program/script will run almost every time (possibly every time) an EVENT occurs (for a list see: http://social.bioware.com/wiki/datoolset/index.php/Category:Event_types). I believe it is my responsibility to make sure that my mods run as rarely as possible and efficiently as possible. How many mods do you have installed and how often do they 'run'? I ended up deleting almost all of the equipment mods - even those I liked - because so many were adding 'just a little more' lag and when you added them all together.... It became noticeable.

 

So how to prevent/reduce lag:

1) PRCSCR to run the script. This is my preferred option for a small mod like yours that adds something to one area and one area only. Using PRCSCR means that the script will run only once each time you enter the specific area. It can be a bit finicky and you may not be able to put the chest in the templar quarters based on areas, area lists, and such that just give me a headache to think about. But could you put the chest in the area where the quartermaster is? Your call on what is most important. For efficiency and least possible increase in lag, I believe it is the way to go. For more information go to: http://social.bioware.com/wiki/datoolset/index.php/PRCSCR_Script_Templates

 

2) Plot flags. Check a flag such as 'ITEM_PLACED' when you first enter the script. If 'ITEM_PLACED' TRUE, then you just execute a few lines of code and exit the script. If ITEM_PLACED FALSE, then you execute additional lines to see if it has already been placed, etc etc - and set ITEM_PLACED TRUE when the item is placed.

 

3) Areaid - Same concept, check the areaid and execute only if you are in the correct area no reason to check IsObjectValid if you are in Lothering.

 

4) Combination AreaID & Plot Flags - I created a little mod for my own use that puts Origin specific items in chest in all of the different Origins (and Ostagar). I checked the Origin and area to determine which items to place where. When I had placed the chest, I set a flag "ORIGIN_COMPLETE" and would exit the program "before Ostagar". In Ostagar, it would place the chest and then set a flag to COMPLETE. For the remainder of the game, it checks one flag (COMPLETE) and then exits the script. I keep telling myself that I should go back and find a way to do it with PRCSCR, but it works the way it is. And someday I might get ambitious and decide to add equipment chests in each area that a Companion is met and/or recruited.

 

Now that you have a working mod (woohoo!), I suggest adding lines/scripts for efficiency. I can't be a huge help on PRCSCR files because they don't always like me. I like THEM from an efficiency standpoint, but they don't always seem to like me! :wink:

Link to comment
Share on other sites

AFGMAlpha - could you move this conversation to 'Mod Talk' (even if it is just a copy/paste of a few messages to start a new thread)? I hate to be discussing 'how to' in an area that others are using for troubleshooting what doesn't work. Your mod now works so we are just discussing how to make it work better! :biggrin:
Link to comment
Share on other sites

AFGMAlpha - could you move this conversation to 'Mod Talk' (even if it is just a copy/paste of a few messages to start a new thread)? I hate to be discussing 'how to' in an area that others are using for troubleshooting what doesn't work. Your mod now works so we are just discussing how to make it work better! :biggrin:

 

http://forums.nexusmods.com/index.php?/topic/853171-optimizing-modscript/

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...