Manual changes to database


Is it possible to to manually change table “item_inventory” when game is running? For example if I change slot position (“item_id”) game doesn’t reflect this change, in fact it is overwritten with original value in some time.

Not while the game is running, no. Or to be precise, not while the world using that database is running. It might also take a short while for the lock on the file to disappear after shutting down. Personally I would always shut down the client entirely before modifying the database.

A mod could of course modify the database while it’s running.

1 Like

Thank you very much for the answer. The whole story behind this question (should post it in the first comment, sorry) - I would like to have a web page which will have features like daily bonus, (and much more) with ingame stuff as reward. So I need to add items to player’s inventory from “outside”. Do you know if there is a mod which can do this? I mean to modify database/add items to players after some “request from outside” (using some REST API, SOAP, DB write, whatever)

I have not downloaded the devkit for this game (at least up to now), but from my observations it appears that conan servers only use the database passively… As in, the database only serves as a save and is not actively used while running whatsoever. It is read at the beginning… all the tables are stored in memory and the server works with those and only writes them out when saving periodically or when shut down.
If that is indeed the case then obviously anything you would do with that file while the server is running is going to be completely irrelevant and will get replaced at the next save point or when stopping the server with what’s in the memory tables.

As such, in order to accomplish what you’re attempting, you would have to set altering the memory tables as a goal and not the database, so a mod that would somehow pick up on external queues and possibly call the legit item adding functions already implemented in the game. I have no clue if that’s possible with the devkit available for conan, or more like (cuz I’m sure there’s a “way”) how easy it would be to accomplish.
This is all based on assumption thou, some of the modders here might be able to clarify it further

The simplest (by far) solution would be to do something like that during a daily (automated) maintenance window, but whether that’s acceptable is up to you.

Other solutions are possible but I haven’t looked into any of those myself, and would rather not speculate on something I know too little about :sweat_smile:

Thank you very much for replies.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.