Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
321 lines (224 sloc) 12.6 KB
# 2013 12 07
create_schemaverse.sql - Gone
The codebase has been converted to a sqitch project.
This makes deployment a bit more complicated, as the sqitch application is required, but development should be a lot better.
Sqitch can be downloaded from:
To deploy the new code, follow these steps:
> git clone
> cd Schemaverse/schema
> sqitch --db-name <dbname> deploy
Removed from the game in this release includes Items and Trading. Items will return one day soon but tradining is likely history for now.
# 2012 04 07
create_schemaverse.sql - v1.2.4 - v0.13.0
Optimized things:
-Perform_mining() now uses some temporary tables during processing
-event_action_index has been disabled/commented out. Keeping this index updated was taxing the public server
System changes now calls run_fleet_script(fleet_id) instead of the fleet_script_#() itself
-run_fleet_script(fleet_id) handles FLEET_SUCCESS and FLEET_FAIL event logging
-FLEET_SUCCESS now logs the actual execution time to descriptor_numeric rather than just logging 00:00:00 every time
Credits (Thanks!)
-xocolatl for RUN_FLEET_SCRIPT(fleet_id) suggestion
-CBBrowne & MC for thoughts of perform_mining()
# 2012 04 03
create_schemaverse.sql - v1.2.3
Optimized things:
-IN_RANGE_SHIP(s1,s2) now SQL
-event table now collects more stats for player_id_1 and player_id_2
System changes
-event_archive table is gone
-archive of a rounds event table is now written to file during round_control()
Credits (Thanks!)
-CBBrowne for the new SQL IN_RANGE functions
-xocolatl for more optimization advice
# 2012 04 01
create_schemaverse.sql - v1.2.2
Optimized things:
-GET_PLAYER_ID() and GET_PLAYER_USERNAME() marked as STABLE to increase performance of calling functions/views
-my_ships was changed back to its original format
-update_ships_near_ships() and update_ships_near_planets() both optimized by new indexes and subtle re-write
- ship_loc_only CIRCLE(location, 1)
- ship_loc_range CIRCLE(location, range)
- planet_loc_only CIRCLE(location, 100000)
# 2012 04 01
create_schemaverse.sql - v1.2.1
This is the most boring April Fools update ever…
Bug Fix:
-UPGRADE used a smallint when it should have been an integer, causing issue with upgrading the larger skills like max_speed
Credits (Thanks!):
-CBBrowne for the bug report
# 2012 03 29
create_schemaverse.sql - v1.2.0 - v0.12.0
Optimized the views of:
-New index on player_id_1, public
-New index on player_id_2, public
-New index on public
-View query re-written to take advantage of new indexes
-New column player_id in ship_control
-View query re-written to take advantage of new indexes
-New column player_id in ships_near_ships
-View query re-written to take advantage of new indexes
-New column player_id in ships_near_planets
-View query re-written to take advantage of new indexes
Feature Additions
-New event action: FLEET_SUCCESS
-When a fleet script completes successfully, a private event will be logged which includes the time taken during execution
-Old fleet scripts will need to be updated before this change takes place but otherwise it is automatic
-New event action: FLEET_FAIL
-When a fleet script fails to execute during the tic, the error will be logged as a new private event
Credits (Thanks!)
-CBBrowne for the suggestions on how to optimize the altered views
-CBBrowne for the FLEET_SUCCESS timing code
-MassConfusion for the FLEET_FAIL error logging
-Everyone else for doing testing, regardless of if they know it
# 2012 03 15
create_schemaverse.sql - v1.1.0 - v0.11.1
Bug Fixes
-resolved issues with and action_permission_check() that allowed for double actions and actions beyond the grave
Gameplay Changes
-First 1 minute of fleet runtime is now free. You can run the upgrade(id, 'FLEET_RUNTIME', 1) once wihtout having the money.
-Players starting balance has been lowered to account for this
# 2012 03 06
create_schemaverse.sql - v1.1.0 location, location, location - v0.11
Gameplay / System Changes
-Any table/view in the game that had the columns location_x, location_y or destination_x, destination_y have been replaced with location and destination columns, both of the Point data type.
-Any function that accepted a location_x integer, location_y integer now accepts location Point (and similar to destination)
-Specifics on ships/planets in range are now cached after the movement for a tic is complete. This should speed up all requests to views like ships_in_range
- Cached data is stored in ships_near_ships and ships_near_planets (Not accessible to players)
-MOVE() is gone
-Ship movement occurs at the beginning of the tic using the MOVE_SHIPS() command
-The course of a ship can be controlled using SHIP_COURSE_CONTROL(ship_id, target_speed integer, target_direction integer, destination point)
-Once set, a ship will burn all available fuel to attempt to reach the target_speed
-Ships will also slow down if fuel is available once the destination is reached
-MOVE() bug which stopped ships just outside of a ships range has been resolved
-SHIP_COURSE_CONTROL() can be called multiple times during a tic. The actual ship movement will not happen until the tic called MOVE_SHIPS()
Credits (Thanks guys!)
derpfish - Contributed the new MOVE_SHIP()/SHIP_COURSE_CONTROL() system
cbbrowne - Contributed the changeover to Point data types from (integer_x,integer_y)
MassConfusion - Bug Report
# 2012 02 23
create_schemaverse.sql - v1.0.0 <--- Awwwwww yeah. That's nice. - v1.0
Gameplay / System Changes
- Trophies now have a Weight and Run Order
- Trophies can now be back-run for older rounds
- ROUND_CONTROL() calls the new trophy_script_#(_round_id integer) instead of trophy_script_#()
- 29 New trophies were created to take advantage of the Weighting
- You can see who is currently in the running for a trophy by issuing a select against trophy_script_#((SELECT last_value FROM round_seq)); where the # is the trophy ID.
- Stat Tables: player_overall_stats, player_round_stats, round_stats
- Stat Views: current_player_stats, current_round_stats, player_stats
- player_round_stats are updated 1 by 1 over time in
- round_stats is updated after every 100 player updates in
- player_stats shows both stats for the current round as well as aggregated stats from previous rounds
- players have access to SELECT on all stat views and tables. The table results will not be as fresh but will be returned much faster compared to the views
- ROUND_CONTROL() updates the stats before issuing trophies
- ROUND_CONTROL() prepares the new stat rows for the new round in player_round_stats and round_stats
Changed where the Variable related functions were created within create_schemaverse.sql so that the script actually works
# 2012 01 23
Bug Fix
- now returns a numeric value rather than an integer. Represents the percentage of a ship's remaining health.
# 2012 01 15
Gameplay change / Bug Fix
- Ships can no longer create ships at location (0,0). This was how the rule was intended during the recent map changes but I missed commenting out a line in create_ship
- A ship's first coordinates are also now added to the ship_flight_recorder during create_ship_event
# 2012 01 13
create_schemaverse.sql - v0.14.2
Bug Fix
-Round_Control() difficulty of a planet could be zero leaving it 'dead' (impossible to mine)
Gameplay change
-Round_Control() has been altered so that all player home planets start equal. Inital planet settings for home planets are:
mine_limit 30
fuel 50000000
difficulty 2
# 2011 12 29
Bug Fix
-Round_control() was not setting enabled='t' when activing fleets players had designated to be active at the start of a round
-Round_control() was also not removing the owner of Torono at the begging of a round. Now sets to NULL.
# 2011 10 22 - v0.10.1
Bug Fix/Gameplay change
-Since there are less planets, the tic had to be changed to replenish the fuel supply much slower
# 2011 10 21
create_schemaverse.sql - v0.14 - Now I remember where I put that ship
New Features
- Players can now store their own variables in the public_variables view.
This should give them a lot more control over the state of their scripts.
Note: Players cannot reuse the names of system variables
Players can maintain their variables with UPDATE/INSERT/DELETE on the public_vairable view or use the following commands
# 2011 10 17
create_schemaverse.sql - v0.14 - Where is everyone?
Rule Alterations and Balancing
-New maps will now be generated every round
-The center box where you could generate ships no longer exists
-You can generate a ship on 0,0 still
-Only ~(total_players * 1.05) planets will be created each round
# 2011 09 10
create_schemaverse.sql - v0.13 - Packrat
New Features
- After a round ends, all events from the round are moved into the event_archive table. The first round to be archived will be round 4
- read_event() has not changed when using it on the my_events view, if you want to use it on the new event_archive
then you can use it by passing a round id like: read_event(round_id, event_id)
- A new view has been created, current_player_stats, to allow you to better track your opponents and allies
# 2011 08 28
create_schemaverse.sql - v0.12 - Stateful Ships - v0.10 - v0.2
New Features
- Ships have been given a way to store state. You no longer have to rely on your fleet script to call all actions each tic.
my_ships.action : Stores either NULL, 'ATTACK', 'REPAIR', 'MINE'
my_ships.action_target_id : Stores either NULL, the Ship ID or Planet ID of the object you want to perform the action against
The program will run the desired action for each ship after performing the fleet scripts.
- New MOVE overloads and functionality.
MOVE(ship, speed, x, y); -- automatically calculates direction. must have enough fuel still to stop
MOVE(ship, x, y); -- automatically calculates direction and best possible speed
MOVE(ship, speed, direction, x, y) -- Still works as before
As the second overload also mentions, if you give a NULL speed and direction, the system will now calculate the optimal choice for both
Rule Alterations and Balancing
- The calculation for an attack is now:
my_ships.attack * ( DEFENSE_EFFICIENCY / enemy.defense + DEFENSE_EFFICIENCY)
This will likely be tweaked but right now DEFENSE_EFFICIENCY is 0.50
Bug Fixes
-committed some fixes to ROUND_CONTROL() I had forgot about
# 2011 08 24
create_schemaverse.sql - v0.11 - The DC19 Tournament Edition - v0.9 - v0.2
Rule Alterations and Balancing
-Changed Pricing to try and make upgrading a better option
-Destroyed ships no longer return the value of the initial ship to the players player.balance (changed in the destroy_ship() trigger)
--A new function will need to be created called ~'reset' that puts a player back to the starting game values, destroys all ships, etc.
-Queries only get 1 minute of run time if they are ran outside of the script system, down from 2 minutes (change made in
-Fleets that run over their limit are automatically set to disabled (change made in
Bug Fixes
-SQL Injections all over these here parts
-Added NOT NULL to player.balance and player.fuel_reserve
-Fixed player_creation trigger issue where new players were not assigned a planet
-Can no longer charge a negative quantity for free money added to player.balance
-Fixed a ship.last_living_tic bug that would set a ship to destroyed if it's health was diminished to zero during the same tic the ship was created on
-my_ships.speed and my_ships.direction are no longer directly updatable because it does not calculate fuel costs when using this method. MOVE() must be used to alter these values
-Can no longer create ships where attack, defense, engineering and prospecting are given as values less than zero. This is to resolve one of the top game hacks discovered at DC19.
-Move fixes, mostly involving when you give a speed and direction but no destination x,y. This function isn't perfect but it is getting there. The suggestions I received recently will definitely be put to use in the near future to further develop this function.
-Fixed round control to start a new round even if it misses the day mark it should have started on
-Dead ships no longer try to move