private void setFieldItems(List<Integer> fieldItems) {
		Iterator<Integer> iterItems = fieldItems.iterator();

		// normal items
		int scriptFile = romEntry.getInt("ItemBallsScriptOffset");
		byte[] itemScripts = scriptNarc.files.get(scriptFile);
		int offset = 0;
		int skipTableOffset = 0;
		int[] skipTable = romEntry.arrayEntries.get("ItemBallsSkip");
		int setVar = romEntry.romType == Type_HGSS ? 0x29 : 0x28;
		while (true) {
			int part1 = readWord(itemScripts, offset);
			if (part1 == 0xFD13) {
				// done
				break;
			}
			int offsetInFile = readRelativePointer(itemScripts, offset);
			offset += 4;
			if (skipTableOffset < skipTable.length
					&& (skipTable[skipTableOffset] == (offset / 4) - 1)) {
				skipTableOffset++;
				continue;
			}
			int command = readWord(itemScripts, offsetInFile);
			int variable = readWord(itemScripts, offsetInFile + 2);
			if (command == setVar && variable == 0x8008) {
				int item = iterItems.next();
				writeWord(itemScripts, offsetInFile + 4, item);
			}
		}

		// hidden items
		int hiTableOffset = romEntry.getInt("HiddenItemTableOffset");
		int hiTableLimit = romEntry.getInt("HiddenItemCount");
		for (int i = 0; i < hiTableLimit; i++) {
			int item = iterItems.next();
			writeWord(arm9, hiTableOffset + i * 8, item);
		}
	}