Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Test3

Welcome to the Chrome Engine Modding Wiki
Revision as of 16:47, 6 February 2025 by Gamer5700 (talk | contribs)


  1. Inventory Imports Guide
    1. General Rules

- Some files **cannot** be imported directly into `inventoryimports.scr` and **must** be reintroduced into their original locations (e.g., the stash). - You can reference what `inventoryimports.scr` contains; the process remains the same. - **Do not** import files into anything other than `inventoryimports.scr` unless required.

---

    1. Custom Script Setup

1. **Define a Subroutine**

  - At the beginning of your script, define a subroutine:  

sub my_craftplans() { }

markdown Copy Edit - It is **recommended** to name the subroutine the same as your `.scr` file (without the extension), but this is optional.

2. **Using the Subroutine** - In the script where your subroutine is imported, place a `use` statement inside `sub main()`. - The `use` script calls the subroutine, and their names must match. - The key difference is that the `use` script includes an extra symbol `();`

3. **Importing Your Custom File** - The import statement **must** be placed **above** the rest of the script and include the full file name: import "custom.scr"

yaml Copy Edit

---

    1. Example Imports
      1. **Example 1: Importing into Another Script**

import "inventorystuff.scr" import "faction_exports.scr" import "inventory_weapondefinitions.scr" import "custom.scr"

sub main() { use my_craftplans(); }

yaml Copy Edit

---

      1. **Example 2: Importing into inventoryimports.scr**
    • ⚠️ Use only one import method—do not mix both!**

// This script is generated from Inventory.xlsm. Do not modify it!!!

import "inventorystuff.scr" import "inventory_outfits_opera.scr"

sub imports() { }

sub outfit_imports() { }

sub collectables_imports() { }

sub prototypes_imports() { }

sub weapons_imports() { }

sub items_imports() // "items_imports" and "imports" accept any inventory data. // You can categorize by type or place all imports here. { use my_craftplans(); }

markdown Copy Edit

---

    1. Custom Scripts for `skills_sources.scr` and `buffs_sources.scr`

- To add a custom script for **skills** or **buffs**, follow the same import structure. - **Steps:**

 1. **Make a copy** of the XML file.
 2. **Clear its content** and rename it.
 3. **Place it in the corresponding source file** (e.g., `buffs_sources.scr`).
      1. **Example: Adding Buffs in `buffs_sources.scr`**

sub main() { Script("buffs.xml"); Script("my_buffs.xml"); Script("buffs_gameplay_modifiers.xml"); }

yaml Copy Edit ---

      1. ✅ **Final Notes**

- **Keep imports organized** based on what they contain. - **Use only one import method** for consistency. - **Make sure subroutine names match** in the `use` statement.

---

Cookies help us deliver our services. By using our services, you agree to our use of cookies.