Now, from poking around tonight I've noticed that treasure seems to get generated based on the contents of several 2da files that are broken down into categories (I assume this is to prevent dead elves from dropping darkspawn weapons and vice versa). Well, this got me thinking (and I admit this is based on a lot of assumptions).
What if I went and modified those 2da files (I assume by creating m2da files) to include a small chance in each Category (rank as well) of dropping a custom object that I create of a base type (Say, an armor or a sword, or a ring).
Now, here is where the massive assumption takes place...
I'm assuming that there is some sort of event that I can catch on the object when it is instantiated into either the creature or container. If this is the case, then I would like to catch that object (one time) and run a custom script that would generate a variety of random properties and then set them on the item via the AddItemProperty() method. Another assumption here is that properties I add dynamically at runtime will be saved with the character data in the save file and the item won't regenerate its properties when the game is loaded!
Anyway, does this sound like a half way decent way to provide some additional treasure options to the single player campaign without interfering with any other potential modules? Also, is there perhaps a smarter way of doing this? And finally, I guess I need to know the following:
- Is there an event I can catch the first time an object is created?
- Is there a way for me to get a scaling number in that event, or a reference to the PC's level for my own scaling?
Thank you





Retour en haut






