<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dwarffortresswiki.org/index.php?action=history&amp;feed=atom&amp;title=Titan%2Fscript</id>
	<title>Titan/script - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://dwarffortresswiki.org/index.php?action=history&amp;feed=atom&amp;title=Titan%2Fscript"/>
	<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Titan/script&amp;action=history"/>
	<updated>2026-05-18T21:30:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.11</generator>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Titan/script&amp;diff=308508&amp;oldid=prev</id>
		<title>DPhKraken: Adding script files</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Titan/script&amp;diff=308508&amp;oldid=prev"/>
		<updated>2025-03-12T01:21:39Z</updated>

		<summary type="html">&lt;p&gt;Adding script files&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
creatures.titan.default=function(subregion,tok)&lt;br /&gt;
    local tbl={}&lt;br /&gt;
    local options={&lt;br /&gt;
        pick_sphere_rcm=true,&lt;br /&gt;
        strong_attack_tweak=true,&lt;br /&gt;
        sickness_name=&amp;quot;titan sickness&amp;quot;,&lt;br /&gt;
        token=tok&lt;br /&gt;
    }&lt;br /&gt;
    local atp = tostring(world.param.titan_attack_trigger_population)&lt;br /&gt;
    local atew = tostring(world.param.titan_attack_trigger_exported_wealth)&lt;br /&gt;
    local atcw = tostring(world.param.titan_attack_trigger_created_wealth)&lt;br /&gt;
    split_to_lines(tbl,[[&lt;br /&gt;
    [TITAN]&lt;br /&gt;
    [ATTACK_TRIGGER:]]..atp..&amp;quot;:&amp;quot;..atew..&amp;quot;:&amp;quot;..atcw..[[]&lt;br /&gt;
    [NO_GENDER]&lt;br /&gt;
    [NO_DRINK][NO_EAT][NO_SLEEP]&lt;br /&gt;
    [DIFFICULTY:10]&lt;br /&gt;
    [LAIR:SHRINE:100]&lt;br /&gt;
&lt;br /&gt;
    [NATURAL_SKILL:WRESTLING:6]&lt;br /&gt;
    [NATURAL_SKILL:BITE:6]&lt;br /&gt;
    [NATURAL_SKILL:GRASP_STRIKE:6]&lt;br /&gt;
    [NATURAL_SKILL:STANCE_STRIKE:6]&lt;br /&gt;
    [NATURAL_SKILL:MELEE_COMBAT:6]&lt;br /&gt;
    [NATURAL_SKILL:DODGING:6]&lt;br /&gt;
    [NATURAL_SKILL:SITUATIONAL_AWARENESS:15]&lt;br /&gt;
    ]])&lt;br /&gt;
    add_regular_tokens(tbl,options)&lt;br /&gt;
    options.spheres={}&lt;br /&gt;
    if subregion then&lt;br /&gt;
        map_merge(options.spheres,regiontypes[subregion.type].spheres)&lt;br /&gt;
        if subregion.is_evil then&lt;br /&gt;
            options.spheres[pick_random(evil_spheres)]=true&lt;br /&gt;
            options.is_evil = true&lt;br /&gt;
        elseif subregion.is_good then&lt;br /&gt;
            options.spheres[pick_random(good_spheres)]=true&lt;br /&gt;
            options.is_good = true&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    populate_sphere_info(tbl,options)&lt;br /&gt;
    local rcp=get_random_creature_profile(options)&lt;br /&gt;
    add_body_size(tbl,math.max(10000000,rcp.min_size),options)&lt;br /&gt;
    tbl[#tbl+1]=&amp;quot;[CREATURE_TILE:&amp;quot;..tile_string(rcp.tile)..&amp;quot;]&amp;quot;&lt;br /&gt;
    if options.is_good then&lt;br /&gt;
        tbl[#tbl+1]=&amp;quot;[BENIGN]&amp;quot;&lt;br /&gt;
    else&lt;br /&gt;
        tbl[#tbl+1]=&amp;quot;[LARGE_PREDATOR]&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    build_procgen_creature(rcp,tbl,options)&lt;br /&gt;
    tbl[#tbl+1]=&amp;quot;[GO_TO_START]&amp;quot;&lt;br /&gt;
    local subreg_name=subregion and regiontypes[subregion.type].name(subregion) or &amp;quot;buggy&amp;quot;&lt;br /&gt;
    local name_str = subreg_name..&amp;quot; titan:&amp;quot;..subreg_name..&amp;quot; titans:&amp;quot;..subreg_name..&amp;quot;-titan]&amp;quot;&lt;br /&gt;
    tbl[#tbl+1]=&amp;quot;[NAME:&amp;quot;..name_str&lt;br /&gt;
    tbl[#tbl+1]=&amp;quot;[CASTE_NAME:&amp;quot;..name_str&lt;br /&gt;
    return {creature=tbl,weight=1}&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;{{Category|Lua script pages}}{{Category|Creature raw pages}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>DPhKraken</name></author>
	</entry>
</feed>