gcsim Documentation
website·Indexed 32 days ago
https://docs.gcsim.appReference documentation for gcsim, featuring a comprehensive weapon database including known issues and AoE data for various weapons.
What's inside gcsim
- The Substat Optimizer is an experimental CLI-only feature that attempts to optimize artifact substats given an action list and key inputs. It is primarily used for theorycrafting to align calculations with standards or to generate reasonable artifact presets when specific artifacts are unavailable. By default, it assigns substats adhering to the KQM Standard.
Overview of gcsim combat simulation
gcsim is a team DPS calculation and combat simulation tool for Genshin Impact. It simulates combat based on user-defined team inputs to calculate overall damage and provide detailed statistics, including:
- Overall damage distribution per character
- Detailed damage distribution per character skill
- Energy regeneration metrics
- Reaction counts
- Field damage
Because the tool is under active development, users are encouraged to verify results and report issues via GitHub or Discord.
Overview of new gcsl language features
The revamped gcsl language introduces several scripting capabilities. While these are optional and not required for basic sims, they are available for advanced logic:
- Variables, arithmetic, and logic operations.
- Loops (e.g.,
while) and control statements (if/else). - Custom functions.
- Implementation of Hitlag.
- Reworked animation system (fixing a 2-frame delay bug) and updated character frame data including dash, jump, and cancels.
Understand gcsim's 2D coordinate system and units
gcsim uses a 2D Cartesian coordinate system where every point is identified by x and y coordinates. The unit of length is meters (m). For context, some Abyss floor tiles (e.g., Floors 7 and 8) are 2.55m x 2.55m.Organize and upload frame data for review
To maintain a clear overview and share data for verification:
- Rename Videos: Use the scheme
<item count>_<item recording count>_<name-with-hyphens>.mp4(e.g.,02_01_NA-String.mp4). - Timestamp TODO List: Watch
in_frames.mp4and add timestamps to thenahida_todo.txtlist (e.g.,0:00 NA String - hitmark). - Upload to YouTube: Upload
out_frames.mp4as an 'Unlisted' video. Paste the timestamped TODO list into the video description. - Create Google Sheet: Base the frame sheet on existing character templates in the reference section, using similar weapon-type characters as guides.
- Rename Videos: Use the scheme
Evaluate player state and stamina
The following fields provide information about the player's current state:
.stam: Evaluates to the player's remaining stamina..state: Evaluates to the current state of the player..previous-char: Evaluates to the character that executed the previous action. This should be compared against keys from.keys.char.<char_name>.
Determine release and travel frames
To calculate travel frames for an ability:
- Release Frame: Identify the frame where a bright circle appears.
- Travel Frames: Count the frames starting from the release frame and ending at the hitmark frame (using the hitmark logic defined in the hitmark section).
Fine-tune macro timings for shortest duration
Finding the shortest possible button press/delay is a brute-force process. Follow these guidelines:
- Adjust durations in multiples of 25ms.
- A timing is considered the shortest possible if increasing the speed (decreasing duration) breaks the macro.
- Build longer chains on previously determined timings (e.g., N4 ➔ CA builds on N3 ➔ CA).
- If a macro is inconsistent or breaks specifically during recording, increase the duration (make it slower).
- For cancels close to hitmark timings, verify by attempting to hit an enemy without triggering hitlag.
Implement conditional logic with if statements
Use theifstatement to execute blocks of code based on a condition.if <condition> { // code to execute if true } else { // code to execute if false }Write combat rotations using gcsim script (gcsl)
The gcsim script (gcsl) defines the sequence of actions. Commands are executed sequentially. If an ability is not ready (due to cooldown, energy, or stamina), the simulator will stall on that line and wait until the action can be successfully executed before proceeding.
Key Syntax:
- Short-form repetition: Use
:nto repeat an action (e.g.,attack:5instead of writingattackfive times). - Automatic Swaps: The simulator automatically swaps characters if the next action requires a different character than the one currently active.
- Manual Swaps: Use
<char> swap;to force a character change.
active raiden; raiden skill; xingqiu skill, burst; bennett skill, burst; xiangling burst, skill; raiden burst; raiden attack:5, jump;- Short-form repetition: Use
Create a character rotation
To define a rotation, first set the starting character using theactivecommand. Then, list the actions (skill, burst, attack) for each character. You can specify the number of attacks using theattack:Nsyntax.active raiden; raiden skill; xingqiu skill, burst; bennett skill, burst; xiangling burst, skill; raiden burst; raiden attack:15;Import characters from Enka.Network
Import character data into gcsim using your in-game UID via Enka.Network.
Prerequisites:
- Open the Paimon Menu in-game.
- Click the pencil icon on your namecard ->
Edit Profile. - Ensure the desired characters are in the
Character Showcase. - Ensure
Show Character Detailsis enabled.
Steps to import:
- Navigate to the gcsim Simulator page.
- Click
Toolsat the bottom of the screen. - Select
Import from Enkato open the dialog. - Paste your in-game UID into the text box.
- Click the
Fetchbutton.
Note: This process will overwrite any existing imports for your characters. To update characters after in-game changes, repeat the import process.