Skip to content

Instantly share code, notes, and snippets.

View nesrak1's full-sized avatar
🦌
deer december

nesrak1

🦌
deer december
View GitHub Profile
@nesrak1
nesrak1 / updatecatalog.py
Created January 17, 2022 04:01
Removes CRC from StreamingAssets catalog.json file for addressables asset bundles
from enum import Enum
from struct import *
import base64
import json
import io
class BinaryStream:
def __init__(self, base_stream):
self.base_stream = base_stream
var snd = {
//buffer
dat: "",
//playback
pos: 0,
stop: 0,
//song data
tickWait: 120, //ms between each tick
startLoop: 0, //start of loop
endLoop: 1, //end of loop
// Copyright (c) Xenko contributors (https://xenko.com) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Xenko.Core.Mathematics;
using Xenko.Assets.Presentation.AssetEditors.EntityHierarchyEditor.Game;
using Xenko.Assets.Presentation.AssetEditors.GameEditor;
using Xenko.Assets.Presentation.AssetEditors.GameEditor.Game;
@nesrak1
nesrak1 / GreenOSInput.cs
Created July 19, 2019 20:24
Xenko Keys to char
using System.Collections.Generic;
using Xenko.Input;
namespace GREENHOUSEF
{
class GreenOSInput
{
private static Dictionary<Keys, char> keyToChar = new Dictionary<Keys, char>()
{
{Keys.OemTilde , '`'},
// ==UserScript==
// @name Grand Prix Chart
// @namespace me.xpaw.grandprixchart
// @version 0.6
// @match https://store.steampowered.com/grandprix*
// @grant GM_xmlhttpRequest
// @grant unsafeWindow
// @require https://cdnjs.cloudflare.com/ajax/libs/highcharts/7.1.2/highstock.js
// @run-at document-end
// ==/UserScript==
Calculating quantity:
For each child, a range from min to max (max is exclusive, so if min is 1 and max is 3, the range would be 1 or 2) will be chosen. This means for a min of 1 and max of 3, that each child will have a chance of dropping 1 to 2 minerals. There is also chance, which dictates whether or not the resources will drop. The game uses FairRandomizer which is different as it is dictated by previous drops (so you don't get too many or too few.) However I will stick with a normal randomization here. Possible chance is the actual range of what you can possibly get. Probably chance is both values multiplied by the chance, so that if you only got (say for a chance = 0.35) got 35% of those values, then you would get the probable range (these are rounded the nearest whole value.)
DrillableCopper -
minResources = 1
maxResources = 3
chance = 1
techType = 7
chance = 1
childrenCount = 8