I'm guessing this is the problem because of this: https://stackoverflow.com/questions/279 ... g-json-dic
However, because quotations are special, I can't figure out how to remove these quotations! Any advice on this?
I tried adding .interkeys() as shown in the above, but didn't work. I also tried this method, and again did not work: https://www.geeksforgeeks.org/python-re ... om-string/
Here's what I'm trying to do:
Code: Select all
for npc in npc_dict:
npc.lhand_state = 0
npc.rhand_state = 0
Code: Select all
def GenerateMultipleNPCs(npc):
## npc is number of npcs you want to create
npc_dict = {}
for x in range(npc):
## add new dictionary entries named npc1, npc2, npc3 etc
npc_dict['npc{}'.format(x+1)] = NPCList(racelist, typelist, procaselist, 1)
return npc_dict