Closed TrevorNBudd closed 1 year ago
Yes, that's what the strict-db
flag is for see: https://github.com/APN-Pucky/tyrant_optimize/wiki/v5.0.0-database
Then tuo discards the database if either the tuo version or card xmls change. (Correct me if I am wrong though, I did not yet look through all of your example)
We can also make that the enabled default for following tuo releases.
With regard to the strict-db
flag, when you say TUO aborts, does that mean it "bombs out" without a solution? The preferred default would be that it discards the current database and runs with a new blank database. Thus it would still generate a solution and start rebuilding the database. It would be cool if it could tell when cards change and discard entries based on the old card (but I don't know how difficult that would be or if it would be worth it).
In general, the db flags need to be added to the flags page, "https://github.com/APN-Pucky/tyrant_optimize/wiki/Flags". A lot of users would benefit from this. Especially true for the db-limit N
flag since there were complaints about the db size.
So far it just stops with an error. Since I did not want to delete the database without the user's knowledge. I could also just move it to database.yml.bakN
.
TUO can not know which cards have changed since it does not have a copy of the previous cards_section.xml
. Also changes to TUO need a whole discard unless I encode into every tuo version what changed between the version, which cards it affects and filter those, but that is not worth the effort, so it will remain a total discard/rename.
I think you can safely discard and recreate the database. For most users, the database is a hidden, backend function that "just works". On the other hand, weird errors throw off most users I know.
I think the wiki can be edited by anyone with a github account (top right Edit
). IMO having it in the sidebar grouped under flags, is enough, but maybe all
flags should be renamed to common
flags. Feel free to change stuff if you think that will help users.
Also note this is something that happens regularly. Buffs and new cards come out weekly, so TUO needs to seamlessly adjust to them without reporting errors.
I think the wiki can be edited by anyone with a github account (top right
Edit
). IMO having it in the sidebar grouped under flags, is enough, but maybeall
flags should be renamed tocommon
flags. Feel free to change stuff if you think that will help users.
Ok. Cool. I will definitely try that out.
Changes work wonderfully. Nice job.
TUO v6.3.0 with db enabled is returning results from database even when they are no longer valid. As demonstrated below, I ran a sim twice with the db enabled (default). As expected the second run returned the result stored in the db. I then buffed one of the cards used - so the result should change. When I tested again, TUO still returned the result from the db even though this was no longer correct.
To cross check the results, TUO was also run with the no_db option. This generated correct results in all cases.
// Turn by turn output indicates TUO ran a sim instead of pulling a result from the db
// TUO immediately returned a result indicating it came from the db
// _Same result reached when nodb option used
// _Note FurrageTest1 is now buffed: From: "Furrage_Test1:
10/200/0 imperial, Evade 10, Counter 10, Flurry 2 every 1" To: "Furrage_Test1: 40/700/0 imperial, Evade 10, Counter 10, Flurry 2 every 1"). However TUO still returned the result from the db (which is based on the unbuffed card).// When the db is disabled the correct result is returned.