Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 14

Author Topic: Rubble 8.5.5 - DF 44.7 - New DF, new Rubble.  (Read 70928 times)

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Rubble 8.5.5 - DF 44.7 - New DF, new Rubble.
« on: December 04, 2015, 04:34:22 pm »

Overview:


Rubble is a general purpose mod installer and creation tool. Mod installation is done with an easy to use HTML GUI or a basic CLI front end. Mod creation is facilitated by a powerful template and scripting system that allows automation of many common modding tasks.

Users of Rubble can install many unrelated mods (called "addons") simply by selecting them in the web UI and generating (which takes only a few seconds). Addons are designed to install quickly and cleanly with a minimum of effort on the part of the user.

Rubble is specifically designed to make it easy to have several worlds with radically different settings playable at the same time. You can even have things like per-world population cap settings (via "Util/Pop Cap") or switching tilesets on worlds in progress (perfect for trying that new tileset you found or changing the tileset of a world you got from a buddy). Tileset switching even works on worlds who's raws were not generated by Rubble!

For modders Rubble automates many common tasks allowing you to create mods in a small fraction of the time using standard methods would take, plus users of your mod can use it together with many other addons, making your mod *much* more user friendly and easier to install.

Rubble has been in continuous development since mid 2013, and many changes and improvements have been made since the first version (which was a simple Blast clone). All of my mods have been made to use it, so I have extensive experience with Rubble modding and along the way fixed most of the bugs and streamlined things as much as possible both for modders and users.

For modders Rubble cuts down repetition and encourages compatibility, for users it gives easy flexibility and simple customization. In short Rubble is the most powerful and easiest to use modding utility and mod manager ever made for Dwarf Fortress. Enjoy!

Where to Find Help:


Rubble comes with extensive documentation. This includes tutorials, template documentation, script documentation, and basic documentation of Rubble's internals.

If you want to view the documentation as it was designed to be viewed start the web UI and visit the "General Documentation" or "Addon Documentation" page. If you prefer documentation can also be read on GitHub, but links and such won't work there.

General users have no need to read anything except the readme! Everything most users need to know (aside from things like how to install Rubble, which can be found here or in the readme) can be found in the web UI documentation pages.

Modders will do well to read everything they can from the "General Documentation" page in the web UI, in particular parts of "Rubble Basics" will be invaluable.

Install:


If you have anything in your Dwarf Fortress directory that you want to keep back it up! Rubble will delete all your existing raw files, including creature graphics (unless you use the "Graphics/Keep" addon) and the DFHack "onLoad.init" and "init.lua" files (and many other things)!

Anything outside of your `data/init` and `raw` directories should be safe, but just in case...

1. Delete or otherwise remove any old Rubble version you may have.
2. Extract the new Rubble to "<DF Directory>/rubble".
3. Install any custom addons you may have to "<DF Directory>/rubble/addons".
4. See the appropriate "Running Rubble" section below.

Now you are good to go!

do not extract a new Rubble version over an old one! This can cause all sorts of hard to find problems!

For more details see the Rubble readme.

Running Rubble (Web UI, Easy):


The web UI is simple, functional, and easy to use.

This interface is the recommended way of running Rubble, as it always has full support for the
latest ways of doing things.

To use the web UI all you need to do is start the server (run "rubble" with no arguments or run "rubble web"), it should automatically open your web browser to the web UI main page. Linux and OSX users should see the Rubble readme for instructions on how to get this working, for Windows users it should "just work".

Running Rubble (CLI, Hard):


If you are a masochist who likes to use the command line you can use the CLI Rubble interface. See the Rubble readme for instructions.

Issues:


Feel free to report bugs either here or on GitHub.

When making an error report please post the FULL log file! Posting just a few lines tells me almost
nothing about the problem, after all I made Rubble write all that stuff for a reason :)

I cannot stress this enough! With Rubble the actual error message is only a small part of the
information I need for tracking an error down! In particular the list of active addons is **very**
important (and it tends to get cut from most reports because it is near the start of the log).

If any of the documentation is not 100% clear just ask. I know everything there is to know about how
Rubble works and so I tend to forget to put "obvious" stuff in the docs. A reminder that I forgot
something is more a help than a hindrance.

Download:


From GitHub
« Last Edit: March 13, 2018, 07:45:33 pm by milo christiansen »
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
« Last Edit: January 07, 2018, 12:55:01 pm by milo christiansen »
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 7.0.0 - DF 42.1 - Now with Lua!
« Reply #2 on: December 04, 2015, 04:35:27 pm »

Reserved
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

palu

  • Bay Watcher
    • View Profile
Re: Rubble 7.0.0 - DF 42.1 - Now with Lua!
« Reply #3 on: December 07, 2015, 08:50:54 pm »

Can I make addons enable other addons? Like, if I have a set of addons, and I want to have easily enableable preset groups, could I have it so one addon enables one set of addons, another enables another set, but perhaps with some of the same, and so on.

EDIT: Does the "Activates" in the addon.meta do that?

EDIT2: The web interface doesnt work in Firefox 45. It faild with a "TypeError: evnt.srcElement is undefined" in the console whenever I click on any of the buttons. Chrome works though. I'll see if there's anything I can do to fix it.

EDIT2 EDIT: Here's an updated html.go that should fix the problem. event.srcElement is deprecated, use event.target instead:
Code: [Select]
/*
Copyright 2013-2014 by Milo Christiansen

This software is provided 'as-is', without any express or implied warranty. In
no event will the authors be held liable for any damages arising from the use of
this software.

Permission is granted to anyone to use this software for any purpose, including
commercial applications, and to alter it and redistribute it freely, subject to
the following restrictions:

1. The origin of this software must not be misrepresented you must not claim
that you wrote the original software. If you use this software in a product, an
acknowledgment in the product documentation would be appreciated but is not
required.

2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.

3. This notice may not be removed or altered from any source distribution.
*/

package main

import "html/template"
import "rubble7/rblutil"
import "dctech/axis"

func LoadHTMLTemplates(fs axis.DataSource) (*template.Template, error) {
tmpl := template.New("webUI")

// Main Menu and Common Pages

_, err := rblutil.LoadOr(fs, tmpl, "menu", ".html", `
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/css"/>
<title>Rubble Web UI: Menu</title>

<script type="text/javascript">
window.onload = function() {
var btn = document.getElementById("Menu");
btn.addEventListener("click", function(evnt) {
evnt.stopPropagation()
evnt.preventDefault()

var to = {
"Generate": "/genaddons",
"Tileset": "/tsetaddons",
"IApply": "/iaaddons",
"Addons": "/addons",
"Docs": "/doclist",
"Quit": "/kill",
"Log": "/log",
"About": "/doc/Rubble License",
}[evnt.target.id]

if (to === undefined) {
return
}
window.location.replace("http://" + window.location.host + to)
}, false)
}
</script>
</head>
<body>
<h1>Welcome to the Rubble Web UI!</h1>
<div id="Menu">
<p><div id="Generate" class="button">Generate raws</div></p>
<p><div id="Tileset" class="button">Switch a region's tileset</div></p>
<p><div id="IApply" class="button">Apply a save-safe addon to a region</div></p>
<div class="hr"></div>
<p><div id="Addons" class="button">Addon documentation</div></p>
<p><div id="Docs" class="button">General documentation</div></p>
<div class="hr"></div>
<p><div id="Log" class="button">Current log file</div></p>
<p><div id="About" class="button">About Rubble</div></p>
<div class="hr"></div>
<p><div id="Quit" class="button">Exit Rubble</div></p>
</div>
</body>
</html>
`)
if err != nil {
return nil, err
}

_, err = rblutil.LoadOr(fs, tmpl, "pleasewait", ".html", `
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/css"/>
<title>Rubble Web UI: Running Operation</title>

<script type="text/javascript">
window.onload = function() {
window.location.replace("http://" + window.location.host + "{{.}}")
}
</script>
</head>
<body>
<h2>Rubble is working</h2>
<p>Please wait while the requested operation completes.
<p>You will automatically be redirected to the log page to view the results of the operation once Rubble is finished.
</body>
</html>
`)
if err != nil {
return nil, err
}

_, err = rblutil.LoadOr(fs, tmpl, "log", ".html", `
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/css"/>
<title>Rubble Web UI: Log</title>

<script type="text/javascript">
window.onload = function() {
function listener(evnt) {
evnt.stopPropagation()

var to = {
"Back": "/",
"Quit": "/kill",
}[evnt.target.id]

if (to === undefined) {
return
}
window.location.replace("http://" + window.location.host + to)
}

var Menu1 = document.getElementById("Menu1")
Menu1.addEventListener("click", listener, false)

var Menu2 = document.getElementById("Menu2")
Menu2.addEventListener("click", listener, false)
}
</script>
</head>
<body>
<div id="Menu1">
<p><div id="Back" class="button">Back to Menu</div></p>
<p><div id="Quit" class="button">Exit Rubble</div></p>
</div>

{{if .Header}}{{if .Error}}<p>An error has occurred or Rubble has aborted, scroll to the end of the log for details.</p>{{else}}<p>Action completed without errors.</p>{{end}}{{end}}

<pre>{{.Log}}</pre>

<div id="Menu2">
<p><div id="Back" class="button">Back to Menu</div></p>
<p><div id="Quit" class="button">Exit Rubble</div></p>
</div>
</body>
</html>
`)
if err != nil {
return nil, err
}

_, err = rblutil.LoadOr(fs, tmpl, "kill", ".html", `
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/css"/>
<title>Rubble Web UI: Exit</title>
</head>
<body>
<h2>Thank you for using Rubble Web UI!</h2>
<p>The server has shutdown.
<p>Please post any suggestions or bugs to the Rubble thread on the forum!
</body>
</html>
`)
if err != nil {
return nil, err
}

_, err = rblutil.LoadOr(fs, tmpl, "doclist", ".html", `
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/css"/>
<title>Rubble Web UI: Documentation</title>

<script type="text/javascript">
window.onload = function() {
// Kill the back button as best I can. There may be a better way to do this, but I don't know it.
function killback(evnt) {
if (evnt.target.href != "" && evnt.target.href != "#") {
evnt.preventDefault()
evnt.stopPropagation()
window.location.replace(evnt.target.href)
}
}
var a = document.getElementsByTagName("a")
for (var i = 0; i < a.length; i++) {
a[i].addEventListener("click", killback, false)
}

function listener(evnt) {
evnt.stopPropagation()

window.location.replace("http://" + window.location.host + "/")
}

document.getElementById("Back").addEventListener("click", listener, false)
}
</script>
</head>
<body>
<p>Stuff everyone should read:</p>
<li><a href="/doc/Rubble Readme">Rubble Readme</a></li>
<li><a href="/doc/Rubble Changelog">Rubble Changelog</a></li>

<p><div class="hr"></div></p>

<p>Extras:</p>
<li><a href="/doc/Rubble History and Philosophy">Rubble History and Philosophy</a></li>

<p><div class="hr"></div></p>

<p>For modders:
<li><a href="/doc/Rubble Basics">Rubble Basics</a></li>
<li><a href="/doc/Rubble Base Templates">Rubble Base Templates</a></li>
<li><a href="/doc/Rubble Libs Templates">Rubble Libs Templates</a></li>

<p><div class="hr"></div></p>

<p>Miscellaneous tutorials:
<li><a href="/doc/Tutorials/Common standard library templates">Common standard library templates</a></li>
<li><a href="/doc/Tutorials/User templates">User templates</a></li>
<li><a href="/doc/Tutorials/Tileset addons">Tileset addons</a></li>

{{range .}}<p><div class="hr"></div></p><p>External Documentation:</p>
<li>{{.Header}}</li>{{else}}{{end}}

<p><div id="Back" class="button">Back to Menu</div></p>
</body>
</html>
`)
if err != nil {
return nil, err
}

_, err = rblutil.LoadOr(fs, tmpl, "docpage", ".html", `
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/css"/>
<title>Rubble Web UI: Documentation</title>

<script type="text/javascript">
window.onload = function() {
// Kill the back button as best I can. There may be a better way to do this, but I don't know it.
function killback(evnt) {
if (evnt.target.href != "" && evnt.target.href != "#") {
evnt.preventDefault()
evnt.stopPropagation()
window.location.replace(evnt.target.href)
}
}
var a = document.getElementsByTagName("a")
for (var i = 0; i < a.length; i++) {
a[i].addEventListener("click", killback, false)
}

function listener(evnt) {
evnt.stopPropagation()

var to = {
"Back": "/doclist",
"ToMenu": "/",
}[evnt.target.id]

if (to === undefined) {
return
}
window.location.replace("http://" + window.location.host + to)
}

var Menu1 = document.getElementById("Menu1")
Menu1.addEventListener("click", listener, false)

var Menu2 = document.getElementById("Menu2")
Menu2.addEventListener("click", listener, false)
}
</script>
</head>
<body>
<div id="Menu1">
<p><div id="Back" class="button">Back to Documentation</div></p>
<p><div id="ToMenu" class="button">To Main Menu</div></p>
</div>

{{.}}

<div id="Menu2">
<p><div id="Back" class="button">Back to Documentation</div></p>
<p><div id="ToMenu" class="button">To Main Menu</div></p>
</div>
</body>
</html>
`)
if err != nil {
return nil, err
}

_, err = rblutil.LoadOr(fs, tmpl, "addondata", ".html", `{{with .Addon}}
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/css"/>
<title>Rubble Web UI: Addon Information for "{{.Meta.Name}}"{{if ne .Meta.Version ""}} ({{.Meta.Version}}){{end}}</title>

<script type="text/javascript">
function Toggle(file) {
var el = document.getElementById("FILE:" + file)
if (el.style.display == "none") {
el.style.display = ""
} else {
el.style.display = "none"
}
}

window.onload = function() {
// Kill the back button as best I can. There may be a better way to do this, but I don't know it.
function killback(evnt) {
if (evnt.target.href !== undefined && evnt.target.href !== "" && evnt.target.href !== "#") {
evnt.preventDefault()
evnt.stopPropagation()
window.location.replace(evnt.target.href)
}
}
var a = document.getElementsByTagName("a")
for (var i = 0; i < a.length; i++) {
a[i].addEventListener("click", killback, false)

// Fix addon links
if (a[i].href.indexOf("/addondata?addon=") != -1) {
a[i].href = a[i].href + "&fromurl={{urlquery $.FromUrl}}&fromname={{urlquery $.FromName}}"
}
}

document.getElementById("More").addEventListener("click", function(evnt) {
evnt.stopPropagation()

data = document.getElementById("MoreData")
if (data.style.display == "none") {
data.style.display = "";
evnt.target.innerHTML = "Hide Details";
} else {
data.style.display = "none";
evnt.target.innerHTML = "Show Details";
}
}, false)

document.getElementById("Back").addEventListener("click", function(evnt) {
evnt.stopPropagation()

window.location.replace("http://" + window.location.host + {{$.FromUrl}})
}, false)
}
</script>
</head>
<body>
<h2>{{.Meta.Name}}{{if ne .Meta.Version ""}} ({{.Meta.Version}}){{end}}</h2>

{{if ne .Meta.Header ""}}<p>{{.Meta.Header}}</p>{{end}}

{{if ne .Meta.Description ""}}{{.Meta.Description}}{{end}}

<p><div id="More" class="button">Show Details</div></p>
<div id="MoreData" style="display:none;">
<h3>Extra Data</h3>

{{if ne .Meta.Author ""}}<p>Addon written by: {{.Meta.Author}}</p>{{end}}
{{if ne .Meta.Version ""}}<p>Version: {{.Meta.Version}}</p>{{end}}

<p>Addon Path: <code>"{{.Source}}"</code></p>

<p>Load Priority: <code>"{{.Meta.LoadPriority}}"</code></p>

<h4>Tags:</h4>{{range $n, $v := .Meta.Tags}}
<li><code>"{{$n}}" = {{$v}}</code>{{if eq $n "Library"}} (Is this addon is an automatically managed library?){{else if eq $n "DocPack"}} (You should never see this, addons with this tag are not really addons.){{else if eq $n "TileSet"}} (Does this addon contains tileset information?){{else if eq $n "SaveSafe"}} (Can this addon be applied to worlds in progress?){{else if eq $n "DFHack"}} (Does this addon requires DFHack to operate?){{else if eq $n "Dev"}} (Is this addon something that will only be interesting to addon developers?){{end}}</li>{{else}}
<li>This addon has no tags.</li>{{end}}

<h4>Dependencies (automatically activated):</h4>{{range .Meta.Activates}}
<li><a href="/addondata?addon={{.}}">{{.}}</a></li>{{else}}
<li>This addon has no dependencies.</li>{{end}}

<h4>Incompatibilities:</h4>{{range .Meta.Incompatible}}
<li><a href="/addondata?addon={{.}}">{{.}}</a></li>{{else}}
<li>This addon has no incompatibilities.</li>{{end}}

<h4>Variables (and their defaults):</h4>
<script language="JavaScript">
// This is me being lazy, I really should do this with templates like everything else...
var vars = {{.Meta.Vars}}

var ok = false
for (var i in vars) {
if (vars[i].Name == "-") {
continue
}

ok = true
if (vars[i].Values.length > 0) {
document.write("<li>" + vars[i].Name + " (<code>" + i + "</code>): <code>\"" + vars[i].Values[0] + "\"</code></a>")
} else {
document.write("<li>" + vars[i].Name + " (<code>" + i + "</code>): No Default Value Specified</a>")
}
}
if (!ok) {
document.write("<li>This addon has no variables.</li>")
}
</script>

<h4>Addon Files:</h4>
{{range .Files}}<li><a href="javascript:Toggle('{{.Name}}');">{{.Name}}</a><pre id="FILE:{{.Name}}" style="display:none;" class="border">{{printf "%s" .Content}}</pre></li>
{{else}}<li>This addon has no files (how is this even possible?).</li>{{end}}
</div>

<p><div id="Back" class="button">Back to {{$.FromName}}</div></p>
</body>
</html>
{{end}}`)
if err != nil {
return nil, err
}

// Master Addon List

_, err = rblutil.LoadOr(fs, tmpl, "addons", ".html", `
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/css"/>
<title>Rubble Web UI: Addon List</title>

<script type="text/javascript">
window.onload = function() {
// Kill the back button as best I can. There may be a better way to do this, but I don't know it.
function killback(evnt) {
if (evnt.target.href != "" && evnt.target.href != "#") {
evnt.preventDefault()
evnt.stopPropagation()
window.location.replace(evnt.target.href)
}
}
var a = document.getElementsByTagName("a")
for (var i = 0; i < a.length; i++) {
a[i].addEventListener("click", killback, false)
}

function listener(evnt) {
evnt.stopPropagation()

window.location.replace("http://" + window.location.host + "/")
}

document.getElementById("Back1").addEventListener("click", listener, false)
document.getElementById("Back2").addEventListener("click", listener, false)
}
</script>
</head>
<body>
<p><div id="Back1" class="button">Back to Menu</div></p>
<table id="Addons">
{{range .Addons}}{{if not .Meta.Tags.DocPack}}<tr><td><a href="/addondata?addon={{.Meta.Name}}">{{.Meta.Name}}</a></td><td>{{.Meta.Header}}</td></tr>
{{end}}{{end}}
</table>
<p><div id="Back2" class="button">Back to Menu</div></p>
</body>
</html>
`)
if err != nil {
return nil, err
}

// Normal Generation

_, err = rblutil.LoadOr(fs, tmpl, "genaddons", ".html", `
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/css"/>
<title>Rubble Web UI: Select Addons</title>
<script type="text/javascript">
function Toggle(addon, state) {
var req = new XMLHttpRequest()
req.open("POST", "/toggle", false)
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
req.send("addon=" + encodeURIComponent(addon) + "&state=" + encodeURIComponent(state))
}

var addontags = { {{range .Addons}}
"{{.Meta.Name}}": {{.Meta.Tags}},{{end}}
}

window.onload = function() {
// Kill the back button as best I can. There may be a better way to do this, but I don't know it.
function killback(evnt) {
if (evnt.target.href != "" && evnt.target.href != "#") {
evnt.preventDefault()
evnt.stopPropagation()
window.location.replace(evnt.target.href)
}
}
var a = document.getElementsByTagName("a")
for (var i = 0; i < a.length; i++) {
a[i].addEventListener("click", killback, false)

// Fix addon links
if (a[i].href.indexOf("/addondata?addon=") != -1) {
a[i].href = a[i].href + "&fromurl=%2fgenaddons&fromname=Generation"
}
}

document.getElementById("AddonList").addEventListener("click", function(evnt) {
evnt.stopPropagation()

if (evnt.target.name != "") {
Toggle(evnt.target.name, evnt.target.checked == true)
}
}, false)

document.getElementById("Select").addEventListener("click", function(evnt) {
evnt.stopPropagation()

var state
if (evnt.target.id == "All") {
state = true
} else if (evnt.target.id == "None") {
state = false
}
if (state === undefined) {
return
}

var addons = document.getElementById("AddonList").getElementsByTagName("input")
for (var i = 0; i < addons.length; i++) {
if (addons[i].style.display != "none") {
Toggle(addons[i].name, state)
addons[i].checked = state
}
}
}, false)

function ToggleTag(tag) {
var addons = document.getElementById("AddonList").getElementsByTagName("tr")
for (var i = 0; i < addons.length; i++) {
if (addontags[addons[i].id][tag] == true) {

if (addons[i].style.display == "none") {
addons[i].style.display = ""
} else {
addons[i].style.display = "none"
}

//if (addons[i].checked) {
// Toggle(addons[i].name, false)
// addons[i].checked = false
//}
}
}
}
ToggleTag("Dev")

document.getElementById("Hide/Show").addEventListener("click", function(evnt) {
evnt.stopPropagation()

if (evnt.target.innerHTML.indexOf("+") != -1) {
evnt.target.innerHTML = evnt.target.id + " -"
} else {
evnt.target.innerHTML = evnt.target.id + " +"
}

ToggleTag(evnt.target.id)
}, false)

document.getElementById("EditConfig").addEventListener("click", function(evnt) {
evnt.stopPropagation()

var to = {
"EditConfig": "/genvars",
"Generate": "/genvars?hidden=true",
}[evnt.target.id]

if (to === undefined) {
return
}
window.location.replace("http://" + window.location.host + to)
}, false)

document.getElementById("Back").addEventListener("click", function(evnt) {
evnt.stopPropagation()

window.location.replace("http://" + window.location.host + "/")
}, false)
}
</script>
</head>
<body>
<table id="AddonList">{{range .Addons}}{{if and (not .Meta.Tags.Library) (not .Meta.Tags.DocPack)}}
<tr id="{{.Meta.Name}}"><td nowrap>{{if .Active}}<input type="checkbox" checked name="{{.Meta.Name}}">{{else}}<input type="checkbox" name="{{.Meta.Name}}">{{end}}<a href="/addondata?addon={{.Meta.Name}}">{{.Meta.Name}}</a></td><td>{{.Meta.Header}}</td></tr>{{end}}{{end}}
</table>

<p><div id="Select" class="button">
Select
<div id="All" class="nose">All</div>
<div id="None" class="nose">None</div>
</div></p>
<p><div id="Hide/Show" class="button">
Hide/Show
<div id="DFHack" class="nose">DFHack -</div>
<div id="Dev" class="nose">Dev +</div>
</div></p>
<p><div id="EditConfig" class="button">
Edit configuration variables
<div id="Generate" class="nose">Skip</div>
</div></p>
<p><div id="Back" class="button">Back to Menu</div></p>
</body>
</html>
`)
if err != nil {
return nil, err
}

_, err = rblutil.LoadOr(fs, tmpl, "genvars", ".html", `
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/css"/>
<title>Rubble Web UI: Edit Configuration Variables</title>

<script type="text/javascript">
function Set(key, val) {
var req = new XMLHttpRequest()
req.open("POST", "/setvar", false)
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
req.send("key=" + encodeURIComponent(key) + "&val=" + encodeURIComponent(val))
}

window.onload = function() {
document.getElementById("VarList").addEventListener("change", function(evnt) {
evnt.stopPropagation()

if (evnt.target.name != "") {
Set(evnt.target.name, evnt.target.value)
}
}, false)

document.getElementById("Menu").addEventListener("click", function(evnt) {
evnt.stopPropagation()

var to = {
"Generate": "/pleasewait?to=/genrun",
"Back": "/",
}[evnt.target.id]

if (to === undefined) {
return
}
window.location.replace("http://" + window.location.host + to)
}, false)
}
</script>
</head>
<body>
<table id="VarList">
<script language="JavaScript">
var items = {{.Vars}}
var values = {{.Vals}}
var noitems = true

for (var i in items) {
if (items[i].Name == "-") {
continue
}

noitems = false

var name = i
if (items[i].Name != "") {
name = items[i].Name
}

document.write("<tr><td>" + name + "</td>")
document.write("<td>")
if (items[i].Values.length > 1) {
document.write("<select name=\"" + i + "\">")
for (var j in items[i].Values) {
if (items[i].Values[j] == values[i]) {
document.write("<option selected>" + items[i].Values[j])
} else {
document.write("<option>" + items[i].Values[j])
}
}
document.write("</select>")
} else {
document.write("<input type=\"text\" value=\"" + values[i] + "\" name=\"" + i + "\">")
}
document.write("</td></tr>")
}
if (noitems) {
document.write("<tr><td>No Variables listed in Meta Data.</td></tr>")
}
</script>
</table>

<div id="Menu">
<p><div id="Generate" class="button">Generate!</div></p>
<p><div id="Back" class="button">Back to Menu</div></p>
</div>
</body>
</html>
`)
if err != nil {
return nil, err
}

// Tilesets and Independent Apply

_, err = rblutil.LoadOr(fs, tmpl, "iaaddons", ".html", `{{with .State}}
<!DOCTYPE html>
<html><!-- This is also used for applying tilesets -->
<head>
<link rel="stylesheet" type="text/css" href="/css"/>
<title>Rubble Web UI: Select Addons</title>
<script type="text/javascript">
function Toggle(addon, state) {
var req = new XMLHttpRequest()
req.open("POST", "/toggle", false)
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
req.send("addon=" + encodeURIComponent(addon) + "&state=" + encodeURIComponent(state))
}

function Set(key, val) {
var req = new XMLHttpRequest()
req.open("POST", "/setvar", false)
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
req.send("key=" + encodeURIComponent(key) + "&val=" + encodeURIComponent(val))
}

window.onload = function() {
// Kill the back button as best I can. There may be a better way to do this, but I don't know it.
function killback(evnt) {
if (evnt.target.href != "" && evnt.target.href != "#") {
evnt.preventDefault()
evnt.stopPropagation()
window.location.replace(evnt.target.href)
}
}
var a = document.getElementsByTagName("a")
for (var i = 0; i < a.length; i++) {
a[i].addEventListener("click", killback, false)

// Fix addon links
if (a[i].href.indexOf("/addondata?addon=") != -1) {
a[i].href = a[i].href + "&fromurl=%2ftsetaddons&fromname=Tileset%20Application"
}
}

document.getElementById("Region").addEventListener("change", function(evnt) {
evnt.stopPropagation()

Set("_RUBBLE_IA_REGION_", evnt.target.value)
}, false)

document.getElementById("AddonList").addEventListener("click", function(evnt) {
evnt.stopPropagation()

if (evnt.target.name != "") {
Toggle(evnt.target.name, evnt.target.value)
}
}, false)

document.getElementById("Select").addEventListener("click", function(evnt) {
evnt.stopPropagation()

var state
if (evnt.target.id == "All") {
state = "true"
} else if (evnt.target.id == "None") {
state = "false"
}
if (state === undefined) {
return
}

var addons = document.getElementById("AddonList").getElementsByTagName("input")
for (var i = 0; i < addons.length; i++) {
Toggle(addons[i].name, state)
addons[i].value = state
addons[i].checked = state === "true"
}
}, false)

document.getElementById("Menu").addEventListener("click", function(evnt) {
evnt.stopPropagation()

var to = {
"Apply": "/pleasewait?to={{$.URL}}",
"Back": "/",
}[evnt.target.id]

if (to === undefined) {
return
}
window.location.replace("http://" + window.location.host + to)
}, false)
}
</script>
</head>
<body>
<p>Region: <select id="Region">
<option selected>raw</option>{{range $.Regions}}
<option>{{.}}</option>{{end}}
</select></p>

<table id="AddonList">{{range .Addons}}{{if and (and (not .Meta.Tags.Library) (not .Meta.Tags.DocPack)) (index .Meta.Tags $.Tag)}}
<tr><td nowrap>{{if .Active}}<input type="checkbox" value="true" checked name="{{.Meta.Name}}">{{else}}<input type="checkbox" value="false" name="{{.Meta.Name}}">{{end}}<a href="/addondata?addon={{.Meta.Name}}">{{.Meta.Name}}</a></td><td>{{.Meta.Header}}</td></tr>{{end}}{{end}}
</table>

<p><div id="Select" class="button">
Select
<div id="All" class="nose">All</div>
<div id="None" class="nose">None</div>
</div></p>
<div id="Menu">
<p><div id="Apply" class="button">Apply Selected</div></p>
<p><div id="Back" class="button">Back to Menu</div></p>
</div>
</body>
</html>
{{end}}`)
if err != nil {
return nil, err
}
return tmpl, nil
}

MOAR EDIT: The Build.md file needs to be updated to refer to the "rubble7" folder.

EVEN MOAR EDIT: When I try to generate with Base addon installed, it crashes with "Error: Invalid token: Found: TknINVALID (Lexeme: EOF). Expected: TknTagEnd Near: inorganic_other.txt|L:63|C:30". Line 63 is "{SHARED_INORGANIC;TIN_GLAZE;", and the file continues normally after that.
Sorry for all the bug reports, I really like rubble, and want to use it for some modding.
« Last Edit: December 07, 2015, 09:42:30 pm by palu »
Logged
Hmph, palu showing off that reading-the-instructions superpower.
The internet encourages thoughtful, intelligent discussion and if you disagree I hate you.

palu

  • Bay Watcher
    • View Profile
Re: Rubble 7.0.0 - DF 42.1 - Now with Lua!
« Reply #4 on: December 07, 2015, 09:43:16 pm »

...went over character limit:
They're missing some brackets:
inorganic_other:
Code: [Select]
[OBJECT:INORGANIC]

{SHARED_INORGANIC;PLASTER;
[USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]
[STATE_NAME_ADJ:ALL:gypsum plaster]
[DISPLAY_COLOR:7:7:1][TILE:'#']
[SOLID_DENSITY:2787]
[IS_STONE]
[HARDENS_WITH_WATER:INORGANIC:GYPSUM]
[MATERIAL_VALUE:3]
[NO_STONE_STOCKPILE]
}

{SHARED_INORGANIC;CERAMIC_EARTHENWARE;
[USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]
[STATE_NAME_ADJ:ALL:earthenware]
[DISPLAY_COLOR:6:0:0][TILE:'#']
[SOLID_DENSITY:1360]
[IS_STONE]
[IS_CERAMIC]
[MATERIAL_VALUE:3]
[ABSORPTION:10]
[BLOCK_NAME:brick:bricks]
[DISPLAY_UNGLAZED]
[NO_STONE_STOCKPILE]
}

{SHARED_INORGANIC;CERAMIC_STONEWARE;
[USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]
[STATE_NAME_ADJ:ALL:stoneware]
[DISPLAY_COLOR:7:0:0][TILE:'#']
[SOLID_DENSITY:2000]
[IS_STONE]
[IS_CERAMIC]
[MATERIAL_VALUE:4]
[BLOCK_NAME:brick:bricks]
[NO_STONE_STOCKPILE]
}

{SHARED_INORGANIC;CERAMIC_PORCELAIN;
[USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]
[STATE_NAME_ADJ:ALL:porcelain]
[DISPLAY_COLOR:7:0:1][TILE:'#']
[SOLID_DENSITY:2403]
[IS_STONE]
[IS_CERAMIC]
[MATERIAL_VALUE:10]
[BLOCK_NAME:brick:bricks]
[NO_STONE_STOCKPILE]
}

{SHARED_INORGANIC;ASH_GLAZE;
[USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]
[STATE_NAME:ALL:ash glaze]
[STATE_NAME_ADJ:ALL:ash glaze]
[DISPLAY_COLOR:3:0:0][TILE:'#']
[SOLID_DENSITY:2000]
[IS_STONE]
[MATERIAL_VALUE:5]
[NO_STONE_STOCKPILE]
}

{SHARED_INORGANIC;TIN_GLAZE;
[USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]
[STATE_NAME:ALL:tin glaze]
[STATE_NAME_ADJ:ALL:tin glaze]
[DISPLAY_COLOR:3:0:0][TILE:'#']
[SOLID_DENSITY:2000]
[IS_STONE]
[MATERIAL_VALUE:10]
[NO_STONE_STOCKPILE]
}

{SHARED_INORGANIC;QUICKLIME; calcium oxide from limestone
[USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]
[STATE_NAME:ALL:quicklime]
[STATE_NAME_ADJ:ALL:quicklime]
[DISPLAY_COLOR:7:7:1][TILE:'#']
[SOLID_DENSITY:*******]
[MATERIAL_VALUE:10]
}

{SHARED_INORGANIC;MILK_OF_LIME; limewater / hydrated calcium oxide
[STATE_COLOR:ALL_SOLID:WHITE]
[STATE_NAME:ALL:milk of lime]
[STATE_NAME_ADJ:ALL:milk of lime]
[DISPLAY_COLOR:7:7:1][TILE:'#']
[MATERIAL_VALUE:10]
[SPEC_HEAT:4181]
[IGNITE_POINT:NONE]
[MELTING_POINT:9950]
[BOILING_POINT:10200]
[HEATDAM_POINT:NONE]
[COLDDAM_POINT:NONE]
[MAT_FIXED_TEMP:NONE]
[SOLID_DENSITY:1200]
[LIQUID_DENSITY:1200]
[MOLAR_MASS:20000]
[IMPACT_YIELD:10000]
[IMPACT_FRACTURE:10000]
[IMPACT_STRAIN_AT_YIELD:100]
[COMPRESSIVE_YIELD:10000]
[COMPRESSIVE_FRACTURE:10000]
[COMPRESSIVE_STRAIN_AT_YIELD:100]
[TENSILE_YIELD:10000]
[TENSILE_FRACTURE:10000]
[TENSILE_STRAIN_AT_YIELD:100]
[TORSION_YIELD:10000]
[TORSION_FRACTURE:10000]
[TORSION_STRAIN_AT_YIELD:100]
[SHEAR_YIELD:6600] used high salinity ice
[SHEAR_FRACTURE:6600]
[SHEAR_STRAIN_AT_YIELD:100]
[BENDING_YIELD:10000]
[BENDING_FRACTURE:10000]
[BENDING_STRAIN_AT_YIELD:100]
[MAX_EDGE:500]
[ABSORPTION:100]
[LIQUID_MISC_OTHER]
}
reaction_other:
Code: [Select]
[OBJECT:REACTION]

{REACTION;TAN_A_HIDE;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_EVIL}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:tan a hide]
[BUILDING:TANNER:CUSTOM_T]
[REAGENT:A:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][UNROTTEN]
[HAS_MATERIAL_REACTION_PRODUCT:TAN_MAT]

In the product, if you want to use the reagent's material itself, use NONE instead of a reaction product class (TAN_MAT in this example).

[PRODUCT:100:1:SKIN_TANNED:NONE:GET_MATERIAL_FROM_REAGENT:A:TAN_MAT]
[SKILL:TANNER]
[AUTOMATIC]

{REACTION;RENDER_FAT;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_EVIL}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:render fat]
[BUILDING:KITCHEN:CUSTOM_R]
[REAGENT:A:150:GLOB:NONE:NONE:NONE][REACTION_CLASS:FAT][UNROTTEN]
[HAS_MATERIAL_REACTION_PRODUCT:RENDER_MAT]
[PRODUCT:100:1:GLOB:NONE:GET_MATERIAL_FROM_REAGENT:A:RENDER_MAT]
[SKILL:COOK]
[AUTOMATIC]

{REACTION;MAKE_SOAP_FROM_TALLOW;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:make soap from tallow]
[BUILDING:SOAP_MAKER:CUSTOM_T]
[REAGENT:lye:150:LIQUID_MISC:NONE:LYE]
[REAGENT:lye container:1:NONE:NONE:NONE:NONE]
[CONTAINS:lye]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[REAGENT:tallow:150:GLOB:NONE:NONE:NONE][REACTION_CLASS:TALLOW][UNROTTEN]
[HAS_MATERIAL_REACTION_PRODUCT:SOAP_MAT]
[PRODUCT:100:1:BAR:NONE:GET_MATERIAL_FROM_REAGENT:tallow:SOAP_MAT]
[PRODUCT_DIMENSION:150]
[SKILL:SOAP_MAKING]

{REACTION;MAKE_SOAP_FROM_OIL;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:make soap from oil]
[BUILDING:SOAP_MAKER:CUSTOM_O]
[REAGENT:lye:150:LIQUID_MISC:NONE:LYE]
[REAGENT:lye container:1:NONE:NONE:NONE:NONE]
[CONTAINS:lye]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[REAGENT:oil:150:LIQUID_MISC:NONE:NONE:NONE]
[UNROTTEN]
[HAS_MATERIAL_REACTION_PRODUCT:SOAP_MAT]
[REAGENT:oil container:1:NONE:NONE:NONE:NONE]
[CONTAINS:oil]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:1:BAR:NONE:GET_MATERIAL_FROM_REAGENT:oil:SOAP_MAT]
[PRODUCT_DIMENSION:150]
[SKILL:SOAP_MAKING]

{REACTION;MAKE_PEARLASH;ADDON_HOOK_MOUNTAIN}
[NAME:make pearlash]
[BUILDING:KILN:CUSTOM_P]
[REAGENT:A:150:BAR:NONE:POTASH:NONE]
[PRODUCT:100:1:BAR:NONE:PEARLASH:NONE][PRODUCT_DIMENSION:150]
[FUEL]
[SKILL:SMELT]

{REACTION;MAKE_PLASTER_POWDER;ADDON_HOOK_MOUNTAIN}
[NAME:make plaster powder]
[BUILDING:KILN:CUSTOM_SHIFT_P]
[REAGENT:A:1:BOULDER:NONE:NONE:NONE][REACTION_CLASS:GYPSUM]
[REAGENT:B:1:BOX:NONE:NONE:NONE][EMPTY][BAG][PRESERVE_REAGENT]
[PRODUCT:100:1:POWDER_MISC:NONE:INORGANIC:PLASTER][PRODUCT_DIMENSION:150][PRODUCT_TO_CONTAINER:B]
[FUEL]
[SKILL:SMELT]

{REACTION;MAKE_SHARP_ROCK;NULL}
[NAME:make sharp rock]
[ADVENTURE_MODE_ENABLED]
[REAGENT:tool stone:1:ROCK:NONE:NONE:NONE][NO_EDGE_ALLOWED]
[REAGENT:hammerstone:1:ROCK:NONE:NONE:NONE][PRESERVE_REAGENT][NO_EDGE_ALLOWED]
[PRODUCT:100:1:ROCK:NONE:GET_MATERIAL_FROM_REAGENT:tool stone:NONE][FORCE_EDGE]
[SKILL:KNAPPING]

{REACTION;MILL_SEEDS_NUTS_TO_PASTE;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:mill seeds/nuts to paste]
[BUILDING:QUERN:CUSTOM_S]
[BUILDING:MILLSTONE:CUSTOM_S]
[REAGENT:seeds:1:SEEDS:NONE:NONE:NONE][UNROTTEN]
[HAS_MATERIAL_REACTION_PRODUCT:PRESS_LIQUID_MAT] to ensure only worthwhile seeds get used
[PRODUCT:100:1:GLOB:NONE:GET_MATERIAL_FROM_REAGENT:seeds:NONE][PRODUCT_PASTE] makes the glob a "paste"
[SKILL:MILLING]

{REACTION;MAKE_CLAY_JUG;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:make clay jug]
[BUILDING:KILN:CUSTOM_J]
[REAGENT:clay:1:BOULDER:NONE:NONE:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:FIRED_MAT]
[PRODUCT:100:1:TOOL:ITEM_TOOL_JUG:GET_MATERIAL_FROM_REAGENT:clay:FIRED_MAT]
[FUEL]
[SKILL:POTTERY]

{REACTION;MAKE_CLAY_BRICKS;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:make clay bricks]
[BUILDING:KILN:CUSTOM_B]
[REAGENT:clay:1:BOULDER:NONE:NONE:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:FIRED_MAT]
[PRODUCT:100:1:BLOCKS:NONE:GET_MATERIAL_FROM_REAGENT:clay:FIRED_MAT]
[FUEL]
[SKILL:POTTERY]

{REACTION;MAKE_CLAY_STATUE;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:make clay statue]
[BUILDING:KILN:CUSTOM_S]
[REAGENT:clay:1:BOULDER:NONE:NONE:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:FIRED_MAT]
[PRODUCT:100:1:STATUE:NONE:GET_MATERIAL_FROM_REAGENT:clay:FIRED_MAT]
[FUEL]
[SKILL:POTTERY]

{REACTION;MAKE_LARGE_CLAY_POT;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:make large clay pot]
[BUILDING:KILN:CUSTOM_ALT_P]
[REAGENT:clay:1:BOULDER:NONE:NONE:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:FIRED_MAT]
[PRODUCT:100:1:TOOL:ITEM_TOOL_LARGE_POT:GET_MATERIAL_FROM_REAGENT:clay:FIRED_MAT]
[FUEL]
[SKILL:POTTERY]

{REACTION;MAKE_CLAY_CRAFTS;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:make clay crafts]
[BUILDING:KILN:CUSTOM_SHIFT_C]
[REAGENT:clay:1:BOULDER:NONE:NONE:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:FIRED_MAT]
[PRODUCT:100:1:CRAFTS:NONE:GET_MATERIAL_FROM_REAGENT:clay:FIRED_MAT]
[FUEL]
[SKILL:POTTERY]

{REACTION;GLAZE_JUG;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:glaze clay/stone jug]
[BUILDING:KILN:CUSTOM_G]
[REAGENT:glaze:1:ANY_RAW_MATERIAL:NONE:NONE:NONE] ANY_RAW_MATERIAL means powder/bars/boulders/globs
[HAS_MATERIAL_REACTION_PRODUCT:GLAZE_MAT]
[REAGENT:jug:1:TOOL:ITEM_TOOL_JUG:NONE:NONE]
[REACTION_CLASS:CAN_GLAZE]
[EMPTY]
[NOT_IMPROVED]
[PRESERVE_REAGENT]

Format for IMPROVEMENT below is <chance>:<reagent target>:<type of improvement>:<mat tokens>
Supported types are COVERED, GLAZED, BANDS, RINGS_HANGING and SPIKES.
GLAZED is a type of item improvement (similar to "covered with <mat>").

[IMPROVEMENT:100:jug:GLAZED:GET_MATERIAL_FROM_REAGENT:glaze:GLAZE_MAT]
[FUEL]
[SKILL:GLAZING]

{REACTION;GLAZE_STATUE;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:glaze clay/stone statue]
[BUILDING:KILN:CUSTOM_SHIFT_G]
[REAGENT:glaze:1:ANY_RAW_MATERIAL:NONE:NONE:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:GLAZE_MAT]
[REAGENT:statue:1:STATUE:NONE:NONE:NONE]
[REACTION_CLASS:CAN_GLAZE]
[EMPTY]
[NOT_IMPROVED]
[PRESERVE_REAGENT]
[IMPROVEMENT:100:statue:GLAZED:GET_MATERIAL_FROM_REAGENT:glaze:GLAZE_MAT]
[FUEL]
[SKILL:GLAZING]

{REACTION;GLAZE_LARGE_POT;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:glaze large clay/stone pot]
[BUILDING:KILN:CUSTOM_ALT_G]
[REAGENT:glaze:1:ANY_RAW_MATERIAL:NONE:NONE:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:GLAZE_MAT]
[REAGENT:large pot:1:TOOL:ITEM_TOOL_LARGE_POT:NONE:NONE]
[REACTION_CLASS:CAN_GLAZE]
[EMPTY]
[NOT_IMPROVED]
[PRESERVE_REAGENT]
[IMPROVEMENT:100:large pot:GLAZED:GET_MATERIAL_FROM_REAGENT:glaze:GLAZE_MAT]
[FUEL]
[SKILL:GLAZING]

{REACTION;GLAZE_CRAFT;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:glaze clay/stone craft]
[BUILDING:KILN:CUSTOM_ALT_C]
[REAGENT:glaze:1:ANY_RAW_MATERIAL:NONE:NONE:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:GLAZE_MAT]
[REAGENT:craft:1:ANY_CRAFT:NONE:NONE:NONE]
[REACTION_CLASS:CAN_GLAZE]
[EMPTY]
[NOT_IMPROVED]
[PRESERVE_REAGENT]
[IMPROVEMENT:100:craft:GLAZED:GET_MATERIAL_FROM_REAGENT:glaze:GLAZE_MAT]
[FUEL]
[SKILL:GLAZING]

{REACTION;PRESS_OIL;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:press liquid from paste]
[BUILDING:SCREW_PRESS:CUSTOM_P]
[REAGENT:paste:150:GLOB:NONE:NONE:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:PRESS_LIQUID_MAT]
[NOT_PRESSED]
[REAGENT:liquid container:1:TOOL:NONE:NONE:NONE]
[EMPTY]
[DOES_NOT_ABSORB]
[PRESERVE_REAGENT]
[HAS_TOOL_USE:LIQUID_CONTAINER]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:1:LIQUID_MISC:NONE:GET_MATERIAL_FROM_REAGENT:paste:PRESS_LIQUID_MAT][PRODUCT_TO_CONTAINER:liquid container]
[PRODUCT:100:1:GLOB:NONE:GET_MATERIAL_FROM_REAGENT:paste:NONE][PRODUCT_PRESSED]
[SKILL:PRESSING]

{REACTION;PRESS_OIL_FRUIT;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:press liquid from fruit]
[BUILDING:SCREW_PRESS:CUSTOM_F]
[REAGENT:plant:1:PLANT_GROWTH:NONE:NONE:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:PRESS_LIQUID_MAT]
[NOT_PRESSED]
[UNROTTEN]
[REAGENT:liquid container:1:TOOL:NONE:NONE:NONE]
[EMPTY]
[DOES_NOT_ABSORB]
[PRESERVE_REAGENT]
[HAS_TOOL_USE:LIQUID_CONTAINER]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:1:LIQUID_MISC:NONE:GET_MATERIAL_FROM_REAGENT:plant:PRESS_LIQUID_MAT][PRODUCT_TO_CONTAINER:liquid container]
[PRODUCT:100:1:GLOB:NONE:GET_MATERIAL_FROM_REAGENT:plant:NONE][PRODUCT_PRESSED]
[SKILL:PRESSING]

{REACTION;MAKE_CLAY_HIVE;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:make clay hive]
[BUILDING:KILN:CUSTOM_H]
[REAGENT:clay:1:BOULDER:NONE:NONE:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:FIRED_MAT]
[PRODUCT:100:1:TOOL:ITEM_TOOL_HIVE:GET_MATERIAL_FROM_REAGENT:clay:FIRED_MAT]
[FUEL]
[SKILL:POTTERY]

{REACTION;PRESS_HONEYCOMB;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:press honey from honeycomb]
[BUILDING:SCREW_PRESS:CUSTOM_H]
[REAGENT:honeycomb:1:TOOL:ITEM_TOOL_HONEYCOMB:NONE:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:HONEYCOMB_PRESS_MAT]
[NOT_PRESSED]
[REAGENT:liquid container:1:TOOL:NONE:NONE:NONE]
[EMPTY]
[DOES_NOT_ABSORB]
[PRESERVE_REAGENT]
[HAS_TOOL_USE:LIQUID_CONTAINER]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:1:LIQUID_MISC:NONE:GET_MATERIAL_FROM_REAGENT:honeycomb:HONEYCOMB_PRESS_MAT][PRODUCT_TO_CONTAINER:liquid container]
[PRODUCT:100:1:GLOB:NONE:GET_MATERIAL_FROM_REAGENT:honeycomb:NONE][PRODUCT_PRESSED]
[SKILL:PRESSING]

{REACTION;MAKE_WAX_CRAFTS;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:make wax crafts]
[BUILDING:CRAFTSMAN:CUSTOM_SHIFT_W]
[REAGENT:wax:150:GLOB:NONE:NONE:NONE]
[REACTION_CLASS:WAX]
[PRODUCT:100:1:CRAFTS:NONE:GET_MATERIAL_FROM_REAGENT:wax:NONE]
[SKILL:WAX_WORKING]

{REACTION;BREW_DRINK_FROM_PLANT;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:brew drink from plant]
[BUILDING:STILL:HOTKEY_STILL_BREW]
[REAGENT:plant:1:PLANT:NONE:NONE:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:DRINK_MAT]
[UNROTTEN]
[REAGENT:barrel/pot:1:NONE:NONE:NONE:NONE]
[EMPTY]
[FOOD_STORAGE_CONTAINER] barrel or any non-absorbing tool with FOOD_STORAGE
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:5:DRINK:NONE:GET_MATERIAL_FROM_REAGENT:plant:DRINK_MAT]
[PRODUCT_TO_CONTAINER:barrel/pot]
[PRODUCT_DIMENSION:150]
[PRODUCT:100:1:SEEDS:NONE:GET_MATERIAL_FROM_REAGENT:plant:SEED_MAT]
[SKILL:BREWING]

{REACTION;BREW_DRINK_FROM_PLANT_GROWTH;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:brew drink from fruit]
[BUILDING:STILL:CUSTOM_F]
[REAGENT:plant:1:PLANT_GROWTH:NONE:NONE:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:DRINK_MAT]
[UNROTTEN]
[REAGENT:barrel/pot:1:NONE:NONE:NONE:NONE]
[EMPTY]
[FOOD_STORAGE_CONTAINER] barrel or any non-absorbing tool with FOOD_STORAGE
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:5:DRINK:NONE:GET_MATERIAL_FROM_REAGENT:plant:DRINK_MAT]
[PRODUCT_TO_CONTAINER:barrel/pot]
[PRODUCT_DIMENSION:150]
[PRODUCT:100:1:SEEDS:NONE:GET_MATERIAL_FROM_REAGENT:plant:SEED_MAT]
[SKILL:BREWING]

{REACTION;MAKE_MEAD;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:make mead]
[BUILDING:STILL:CUSTOM_M]
[REAGENT:honey:150:LIQUID_MISC:NONE:CREATURE_MAT:HONEY_BEE:HONEY]
[UNROTTEN]
[REAGENT:honey container:1:NONE:NONE:NONE:NONE]
[CONTAINS:honey]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[REAGENT:barrel/pot:1:NONE:NONE:NONE:NONE]
[EMPTY]
[FOOD_STORAGE_CONTAINER] barrel or any non-absorbing tool with FOOD_STORAGE
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:5:DRINK:NONE:GET_MATERIAL_FROM_REAGENT:honey:DRINK_MAT]
[PRODUCT_TO_CONTAINER:barrel/pot]
[PRODUCT_DIMENSION:150]
[SKILL:BREWING]

{REACTION;PROCESS_PLANT_TO_BAG;ADDON_HOOK_MOUNTAIN}
[NAME:process plant to bag]
[BUILDING:FARMER:CUSTOM_B]
[REAGENT:plant:1:PLANT:NONE:NONE:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:BAG_ITEM]
[UNROTTEN]
[REAGENT:bag:1:BOX:NONE:NONE:NONE]
[EMPTY]
[BAG]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:5:GET_ITEM_DATA_FROM_REAGENT:plant:BAG_ITEM]
[PRODUCT_TO_CONTAINER:bag]
[PRODUCT:100:1:SEEDS:NONE:GET_MATERIAL_FROM_REAGENT:plant:SEED_MAT]
[SKILL:PROCESSPLANTS]

{REACTION;MAKE_QUICKLIME;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:make quicklime]
[BUILDING:KILN:CUSTOM_Q]
[REAGENT:A:1:BOULDER:NONE:NONE:NONE][REACTION_CLASS:CALCIUM_CARBONATE]
[REAGENT:B:1:BOX:NONE:NONE:NONE][EMPTY][BAG][PRESERVE_REAGENT]
[PRODUCT:100:1:POWDER_MISC:NONE:INORGANIC:QUICKLIME][PRODUCT_DIMENSION:150][PRODUCT_TO_CONTAINER:B]
[FUEL]
[SKILL:SMELT]

{REACTION;MAKE_MILK_OF_LIME;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:make milk of lime]
[BUILDING:ASHERY:CUSTOM_M]
[REAGENT:quicklime:150:POWDER_MISC:NONE:INORGANIC:QUICKLIME]
[REAGENT:quicklime container:1:NONE:NONE:NONE:NONE]
[CONTAINS:quicklime]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[REAGENT:bucket:1:BUCKET:NONE:NONE:NONE]
[EMPTY]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:1:LIQUID_MISC:NONE:INORGANIC:MILK_OF_LIME]
[PRODUCT_TO_CONTAINER:bucket]
[PRODUCT_DIMENSION:150]
[SKILL:LYE_MAKING] close enough for now!

{REACTION;MAKE_PARCHMENT;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:make parchment]
[BUILDING:TANNER:CUSTOM_P]
[REAGENT:A:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][UNROTTEN]
[HAS_MATERIAL_REACTION_PRODUCT:PARCHMENT_MAT]
[REAGENT:milk of lime:150:LIQUID_MISC:NONE:INORGANIC:MILK_OF_LIME]
[REAGENT:lime container:1:NONE:NONE:NONE:NONE]
[CONTAINS:milk of lime]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:1:SHEET:NONE:GET_MATERIAL_FROM_REAGENT:A:PARCHMENT_MAT]
[SKILL:TANNER] close enough for now!

{REACTION;MAKE_SCROLL;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:make scroll]
[BUILDING:CRAFTSMAN:NONE]
[REAGENT:sheet:10000:SHEET:NONE:NONE:NONE]
[REAGENT:scroll rollers:1:TOOL:ITEM_TOOL_SCROLL_ROLLERS:NONE:NONE]
[PRODUCT:100:1:TOOL:ITEM_TOOL_SCROLL:GET_MATERIAL_FROM_REAGENT:sheet:NONE]
[PRODUCT_TOKEN:scroll]
[IMPROVEMENT:100:scroll:SPECIFIC:ROLLERS:GET_MATERIAL_FROM_REAGENT:scroll rollers:NONE]
[SKILL:BOOKBINDING]

{REACTION;MAKE_QUIRE;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:make quire]
[BUILDING:CRAFTSMAN:NONE]
[REAGENT:sheet:10000:SHEET:NONE:NONE:NONE]
[PRODUCT:100:1:TOOL:ITEM_TOOL_QUIRE:GET_MATERIAL_FROM_REAGENT:sheet:NONE]
[SKILL:BOOKBINDING]

{REACTION;MAKE_SHEET_FROM_PLANT}
[NAME:make sheet from plant]
[BUILDING:FARMER:NONE]
[REAGENT:plant:1:PLANT:NONE:NONE:NONE]
[REACTION_CLASS:PAPER_PLANT]
[UNROTTEN]
[PRODUCT:100:1:SHEET:NONE:GET_MATERIAL_FROM_REAGENT:plant:NONE]
[PRODUCT_PRESSED]
[PRODUCT:100:1:SEEDS:NONE:GET_MATERIAL_FROM_REAGENT:plant:SEED_MAT]
[SKILL:PAPERMAKING]

{REACTION;MAKE_SLURRY_FROM_PLANT;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:mash plant into slurry]
[BUILDING:QUERN:NONE]
[BUILDING:MILLSTONE:NONE]
[REAGENT:plant:1:PLANT:NONE:NONE:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:PRESS_PAPER_MAT]
[UNROTTEN]
[PRODUCT:100:1:GLOB:NONE:GET_MATERIAL_FROM_REAGENT:plant:PRESS_PAPER_MAT]
[PRODUCT_PASTE]
[PRODUCT:100:1:SEEDS:NONE:GET_MATERIAL_FROM_REAGENT:plant:SEED_MAT]
[SKILL:PAPERMAKING]

{REACTION;PRESS_PLANT_PAPER;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:press plant slurry into paper sheet]
[BUILDING:SCREW_PRESS:NONE]
[REAGENT:paste:150:GLOB:NONE:NONE:NONE]
[REACTION_CLASS:PAPER_SLURRY]
[NOT_PRESSED]
[PRODUCT:100:1:SHEET:NONE:GET_MATERIAL_FROM_REAGENT:paste:NONE]
[PRODUCT_PRESSED]
[SKILL:PAPERMAKING]

{REACTION;BIND_BOOK;ADDON_HOOK_MOUNTAIN}{REACTION_ADD_CLASS;ADDON_HOOK_PLAINS}
[NAME:bind book]
[BUILDING:CRAFTSMAN:NONE]
[REAGENT:quire:1:TOOL:ITEM_TOOL_QUIRE:NONE:NONE]
[HAS_WRITING_IMPROVEMENT]
[CAN_USE_ARTIFACT]
[CAN_USE_LOCATION_RESERVED]
[REAGENT:binding:1:TOOL:ITEM_TOOL_BOOK_BINDING:NONE:NONE]
[REAGENT:thread:15000:THREAD:NONE:NONE:NONE]
[PRODUCT:100:1:BOOK:NONE:GET_MATERIAL_FROM_REAGENT:binding:NONE]
[PRODUCT_TOKEN:book]
[TRANSFER_ARTIFACT_STATUS]
[IMPROVEMENT:100:book:PAGES:GET_MATERIAL_FROM_REAGENT:quire:NONE]
note -- right now, the above will auto-pull any writing from the quire and place it in the pages improvement
[SKILL:BOOKBINDING]

Here's a complete base addon: http://dffd.bay12games.com/file.php?id=11416

EDIT: More questions: Is there any sort of debug logging in scripts?
« Last Edit: December 08, 2015, 03:39:41 pm by palu »
Logged
Hmph, palu showing off that reading-the-instructions superpower.
The internet encourages thoughtful, intelligent discussion and if you disagree I hate you.

Abadrausar

  • Bay Watcher
  • empowering ideas
    • View Profile
    • ♫♪♀HDFPS♂♪♫
Re: Rubble 7.0.0 - DF 42.1 - Now with Lua!
« Reply #5 on: December 09, 2015, 12:12:12 pm »

Nice preview of the new rubble-lua scripting ;)

But I am unable to use it, even using the base from Palu, tnx Palu.

I m having errors with dev_so_insert.pre.lua and Nonexistent template: "!RESEARCH"

Hoping for some of your rubble love  :o :P ...

With these minor bugs.

Impresive work!


« Last Edit: December 09, 2015, 01:22:08 pm by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::

palu

  • Bay Watcher
    • View Profile
Re: Rubble 7.0.0 - DF 42.1 - Now with Lua!
« Reply #6 on: December 09, 2015, 09:16:13 pm »

SHARDE_OBJECT_KILL_TAG is broken; it exits with:
Code: [Select]
Error: SHARED_OBJECT_KILL_TAG: aaa_sobject_libs_base.pre.lua:44: bad argument #0 to format (table expected, got nil)
stack traceback:
[G]: in format
aaa_sobject_libs_base.pre.lua:44: in sharedobject_walk
unknown:3: in function 'main chunk'
[G]: ?
Logged
Hmph, palu showing off that reading-the-instructions superpower.
The internet encourages thoughtful, intelligent discussion and if you disagree I hate you.

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 7.0.0 - DF 42.1 - Now with Lua!
« Reply #7 on: December 10, 2015, 02:01:39 pm »

Whoa! I thought I tested all that!

Coming soon, Rubble 7.0.1 courtesy of palu. Thanks for finding all that stuff palu!

@Abadrausar:
The new version of the "Dev/SO Insert" addon has not been tested (I planed to test it, then forgot. It will work next version).

Missing "!RESEARCH" templates are caused by a removed library addon (one of those that is gone for good), I must have missed one or two (or six, or seven) when I removed the calls. For a quick fix just delete any calls to that template (and any related templates that are also missing). Next version will have that fixed.

What are you trying to use "Dev/SO Insert" for anyway? That addon is strictly for things like automated tileset porting and initial porting of non-Rubble mods, the web UI hides it by default for a reason. If you are porting mods and tilesets then please post them for others to use, Rubble needs more third party content.

@palu:
Answering your questions:

The "Activates" key is exactly what you need. (BTW: Saving and loading addon presets was a planned feature for the new web UI that didn't quite make it, maybe later...)

Debug logging in scripts:
It depends on what you mean, if you want to write stuff to the log you can use "rubble.print" or the standard "print", but the default scripts will not print any debug info normally. Generally when I need debug info I add it where and when I need it, then remove it when finished. Rubble does log what file it is currently processing, and it makes a good effort to attach a location to error messages, but there are no extra debug messages to enable. If I go though the effort of making a script print actual readable info I just let it print that info all the time :)



I have been spending my time lately writing my own Lua 5.3 VM, so far it is going surprisingly easy. I decided to skip writing a lexer and compiler for now and just use the output from the reference implementation of "luac", but before I can use my VM in Rubble I will need a proper compiler of my own.

Why write a custom VM? To put it simply I got tired of working around other people's buggy code, I would rather work with a library I fully understand so that I can fix/extend it as needed. Also the Lua VM I am using seems to no longer be under active development, which means that bug reports get ignored.

I like writing scripting languages, and writing a Lua VM is my idea of fun... Does that make me odd? :P

I think I should be able to get performance comparable to the VM I use now, at least after I do some manual inlining of certain parts of the code...
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

palu

  • Bay Watcher
    • View Profile
Re: Rubble 7.0.0 - DF 42.1 - Now with Lua!
« Reply #8 on: December 11, 2015, 08:48:36 pm »

Actually, none of the shared object stuff seems to work for me.
Logged
Hmph, palu showing off that reading-the-instructions superpower.
The internet encourages thoughtful, intelligent discussion and if you disagree I hate you.

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 7.1.0 - DF 42.2 - Now with Lua!
« Reply #9 on: December 12, 2015, 12:37:50 pm »

OK, 7.1.0 is now up!

This version fixes tons of bugs, mostly stupid stuff that I missed due to far to little testing.

Actually, none of the shared object stuff seems to work for me.

Well, I tested it and it should work now... Anything that used the raw parser (SHARED_OBJECT_KILL_TAG and SHARED_OBJECT_REPLACE_TAG) was broken, but the other stuff should have worked.

A bunch of the addons had minor issues (but not minor enough to allow them to work), and there were some fairly major bugs in the Rubble engine. See the changelog (second post) for the full roll of shame.
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 7.1.1 - DF 42.2 - Now with Lua!
« Reply #10 on: December 17, 2015, 02:30:12 pm »

7.1.1 is up!

This version fixes some possible ordering issues with SHARED_OBJECT (now named !SHARED_OBJECT). All old code should still work, but it is highly recommended for any modders to check the change log and update your addons to use the new templates instead of the depreciated ones.
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 7.1.2 - DF 42.3 - Now with Lua!
« Reply #11 on: December 18, 2015, 02:35:58 pm »

7.1.2 is now up!

This version is nothing but an update for the "Base" addon to fit the 42.3 changes, so I won't bother to change the changelog post (if you want to see the exact changes look at the changelog that is in the download).
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 7.1.2 - DF 42.3 - Now with Lua!
« Reply #12 on: December 30, 2015, 06:24:24 pm »

I am making progress on my custom Lua VM. It's terribly unstable, and some of the instructions don't work at all, but it is getting there. The good news is that, provided things keep going well, Rubble's Lua VM will be mostly 5.3 compatible (rather than mostly 5.1 compatible) at some point in the future. I intend to make no changes to the Rubble Lua API when I do update, so the only required script changes will be minor (for example changing `module(name) ...` to `_ENV = mkmodule(name) ... return _ENV`).

Anyway, an official 42.4 base is coming soon!
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

Spacebat

  • Bay Watcher
    • View Profile
Re: Rubble 7.1.2 - DF 42.3 - Now with Lua!
« Reply #13 on: January 02, 2016, 03:15:03 pm »

Is there a simple way to update the base raws?
Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Rubble 7.1.2 - DF 42.3 - Now with Lua!
« Reply #14 on: January 04, 2016, 12:17:14 pm »

Oh it's simple, but time consuming (figure a hour or so for a major update like 42.4). I use a visual diff program and simply ignore differences caused by templates.

Anyway 7.2.0 is now up, fixing some obscure bugs and including an updated base.

I also added some basic sanity/syntax checking for the output. Currently it can report bugs that are not bugs, but once I get more syntax rules written this "issue" should go away. This feature has already proven it's worth by finding several bugs in both Rubble standard addons and First Landing.

In custom Lua VM news: I have 50 bazillion off by one errors to find and fix, and it seems something is trashing the Lua stack, but I still have high hopes that it will be ready soon...
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS
Pages: [1] 2 3 ... 14