CLUAConsole:CreateCreature on Mac
LookToWindward
Member Posts: 179
Hi,
I'm trying to create a monster in a test game so I can practise taking them out. I can't seem to get the command to work, but I'm not sure of the right Creature Codes to use for BG-EE and BG-EE2 for Mac?
I've tried a number of codes I found on the web, but they don't work, e.g. when I try:
CLUAConsole:CreateCreature("orc01") I get an error:
lua: indexed expression not a table
Active Stack:
Active Stack:
How do I get this command to work and is there a list of Creature Codes? CreateItem seems to work ok using the codes I found.
Thanks a lot of any help.
Dave
I'm trying to create a monster in a test game so I can practise taking them out. I can't seem to get the command to work, but I'm not sure of the right Creature Codes to use for BG-EE and BG-EE2 for Mac?
I've tried a number of codes I found on the web, but they don't work, e.g. when I try:
CLUAConsole:CreateCreature("orc01") I get an error:
lua: indexed expression not a table
Active Stack:
Active Stack:
How do I get this command to work and is there a list of Creature Codes? CreateItem seems to work ok using the codes I found.
Thanks a lot of any help.
Dave
0
Comments
Edit: that is a valid code for bg2.
As for a list of codes, you can probably use something like Near Infinity to find the codes for any creatures you want to spawn. There are a few lists out there, some are better than others. I can get you a complete list for both games, though, but will take a couple hours.
Baldur's Gate & Tales of the Sword Coast Creature List
Bg2:
Baldur's Gate II: Shadows of Amn Creature List
e.g. CLUConsole:CreateCreature("belt")
or
CLUConsole:CreateCreature("gnoll_a") just give the same error message:
lua: indexed expression not a table
Active Stack:
Active Stack:
Found it! It was my mistake! You can't paste into the Console, I had typed CLUConsole: instead of CLUAConsole:
Also the original codes I tried were not valid, so I think I tried the command spelled correctly but with the wrong codes, then tried it with the command spelled incorrectly but with the right codes!
Thanks for your help!
CreatureCode Name Description
Game which game it appears in.
Location Map Location in game
HP Hit points (if it's possible to get this).
As an aside:
Try creating the character Hack - it's great fun to create Hack, leave it about 30 secs then create another Hack and stand them next to each other. The first Hack will go hostile but the second Hack is still friendly so they have a fight!
Love it!
Oh well, back to Durlag's for me now after a much needed rest from it!
Thanks again!
So
C:CreateCreature("Imoen1")
or something to that effect.
CreatureCode,Name,Description,GameCode,etc
orc1,Orc,Some text about Orcs,BG-EE|BG2-EE|BG,BG2,etc.
We'd have to agree on the field names, or if they are already defined somewhere we could just use those.
Just a suggestion/example of what I meant, an Orc for instance can appear in more than one game, but if they have the same code, we'd only need one entry in the Database for.
I'll then read the first line and create a table containing the fields specified and populate with each row in the file.
Strength 14 10
Strength+ 0 0
Dexterity 16 16
Constitution 10 10
Inteligence 17 17
Wisdom 16 14
Charisma 10 14
Gender Male Male
Race Human Human
Alignment Chaotic Evil Chaotic Evil
Class Mage Mage
Kit Necromancer Necromancer
We'll work those details out in the future. I'll work on getting the lists when I'm not busy filtering through bug reports. :-)
Some columns will be altered to include actual text instead of a decimal/hexadecimal number, but this is the basics.
If those columns are all okay, then I shan't add or remove any more in that regard.
I have amended the Attacks Per Round to AttacksPerRound, and I will have the list ready tomorrow. To note, the list will have the string representations instead of an integers for things like race, gender, etc.
As an example, list items will look something like this:
BG2:EE,Valygar,"VALYG14",12,1,1,17,0,18,16,10,14,10,1,10,9,2500000,0,94,94,0,0,10,5,60,7,9,8,8,10,0,0,0,0,0,0,0,0,0,0,0,0,94,0,0,94,0,0,0,Human,Male,Neutral Good,Ranger,Stalker,Golem,Neutral,State Normal,Fighter Male Human
I assume spaces are usable in this context? Perhaps surrounding them with quotes would be better?
Also, note the 'BG2:EE'; this is a new column to denote which game is being referenced since the list will contain all creatures from both games. If you would rather create two separate lists (thus cutting down on the overall size of the databases as individual elements should you decide to make them available online), then I can remove that. :-)
You should be able to open it with any tool that works with SQLite. I'm on a Mac and use MesaSQL, but I'm sure you will find a Windows tool that will open it!
Did you know there are 1,125 monsters with a BaseHP of >= 70!
We could add a line after the first line, with a list of the types,
e.g.
Line 1 - Name,Resource,BaseHP,...,...,...
Line 2 - string, string,integer,,...,...,...
Line 3 - NameData,ResourceData,BaseHPData,...,...,...
Alternatively the type could be appended to the field name,
Name:string,Resource:string,BaseHP:integer,...,...,...
What do you think?