Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - BradUffner

Pages: 1 2 [3] 4 5 ... 25
31
Fully corrected script would look like this:
Code: [Select]
using RawExplorer;

public class Script : ScriptBase
{
    public override void runGlobalScript(RawLibrary library)
    {
        foreach (RawObject obj in library.getAllObjects())
        {
if (obj.objectType == Common.ObjectType.CREATURE)
{
obj.removeToken("PET");
obj.removeToken("PET_EXOTIC");
obj.removeToken("TRAINABLE");
obj.removeToken("TRAINABLE_WAR");
obj.removeToken("TRAINABLE_HUNTING");

obj.addToken("PET", "");
obj.addToken("TRAINABLE", "");
}
        }
    }
}

32
I have got just one small question. I am trying to wrap my mind around the scripts. I try to make every single creature in the game tameable and trainable. I made a small script that does not work, but i cant figure out why
Code: [Select]
using RawExplorer;

public class Script : ScriptBase
{
    public override void runGlobalScript(RawLibrary library)
    {
        foreach (RawObject obj in library.getAllObjects())
        {
            obj.removeToken("PET");
            obj.removeToken("PET_EXOTIC");
            obj.removeToken("TRAINABLE");
            obj.removeToken("TRAINABLE_WAR");
            obj.removeToken("TRAINABLE_HUNTING");

            obj.addToken("PET");
            obj.addToken("TRAINABLE");
        }
    }
}
In theory it should first wipe all trainable and pet availabilities, then add them again. what am i doing wrong here?

You need to add the 2nd argument for .addToken so that it looks like this:
obj.addToken("TRAINABLE", "");
You should also check the object type to make sure it's a creature or else your script will add the tokens to entities, buildings, etc.

I'll try to add some better error reporting to the script runner so that it actually shows the error instead of just "script failed".  I'm still not really happy with the way scripting works. it's way too complicated at the moment.  It's something I want to work on when I have more time.

33
Sorry about the delay in answering questions, I've been out of town for the holidays.
I'm going to start taking a look at these bug reports and try to get some fixes out.

34
This is a really newby question. I just installed this, and it starts up fine, but i don't know how to start using it, im thinking i need to use he "import raws" tool, but i don't know how to use it correctly.

You are correct!  Start the program, and choose the option to import raws.  Then just browse to, and select, the "raw" directory from your Dwarf Fortress installation.

35
I've fixed the bug in the Inorganic Analyzer that was stopping it from following the USE_MATERIAL_TEMPLATE tag.  I've also corrected the spelling of that tool and it's menu (sigh).  Expect it in the next version.

I love the idea to display inherited tokens in gray in the object editor grid.  I'll see what I can do about making that happen!  I don't know about optimizing the token output by default though.  Would a check box on exporting to apply optimizations work for you instead, similar to the one for sorting by name?

36
DF General Discussion / Re: Future of the Fortress
« on: November 27, 2012, 06:04:50 pm »
Well hey, if there's 200 masterwork beds in the room, it MUST be a great place to stay!
"And over there to the left is the Dwarven Orgy Hall."

37
That's a fair request, but the DevExpress library is the only thing I've found with a grid control flexible enough to do what I wanted with the UI.  It handles all the grouping, nesting, and hosting of the custom editors within the grid.  Moving away from DevExpress would require either reimplementiing all the feature that the devexpress grids provide, which is a HUGE amount of work, or completely changing the UI of RawExplorer.  I'm not really looking forward to either of those options, but I am aware that reliance on such an expensive library would be a big stumbling block to continuing the life of Raw Explorer if I ever leave the project.

I've actually been working on splitting out the back end token and raw parsing code in to a separate library that would be available for anyone to use in other projects.  When I get around to finishing that there should be no problems making the source code for that library available under an Open Source license.

38
This is a fantastic start!  How far do you plan on taking this?

Are you willing to share the code?  I have some ideas and I'd like to see the internal architecture of the application so I can perhaps propose some changes.

I can't find my original post I made a long, long time ago, so I'll try to give you a basic idea of where I was going.  My idea was based around a modding tool with version that would track the changes you made and had undo.  When you got your mod to a place you liked it you could publish it which would at least produce a set of packaged raw files with a change log.  However it would also be able to produce a simple plant/mineral/animal guide.

I've been editing and re-editing this email for at least 45 minutes now...*sigh*.  Might as well mention a couple of those ideas now that I've had a while to think about it :)

I was wonder about the option of a spreadsheet type view where, for example, each row of a datagridview is an object and each column is an attribute of the object.  Then add some filtering options.  For example, if one wanted to work on trees only, then they could bring up PLANTs in the grid view and filter down to only those have the TREE token.

Another thing I think would be handy is some sort of referential integrity.  For example, if you changed the USE_MATERIAL_TEMPLATE on the Acacia tree to say "ACACIA" the Raw Explorer doesn't automatically re-point the BASIC_MAT to ACACIA, it's still "STRUCTURE".

Oh my it's quite late.  I better stop now.

I don't really have any clear goals in mind for a place to stop, but I know that Raw Explorer isn't even close to being feature complete.  I have plans for an entire plugin system that hasn't even been started yet.  That system would allow anyone with .NET programming experience to write plugins for all the features you described and more!

I don't really have a problem releasing source code, but there are some things to keep in mind.  It makes HEAVY use of the WinForms control library from www.devexpress.com, which costs about $800 for a license.  No one would be able to compile the application from source without having a valid license.  That's a pretty big hurdle for most hobbiest programmers.

Your idea about recording changes is very similar to a feature I've been planning actually.  Raw Explorer would record the steps you take with the ability to export those steps to a "diff file" that would allow anyone to play back those changes to a different set of raws.  In effect allowing users to merge multiple mods together or apply mod changes to the base raws when a new version is released by Toady.  Using it to generate a change log and other assorted user fields would be a fairly easy thing to add to that feature.

There is already a basic spreadsheet view similar to what you describe for materials until the tools menu.  It's read only at the moment, but could be modified to allow changes to be bushed back to the library.

It would be great to hear any other ideas you have or that you come up with later.  Like I've said in previous posts, I don't do any modding myself, so it's really hard for me to guess what type of tools would make things easier on you guys.  Feedback and suggestions directly help to drive the features that Raw Explorer will get.

39
DF General Discussion / Re: Future of the Fortress
« on: November 22, 2012, 02:35:51 am »
Whenever fire and walls is done, it should never be easy to burn down an entire elf grove simply by starting a campfire next to a named tree. That would be lame. Unless maybe the forest's been in drought and everything is tinder dry.

I'd expect some sort of Elfy / Nature magic thing to protect the Elf cities from standard (non-magic) fire.

40
I've released Beta 11.  This version doesn't have any new features, but it fixes various bugs that have been reported.  I don't remember all the details about what was changed because I've gotten myself distracted by writing an MMO inspired by the early Ultima Series games.  It's also heavily influenced by games like Dwarf Fortress, Morrowind, and Ultima Online.

41
DF General Discussion / Re: Future of the Fortress
« on: November 16, 2012, 02:06:14 am »
I wonder if this is the version where we get worldgen options to change the temperature gradients. I've always wanted to be able to have uniformly-freezing glacier worlds or pseudo-whole-globe-maps with both tropics and poles.

Or even strange worlds with freezing centers and hot edges. Not that I'm passive-agressively migrating suggestions into FotF or anything.

Its actualy in. You go to advanced worlgen. the you hit "e" to customize and then you hit "p". In that window you can paint your map.

oooo.... my.... god....  This is like when I first learned about mass designations for dumping after I had been playing for months.

42
DF General Discussion / Re: Future of the Fortress
« on: November 13, 2012, 11:22:14 am »
an adventurer being held in a bar? Could be worse, as far as demonic punishments go.

He forgot to mention that it's a Milk Bar.

43
DF General Discussion / Re: Future of the Fortress
« on: November 13, 2012, 03:21:20 am »
Are there any plans to include water as a factor in fortress survival in a bigger way? Water availability was one of the biggest limiting factors in real human settlement and, despite their preference for booze, I would imagine it would be the same for less established (i.e. not yet able to tap into bore water) dwarven sites. Currently, barring hospitals, there's no real survival problem with settling in the middle of a desert, when it should be a massive challenge.

Perhaps dwarves could get dehydrated at a slow rate, forcing them to take a drink every now and then?
This would also make building a sewer system somewhat useful rather than just a fun little puzzle as it is now.

I remember Toady mentioning in the past that he thought that the ability to create booze without using water was a bit unrealistic.  Hopefully that means it's on his radar at some point to have booze production require access to water.

44
DF General Discussion / Re: Future of the Fortress
« on: November 11, 2012, 07:33:44 pm »
I would prefer expanded adventurer skills got their very own release cycle, or several.

I can't wait for the day when I can chop down trees and build my own cabin with farm plot out in the woods in adventure mode.

45
DF General Discussion / Re: Future of the Fortress
« on: November 03, 2012, 02:13:54 am »

 certain types of weapons being ungodly overkill for what they should be?

We're talking about whips, right? And scourges?
...and Fluffy Wumblers.

Pages: 1 2 [3] 4 5 ... 25