(Search didn't bring up anything really helpful)
Hello people!
I'm about to start up a fairly large game, and am in need of a database to keep track of about three hundred things in the game. Using simple variables such as integers would be quite a bother, so my question is: Is there a way to use an external database in an AGS game? (For example: create an Access database, read data from it and use it in the game, write data into it from the game and so on)
Has anyone done this before? Are there any other solutions to this problem available?
Thanks in advance to all who reply!
If you could be more specific about what data you want to store, and what indexes you would want then it would help. 300 doesn't sound much, though.
The database would hold the data of all the characters in my game (Approx 200+ characters).
Data of a character: Room_Character_Is_In, injury_level, morale_level, awareness, Ammo, Name, etc.
There would be 10 or more different stats for all the characters.
I also need a way to keep track of locations of certain items, and statuses of differet rooms (Room_Grid_X, Room_grid_Y, Room_Damage_Level, etc.)
The idea is to load these stats from the database when the player is in the same room as the characters, and then use them as stats for a generic NPC, who would then act accordingly.
Basically, the character database would look something like
PRIMARY KEY: (Automatic integer)
NAME: "Pete"
ROOM: "28"
INJURY: "0"
MORALE: "5"
AWARENESS: "2"
And so on...
Have you tried Monkey's properties module? I think it should do what you want.
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=27385.0
Quote from: SSH on Mon 07/07/2008 14:30:34
Have you tried Monkey's properties module? I think it should do what you want.
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=27385.0
What would I be giving the properties for? Is it possible to create 300 Characters to give the properties for? I was under the impression you can only have 50 or so characters in an AGS game.
Quote from: WHAM on Mon 07/07/2008 15:49:30
Quote from: SSH on Mon 07/07/2008 14:30:34
Have you tried Monkey's properties module? I think it should do what you want.
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=27385.0
What would I be giving the properties for? Is it possible to create 300 Characters to give the properties for? I was under the impression you can only have 50 or so characters in an AGS game.
RTFM...
Quote
System limits
This section tells you the maximums for various parts of the system. If you have been wondering "How many rooms can I have?" or something similar, chances are this section will answer it.
There are maximum...
40 objects per room
100 local messages per room (excluding script)
299 state-saving rooms per game
300 inventory items
30000 imported sprites
30 controls on each GUI
500 dialog topics
3000 dialog-script messages
30 options per topic
20 screen overlays at a time
500 script GlobalInts (not including your own variables)
50 script GlobalStrings (not including your own variables)
5 background frames per room
20 mouse cursors
unlimited characters
unlimited views
unlimited GUIs
unlimited loops per view
unlimited frames per loop
Drat! Was there such a limitation in the old 2.72? I havent gotten around to the 3.0 yet, or is my memory really this bad!?
This could fix my problems though, so thanks. I'll do some more planning with this information and return here if I still need ideas.
Yes, 2.72 had limits but they were removed in 3.0 at some point.
Just for the record regarding the Properties module, there is actually an outstanding issue if you try to create more than, I believe, 30 properties. This is due to the implementation of hotspot and object properties. In the module header I believe there is a #define for AGS_MAX_ROOMS which sets it to 1000; lowering this would temporarily resolve the issue.
I wrote a fix, but never got around to uploading it and currently do not have access to that script. I should probably just rewrite the bloody thing already! ;)
BTW, if I recall correctly, wasn't the old limit on characters like 300 characters per game or some such? I think having too many on-screen causes slow-downs, but I don't think the limit has been that low for a very long time, if ever.