Tune progression

StoryForce keeps its progression rules in the server database, so you can change them without rebuilding the game.

You need access to the server files and a SQLite editor.

Stopping the server first gives you a clean database file and a clear point to restore.

Stop and back up the server

  1. Stop the server cleanly.
  2. Back up GameData/StoryForce/db/storyforce.db before changing it.
  3. Open that file in a SQLite editor.

Back up your database covers automatic snapshots and restoring one.

Choose what to tune

The three tables divide the job:

TableWhat each row controls
sf_levelsTotal XP required for a level, maximum health, health per second, maximum Force and Force per second
sf_forcepowersThe highest purchasable rank and the XP price of each Force-power rank
sf_skillsThe highest purchasable rank and the XP price of each skill rank

The tables ship with 30 levels, 18 Force powers and 20 skills.

Tune the values in existing rows. Keep each id unchanged. The idx and label columns in the two rank tables are informational.

  • xp_required is the total XP at which a level begins.
  • hp_per_sec and force_per_sec are recovery rates, so 0.5 means half a point each second.

Keep values valid

  • Level 1 starts at 0 XP. Every later xp_required must equal or exceed the row before it.
  • Every level row must remain usable. max_hp, hp_per_sec and force_per_sec must be above 0.
  • max_force must be from 1 to 255.
  • Every price through the ceiling must be valid. Rank costs run from 5 to 250 XP in steps of 5.

One invalid level row makes StoryForce reject the whole sf_levels table and use the shipped level curve.

The server prints an SF_Tuning: explanation for every rejected value.

Account for existing characters

Changing a rank price also reprices ranks characters already bought.

Their remaining XP is worked out from the current table, not the price on the day of purchase.

Raising prices can leave a character with no XP available for another purchase until their total catches up.

Lowering prices frees XP for later purchases.

Restart and check the result

Commit or save your changes, then close the SQLite editor. Start the server and read its console. A changed database produces an SF_Tuning: summary and lists up to eight values that differ from the shipped defaults. Rejected rows print their reason there too.

Open the Force and Skills screens with a player account to confirm the ceilings and prices. The server sends its custom tables to each player as they join.

To restore shipped values, delete the rows you want to reset while the server is stopped, then restart. StoryForce recreates missing rows from its defaults.