1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Script file handling for Gen 4 Pokémon games.
//!
//! This module provides functionality for working with script files, including:
//!
//! - **Script ID Resolution**: Resolve script IDs to their containing files and associated data
//! - **Global Script Table**: Map common/global script IDs (2000+) to script files
//! - **Script Table**: Map script file names to numeric IDs from `scripts.order` files
//!
//! # Script ID System
//!
//! Gen 4 games use two categories of scripts:
//!
//! - **Local Scripts** (ID 0-1999): Scripts that belong to a specific map's script file
//! - **Common Scripts** (ID 2000+): Global scripts accessible from anywhere
//!
//! # Example
//!
//! ```rust,no_run
//! use uxie::script_file::{
//! GlobalScriptTable, resolve_script_id, is_common_script_id,
//! };
//!
//! // Check if a script ID is a common/global script
//! assert!(is_common_script_id(2500));
//! assert!(!is_common_script_id(100));
//!
//! // Load the global script table for Platinum
//! let table = GlobalScriptTable::platinum_hardcoded();
//!
//! // Look up which file contains script ID 2018
//! if let Some(entry) = table.lookup(2018) {
//! println!("Script file: {}", entry.script_file_id);
//! println!("Text archive: {}", entry.text_archive_id);
//! }
//! ```
pub use ;
pub use ;
pub use ScriptTable;