Commit graph

66 commits

Author SHA1 Message Date
Ty Conner
93723a0845
Rebase SQL scripts (#3402)
* Rebase SQL scripts

Archive previous SQL base

* .

update mysql to latest, no real changes found

* Update ShardBase.sql
2020-12-30 14:21:39 -05:00
gmriggs
e327049005
adding chance tables for gem count (#3199)
* add scaffolding

* adding chance tables for gem count

* update scaffolding

* update var names

* moving treasure-gem-count.sql test file to WorldBase and 16PY-patches
2020-09-10 08:03:01 -04:00
Mag-nus
34d54c8cb1 Set all Shard non-zero defaults to zero (#2459)
* Set all Shard non-zero defaults to zero

There appears to be a bug in EF where, if the models value is not nullab,e and is 0, and the SQL columns default is not 0, the EF.SaveChanges() command will INSERT the record but omit the columns that are 0 value.

The DB will then add default values for the omitted columns.

The entire record is then returned as a result, and EF uses this to update the model, now setting those fields that were 0 to the new non-zero default.

This is the cause for the Jive Turkey emote delay issues.

The next step will be to create an update script that will set existing shard objects to their weenie defaults. The following tables will need to be investigated:
biota_properties_create_list
biota_properties_emote
biota_properties_emote_action

* biota_properties_spell_book probability
2019-11-26 16:28:37 -05:00
Ty Conner
c96cfa4737
Rebase SQL scripts (#2301)
Archived previous scripts for legacy servers not yet upgraded
2019-09-14 22:46:03 -05:00
Ty Conner
4f751f2f41
Rebase SQL files (#1827) 2019-04-29 04:56:33 -05:00
Ty Conner
eac0370646
Fix Generator Ints (#1042)
* Add SQL update scripts

* Update Shard and World base scripts

* Update Shard Scaffolding

* Update World database Scaffolding
2018-10-02 21:34:58 -04:00
Ty Conner
bff8c20dce
Update SQL Scripts (#1026)
* Add alwaysshowwelcome to default config dict

* Update SQL tools for 8.0

* Rebase SQL scripts

* Update scaffolding

* Fix TargetType Enum

* Correct TargetType again...

* Use 16PY PR db for confirmation of SQL rebase testing

* Undo enum shift in code
2018-09-29 00:28:56 -04:00
Ty Conner
19ab98ac7e
Update SQL Writers for more comment output (#946)
* Update SQL Writers for more comment output

* Update SQL Bases

Used included tools to align output of sql scripts

* Update AppVeyor
2018-08-11 16:12:08 -04:00
mcreedjr
ad20765c9d Added missing comma in updated ShardBase.sql (#943) 2018-08-10 22:14:09 -07:00
Mag-nus
df8946b9da
Major Shard Performance Improvements (#941)
* Shard PopulatedCollectionFlags

This greatly improves GetBiota performance.

It does so by recording the biotas populated collections on save, and then on Get, only pulling those known populated collections back from the database.

* Note added about GetBiota improvements

* Shard Parallel loops added for GetPlayerBiotas

This improves performance signifcantly.

Previously, a full mule too 8s to load.
Now, it's uder 500ms.
2018-08-10 20:30:21 -05:00
Mag-nus
81fc08040e
Character refactor (#928)
This removes Character as the parent of a Biota, and instead, makes them side by side objects that are owned by Player.

Session no longer owns Character.

Session maintains a list of the Characters for the account.

Session holds a reference to the current Player being used.

Player holds a reference to Biota and Character objects.

What I said in discord:

We have the Player object (our god class).

To put a player in the world, it requires a biota. It doesn't require a character or session.
To manipulate the player, we need a session (but not a character).
To give the player a user interface, we need a character.

The character holds all the user progress of the particular biota it's associated with.

So, a session holds a link to the current player the session is managing.

Player holds a link to the biota and character that represent the player.

The biota represents the player from the worlds pov.
The character represents the player from the users pov.
2018-08-07 21:08:22 -05:00
Mag-nus
47f89f18d6 Remove unused index
We never used any of these in ACE, so we don't need the database to keep track of them for us.
2018-08-06 01:28:24 -05:00
Mag-nus
128ca11fd4 Remove redundant keys for forein keys in Shard
Seem my previous checkin for World.

InnoDb will auto create these keys for us. We do not need to do them explicitly.
2018-08-06 00:38:42 -05:00
Mag-nus
ad80efd810 SQL Base formatting change (Purely cosmetic)
Order changed to
PRIMARY KEY
KEY
UNIQUE KEY
CONSTRAINT
2018-08-06 00:32:56 -05:00
Mag-nus
c079bf0fd0 Treasure Death/Wielded column names updated (Thanks GDLE) 2018-08-06 00:16:28 -05:00
Mag-nus
478e891aa3 PropertiesSkill AdjustPP removed
In the cache.bin, this is probably a bool. It is 1 for every instance found.

If/When we understand what this flag might have meant, we can re-add. However, given that it was always true in cache.bin, that is unlikely.

Furthermore, in GDLE, this bit was always set to 1 on write, and always masked off on read.
2018-08-05 23:27:06 -05:00
Mag-nus
15c9c6f8a3 Redunent keys for foreign keys removed
keys will automatically be created for columns that reference foreign keys.

We do not need to manually define them as well.
2018-08-05 12:40:34 -05:00
Mag-nus
e9db9ab530 Defaults removed for native type default values
If an int/float had a default of '0', it was removed.
If a nullable had adefault of NULL, it was removed.

This isn't needed for EF.
This cleans up the SQL.
This also helps make sure our sql writers are generating the full INSERT query to recreate a record.
2018-08-05 12:24:43 -05:00
Mag-nus
7feffeedcc Spell table columns Id and SpellId merged into Id
There are no need for duplicate unique id's. The Spell Id is already gauranteed to be unique
2018-08-05 08:54:42 -05:00
Mag-nus
004d7d4f19 LandblockInstance refactored. DYNAMIC SUPPORT REMOVED
Columns id and guid have been combined into a single guid column.

This requires that every landblock instance be provided with a valid unique guid.

In the old code, you could provide an instance that would have an auto generated id (column) and a guid of 0. ACE would then see the guid is 0 and would use the following:
GuidManager.NewDynamicGuid();

In the cache.bin, every landblock instance has a unique id.

If we need to add the ability to have dynamically guid'd landblockinstances, this is an easy thing to add back.
2018-08-05 07:30:14 -05:00
Mag-nus
33ef2f2e7c Rename landblock_instances to landblock_instance
This follows the singular naming convention we are using for the other tables
2018-08-04 14:24:52 -05:00
Mag-nus
005fd2339a EmoteActions are now childeren of Emote 2018-08-04 09:02:41 -05:00
Mag-nus
70d7ca78a5 Quest message column allow null
Text columns should allow null
2018-08-01 22:58:19 -05:00
Mag-nus
1429c1751f Cook_book column reorder
Source now comes before target
2018-08-01 22:56:21 -05:00
Mag-nus
2c8e2507d4 Recipe_Mod Health/Stamina/Mana cleaned up
There were 3 redundant values which were basically flags indicating if it's associated vital was actually used.

However, in the cache.bin, any time a vital was present, it's associated flag was also set to 1. This is basically redundant.

We can simplify this as follows. If the Vital != 0, it gets applied. If the Vital == 0, it doesn't get applied.

I suspect they may have wanted the flag so they could leave a vital value in the db, but just have it disabled. We don't need this.
2018-08-01 22:54:06 -05:00
Mag-nus
79b07792de Recipe_Mod ExecuteOnSuccess field added
This allows us to not have to add all 8 records found in the cache.bin.

Instead, we only have to add the records that actually modify something. This new bool basically indicates if it was the first 4 or the last 4 or the fixed 8 found in the cache.bin
2018-08-01 22:40:36 -05:00
Mag-nus
88805c14a8 Recipe_Component table removed and merged into Recipe table
We were relying on the order of the recipe_componet records to remain the same, but this isn't gauranteed unless we provide a zIndex.

Instead of adding a zIndex to the Recipe_Component table, we can just put the static values in the base Recipe table.
2018-08-01 22:09:09 -05:00
Mag-nus
7989686440 Recipe.RecipeId removed in favor of Recipe.Id
We basically had 2 id's, one static and one auto generated. We can just remove the auto generated id and use the static id as the primary key.
2018-08-01 21:35:18 -05:00
Mag-nus
eed714dbfd Removed NOT NULL from recipe TEXT columns
Null is a valid value for native .net string type.
2018-08-01 19:09:56 -05:00
Mag-nus
cf3979de80 RecipeMod Properties are now recorded per mod, not per recipe 2018-08-01 18:47:05 -05:00
Ty Conner
e3be63ce62
SQL Re-Base and EF Re-Scaffold (#886)
* Rebase Shard and World DBs

* ReScaffold Shard DB

* ReScaffold World DB

* Update SQL Bases

* ReScaffold Shard DB

* ReScaffold World DB

* Update DB to v0.0.16 PR

* Update changelog

* Update changelog.md
2018-07-22 15:14:59 -04:00
Ty Conner
53f00917a4
Database Rebase and Table Rename (#799)
* World DB Rekeyed

* Rebase World DB

* Rebase Shard DB

* Update PK in EmoteAction

* Shard DB Rekeyed. This change creates lots of exceptions currently.

* Revert to Shard/World DB Rebase

* Restore Id to each table

* Restore Id to Shard tables

* Update World DB pr location

* Missed this ObjectId > Id change

* Rename Tables

* Updating Changlog and Readme. This PR fixes #782 and fixes #783

* Updating Changelog again to note that you must drop and re-create Shard and World DB due to changes
2018-05-24 16:07:00 -04:00
Ty Conner
0dc934abc4
Rebase SQL scripts (#714) 2018-03-31 22:05:50 -04:00
Ty Conner
d2cb98adb1
Changing IID from INT to UINT (#681)
* Changing IID from INT to UINT

* AppVeyor fix for PRs

* Fix AppVeyor script

* Maybe fix?

* Quotation marks...

* setlocal

* hmm

* debugging

* download script rewrite

* Missed a cmd line argument for DownloadFile

* yay, script clean up

* ints to uints
2018-03-11 18:39:46 -04:00
Ty Conner
7bb56f5f73 Update Shard Base 2018-03-06 04:37:44 -05:00
Ty Conner
f2aeb388f8 Update SQL Base scripts 2018-03-06 04:37:44 -05:00
Mag-nus
e5dd43d460 Remove calculated column Landblock from properties_Location tables 2018-03-06 04:37:38 -05:00
Ty Conner
06cff7352d More Base Updates 2018-03-06 04:35:50 -05:00
Ty Conner
6cb5ef5f2b Update SQL Base files to new database structure 2018-03-06 04:35:50 -05:00
Ty Conner
e83ce1fce3
Rebased SQL scripts (#608) 2018-01-29 11:58:42 -06:00
Ty Conner
73b094ceab
Quick Minor fixes/cleanup (#571)
* Some quick fixes

* Cleanup AppVeyor script
2017-12-02 00:16:06 -05:00
Ty Conner
ef62342eab
Convert PropertyInt properties from uint to int (#559)
* Update EmoteCategory, EmoteType and SpellType enums

* Add CombatStyle enum

* Rebase SQL scripts

* Change uint to int in SQL

* Adjust SpellType

* Changed all PropertyInt properties from uint to int

* Some CombatStance work + StyleCop clean up

* Update README

* Updated ACE-World requirement and appveyor
2017-11-01 13:53:08 -04:00
Ty Conner
359d90e05b Misc Changes (#515)
* WorldBase SQL merged

* Fix Books saving to Shard database

* README updated

* Add character wielded items upon creation

* Update appveyor

* Swap GenericObject for WorldObjectFactory

* Add WeenieType.Coin (Pyreals) handling and CoinValue tracking

* Trim Coin using statements

* Update appveyor to latest ACE-World
2017-10-02 15:52:58 -04:00
Ty Conner
af45bf2b5e Support for ACE-World 0.2.0+ (#499)
* Add and use LandblockObjectInstance

* Uncomment weenieHeaderFlags2

* Rebase SQL scripts

* Update changelog

* Adjust linespacing in changelog

* Add generators back to the landblocks.

* Update appveyor script

* test database install

* Renamed functions to be more inline with their use
2017-09-02 11:33:49 -04:00
Ty Conner
1056a2f718 New Character Defaults + misc changes (#463)
* Removed events in SQL script

* Renamed ObjectType to ItemType to accurately reflect its usage

* New Character Defaults

* Removing Flags from Enums
2017-07-12 00:42:25 -04:00
Ty Conner
3059ca425b SQL Rebase - 07082017 (#457)
* STOP... Rebase time!

* WIP appveyor

* appveyor WIP 2

* appveyor WIP 3

* appveyor WIP 4

* appveyor WIP 5

* appveyor WIP 6

* appveyor WIP 7

* appveyor WIP 8

* Fixes for Appveyor

* Cleaning up StyleCop warning

* More AppVeyor fun

* Another Appveyor test

* Updated GuidManager

* Deleted previous generator test data due to issues with appveyor?

* Stylecop error

* Changed GuidType to fix IsCreature. why is this a thing?
2017-07-10 14:04:03 -04:00
Ty Conner
8363a3213f PR 430 + Generator Instances + Monster Health fix (#442)
* Extend generators to spawn linked generators

* Fix appveyor and guid

* Renamed generatorId to generatorWeenieClassId

* Renamed sql script for appveyor

* Fix for appveyor for real - dumb me :-P

* Change ItemType to Type

* Generator Instances

* Updated changelog

* Added ACE-World db version requirement

* Updated sql script

* Fixes for Null exceptions

* More Generator Properties

* Changed how generators are classified

* Updated changelog

* Fixed merge error

* Updated SQL script to reflect new generator properties

* Typo in changelog

* Requested Changes plus some ID output adjustments
2017-07-07 10:39:46 -04:00
Ty Conner
1018a511c1 Of Guids and Generators... (#437) 2017-07-01 01:00:43 -04:00
Ty Conner
4623aadaa1 Rebased and synced SQL scripts. (#413)
* Rebased and synced SQL scripts.

* Updated AppVeyor script

* Added turning on the Event Scheduler to ShardBase

* Changed NOT PRESERVE to PRESERVE on event
2017-06-26 08:06:50 -04:00
Ty Conner
9b4f6a34ea Setting ON DELETE CASCADE for ace_poi (#394) 2017-06-17 23:55:58 -04:00