Commit graph

32 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
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
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
005fd2339a EmoteActions are now childeren of Emote 2018-08-04 09:02:41 -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
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
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
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
e9bd605ec4 Landblock Object Loading Fix (#392)
* Landblock Object Loading Fix

* Change Character Database references to Shard Database

* Corrected AppVeyor issue with scripts
2017-06-17 23:42:25 -04:00
Mogwai-TheFurry
c3184a08fa Object overhaul (#384)
* Object overhaul - clean up enums (#337)

* Give property enums a static value to aviod positional fubar later on.   Cleaned up using.

* Cleaning up enums

* Fixed Line ending update change log.

* Review & Comment only || Object overhaul - POC  (#339)

* Give property enums a static value to aviod positional fubar later on.   Cleaned up using.

* Cleaning up enums

* Fixed Line ending update change log.

* Added new positionType

* Started work on implementing object overhaul - want to make sure I am heading in the right direction.

* Minor clean up, responded to feedback and fixed a few bugs.   Thanks for the second and third set of eyes.

* Object Overhaul - ready for review and merge.    Still Work in Progress but a good spot. (#341)

* Give property enums a static value to aviod positional fubar later on.   Cleaned up using.

* Cleaning up enums

* Fixed Line ending update change log.

* Added new positionType

* Started work on implementing object overhaul - want to make sure I am heading in the right direction.

* Minor clean up, responded to feedback and fixed a few bugs.   Thanks for the second and third set of eyes.

* Continued work.   Please review as these are a LOT of manual changes.   Compiles and you can log in.

* Continued work.   I have all of the items pulling from properties now.   Still work to make baseAceObject and AceObject on thing / finish work around workmanship and actually kick the tires and start pulling data.   Sorry this is taking so long.

* Had time for a few more and cleaned up whitespace.

* Good point to check in.   All of the property tables are hooked up and loading data.   I created the workmanship hackery we discussed.   As always comments and suggestions much appreciated.

* One quick shot to fix appveyor before bed.

* * Continued work on Overhaul
* Created mapping cross reference file to faciltate docuatation and cleaning up names - work in progress https://goo.gl/eaaNQb
* Created new database schema for world_object - modified mysqlinstall.bat to refect new baseline
* created script to ETL old schema to new schema.   I have not included it as we will be refactoring the initial data load to use the new
* schema according to Ripley.   I have the script tested and posted on my dropbox if anyone wants it.   I also have a complete data dump that
* zips down to a manageable size.
* BaseAceObject is now using the new schema
* I re-hooked up telepoi to use the new schema.   Still to do, convert to constructed statement
* Next steps - refactor AceObject and make sure world objects load again.
* Once that is complete - start same process using clone of this schema for character as discussed.

* renabled more data loading.

* Continued work on hooking data back up.   Working on moveto debug command - this creates a world object.   Not quite there yet.

* WIP

* Making progress.   Test object able to be spwaned from new schema.   Still to do, renable constructed statements, clean up and re-enable the other constructed statements.

* updated worldbase

* * Intital work done for new schema.   Rebased and removed update sql files. (#353)

* Tested and the auto setting of Physics and Weenie Header Flags looks really solid.   Side note, the values we have
* in the database for weenieHeaderFlags and PhysicsDescriptionFlag should probably be dropped we don't read them or use them now.
* Doors, portals NPC's and signs are all back in the world now.
* I would suggest we remearge with the main branch sooner rather than later - we can create another branch to introduce these
* changes into the character side.
* TODO items:
* Creature spawns need to be refactored - I left them commented out.   We need to ditch seperate tables that we have now, I think all
* creature can use what we have now, plus maybe two additional world tables.   Everything else fits into the current schema.
* Test Ripley data and update ACE_World.
* Refactor portals - I just left the old way in and faked it out with a view.
* Once this looks good and stable and we fix any found bugs - we need to clone this over to the character database and start refactoring
* That will get us to persisted inventory.

* Objects - Game data refactored - issue with character login (#355)

* wip

* WIP - character login is trying to persist a world object

* Still throwing an exception on player login.

* Working Code - finished GameData - need to complete PhysicsData and ModelData.   Thanks to @Lidefeath for finding my issue.

* WIP compiles but has error on run.   Data changes have broken something.   Will fix tomorrow.

* Wip - nothing really working yet.   I can log in but item creation is not working.

* Objects (#357)

* wip

* WIP - character login is trying to persist a world object

* Still throwing an exception on player login.

* Working Code - finished GameData - need to complete PhysicsData and ModelData.   Thanks to @Lidefeath for finding my issue.

* WIP compiles but has error on run.   Data changes have broken something.   Will fix tomorrow.

* Wip - nothing really working yet.   I can log in but item creation is not working.

* Best attempt stabbed (#358)

* wip 1

* wip 2

* wip 3

* wip 3

* i think thats it for now.  good luck!

* Read cached characters and launch to char list (#360)

* First corrections and commenting out so the start to command line works

* The basics for launching to character list is working.

* Edit config.json for AppVeyor

* Rework Base SQL scripts. (#361)

Expect broken execution until views are corrected for ace_shard

* Cleaning up error list (#362)

Clearing stylecop issues and warnings in Error List

* ACE Enum adjustments (#363)

* More Enum Adjustments (#364)

* More Enum Adjustments

* Further Enum Refinement

* Changed Enum Value

* More Enum and Object Realignment (#365)

* Adding Enums to better align with AC standards. GroupTypeChat and AccessLevel will be converted to these.

* Object level changes to go with enum resorting

* Extend ORM to allow aggregate functions i.e. MAX(column) and (#366)

* Extend ORM to allow aggregate functions i.e. MAX(column) and implement GetNextCharacterId

* For AppVeyor, thanks @ogmage78 for the sql

* Implements IsCharacterNameAvailable and fixes some errors in the chargen code. (#367)

* Character Loading (#368)

* Cleaned up some whitespace issues.   Still understanding the direction.

* WIP added enums for PropertyAttribute

* Wip got a lot of aceCharacter done - working on position - about 1/2 done.

* WIP - Ace Character Loading.
* Intital work done for loading character from ace_shard.   Rebased and removed update sql files.
* Tested up to position loading.   Made changes to position, but have not loaded the dictionary yet.
* Fixed a few bugs - attribute loading had a few.
* TODO items:
* Finish up loading positions then see what is left.
* Work on saving as OptimShi - has character creation ready to go.

* Fixed for rebase and apveyor

* Hand wrote view per request and removed unneeded position.

* Read character creation values from client_portal.dat  (#369)

* Read character creation values from client_portal.dat and assign to appropriate Character Properties

* Added AceCharacter properties for the character appearance data

* More fun in Zombieland - character loading.    (#370)

* [Og II]
* Continued work loading character from ace_shard.   Rebased
* Added cascade delete to all child tables in ace_shard.
* Completed and tested up to skillz loading.   Made a few changes on the db side for key consistancy.
* TODO items:
* Finish up loading - spells, friends, allegiance info, spell comps, spell bars etc. etc....

* Fixed bug in setXXXProperty methods with the add new.   Was not setting the AceObjectId

* Fixed auto inc and unsealed position class and made aceObjectId virtual again.

* SaveObject implemented in ShardDatabase.cs (#371)

* First steps of SaveObject

* Hopefully I didn't bork anything too hard.

* Character creation -- data present on save appears to make its way to the DB.  Thanks to Lidefeath for the starter here.

* Removed all references to SaveCharacterOptions -- replace with SaveObject().

* Removed all references to SaveCharacterOptions -- replace with SaveObject().

* Cleanup of DbGetListAttribute (#372)

* First steps of SaveObject

* Hopefully I didn't bork anything too hard.

* Character creation -- data present on save appears to make its way to the DB.  Thanks to Lidefeath for the starter here.

* Removed all references to SaveCharacterOptions -- replace with SaveObject().

* Removed all references to SaveCharacterOptions -- replace with SaveObject().

* Reworked DbGetListAttribute, got rid of hacky code.

* Forgot to remove sloppy comments from refactoring.

* Create Database.cs

* Fix the "You do not own this character" error. (#373)

* Refactoring, save/restore progress on object overhaul (#375)

* First steps of SaveObject

* added todo

* Hopefully I didn't bork anything too hard.

* Character creation -- data present on save appears to make its way to the DB.  Thanks to Lidefeath for the starter here.

* Removed all references to SaveCharacterOptions -- replace with SaveObject().

* Removed all references to SaveCharacterOptions -- replace with SaveObject().

* Working on player login.   Getting closer.   At SendSelf in player.cs

* Reworked DbGetListAttribute, got rid of hacky code.

* Forgot to remove sloppy comments from refactoring.

* Create Database.cs

* Continued work on character login.   A little closer - we can get into the world now.   Please see change log for list of outstanding items.

* Can log in, and walk around.  Some properties still wrong.  Still need to submit several DB level fixes.

* Many fixups/bugfixes.

Positions now save.
Character logs in.
Game doesn't crash.
Can open multiple sessions.
(some) ORM issues fixed

Issues:
World Objects still don't appear in game.
Race found in ShardDatabase (commented)

* Minor cleanups.

* Object overhaul (#376)

* First steps of SaveObject

* added todo

* Hopefully I didn't bork anything too hard.

* Character creation -- data present on save appears to make its way to the DB.  Thanks to Lidefeath for the starter here.

* Removed all references to SaveCharacterOptions -- replace with SaveObject().

* Removed all references to SaveCharacterOptions -- replace with SaveObject().

* Working on player login.   Getting closer.   At SendSelf in player.cs

* Reworked DbGetListAttribute, got rid of hacky code.

* Forgot to remove sloppy comments from refactoring.

* Create Database.cs

* Continued work on character login.   A little closer - we can get into the world now.   Please see change log for list of outstanding items.

* Can log in, and walk around.  Some properties still wrong.  Still need to submit several DB level fixes.

* Many fixups/bugfixes.

Positions now save.
Character logs in.
Game doesn't crash.
Can open multiple sessions.
(some) ORM issues fixed

Issues:
World Objects still don't appear in game.
Race found in ShardDatabase (commented)

* Properly load Data Id instances.  Objects now "spawn" in-world, but don't interact properly.

* Fixes to worldbase vw_teleport_location, player description, character handler.  Player now gets proper stats and can teleportpoi.  Vital inital values are off.

* Sets options on load.  May be bad/broken.  Need to seriously think how AceObject/AceCharacter and WorldObject/Player should interact.  We don't do that well now.

* Fix to attribute2nd, using uint24 instead of uint16 for value (because monster's health can get huuuge).

* Position refactor into backend object AceObjectPropertiesPosition and front-end object Position.

* * fixed issues with the weenieHeaderFlags setting method, fixed PhysicsDescriptionFlag setting issue as well.
* cleaned up and rebased data scripts for WorldBase and ShardBase
* Found issue in my data that was ETL to our new schema - had two flag fields Reversed - that is fixed but would be no issue
* once we have Ripley's new data export.   I have shared out a link to the cleaned up data for use while we finish the new export.
* https://www.dropbox.com/s/pohcruvalt9s38h/WorldandShardData.zip?dl=0
* I put in a nasty hack - hard coded weenieClassId on character save - it was being set to 0 and I could not find it.   I marked with with a todo.
* player.cs line 490

* Create Landblock.cs

* Updated changelog

* Fear the Walking Dead - More work on our object overhaul - bug fixes and continued work (#377)

* Testing - fixed a few null reference check errors.   Added in OptimShi player apperance code.

* added back code needed for ci

* Sending DataId and InstanceId data to character description.

* Forgot to update change log

* Added Ripley's changes to scheam

* Create ShardBase.sql

* Create WorldBase.sql

* Made requested changes

* Lord BucketHead - temp fix.   Added start of equipping items and POC code (#378)

* * Added getting and setting ContainerID and Wielder into AceObject and surfaced in worldObject
* Put in a hack to show how equiped weapons and shields work.   We will need to establish a place to store this data.
* I put in big TODO to indentify the hack - it is benign and will not impact anything else other than to demo the placement
* of the spear in Rand the Game Hunters hand in Holtburg.
* Modified SetPhysicsDescriptionFlags so it can be container and weilder aware.
* Worked with OptimShi and we put in a fix for Lord BucketHead.

* Found and fixed one more bug with hair styles

* Update Player.cs

removed comment that was out of date.

* SQL Scripts Re-based (#379)

* SQL Scripts Rebased

* More alignment of base DB script.

* Final SQL script rebase

* Code cleanup and a few bug fixes.   (#380)

* Code cleanup and a few bug fixes.   Working to trello card.   Board updated.

* Added first part of wield item.

* Update to remove class diagram

* Update GameActionGetAndWieldItem.cs

* Update GameEventWieldItem.cs

* Fixed Position Saving. (#381)

* Fixed Position Saving.

* Fixed other minor character initialization bugs

* Cleanup backing AceObject (#382)

* Reworked AceObject/Player/WorldObject to better repsect AceObject as a unit backing.

* Enough cleanup to commit.  Fixed vitals (Attribute2nd) in the process.

* Fixed bad rebase errors.  Appears to work now.  Can confirm vitals (Attribute2nds) initialize well, and can be raised.

* Fixed bug with player creation and made a bunch of comments and notes about things I discovered so they would not get lost. (#383)
2017-06-16 09:54:39 -04:00