Tactics Ogre PSP Crafting System (タクティクスオウガ PSP 合成)

This slideshow requires JavaScript.

Version 2.04 (5/18/2013)
Script Download

Required Scripts
Info Pages Window

This item crafting script is modeled after the crafting system implemented in the PSP remake of Tactics Ogre: Let Us Cling Together. It’s a very simple crafting system with a very simple GUI which I also used as a model.

Players must have recipe books in their inventory when entering the crafting scene. Any recipe books owned by the player will be displayed in a list. When a recipe book is selected, all possible items, armors, and weapons in the recipe book will be listed and you will be able to craft them provided that the player has the necessary ingredients.

The script Info Pages Window is required.

Feel free to reguest custom information to be added to item info pages in the crafting scene.

Changelog

  • v2.04
    • Italian language support added.
    • Shifted some code. (5/18/2013)
  • v2.03
    • Compatibility Update: “TH_SceneInterpreter”
    • Bugfix: Fixed bug where selecting the number to craft ignores the amount of ingredients available. (5/11/2013)
  • v2.02
    • Bugfix: Fixed categories nil error. (5/02/2013)
  • v2.01
    • Bugfix: Fixed ingredient numbers in info window.
    • New tag: <craft result>. See comments for more info.
    • You can now run a common event after crafting an item.
    • You can now change how many of an item you gain per set of ingredients. (5/02/2013)
  • v2.00
    • Now requires script: “Info Pages Window”.
    • This script will now check if any required scripts are missing. If any are missing, the game will be exited.
    • Many crafting customization options related to the info pages window have been removed.
    • Changed version number format.
    • $imported variable now uses version number.
    • Changed some methods, add-ons/patches may not work anymore.
    • Removed about 700+ lines of code. (5/02/2013)
  • v1.14
    • Calling the crafting scene directly with SceneManager will no longer crash the game. (4/28/2013)
  • v1.13
    • Bugfix: Custom craft result sound effects should no longer crash the game.
    • Equippable members info page added.
    • Cleaned up some code. (3/26/13)
  • v1.12
    • Quick compatibility update with Tsukihime’s TO Crafting Shop script. (3/13/13)
  • v1.11
    • You can now require specific actors in the party as a crafting requirement.
    • New ingredient notetag added.
    • New options in the customization module added.
    • Slight code efficiency update. (2/06/2013)
  • v1.10
    • TP Recovery now displays the correct value.
    • Recipebook images are now centered by default. (9/04/2012)
  • v1.09
    • State resistance item info is now viewable.
    • Footer text is now properly aligned. (8/28/2012)
  • v1.08
    • Compatibility: “YEA-AceMenuEngine” support added.
    • You can now view item details in the crafting scene if the script “Reader Functions for Features/Effects” is installed.
    • Info window style has changed.
    • Any amount of ingredients can now be displayed, not just 6.
    • Configuration module has many new settings.
    • Some method names have changed.
    • Removed a chunk of redundant code.
    • Efficiency update. (8/25/12)
  • v1.07
    • Fixed issue where you can still craft from a recipebook even if you have zero left as a result of using it in a crafting recipe.
    • Script call for the crafting scene has changed. The old one can still be used though.
    • You can now choose which recipebooks can be included in the crafting scene by category.
    • New Notetag for recipebooks added.
    • Efficiency update. (8/18/2012)
  • v1.06
    • Compatibility: “XAS VX Ace” support added. (8/08/2012)
  • v1.05
    • You can now change the recipebook pictures directory.
    • You can now assign sound effects for crafted items.
    • Slight code efficiency update. (7/29/2012)
  • v1.04
    • Added the option to use images as recipebook covers.
    • New Notetag for recipebooks added.
    • New option in customization module for book images. (7/27/2012)
  • v1.03
    • Colon between type and ID no longer needed.
    • Updated comments to reflect changes.
    • Tool regexp updated. (7/27/2012)
  • v1.02
    • You can now change the Gold icon in the customization module.
    • You can now change the name of Gold in windows. (7/27/2012)
  • v1.01
    • Fixed issue with long item names getting cut off in windows.
    • Confirm window removed.
    • Quantity selection window implemented.
    • Crafting Gold fee implemented.
    • Crafting tool requirement implemented.
    • New options added in customization module. (7/26/2012)
  • v1.00
    • Initial release. (7/25/2012)

Notetags

Note: Some tags are given shorter tags for typing convenience. You only need to use one <tag> from a given group for a notebox. Use common sense.

The following Notetags are for Items, Weapons, and Armors only:

<recipebook>
setting
setting
</recipebook>

This tag allows you define a recipe book. You can add as many settings between the <recipebook> tags as you like. Only items with this tag will appear in the recipes window in the crafting scene. The following settings are available:

item: id
item: id, id, id …
i: id
i: id, id, id …

This setting defines the items that can be crafted from the recipe book where id is the Item ID number found in your database. You can list multiple id numbers on the same line separated by commas. This setting can be used multiple times within the <recipebook> tags.

weapon: id
weapon: id, id, id …
w: id
w: id, id, id …

This setting defines the weapons that can be crafted from the recipe book where id is the Weapon ID number found in your database. You can list multiple id numbers on the same line separated by commas. This setting can be used multiple times within the <recipebook> tags.

armor: id
armor: id, id, id …
armour: id
armour: id, id, id …
a: id
a: id, id, id …

This setting defines the armors that can be crafted from the recipe book where id is the Armor ID number found in your database. You can list multiple id numbers on the same line separated by commas. This setting can be used multiple times within the <recipebook> tags.

picture: filename
pic: filename
cover: filename

This setting defines the image used to represent the recipe book in the crafting scene where filename is the name of a picture located in the Graphics/Pictures/ folder of your project. Do not include the filename’s extension. Recommended picture resolutions are [width: 248, height: 320] for default resolutions and [width: 296, height: 384] for 480×640 resolutions.

category: name

This setting defines the recipebook’s category label. Category labels are used by developers to determine which recipebooks they want included in the crafting scene. If a category label is not defined, the default category is “none”. This is a completely optional setting.

——

<ingredients>
setting
setting
<ingredients>

This tag allows you define the ingredients required to craft an item. You can add as many settings between the <ingredients> tags as you like. If an item, weapon, or armor has no ingredients, you can still craft it. The following settings are available:

item: id
item: id xN
i: id
i: id xN

This setting defines the item ingredients required to craft the item, weapon, or armor where id is the Item ID number found in your database. xN is total number of that ingredient required if it is included after the id number where N is a whole number (ex. x2, x3, x4, etc.). If xN is not included, the script will automatically assume x1. You can list multiple id numbers on the same line separated by commas. This setting can be used multiple times within the <ingredients> tags.

weapon: id
weapon: id xN
w: id
w: id xN

This setting defines the weapon ingredients required to craft the item, weapon, or armor where id is the Weapon ID number found in your database. xN is total number of that ingredient required if it is included after the id number where N is a whole number (ex. x2, x3, x4, etc.). If xN is not included, the script will automatically assume x1. You can list multiple id numbers on the same line separated by commas. This setting can be used multiple times within the <ingredients> tags.

armor: id
armor: id xN
armour: id
armour: id xN
a: id
a: id xN

This setting defines the armor ingredients required to craft the item, weapon, or armor where id is the Weapon ID number found in your database. xN is total number of that ingredient required if it is included after the id number where N is a whole number (ex. x2, x3, x4, etc.). If xN is not included, the script will automatically assume x1. You can list multiple id numbers on the same line separated by commas. This setting can be used multiple times within the <ingredients> tags.

gold: amount

This setting defines the amount of Gold required to craft the item, armor, or weapon where amount is any amount of gold. If this setting is omitted, it will use the default fee defined in the customization module.

tool: item id
tool: i id
tool: weapon id
tool: w id
tool: armor id
tool: armour id
tool: a id

This setting defines the tools required to craft the item, weapon, or armor where id is the item, weapon, or armor ID number found in your database. Tools are not consumed in the crafting process. This setting can be used multiple times within the <ingredients> tags.

actor: actor_id

This setting defines the actor required to craft the item, weapon, or armor where actor_id is the actor ID number from your database. Currently, nothing happens to the actor after crafting an item that requires one. This setting can be used multiple times within the <ingredients> tags.

<craft result>
setting
setting
</craft result>

This tag allows you to define what happens  after an item is crafted. You can add as many settings between the <craft result> tags as you like. The following settings are available:

se: filename, volume, pitch

This setting defines the custom sound effect played when the item is crafted. filename is a sound effect filename found in the Audio/SE/ folder. volume is a value between 0~100. pitch is a value between 50~150. If this setting is omitted, the default crafting sound effect defined in the customization module will play instead.

amount: n

This setting defines the amount that is produced from one set of ingredients, where n is a number. By default, the amount produced from one set of ingredients is 1.

common_event: id
cev: id

This setting defines a common event that runs right after an item is crafted where id is a common event ID number from your database.

——

Here are some examples of proper <recipebook> tags and <ingredients> tags:

It is important to know that Note boxes have iffy word wrap distinction. If a line is too long and overflows into the next line, that next line might be treated as a new line in the Note box. To stay on the safe side, if you have a long list of ids for a single item type setting, you should start the line with the similar type setting. See the “weapon:” settings in this example tag.

Each ingredient id must be on its own line, unlike the recipebook tag. More than 6 ingredients are possible, but the Required Ingredients window will not display more than 6. The last setting tag “item: 31” does not have an “xN” multiplier which means the script will automatically assume “x1”.

This tag is an example of how to use the “fee” and “tool” setting tags. Item ID 40 is required to craft the item, but it will not be consumed. Each item crafted costs 30 gold.

Script Calls

The following script calls are meant to be used in “Script…” event commands found under Tab 3 when adding a new event command.

call_tocrafting_scene

This script call opens up a Tactics Ogre Crafting scene with all recipebooks the player has in their inventory.

call_tocrafting_scene( :category, :category, …)

This script call opens up the Tactics Ogre Crafting scene with only recipebooks that have the category included in one of the script call’s arguments. You can list as many categories in the script call’s arguments separated by commas as you like. Category names must always be preceeded by a colon (:).

——

Here is an example of a script call using call_tocrafting_scene with category arguments:


This script call will open up the crafting scene with only recipebooks that have the category of “smithing”.

FAQ

Why am I allowed to craft items that have no required ingredients?

This was done on purpose to ease game development. I assumed that when people finalize a game, they will have an appropriate list of ingredients for each craftable item defined by then.

Can an item/armor/weapon have a <recipebook> tag AND an <ingredients> tag?

Yes.

Why isn’t “Success Rate” also implemented in this script from Tactics Ogre PSP?

Because I think Success Rate on crafting in single-player games is annoying and pointless due to save and load. But if there is demand for it, I can implement it.

Script ‘Tactics Ogre PSP Crafting System’ line x: NameError occurred.

uninitialized constant Object::Window_InfoPages

Place the crafting script BELOW the Info Pages script in your script editor list.

Compatibility

This script aliases the following default VXA methods:

  • DataManager#load_database

There are no default method overwrites.

This script has built-in compatibility with the following scripts:

Requests for compatibility with other scripts are welcome.

How to Add Craft Scene Command in “XaiL System – Menu Delux”

To add this command in XaiL System – Menu Delux, there are two requirements:

  1. Use v1.14 of the crafting script or higher.
  2. Install the crafting script ABOVE the Menu Delux script in the Materials section of the script editor.

Find a setting called MENU_LIST in the menu script’s customization module. Once you find it, you can add this line of code anywhere inside MENU_LIST:

:tocraft => ["Crafting", "Craft description", 16, true, false, Scene_TOCrafting],

It should look similar to this:

Change the strings to anything you want. Change 16 to any icon index number you want.

If you get a syntax error, it means you forgot a comma after one of the arrays in MENU_LIST.

Terms and Conditions

Please do not repost this script elsewhere without permission.

Free for non-commercial use. For commercial use, contact me first.

Newest versions of this script can be found at https://mrbubblewand.wordpress.com/

Advertisements

125 Responses to Tactics Ogre PSP Crafting System (タクティクスオウガ PSP 合成)

  1. nightdragon says:

    I like your crafting script. However I would like the ingredients to dissappear from your inventory after crafting. is there anyway I could do this without scripting or do i need a script for that?

  2. Allan says:

    Hello, Mr. Bubble. I keep getting an error when I start up the game on line 798. It says “undefined method `upcase’ for nil:NilClass”
    I’m not sure what to do here and it’s actually rather annoying. It doesn’t seem to do that with any of the other games I’m making.

    I would appreciate a speedy reply as I’m eager to test a few things I’m working on. Thank you in advance.

    • Allan says:

      Actually, I just tried it by making a new game entirely. It seems the script continues to fail even though it’s a completely new project. My mistake.

      • Allan says:

        Hi again. Sorry for spamming messages, but I’ve finally figured out what was wrong.
        I was placing the tag in the wrong place. Apparently I was supposed to put it inside of the tags and I was putting it after. So, sorry about all that and… problem resolved.

        Love the script. 😀

  3. joshtabner says:

    Why isn’t it working, I’ve used the notetags correctly… 😦

    see :

    item : 14, 33, 34

    plus :

    1.

    item : 15 x2
    item : 16
    tool : item 17

    2.

    item : 14 x2
    item : 12 x5

    3.

    item : 13 x3

    ——————————

    For some reason, it won’t show up on the crafting menu, please help
    😦

  4. for some reason i only get flat HP and MP restore not the % restore, anyway of fixing this?

  5. LittlMousie says:

    hello! i am using your script in tandem with a runic enchantment script, and i was wondering, is there a way to prevent items that have runes inscribed on them from being crafted and/or have any inscribed runes returned to inventory after upgrading (crafting) has taken place?

Leave a Reply here. (Due to a recent increase in comment spam bots, new comments will be moderated unless you have at least one approved comment in the past.)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s