Skip to content

Instantly share code, notes, and snippets.

View Petethegoat's full-sized avatar
😍

Pete Goodfellow Petethegoat

😍
View GitHub Profile
local scriptNames = {
-- Services
travel = "showTravelScript",
barter = "showBarterScript",
repair = "showRepairScript",
spells = "showSpellsScript",
training = "showTrainingScript",
spellmaking = "showSpellmakingScript",
enchanting = "showEnchantingScript",
companion = "showCompanionScript",
local function onKeyDown(e)
if e.keyCode == tes3.worldController.inputController.inputMaps[20].code then
journalKey = e.keyCode
tes3.worldController.inputController.inputMaps[20].code = nil
if tes3ui.findMenu(menuBook) then
tes3ui.findMenu(menuBook):findChild(menuBook_button_close):triggerEvent("mouseClick")
tes3ui.leaveMenuMode()
else
showJournalUI()
-- Tweakables
local ringScriptName = "mwseRingScript"
local cureJournalEntry = "MS_Nuccius"
local cureJournalIndex = 150 -- if the journal entry is equal to or higher than this index, cure the curse.
local tickDuration = .1 -- Tick the curse every X seconds
-- No editarino below this line unless you're pro
local ringTimer
local startingAttributes = {}
local menuBook_button_take = tes3ui.registerID("MenuBook_button_take")
local menuBook_button_next = tes3ui.registerID("MenuBook_button_next")
local menuBook_button_prev = tes3ui.registerID("MenuBook_button_prev")
local menuBook_page_1 = tes3ui.registerID("MenuBook_page_1")
local menuBook_page_2 = tes3ui.registerID("MenuBook_page_2")
local menuScroll_scroll = tes3ui.registerID("MenuScroll_Scroll")
local config = mwse.loadConfig("Illiterate")
if not config then
config = {
bl_info = {
"name": "Convert Face Textures to Material Textures",
"author": "Greatness7",
"location": "Object -> Search -> Convert Face Textures to Material Textures",
"description": "Convert Face Textures to Material Textures",
"category": "Object",
}
import bpy
from pathlib import Path
local loreTable = {
["iron battle axe"] = "A mediocre battle axe, forged from low quality impure iron. No self respecting Dunmer smith would dare sell this- it has plainly been imported from another province."
}
local function loreTooltip(e)
local lore = loreTable[e.object.id]
if lore then
local loreBlock = e.tooltip:createBlock{}
loreBlock.autoHeight = true
loreBlock.width = 440
MenuLoading
The loading screen.
MenuOptions
The main menu.
MenuLoad
The load game dialog.
MenuPrefs
@Petethegoat
Petethegoat / DropToFloor.cs
Last active November 2, 2016 08:31
Editor script for Unity that drops the selected gameobject to the ground, based on it's extents. Doesn't handle convex shapes at all. Put in Assets/Editor/DropToFloor.cs
using UnityEngine;
using UnityEditor;
namespace Goodfellow.Utils
{
public class DropToFloor
{
/*
These are the supported keys (can also be combined together):
@Petethegoat
Petethegoat / ptg_pickMarker.sqf
Last active August 29, 2015 13:57
This will move a unit to a random marker, and rotate it in the direction of that marker. Supports any number of markers.
//This will move a unit to a random marker, and rotate it in the direction of that marker. Supports any number of markers.
//Usage:
//null = [this, "mrk_1", "mrk_2", "mrk_3", "mrk_x"] execVM "ptg_pickMarker.sqf";
_unit = _this select 0;
_pick = (floor random ((count _this) - 1)) + 1;
_marker = _this select _pick;
_unit setPosATL getMarkerPos _marker;
_unit setDir markerDir _marker;
@Petethegoat
Petethegoat / ptg_garrison.sqf
Created March 8, 2014 19:41
This is designed for garrisoning AI in buildings, without preventing them from reacting when enemies are too close for their firing positions to be useful- very near to, or inside the building. You can choose to disable reaction if you don't want the additional overhead.
//This is designed for garrisoning AI in buildings, without preventing them from reacting when enemies are too close for their firing positions to be useful- very near to, or inside the building. You can choose to disable reaction if you don't want the additional overhead.
//Usage:
//null = [this, "UP", true] execVM "ptg_garrison.sqf";
//When should garrisoned units check for close enemies? In seconds.
_INTERVAL = 5;
//How close should an enemy be before they abandon their position? In meters.
_RANGE = 8;
//Fake defines so you can just execVM from init.