- Items:
- incrementRotTimer
- addImprovementFromJob
- moveToGround
- categorize
- addWear/incWearTimer/setWear
- addContaminant/removeContaminant/removeContaminantByIdx
- contaminateWound
- coverWithContaminant
- becomePaste/becomePressed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- changes from advmode to fort safely (hopefully) | |
if df.global.gamemode==df.game_mode.ADVENTURE then | |
local adv=df.global.world.units.active[0] | |
local ui=df.global.ui | |
function advGlobalPos() | |
local wd=df.global.world.world_data | |
return wd.adv_region_x*16+wd.adv_emb_x,wd.adv_region_y*16+wd.adv_emb_y | |
end | |
function inSite() | |
local tx,ty=advGlobalPos() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# McSimps Titanfall Map Exporter Tool | |
# Website: https://will.io/ | |
# Modded(butchered) to output ply by Warmist | |
# disclaimer: i don't know python... | |
import struct | |
from enum import Enum | |
import os | |
import math |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local fname="mp_forwardbase_kodai.ain" | |
local print_stuff=true | |
local save_nodes=true | |
local save_links=true | |
--[[ current struct layouts ]] | |
local MAX_HULLS=5 | |
local ain_file={ | |
{"u32","magic"}, | |
{"u32","mapver"}, | |
{"u32","crc"}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hulls extracted from the game: | |
180b4be60 hulldef[6] | |
hulldef[0] | |
name=HULL_HUMAN | |
field1_0x8=0x1 | |
bbox_min={-16,-16,0} | |
bbox_max={16,16,72} | |
walk_height=18.0 //not 100% sure... | |
field5_0x28=0.5 | |
field6_0x2c={60.0f,250.0f,400.0f} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct header { | |
u32 version; | |
u32 map_version; | |
u32 unk0; //crc or hash or sth | |
}; | |
header head @ 0x00; | |
struct node_t { | |
float px,py,pz,yaw; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function find_race(name) | |
name = name:lower() | |
for i,v in ipairs(df.global.world.raws.creatures.all) do | |
if v.creature_id:lower() == name:lower() then | |
return i | |
end | |
end | |
end | |
--NOTE(warmist): named_civ changed to player_civ but does not make sense? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--removes heart | |
function findBodyPart(caste_raw,token) | |
for id,bp in ipairs(caste_raw.body_info.body_parts) do | |
if bp.token==token then | |
return id,bp | |
end | |
end | |
end | |
local trg=dfhack.gui.getSelectedUnit() | |
local heart_id=findBodyPart(df.creature_raw.find(trg.race).caste[trg.caste],"HEART") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//from Hash Functions for GPU Rendering (Jarzynski et al.) | |
//http://www.jcgt.org/published/0009/03/02/ | |
uint3 pcg3d(uint3 v) | |
{ | |
v = v * 1664525u + 1013904223u; | |
v.x += v.y*v.z; v.y += v.z*v.x; v.z += v.x*v.y; | |
v ˆ= v >> 16u; | |
v.x += v.y*v.z; v.y += v.z*v.x; v.z += v.x*v.y; | |
return v; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ms=require('memscan') | |
local cs=ms.get_code_segment() | |
function get_ptr_size( ) | |
local v=df.new('uintptr_t') | |
local ret=df.sizeof(v) | |
df.delete(v) | |
return ret | |
end |
NewerOlder