Creating a Custom Skills System
Player Guide
This page is a player-created guide. Information may reflect personal opinions or playstyles; instruction snippets are examples only. See all guides for more advice.
By default, Infinite Worlds characters have one or more skills. These control the success or failure of the player's actions as determined by the world's Evaluation Instructions. However, the default skills system can be disabled entirely, allowing one to create one's own system in its place. This guide will explain how to go about it.
This article has a great deal of overlap with the guide on Evaluation Instructions since the two topics are so related.
Designing Your Skills System[edit]
The first question you should ask yourself is: why create a new skills system? It's not uncommon to want to mimic other role-playing games and create something that looks like D&D for example, but does it actually add anything to your story?
In terms of action evaluation, each system essentially boils down to a chance of success for any given task and skill value. Therefore there is arguably little reason in creating a more granular skill system than IW's 0-5 one, even though it may seem like it offers more flexibilty. However IW's system generally dictates a flat success or failure based on skill value; there is little randomness.
Some - possible - reasons for wanting a new skills system:
- Let skills change more dynamically. Skills can be increased or decrease but currently only with triggers - using a tracked item instead of standard skills can make this much easier, and the AI could potentially modify them directly.
- To make the list of skills itself to be more dynamic - using the default system you cannot add skills mid-game, for example.
- To better control evaluations - as noted, there is usually no need to do this, but you may prefer that outcomes are more random.
- The complexity of the system is, itself, part of the game, e.g. you're deliberately playing into certain RPG tropes.
- You want skills to be used for other things than just evaluation.
These reasons don't necessarily dictate creating a custom system, but might.
Hide the Standard Skills System[edit]
Go to "Specalist Instructions" and check the "Hide skill system from players" box. Note that this does not disable the skills system or alter the evaluation process! It only conceals the skills from the start game screen and player character details.
Create a Tracked Item[edit]
Whatever system you decide upon, we will need to store skill values somewhere. That means a tracked item. The tracked item could be AI-visible or not (we could inject it directly into the instructions using PawScript), and if visible we could choose to let the AI update it, or not.
The best format to use for the tracked item depends on how you intend to use it, but it is probably best to use a YAML one, for example:
- name: Combat value: 3 - name: Magic value: 2 - name: Basket-weaving value: 4
Write Custom Evaluation Instructions[edit]
The standard evaluation instructions refer to the standard IW skills. You must therefore edit them to refer to your new skills! See here for more details: Evaluation Instructions
Continuing the above example, we could list out our skills in a nice textual format using PawScript like this:
My skills are $skills.format_each("{name} ({value}/5)").join(", ", " and ")
With the above tracked item, this evaluates to
My skills are Combat (3/5), Magic (2/5) and Basket-weaving (4/5)
Expressions like this can be used as part of your evaluation instructions. As mentioned in the full evaluation instructions guide, this is also where you could implement an alternative logic such as a d20 system, were you so inclined.
A Skill-Based XP System[edit]
See Levelling Up Skills for more ideas about skills which develop during a game.
The benefit of a custom skills system is that we can update our skills without needing dedicated triggers for each. We could for example tell the AI to update them for us! However here we shall explore the concept of a skill-based XP system as mentioned in that article. Each skill also has an associated XP value, and we increase the skill when the XP gets high enough. Here, we'll say we need 10 XP per point of skill we already have for each level.
- name: Combat value: 3 xp: 0 - name: Magic value: 2 xp: 0
Tell the AI how to assign XP. More reliability may be achieved by using a separate "XP gained this turn" tracked item, and then using a script trigger to add the values; then, the skills tracked item itself can be hidden from the AI (or, at least, non-updatable).
A script like this can be used to handle all skills at once with just a single trigger:
for each $skill in $skills
# Maximum skill value 5
if $skill.value <= 5
# Do we have enough XP to increase?
if $skill.xp >= $skill.value * 10
$skill.xp -= $skill.value * 10
$skill.value += 1
Skill Bonuses[edit]
Perhaps we want items or other things which provide bonuses or penalties to our skills?
It is possible to include mention of these bonuses in your evaluation instructions and tell the AI to incorporate them. However, LLMs aren't very good at arithmetic! Luckily, the power of PawScript lets us handle (almost) all of the arithmetic for the AI, though doing so necessitates a more complex system.
One way this can be done is with a clever script trigger.
Imagine we modify our skills tracked item to include a "modified" value:
- name: Combat value: 3 value_modified: 3 - name: Magic value: 2 value_modified: 2
We'll change the evaluation instructions to reference this modified value rather than the base value.
Now consider an inventory-style tracked item (the full details of implementing an inventory, including deciding what's necessary to include in it, are left as an exercise for the reader) that looks something like this:
- name: Super Magic Sword
bonuses:
- name: Combat
bonus: 3
- name: Magic
bonus: 1
- name: Useless Tea-Pot
bonuses:
A PawScript script can assemble the bonuses from this tracked item and use them to calculate modified skill values each turn:
for each $skill in $skills $skill.value_modified = $skill.value + $inventory.all().bonuses.flatten().where(name = $skill.name).sum(bonus)
To explain, for each skill, this:
- Looks at the "bonuses" field in each inventory item
- Flattens those into a big list of all bonsues
- Extract the ones which have a "name" field which matches the name of the current skill
- Sums up the "bonus" fields (these can be negative!)
- Adds the total result to the skill's value to create the value_modified
The AI can generate the bonuses for the items, but never needs to see the arithmetic going on!