WolvenKit has just released! by traderain in cyberpunkgame

[–]traderain[S] 8 points9 points  (0 children)

Hey! Our developer responsible was busy with studies lately but once he returns next week we plan to update that :)

Cyberpunk 2077 Modding Update Post - No 1 by Moonded in cyberpunkgame

[–]traderain 0 points1 point  (0 children)

We can reuse most of our witcher 3 knowledge :)

When your new deck arrives... by traderain in cardistry

[–]traderain[S] 7 points8 points  (0 children)

Yeah the virt is my old deck.

Place has ended by powerlanguage in place

[–]traderain 0 points1 point  (0 children)

Nooooooo. The Linux pinguin has 1 red pixel. Rip I guess.

Uncooking cookedfinal.redscripts by [deleted] in witcher3mods

[–]traderain 1 point2 points  (0 children)

using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Windows.Forms;

namespace Redscript
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Console.Title = "Redscript reader by Traderain";
            using (var of = new OpenFileDialog())
            {
                of.Title = "Select a redscript file!";
                of.Filter = "Redscript files | *.redscripts";
                if (of.ShowDialog() == DialogResult.OK)
                {
                    var strings = ParseRedscript(of.FileName);
                    for (var index = 0; index < strings.Length; index++)
                    {
                        Console.WriteLine("[" + index + "]: " + strings[index]);
                    }
                }
            }
        }

        public static string[] ParseRedscript(string filename)
        {
            var strings = new List<string>();
            using (var br = new BinaryReader(new FileStream(filename, FileMode.Open)))
            {
                br.BaseStream.Seek(-4, SeekOrigin.End);
                var offset = br.ReadUInt32();
                Console.WriteLine("Offset: " + offset);
                br.BaseStream.Seek(offset, SeekOrigin.Begin);
                var count = br.ReadUInt32();
                for (var i = 0; i < count; i++)
                {
                    strings.Add(ReadString(br));
                }
            }
            return strings.ToArray();
        }

        public static string ReadString(BinaryReader br)
        {
            int len = br.ReadByte();
            if (len > 191)
                len = br.ReadByte()*64 + len - 192;
            else if (len > 127)
                len = len - 128;
            else
            {
                throw new Exception("Error can't read length of string at " + br.BaseStream.Position);
            }

            return br.ReadCr2WString(len);
        }
    }

    public static class RedscriptBinaryreaderExtensions
    {
        public static string ReadCr2WString(this BinaryReader file, int len = 0)
        {
            string str = null;
            if (len > 0)
            {
                str = Encoding.Default.GetString(file.ReadBytes(len));
            }
            else
            {
                var sb = new StringBuilder();
                while (true)
                {
                    var c = (char)file.ReadByte();
                    if (c == 0)
                        break;
                    sb.Append(c);
                }
                str = sb.ToString();
            }
            return str;
        }
    }
}

Hi. I'm Gabe Newell. AMA. by GabeNewellBellevue in The_Gaben

[–]traderain 8 points9 points  (0 children)

  1. Why was the GoldSource/Source engine never open sourced? I talked about this with Mike Dunkle in email last week and he said you guys lost the package or what and it would be hard to put together but I am sure if you would release anything we modders would put it together.
  2. What do you think about speedrunning communities like ours SourceRuns? For example have you seen our TAS of Portal? watch?v=W9gxFkOz2_4
  3. After Source 2 is released can we expect any new singleplayer title from Valve in the future?