I recently completely redid the script system in smaug, and I was implementing a new mining script when I realized that programs didn't run exactly as I thought they did, and I need to change them.
Basically as it is, progz are stored in the mob_index_data structure, I would like to move them into the char_data structure. This way each mob would have its own instance of the program in its data structure, and if something is modified like a variable on the prog it would only affect the programs on that mob, and not the whole base set. I would just like to see if anyone else has done this or attempted this, and if they know of or see any potential problems with redoing the system this way.
Why I want to do this, in this example, I have mobs that are miners, and the scripts control what action they are currently doing. A variable in the program structure controls what script is running in a particular group, for this instance lets say the script that governs the mining of ore is running. The system currently would have EVERY miner of the specific mob vnum doing that action at the same time.
Any info or insight would be appreciated.
Basically as it is, progz are stored in the mob_index_data structure, I would like to move them into the char_data structure. This way each mob would have its own instance of the program in its data structure, and if something is modified like a variable on the prog it would only affect the programs on that mob, and not the whole base set. I would just like to see if anyone else has done this or attempted this, and if they know of or see any potential problems with redoing the system this way.
Why I want to do this, in this example, I have mobs that are miners, and the scripts control what action they are currently doing. A variable in the program structure controls what script is running in a particular group, for this instance lets say the script that governs the mining of ore is running. The system currently would have EVERY miner of the specific mob vnum doing that action at the same time.
Any info or insight would be appreciated.