Skip to content

Instantly share code, notes, and snippets.

@Numbers11
Numbers11 / get_land_type_from_template.py
Created March 4, 2024 21:27
Python script to extract the land type value (is a certain tile in a template walkable, buildable etc.) from the template files in Command and Conquer (Remastered, but will likely work as well in the original)
import os
from enum import Enum
#for the Temperate tileset
templates = {
"clear1" : {"id":0,"w":1,"h":1},
"w1" : {"id":1,"w":1,"h":1},
"w2" : {"id":2,"w":2,"h":2},
"sh01" : {"id":3,"w":4,"h":5},
"sh02" : {"id":4,"w":5,"h":5},
function checkCollision(x1,y1,w1,h1, x2,y2,w2,h2)
return x1 < x2+w2 and
x2 < x1+w1 and
y1 < y2+h2 and
y2 < y1+h1
end
MAX_OBJECTS = 10
MAX_LEVELS = 5
Class Entitity
entity.id
entity.dead
entity.position (als vector oder sonst was)
------
entity.follow vllt?
entity.parent vllt? <- wird gelöscht wenn der parent gelöscht wird
....
entity.nodraw
entity.paused
<?XML version="1.0"?>
<scriptlet>
<registration
description="AtomicRedTeam"
progid="AtomicRedTeam"
version="1.00"
classid="{AAAA1111-0000-0000-0000-0000FEEDACDC}"
remotable="true"
>
<?XML version="1.0"?>
<script language="JScript">
<![CDATA[
var r = new ActiveXObject("WScript.Shell").Run("calc.exe");
]]>
</script>
#$t = '[DllImport("user32.dll")] public static extern bool ShowWindow(int handle, int state);'
#add-type -name win -member $t -namespace native
#[native.win]::ShowWindow(([System.Diagnostics.Process]::GetCurrentProcess() | Get-Process).MainWindowHandle, 0)
function Out-Minidump
{
<#
.SYNOPSIS
λ wget -r -H -nc -np -nH --cut-dirs=3 -A .cbr -e robots=off -l1 -i ./itemlist.txt -B "http://archive.org/download/"
javascript:document.querySelector("div.c-article-text").innerHTML = JSON.parse(document.querySelector('script[type="application/ld+json"]').innerText).articleBody;alert();
document.querySelector("div.c-article-text").innerHTML = JSON.parse(document.querySelector('script[type="application/ld+json"]').innerText).articleBody;
import struct
global file
#import fbx
import sys
import math
#import FbxCommon
import functools
import itertools
import numpy as np
import bpy, mathutils
@Numbers11
Numbers11 / parse.py
Last active February 23, 2016 16:16
import struct
global file
import fbx
import sys
import math
import FbxCommon
import functools
import itertools